efax-gtk-3.2.8/0000755000175000001440000000000011544574522010240 500000000000000efax-gtk-3.2.8/ChangeLog0000644000175000001440000016565711544574454011762 00000000000000Version 3.2.8 (30th March 2011) ------------- Permit IPv6 addresses in domain name form as well as in numeric format (socket_server.h and socket_server.cpp). Improve error checking and so suppress gcc-4.6 warning (mainwindow.cpp; utils/mono_tiff_print_manager.cpp). Upgrade internal c++-gtk-utils version. Version 3.2.7.1 (16th March 2011) --------------- Correct style change handling (mainwindow.h, mainwindow.cpp). Update comments in efax-gtkrc on "SOCK_OTHER_ADDRESSES:" for IPv6 (efax-gtkrc). Version 3.2.7 (14th March 2011) ------------- Change default gtk target to gtk+3, and permit --with-gtk-version=gtk2 and --with=gtk-version=gtk3 as well as --with-gtk-version=gtk+2 and --with=gtk-version=gtk+3 (acinclude.m4, README). Provide option for server to accept IPv6 connections (efax-gtkrc; prog_defs.h, main.cpp, mainwindow.cpp, settings.h, settings.cpp, settings_help.h, settings_help.cpp, socket_server.h and socket_server.cpp). Use GtkStyleContext for a GTK+3 compile (acinclude.m4; addressbook.cpp, dialogs.h, dialogs.cpp, fax_list.cpp, fax_list-manager.cpp, helpfile.cpp, logger.cpp, main.cpp, mainwindow.h and mainwindow.cpp). Correct non-sh-ism in configuration files (acinclude.m4). Include efax-gtk.png icon in rpm spec file (efax-gtk.spec.in). Minor adjustments to MonoTiffPrintManager implementation (utils/mono_tiff_print_manager.h and utils/mono_tiff_print_manager.cpp). Provide some explicit casts for std::pair constructor required by C++0x (dialogs.cpp, fax_list.cpp, file_list.cpp, socket_list.cpp). Provide compile option for c++-gtk-utils-2.0 (acinclude.m4, README; efax_controller.cpp, fax_list.cpp, gpl.h, logger.cpp, socket_server.h and socket_server.cpp). Surpress warning about std::auto_ptr being deprecated when compiling under C++0x (acinclude.m4). Upgrade internal c++-gtk-utils version to 1.2.12 (and also adjust the configuration files for that (acinclude.m4, configure.ac; src/internal/c++-gtk-utils/Makefile.am)). Version 3.2.6 (13th November 2010) ------------- Do not require dbus-glib where glib >= 2.26 is installed (acinclude.4, configure.ac, src/Makefile.am, src/internal/c++-gtk-utils/Makefile.am with upgraded c++-gtk-utils). Fixes for gtk+-2.91 (acinclude.m4, addressbook.cpp, dialogs.cpp, fax_list.cpp, fax_list_manager.cpp, helpfile.cpp, logger.cpp, main.cpp, mainwindow.h, mainwindow.cpp, settings.cpp and socket_notify.cpp). Improve widget sizing for widgets displaying text (efax_controller.h, mainwindow.h and mainwindow.cpp). Fix compilation error with gtk+-2.12 (mainwindow.cpp). Remove anachronistic comment (utils/mono_tiff_print_manager.cpp). Upgrade internal c++-gtk-utils version to 1.2.7. Version 3.2.5 (13th October 2010) ------------- Fix segfault when printing faxes with cairo-1.10 (utils/mono_tiff_print_manager.h and utils/mono_tiff_print_manager.cpp). Use cairo rather than the GDK drawing functions to draw the indicator of whether there are print jobs from the socket to be faxed (mainwindow.h, mainwindow.cpp and utils/cairo_handle.h). Use gtk_tree_view_convert_bin_window_to_widget_coords() instead of gtk_widget_get_pointer() in order to obtain the pointer position in widget co-ordinates for tree view motion notify events (fax_list_manager.cpp). Modify argument handling for efax message functions to avoid an invalid double call to vfprintf() on the same va_list value (this bug is triggered on some systems when using the 'fax' script but does not directly affect efax-gtk) (efax/efaxmsg.c, efax/PATCHES). Upgrade internal c++-gtk-utils version to 1.2.6. Version 3.2.4 (2nd August 2010) ------------- Fix uncaught exception where a file to be faxed is not in valid postscript/PDF format (efax_controller.cpp). Include the former gnome stock_send-fax icon as the standard icon for efax-gtk (Makefile.am, efax-gtk.desktop, efax-gtk.png, AUTHORS; main.cpp). Use XkbBell() rather than XBell() where available (acinclude.m4, main.cpp). Include pkg-config test for x11.pc, if available (acinclude.m4 and src/Makefile.am). Further build fixes for Debian Hurd (src/efax_controller.cpp and src/fax_list.cpp; efax/efaxmsg.c). Update Hungarian translation (László Csordás) (hu.po and mainwindow.cpp). Remove redundant anonymous namespace for callbacks with C linkage (addressbook.h, addressbook.cpp, dialogs.h, dialogs.cpp, fax_list.h, fax_list.cpp, fax_list_manager.h, fax_list_manager.cpp, file_list.h, file_list.cpp, helpfile.h, helpfile.cpp, logger.h, logger.cpp, mainwindow.h, mainwindow.cpp, redial_queue.h, redial_queue.cpp, settings.h, settings.cpp, settings_help.h, settings_help.cpp, socket_list.h, socket_list.cpp, socket_notify.h, socket_notify.cpp, tray_icon.h, tray_icon.cpp, utils/mono_tiff_print_manager.h, utils/mono_tiff_print_manager.cpp, utils/selected_rows_handle.h, utils/selected_rows_handle.cpp). Correct linkage specification of present_prog() (main.cpp). Use Cgu::start_timeout_seconds() rather than Cgu::start_timeout() where available (fax_list_manager.cpp, logger.cpp). Remove redundant comments (prog_defs.h, utils/toolbar_append_widget.cpp). Upgrade internal c++-gtk-utils version to 1.2.4. Version 3.2.3 (4th June 2010) ------------- Provide compilation option for GTK+3 as well as GTK+2 (configure.ac, acinclude.m4 and README; addressbook.cpp, dialogs.cpp, fax_list.cpp, fax_list_manager.cpp, file_list.cpp, helpfile.cpp, logger.cpp, mainwindow.cpp, redial_queue.cpp, settings.cpp, settings_help.cpp, socket_list.cpp and socket_notify.cpp). Make program configuration check for _POSIX_CLOCK_SELECTION as well as _POSIX_MONOTONIC_CLOCK when checking the availability of monotonic clocks for condition variables (corrects BSD builds) (acinclude.m4). Ensure PIPE_BUF is defined in mainwindow.cpp (corrects Hurd build). Upgrade internal c++-gtk-utils version to 1.2.3. Version 3.2.2 (7th May 2010) ------------- Update internal copy of c++-gtk-utils to version 1.2.2 and fix compilation error with gcc-4.5.0. Provide an automatic redial option where the modem is in use or the recipient of a fax is busy (efax-gtkrc; efax_controller.h, efax_controller.cpp, helpfile.h, helpfile.cpp, main.cpp, mainwindow.h, mainwindow.cpp, prog_defs.h, settings.h, settings.cpp, settings_help.h, settings_help.cpp, tray_icon.h and tray_icon.cpp; new files redial_queue.h, redial_queue_icons.h and redial_queue.cpp). Get GUI to deal with a corner case where sending a fax from the socket server to an empty number (open connection) is cancelled (mainwindow.h, mainwindow.cpp, socket_notify.h and socket_notify.cpp). Provide an error dialog if, on program start-up, a connection to the dbus session message bus cannot be established (main.cpp). Use Cgu::start_timeout_seconds() instead of Cgu::start_timeout() where glib supports it, and so bump c++-gtk-utils requirement to version 1.2.1 (acinclude.m4, mainwindow.cpp) Version 3.2.1 (9th April 2010) ------------- Fix compilation error where GTK+ version 2.12 or 2.14 is installed (tray_icon.cpp). Make a double click on a fax to send in the socket list cause the fax to be viewed (fax_list_manager.h, fax_list_manager.cpp, socket_list.h and socket_list.cpp). Update c++-gtk-utils version. Update Catalan translation (Jordi Salomo). Update documentation to refer to PDF format files (README, helpfile.cpp). Omit unnecessary conditional inclusion of c++-gtk-utils headers (addressbook.h, addressbook.cpp, dialogs.h, dialogs.cpp, efax_controller.h, efax_controller.cpp, fax_list.h, fax_list.cpp, fax_list_manager.h, fax_list_manager.cpp, file_list.h, file_list.cpp, helpfile.h, logger.h, logger.cpp, main.cpp, mainwindow.h, mainwindow.cpp, prog_defs.h, settings.h, settings_help.h, socket_list.h, socket_list.cpp, socket_notify.h, socket_server.h, socket_server.cpp, tray_icon.h, utils/cairo_handle.h, utils/icon_info_handle.h, utils/mono_tiff_print_manager,h, utils/mono_tiff_print_manager.cpp, utils/pango_layout_iter_handle.h, utils/tiff_handle.h, utils/tree_path_handle.h, utils/tree_row_reference_handle.h and utils/utf8_utils.cpp). Version 3.2.0 (10th March 2010) ------------- Make a double click on a fax in a fax list cause the fax to be viewed (fax_list.cpp, fax_list_manager.h and fax_list_manager.cpp). Enforce single strip tiff images from ghostscript for efix (efax_controller.cpp). Incorporate c++-gtk-utils library, including providing new Emitter/EmitterArg and SafeEmitter/SafeEmitterArg classes for thread-safe signalling, and a Callback::post() function which provides for thread-safe disconnection of a callback if the object whose method it encapsulates has been destroyed (src/internal/c++-gtk-utils, src/utils); drop dependency on libsigc++. Replace deprecated GtkTooltips interface with GtkTooltip interface (addressbook.cpp, fax_list.cpp, file_list.cpp, settings.cpp, socket_list.cpp, tray_icon.h, tray_icon.cpp, utils/toolbar_append_widget.h and utils/toolbar_append_widget.cpp). Substitute GtkStatusIcon for EggTrayIcon (mainwindow.h, mainwindow.cpp, tray_icon.h, tray_icon.cpp, libegg/eggtrayicon.h and libegg/eggtrayicon.cpp). Reimplement PromptDialog class using GtkDialog, and tidy up InfoDialog class (dialogs.h and dialogs.cpp). Reimplement about dialogs with GtkAboutDialog (dialogs.h, dialogs.cpp and mainwindow.cpp). Refactor the code so that a continous timer event is not required (efax_controller.h, efax_controller.cpp, mainwindow.h and mainwindow.cpp). Remove code for a case where std::stringstream is not present. No longer include all of namespace std with a using declaration (src/prog_defs.h). Do not include partial gtk+/gobject/glib headers (adopt '#include ' etc). Version 3.0.20 (20th August 2009) -------------- Fix regression in 3.0.19 which causes incorrect fault handling if efax-gtk is given an invalid postscript file (efax_controller.h and efax_controller.cpp). Provide new Emitter/EmitterArg and SafeEmitter/SafeEmitterArg classes for thread-safe signalling (utils/emitter.h, utils/callback.h and utils/mutex.h). Provide a Callback::post() function which provides for thread-safe disconnection of a callback if the object whose method it encapsulates has been destroyed (utils/callback.h and utils/callback.cpp). Version 3.0.19 (28th July 2009) -------------- If the gtk+ version is >= 2.8.0 and X11 is the backend, use gdk X11 functions to move the program window to the current workspace if the user tries to start another instance (mainwindow.cpp). Include gtk/gtk.h, gdk/gdk.h and glib.h instead of individual gtk+/glib header files. Correct failure to print or view logfile if the logfile user setting does not have an absolute path name (logger.cpp) (and if no absolute path name is specified, store the file in $HOME or the working sub-directory of $HOME - mainwindow.h and mainwindow.cpp). Allow choice of priorities in Callback::post() function. Provide Callback::Functor class wrapping Callback objects and further generalise Callback objects (utils/callback.h). Improve iconified tracking (mainwindow.cpp). Correct the order in which tests based on the definitions in config.h are carried out, when choosing header files to be included (fax_list_manager.cpp, logger.cpp and mainwindow.cpp). Include fsync() call after flushing fdoutbuf stream buffer (utils/fdstream.tcc). Minor code layout improvements (efax_controller.h, efax_controller.cpp, file_list.h, file_list.cpp, socket_list.h, socket_list.cpp, utils/mem_fun.h, utils/Makefile.am and utils/Makefile.in). Update to gettext-0.17 Update to automake-1.10.1. Version 3.0.18 (9th December 2008) -------------- Print received/sent faxes via cairo, libtiff and GtkPrintOperation when efax-gtk is compiled against GTK+ >= 2.10.0, instead of converting to postscript with efix (fax_list.h, fax_list.cpp, mainwindow.cpp, settings.h and settings.cpp, and new files utils/mono_tiff_print_manager.h and utils/mono_tiff_print_manager.cpp; configure.ac, src/Makefile.am and utils/Makefile.am). Minor improvements to the TextPrintManager implementation (text_print_manager.h and text_print_manager.cpp). Make use of GTK+ print system the default when efax-gtk is compiled against GTK+ >= 2.10.0 (main.cpp and efax-gtkrc). Correct man file (efax-gtk.1) (Lior Kaplan). Version 3.0.17 (27th March 2008) -------------- Replace thread-unsafe use of sigc::slot where relevant with thread safe callback classes (efax_controller.cpp, fax_list.cpp, mainwindow.cpp, socket_server.cpp, utils/thread.h, utils/thread.cpp and utils/Makefile.am and add new file utils/callback.h). Compile fixes for gcc-4.3 (file_list.cpp and socket_list.cpp). Fix '=' for '==' error (settings.cpp). Remove unnecessary debugging code (main.cpp). Update config.guess, config.sub, install-sh, missing and mkinstalldirs to automake-1.9. Correct comments in pipes.h (utils/pipes.h). Update documentation in utils/gobj_handle.h, utils/intrusive_handle.h and utils/notifier.h. Version 3.0.16 (14th November 2007) -------------- Provide an option for prepending a standard prefix on dialling (prog_defs.h, main.cpp, mainwindow.cpp, settings.h, settings.cpp, settings_help.h and settings_help.cpp). Implement start_iowatch() without a sigc::signal object (that is, using only a sigc::slot object for the callback) (utils/io_watch.cpp). Corrections to syntax of efax-gtk.1 (man file) and efax-gtk.desktop. (Lior Kaplan). Add reference to -e option in efax man file. Add more robust checking of whether an existing instance of efax-gtk is running when another instance is started (main.cpp). Correct conditional compilation for use of GTK+ printing system to check for version 2.10 (mainwindow.cpp). Update comments on threading in prog_defs.h. Update Catalan translation (Jordi Sayol). Update README file. Version 3.0.15 (15th July 2007) -------------- Add provision for printing and viewing the logfile (src/logger.h, src/logger.cpp, src/mainwindow.h, src/mainwindow.cpp, src/Makefile.and src/Makefile.in). Make the expose event handler for the drawing area of the "Fax from socket" notifier more efficient (mainwindow.h and mainwindow.cpp). Move PrintManager class to utils sub-directory as FilePrintManager class and provide new TextPrintManager class (utils/file_print_manager.h,utils/file_print_manager.cpp, utils/text_print_manager.h and utils/text_print_manager.cpp, utils/pango_layout_iter_handle.h; print_manager.h and print_manager.cpp removed). Correctly show help dialog for GTK+ print system checkbox in settings dialog (settings.cpp). Explicitly forbid copying of IntrusiveCounter and IntrusiveLockCounter class objects (utils/intrusive_ptr.h). Do not initialise the pthread_cond_t object in a Thread::Cond object if the call to pthread_condattr_setclock() fails (this avoids a possible resource leak) (utils/mutex.h). Improve GError handling where relevant (main.cpp, mainwindow.cpp, utils/utf8utils.cpp and utils/gerror_handle.h). Change use of g_list_append() to g_list_prepend() (mainwindow.cpp). Greek translation updated. Version 3.0.14 (16th March 2007) -------------- Cater for postscript viewers such as evince which, if an instance of the program is already running, will return before the file to be viewed is displayed (fax_list.h and fax_list.cpp). Version 3.0.13 (10th March 2007) -------------- Use GtkToolItem interface where compiled against GTK+ >= 2.4 (fax_list.cpp, file_list.cpp, socket_list.cpp, utils/toolbar_append_widget.h utils/toolbar_append_widget.cpp). Use Glib atomic functions for locked reference counting where compiled against glib >= 2.4 (utils/intrusive_ptr.h, utils/shared_handle.h and utils/shared_ptr.h). Improve robustness of referencing of PrintManager class (print_manager.cpp). Don't allow GtkEntry objects to select contents automatically when acquiring focus (mainwindow.cpp) and update copyright notice (main.cpp, mainwindow.cpp and efax-gtk.1). Take some miscellaneous thread functions/objects out of global namespace (utils/thread.h and utils/thread.cpp). Refer to evince rather than ggv as the Gnome ps file viewer (efax-gtkrc and settings_help.cpp). Modify interface of AsyncQueue class (utils/async_queue.h). In the README file, refer to using rpmbuild and not rpm to build rpm packages. Version 3.0.12 (8th November 2006) -------------- Update Catalan translation (Jordi Sayol) and Hebrew translation (Assaf Gillat). Correct failure to clear the list of permitted client addresses for the socket interface after changing settings from the settings dialog (main.cpp). Hostname addresses permitted to connect to the socket server may now be specified in numeric dot notation. Numeric dot notation may also contain a trailing * as a wildcard. (efax-gtkrc, prog_defs.h, settings_help.cpp, socket_server.h and socket_server.cpp). Make memory management of the PrintManager class easier/safer for the user (fax_list.h, fax_list.cpp, main.cpp, mainwindow.cpp, print_manager.h, print_manager.cpp, utils/intrusive_ptr.h, src/Makefile.am and src/Makefile.in). Revise method for passing of arguments to threads (fax_list.h, fax_list.cpp, sigc_compatibility.h and utils/async_queue.h). Correct second paragraph of documentation comments in utils/notifier.h and add further paragraph about the use of the Notifier::connect() method (utils/notifier.h). Correct threading explanation for the program (prog_defs.h). Correct format of efax-gtk man page (efax-gtk.1). Upgrade configuration files to automake-1.9.6 and gettext-0.15 (Makefile.in, aclocal.m4, config.rpath, efax-gtk-faxfilter/Makefile.in, po/Makefile.in.in, src/Makefile.in, src/utils/Makefile.in). Provide full quoting of aclocal macros (acinclude.m4, aclocal.m4). Revise the 'mail_fax' script to refer to Heirloom mailx rather than nail. Update the copyright dates in the efax-gtk man file (efax-gtk.1). Version 3.0.11 (19th August 2006) -------------- Correct file descriptor leak when viewing a fax (fax_list.h and fax_list.cpp). Implement printing of faxes in fax lists via the GTK+ print system where compiled against GTK+2.10 or higher (acinclude.m4, aclocal.m4, configure.ac, configure, efax-gtkrc, po/POTFILES.in, src/Makefile.am, src/Makefile.in, dialogs.h, fax_list.h, fax_list.cpp, main.cpp, print_manager.h, print_manager.cpp, prog_defs.h, settings.h, settings.cpp, settings_help.h, settings_help.cpp, utils/window.cpp). Improve handling of user locales with streams (acinclude.m2, configure.ac, efax_controller.cpp, fax_list.cpp, main.cpp, mainwindow.cpp, settings.cpp and socket_server.cpp). Use AC_COMPILE_IFELSE/AC_LANG_PROGRAM autoconf macros instead of the AC_TRY_COMPILE macro when configuring the program (acinclude.m4 and aclocal.m4). Correct derivation of fdistream class for wide characters (not relevant to efax-gtk) (utils/fdstream.h). Mention the need to call g_thread_init() before Notifier::init() in the Notifier documentation (utils/notifier.h). Correct help information concerning sending faxes via socket and pop-up dialog (settings_help.cpp). Explicitly include header where relevant (addressbook.cpp, efax_controller.cpp, fax_list.cpp, fax_list_manager.cpp, main.cpp, mainwindow.cpp, socket_list>cpp, socket_notify.cpp, socket_server.cpp and tray_icon.cpp). Version 3.0.10 (10th June 2006) -------------- Update Albanian translation (Besnik Bleta) and Catalan translation (Jordi Sayol). Add Traditional Chinese translation (including efax-gtk.desktop) (Wei-Lun Chao). Make the sort direction of the fax lists selectable (fax_list_manager.h, fax_list_manager.cpp and mainwindow.cpp). Improve time reporting to main window and to logfile (mainwindow.h, mainwindow.cpp and efax/efaxmsg.c). Have GobjHandle<> sink objects with floating references, and with GTK+-2.9 and above use g_object_ref_sink() instead of g_object_ref()/gtk_object_sink() (utils/gobj_handle.h, utils/widget.h, utils/widget.cpp, dialogs.cpp and mainwindow.cpp). Have consistent keys shortcuts for the closing of dialogs (addressbook.cpp, dialogs.h, dialogs.cpp, fax_list.cpp and helpfile.cpp). Use in_addr_t type explicitly where relevant (socket_server.cpp, prog_defs.h, configure.ac, acinclude.m4 and aclocal.m4). Move initialisation of std::string prog_fifo_name (previously std::string fifo_name) from MainWindow::pipe_thread() to MainWindow::start_pipe_thread() to prevent read access of ProgConfig::working_dir by more than one thread (mainwindow.h and mainwindow.cpp). Explicitly define _XOPEN_SOURCE where relevant (src/Makefile.am, src/Makefile.in, src/utils/Makefile.am and src/utils/Makefile.in). Break up the string literal making up the GPL copyright notice into smaller chunks to accommodate compilers which will not accept large string literals (gpl.h and dialogs.cpp). Use the GTK_CHECK_VERSION macro where relevant (dialogs.cpp, fax_list_manager.cpp, main.cpp and mainwindow.cpp). Amend copyright notice (COPYING and gpl.h). Update copyright notice when the program is started with the --version option (main.cpp). Documentation improvements, including explaining in README how to use CUPS lpadmin to set up a virtual printer for efax-gtk as an alternative to using the CUPS web interface and updating the man file (settings_help.cpp, README and efax-gtk.1). Version 3.0.9 (11th March 2006) ------------- Swedish translation added (Daniel Nylander). Catalan translation added (Jordi Sayol Salomo). Use gtk_widget_queue_draw() to update the drawing area which indicates whether a fax is in the "faxes to send" queue via an expose event rather than doing it directly (mainwindow.cpp). Cater for serial port devices in sub-directories of /dev (main.cpp). Have Notifier objects detect whether the signalling thread is the same one as the thread in which the slot will execute and if so by-pass the Notifier pipe, and implement Notifier objects without using a map and object IDs. (main.cpp, socket_server.cpp, utils/notifier.h and utils/notifier.cpp). Correctly handle case of constructor of SharedPtr and SharedHandle objects throwing (utils/shared_ptr.h and utils/shared_handle.h) Allow the program to compile without X (configure.ac, acinclude.m4, aclocal.m4, main.cpp, tray_icon.h, tray_icon.cpp and libegg/eggtrayicon.c). Document the use of G_IO_HUP with iowatches (utils/io_watch.h). Correct comments about the use of PipeFifo::connect_to_stdout() and PipeFifo::connect_to_stderr() (utils/pipes.h). Improve text for translation about modem classes (efax.c). Include and headers file where relevant (configure.ac, include.m4, aclocal.m4, addressbook.cpp, efax_controller.cpp, fax_list.cpp, fax_list_manager.cpp, main.cpp, mainwindow.cpp, socket_list.cpp, socket_notify.cpp, socket_server.cpp and tray_icon.cpp). Revise locking of prog_config objects (dialogs.cpp, efax_controller.cpp and fax_list.cpp). Version 3.0.8 (14th January 2006) ------------- Update Greek translation (Hellenic Linux Users Group). Add German translation (po/de.po and mainwindow.cpp) (Steffen Wagner). Destroy thread attribute object correctly (utils/thread.h and utils/thread.cpp). Use GtkSpinButton objects in the settings dialog where relevant (settings.h, settings.cpp and settings_help.cpp). Improve documentation/commenting of write_error() function (mainwindow.cpp). Update gettext tools to latest version (gettext-0.14.5) (po/Makevars and po/Rules-quot). Move typedef of InstanceMap into the Notifier class (utils/notifier.h and utils/notifier.cpp). Provide specific CFLAGS and CXXFLAGS specification in rpm spec file (efax-gtk.spec.in and efax-gtk.spec). Version 3.0.7 (23rd November 2005) ------------- NOTE: Fax descriptions in the fax lists are now stored in UTF-8 rather than the locale codeset. This means that any fax descriptions previously stored in a codeset other than ASCII or UTF-8 by efax-gtk will not be shown in version 3.0.7. Sorry about that, but the former method of storing them in the locale codeset was bound to lead to trouble, because in due course Unix-like systems will adopt UTF-8 as their standard codeset and on changing codesets, previously entered file description were bound to be broken anyway. This gets it over with. To show these fax descriptions again, the contents of all the files with the name Description in the $HOME/[WORK_SUBDIR]/faxin/[faxnumber] and $HOME/[WORK_SUBDIR]/faxsent/[faxnumber] directories will need to be changed from the locale codeset to UTF-8. gedit can do this manually, although it will be a bit tedious. Corrections to man pages (Lior Kaplan) (efax-gtk.1, efax.1 and efix.1). Enable file names to be used in locale codesets other than ASCII or UTF-8 (efax_controller.cpp, fax_list_manager.cpp, mainwindow.cpp, efax/efax.c, efax/efaxio.c and efax/efaxlib.c). Make keyboard navigation of FileReadSelectDialog class work correctly where implemented with a GtkFileDhooserDialog object (dialogs.cpp). Update the README file to explain the setting of the G_FILENAME_ENCODING environmental variable for file systems using other than the ASCII or UTF-8 codesets (README). Add some stray missing std namespace scope qualifiers so that the program compiles without a using-directive for std namespace (file_list.cpp, main.cpp, socket_list.h, socket_list.cpp and socket_server.cpp). Make the methods of the Thread::CancelBlock class explicitly static (utils/thread.h). Update Russian translation (Pavel Vainerman) (po/ru.po and mainwindow.cpp). Version 3.0.6 (16th October 2005) ------------- Add simplified Chinese translation (Kite Lau). Provide internationalisation support for the efax program to which efax-gtk is a front end (configure.ac, efax_controller.h, efax_controller.cpp, main.cpp, mainwindow.h, mainwindow.cpp, efax/Makefile.am, efax/efax.c, efax/efaxio.c, efax/efaxlib.h, efax/efaxlib.c, efax/efaxmsg.h, efax/efaxmsg.c, utils/utf8_utils.h and utils/utf8_utils.cpp; man file efax/efax.1). Make the fax top header line of a sent fax charset independent, and remove some incorrect codeset conversions (efax_controller.cpp, main.cpp, settings.h, settings.cpp and settings_help.cpp). Deal with two minor timing/race issues (efax_controller.h and efax_controller.cpp). Make Notifier::make_id() a static method, since it only uses local or static objects (notifier.h). Instead of omitting the call to setlocale() in efax/efix.c, after setting the locales to match their environment, reset LC_NUMERIC to the "C" locale (efax/efix.c). Update Hungarian translation (Gergely Szakats). Version 3.0.5 (11th September 2005) ------------- Provide a further explicit cast to void* in sentinel for elipsis arguments, for 64-bit systems (mainwindow.cpp). Provide for the automatic updating of the fax lists when a fax is received or sent (efax_controller.h, efax_controller.cpp, fax_list.h, fax_list.cpp, fax_list_manager.h, fax_list_manager.cpp, helpfile.cpp, mainwindow.h and mainwindow.cpp). Provide for the received fax list to show the number of new faxes received since the program was last started (efax_controller.h, efax_controller.cpp, fax_list.h, fax_list.cpp, helpfile.cpp, mainwindow.cpp, tray_icon.h and tray_icon.cpp) Make minor changes to handling of colours of certain labels (mainwindow.h and mainwindow.cpp). Make the program close properly if the "Quit" item is chosen from the system tray menu and a blocking modal dialog is showing (utils/window.cpp). Remove unnecessary use of GtkAlignment objects to adjust labels (GtkLabel derives from GtkMisc) (addressbook.cpp and settings.cpp). Make Notifier::read_pipe_slot() a static method (utils/notifier.h, utils/notifier.cpp and sigc_compatibility.h). Call the slot connected to an iowatch via a sigc::signal object rather than directly, so sigc::trackable is effective (utils/iowatch.h and utils/iowatch.cpp). Change text when prompting to delete or print faxes now that fax id numbers are not shown in fax lists (fax_list.cpp). Remove exception specifications in shared pointer/handle classes (utils/gobj_handle.h, utils/shared_handle.h and utils/shared_ptr.h). Include a guard when creating a FaxListDialog object so we cannot call it up twice through the call to gtk_main_iteration() in FaxListManager::populate_fax_list() (fax_list_manager.h, fax_list_manager.cpp and mainwindow.cpp). Provide an exception to the LGPL in its application to files containing templates to allow instantiation of templates by program source code without imposing restrictions on the use of the resulting object code (utils/fdstream.h, utils/fdstream.tcc, utils/gobj_handle.h, utils/shared_handle.h and utils/shared_ptr.h). Change the "Copyright" field to a "License" field in RPM spec file (efax-gtk.spec.in and efax-gtk.spec). Update Russian translation (Pavel Vainerman). Version 3.0.4 (13th August 2005) ------------- Add a date column to the fax lists, which derives the time of the fax from the fax ID (the directory in which faxes are stored) (Pavel Vainerman and Chris Vine). (fax_list_manager.h, fax_list_manager.cpp and helpfile.cpp; and README) Provide for the fax ID (the directory in which faxes are stored) for received faxes to be derived from the time that the fax is received rather than the time that efax-gtk is put into receive mode. This enables the fax lists to display the correct time of a received fax. (Chris Vine) (efax_controller.h, efax_controller.cpp, fax_list_manager.h, fax_list_manager.cpp, main.cpp, mainwindow.h, mainwindow.cpp and prog_defs.h) Now that stored fax directories (fax name IDs) are not displayed in the fax lists, provide the part of the ID representing a year in 4 (or more) digit rather than 2 digit format (someone in 2099 might be pleased!). (Chris Vine) (efax_controller.cpp, fax_list_manager.cpp and main.cpp) Put a UTF-8 validation function in namespace Utf8 (Chris Vine) (fax_list_manager.h, utils/utf8_utils.h and utils/utf8_utils.cpp). Move gobj_handle.h, icon_info_handle.h, io_watch.h, io_watch.cpp, mutex.h, notifier.h, notifier.cpp, pipes.h, pipes.cpp, selected_rows_handle.h, selected_rows_handle.cpp, sem_sync.h, shared_handle.h, shared_ptr.h, thread.h, thread.cpp, tree_path_handle.h, tree_row_reference_handle.h, utf8_utils.h, utf8_utils.cpp, widget.h, widget.cpp, window.h and window.cpp to src/utils sub-directory and change licence from GPL to LGPL. Move fdstream.h and fdstream.tcc from src/fdstream sub-directory to src/utils sub-directory. Where relevant, handle PipeFifo and Notifier errors by exceptions - consequential on putting the source for these in the utils sub-directory (Chris Vine) (fax_list.cpp, main.cpp, prog_defs.h, utils/notifier.h, utils/notifier.cpp, utils/pipes.h and utils/pipes.cpp). Change clean-up arrangements on start-up (Chris Vine) (efax_controller.h, efax_controller.cpp and main.cpp). Correct false calls to _exit() in FaxListDialog::view_fax_thread() (Chris Vine) (fax_list.cpp). Make the PipeFifo and SemSync classes explicitly non-copiable (Chris Vine) (utils/pipes.h and utils/sem_sync.h). Provide further explicit casts to void* in sentinels for elipsis arguments for 64-bit systems (Chris Vine) (addressbook.cpp, fax_list_manager.cpp, file_list.cpp, mainwindow.cpp and socket_list.cpp). Update Hebrew translation (Assaf Gillat). Version 3.0.3 (16th July 2005) ------------- Provide a settings option to omit the destination fax number from the fax page top header line (efax_controller.cpp, main.cpp, prog_defs.h, settings.h, settings.cpp, settings_help.h and settings_help.cpp). Use a mutex to ensure that writes to the Notifier pipe are atomic between threads (IEEE Std 1003.1, 2001 Edition guarantees that writes by different processes to a pipe of less than PIPE_BUF in size are atomic, but not in relation to writes by threads within any one process). (notifier.h and notifier.cpp). Some fixes for 64 bit systems: Update gettext configuration (including removing relevant macros from acinclude.m4) (acinclude.m4, aclocal.m4, configure and po/Makefile.in.in). Provide an explicit cast to void* in a sentinel for elipsis arguments (mainwindow.cpp). Fixes for (harmless) warnings issued by gcc-4.0, about pointer targets differing in signedness (efax.c, efaxio.c and efaxlib.c). Version 3.0.2 (5th June 2005) ------------- Close the socket server by using pthread_cancel() with a suitable choice of cancellation point, to guarantee that the socket is closed correctly under all conditions; this also requires that pthreads be used explicitly (efax_controller.cpp, fax_list.cpp, main.cpp, mainwindow.cpp, mutex.h, socket_server.h, socket_server.cpp, thread.h and thread.cpp; acinclude.m4, aclocal.m4 and configure.ac). Provide for efax-gtk to kill any fax viewing sessions which are open when efax-gtk is closed (main.cpp). Simplify and improve the implementation of the fax lists (fax_list_manager.h, fax_list_manager.cpp, selected_rows_handle.h, selected_rows_handle.cpp and tree_row_reference.h). Add an option to the mail_fax script to enable the received fax to be e-mailed in PDF (Portable Document Format) as well as PS (PostScript) formats. (mail_fax). Use a custom iowatch object instead of a GIOChannel object when all we want to do is poll a file descriptor in the main program event loop. (efax_controller.h, efax_controller.cpp, mainwindow.h, mainwindow.cpp, notifier.h and notifier.cpp and add new files io_watch.h and io_watch.cpp). Close timer in MessageText destructor (mainwindow.h and mainwindow.cpp). Version 3.0.1 (12th May 2005) ------------- Add Hungarian translation (Gergely Szakats) (po/LINGUAS, po/hu.po and mainwindow.cpp). Update the Bulgarian Translation (Zdravko Nikolov). Make removal of an address in the addressbook work correctly (addressbook.h and addressbook.cpp). Make the program clean up correctly if terminated by the X session manager (prog_defs.h, main.cpp, efax_controller.h and efax_controller.cpp). Notify the program when running that the user has started it again by means of a fifo, rather than a Unix signal (prog_defs.h, main.cpp, mainwindow.h and mainwindow.cpp). Make AddressDialog text length friendly (addressbook.cpp). Correct the button reliefs in the fax lists when the fax list is first brought up (efax_controller.cpp). Correct dependencies in efax-gtk.spec file (efax-gtk.spec and efax-gtk.spec.in). Version 3.0.0 (7th May 2005) ------------- Remove dependency on gtkmm (now only GTK+ and libsigc++ are required). All files in src/ have been revised, with the following new files added: gobj_handle.h icon_info_handle.h mutex.h notifier.h/notifier.cpp thread.h/thread.cpp tree_path_handle.h tree_row_reference_handle.h utf8_utils.h/utf8_utils.cpp widget.h/widget.cpp window.h/window.cpp The following files were removed: gtk_icon_info_handle.h tree_model_row_reference.h (NOTE: the GTKMM branch in CVS still uses gtkmm: go to that branch for any revisions of the version using gtkmm.) Version 2.2.16 (7th May 2005) -------------- Albanian translation added (Besnik Bleta). Update Russian translation (Pavel Vainerman). Update Polish translation (Pawel Suwinski). Bring up a prompt when deleting a file in the file list (file_list.cpp). Use Scoped_handle<> where relevant (mainwindow.cpp and socket_server.cpp). Increase icon size in panel notification area (tray_icon.cpp). Correct order of initialisation of static objects for writing to the error pipe (to cater for the unlikely event that the static pipe tries to write to itself on error on setting itself up) (mainwindow.cpp). Some code tidying up (socket_list.h and socket_list.cpp). Make corrections to basic_inbuf::underflow() and basic_inbuf::xsgetn() methods (doesn't affect efax-gtk but does affect any use of the basic_fdistream class - efax-gtk doesn't use it). (fdstream.tcc). Version 2.2.15 (26th February 2005) -------------- Fix bug where the Trash folder is dragged in the fax lists (fax_list_manager.cpp). Greek translation added (the Hellenic Linux Users Group translation team). Italian translation updated (Luca De Rugeriis). Adjust image sizes for toolbar buttons in GTK+2.4 or higher (fax_list.cpp, file_list.cpp and socket_list.cpp). Provision to ensure synchronisation of memory where necessary in multi-processor systems (efax_controller.h and efax_controller.cpp). Version 2.2.14 (18th December 2004) -------------- Fix bug #1079142 (segmentation fault if a fax for sending is received from the print system and the program has been started in the system tray and never raised) (mainwindow.cpp). Check whether the program is already running when it starts up, and if it is bring up the existing program instance on the current workspace (acinclude.m4, aclocal.m4, configure.ac, efax_controller.cpp, fax_list.cpp, file_list.cpp, main.cpp, mainwindow.cpp, socket_server.cpp, fdstream/fdstream.h and fdstream/fdstream.tcc). Prettify the setting dialog with Gtk::Alignment, and use Gtk::Alignment instead of filler widgets (mainwindow.h, mainwindow.cpp, settings.h and settings.cpp). Some minor code clean-ups (efax_controller.cpp, fax_list.cpp, fax_list_manager.cpp, pipes.h, pipes.cpp and socket_server.cpp). Update Bulgarian translation (Zdravko Nikolov). Version 2.2.13 (20th November 2004) -------------- Provide a trash folder from which faxes can be moved and then physically deleted from the file system (efax-gtk.1, fax_list.h, fax_list.cpp, fax_list_manager.h, fax_list_manager_icons.h, fax_list_manager.cpp, helpfile.cpp, mainwindow.cpp and README). (Once deleted from the trash folder faxes are now removed from the file system rather then being moved to an 'oldfax' sub-directory.) Allow multiple faxes to be selected in fax lists (fax_list.cpp, fax_list_manager.h, fax_list_manager.cpp, selected_rows_handle.h and selected_rows_handle.cpp). Make dialog captions consistent (addressbook.cpp, dialogs.cpp, fax_list.h, fax_list.cpp, mainwindow.cpp and socket_list.cpp). Make Sem_sync::~Sem_sync() take account of the fact that under IEEE Std 1003.1 the count value given by sem_getvalue() can be less than 0 (a negative number can be used to indicate the number of threads waiting on the semaphore) (sem_sync.h). Use GTK+ stock icons where available (addressbook.cpp, addressbook_icons.h, fax_list.cpp, fax_list_icons.h, file_list.cpp file_list_icons.h and mainwindow.cpp). Update Russian translation (Pavel Vainerman). Update Hebrew translation (Assaf Gillat). Version 2.2.12 (24th October 2004) -------------- Make the bottom status bar size itself according to the font size choice in Gnome (mainwindow.h and mainwindow.cpp). Make EfaxController::status an enumerated type (efax_controller.h, efax_controller.cpp, mainwindow.h and mainwindow.cpp). Handle signals properly in Sem_sync::wait() (sem_sync.h). Add error checking in FaxListManager::get_folders() (fax_list_manager.cpp). Improve error checking on writing to Pipe_fifo objects (mainwindow.cpp, pipes.h, pipes.cpp and prog_defs.h). Zero serve_address in Socket_server::socket_thread() before using it (socket_server.cpp), and also address in efax-gtk-socket-client.cpp (in efax-gtk-faxfilter directory)). Some other clean-ups (efax_controller.cpp, main.cpp, settings.cpp and shared_ptr.h; efax-gtk-socket-client.cpp (in efax-gtk-faxfilter directory)). Add commentary about modem class modes in README file. Update Hebrew translation (Assaf Gillat). Version 2.2.11 (25th September 2004) -------------- The program can now send a fax when in receive standby mode. When the fax has been sent (or there is an error in sending the fax), the program will return to receive standby mode. (efax_controller.h, efax_controller.cpp, mainwindow.h and mainwindow.cpp). Allow spaces in file names for faxes to be sent (acceptable file name separators are now ',' and ';') (mainwindow.cpp and file_list.cpp). Add Assaf Gillat to the list of translators in the translators' pop-up dialog (mainwindow.cpp). Put all the child exit handling of efax sessions in EfaxController::timer_event() (mainwindow.h, mainwindow.cpp, main.cpp, efax_controller.h and efax_controller.cpp). Make modal the dialog warning that no fax number has been specified when sending a fax (mainwindow.cpp). Put the list of translators in MainWindow::translations_slot() in a gettext() block (mainwindow.cpp). Update Russian transation (Pavel Vainerman). Put current URL in rpm spec file (efax-gtk.spec.in and efax-gtk.spec). Version 2.2.10 (5th September 2004) -------------- Provide a -r option which starts the program in receive standby mode, and a -s option which starts the program hidden in the system tray (main.cpp, mainwindow.h and mainwindow.cpp). In the fax lists, the folder name and folder icon are placed in a single column (fax_list_manager.h and fax_list_manager.cpp). Hebrew translation (Assaf Gillat). The following patches from http://shino.pos.to/linux/efax/ have been applied to efax: efax08a-time.patch (efaxio.c) efax-0.9-nullptr.patch (efax.c and efaxos.c) efax-0.9-numlines.patch (efix.c) efax-0.9a-frlen.patch (efax.c) And the following patch from Fedora 2: efax-0.9-misc.patch (efax.c) Encapsulate valid fax list folder name checking code in new FolderNameValidator class (fax_list_manager.h, fax_list_manager.cpp and fax_list.cpp). Version 2.2.9a (9th August 2004) -------------- Fix incorrect incrementing of STL std:pair iterator after erasing object in std::multimap container (fax_list_manager.cpp). Improve detection of UTF-8 encoding errors (fax_list_manager.cpp). Updated Polish translation (Pawel Suwinski). Version 2.2.9 (25th July 2004) ------------- Faxes can be organised in the sent and received fax lists into folders, and dragged and dropped between folders. (fax_list.h, fax_list.cpp, fax_list_manager.h, fax_list_manager.cpp and tree_model_row_reference.h) A working sub-directory for the storage of .efax-gtk_addressbook, .efax-gtk_mainwin_save and .efax-gtk_queued_server_files and the faxin, faxout, faxsent and efax-gtk-server directories can be specified in efax-gtkrc with the WORK_SUBDIR: parameter. (addressbook.cpp, dialogs.cpp, efax_controller.cpp, fax_list.cpp, fax_list_manager.cpp, main.cpp, mainwindow.cpp, prog_defs.h, socket_server.cpp and socket_server.cpp). (Pavel Vainerman, revised by Chris Vine). Fix the attempt to call write_error() before the MainWindow object has been created. (main.cpp). Version 2.2.8a (4th July 2004) -------------- Revised Bulgarian translation (Zdravko Nikolov). Tests for whether phread.h should be included (testing for whether HAVE_PTHREAD_SIGPROCMASK is defined) have been corrected (efax_controller.cpp, fax_list.cpp and socket_server.cpp). (Jean-Baptiste Quenot). Fix for overwriting static data on call to gethostbyaddr() (socket_server.cpp). (Jean-Baptiste Quenot). Fix so that fstream::close() and fstream::clear() are called in the correct order. (efax_controller.cpp, fax_list.cpp and mainwindow.cpp). Some other minor code clean-ups and bug fixes (tray_icon.cpp, shared_ptr.h and shared_handle.h). Version 2.2.8 (18th June 2004) ------------- The program will reside in a panel notification area (system tray). (mainwindow.h, mainwindow.cpp, tray_icon.h and tray_icon.cpp). The program pull-down menus use icons in the menu entries for which GTK+ stock icons are available. (mainwindow.cpp and tray_icon.cpp). GtkIconInfo memory leak fixed in main.cpp (main.cpp and gtk_icon_info_handle.h). Russian translation (Pavel Vainerman) Documentation updates (prog_defs.h, README and efax-gtk.1). Version 2.2.7a (6th June 2004) -------------- When using gtkmm-2.4: Gtk::FileChooserDialog is used instead of Gtk::FileSelection as the file selector dialog (dialogs.h, dialogs.cpp and mainwindow.cpp). Gtk::IconTheme is used to pick the icon for the program (otherwise the default built-in icon is used) (prog_defs.h and main.cpp). The mutex locking of prog_config is cleaned up. In dialogs, exec() methods are substituted for run() methods (this is because in gtkmm-2.*, Gtk::Dialog has its own non-virtual run() method and some dialogs used in the program are derived from Gtk::Dialog. Having a separate exec() method avoids the wrong method being called by mistake from a Gtk::Dialog pointer/reference (and attempts to call exec() from a Gtk::Dialog pointer/reference will fail to compile). Lists of files received by the socket server for faxing are passed by shared pointer (mainwindow.h, mainwindow.cpp, socket_list.h, socket_list.cpp socket_server.h, socket_server.cpp). Further clean ups of use of Glib::ustring and std::string (dialogs.cpp). Some changes to the build system so that AC_CHECK_FILES is used instead of AC_CHECK_FILE, and the install will not fail if there is no user 'lp' on the system (acinclude.m4, configure.ac, prog_defs.h and efax-gtk-socket-client.cpp). Version 2.2.7 (6th May 2004) ------------- The socket server now runs in its own thread, compliant with the requirement in IEEE Std 1003.1 that any system calls after fork()ing and before exec()ing in a multi-threaded program should be async-signal-safe. Version 2.2.6b (6th June 2004) -------------- Carry out Filename to UTF-8 conversion in MainWindow:get_file_slot() (mainwindow.cpp). Further clean ups of use of Glib::ustring and std::string (dialogs.cpp). Some changes to the build system so that AC_CHECK_FILES is used instead of AC_CHECK_FILE, and the install will not fail if there is no user 'lp' on the system (acinclude.m4, configure.ac and prog_defs.h). Socket_server::is_files() method added (socket_server.h, socket_server.cpp and mainwindow.cpp) Version 2.2.6a (6th May 2004) -------------- Bulgarian translation (Zdravko Nikolov). Italian translation updated (Luca De Rugeriis). Some bug fixes (main.cpp, file_list.cpp socket_list.cpp). Version 2.2.6 (12th April 2004) ------------- The program will now compile and work with gtkmm-2.4, as well as gtkmm-2.2 and gtkmm-2.0. The settings dialog contains two new options. First, the user can elect to execute a program or have a pop-up dialog appear whenever a fax is received. If a program is executed, it will be passed the number of the fax received as appearing in the faxes received list as an argument. Two executable scripts, mail_fax and print_fax, are provided for the purpose. (efax_controller.cpp, main.cpp, mainwindow.cpp and settings.cpp). Second, the user can elect not to bring up the confirmatory pop-up dialog after pressing the "Print selected fax" button in the Received Faxes list or Sent Faxes list. (fax_list.cpp, main.cpp, mainwindow.cpp and settings.cpp). The efax-gtk.desktop file is now installed in $datadir/applications instead of $datadir/gnome/apps/Applications, and it uses the icon supplied with GNOME-2.6 comprising stock_send-fax.png. The use of Glib::ustring and std::string is rationalised and cleaned up (dialogs.cpp, fax_list.cpp and socket_list.cpp). Version 2.2.5a (6th March 2004) -------------- Polish translation (Pawel Suwinski). A fax can now be sent on an open telephone connection if no telephone number is entered into the "Tel Number" box (this does the same thing as 'fax send -m ...' using the efax 'fax' script from the command line). 'efax-gtk [filename]' now works correctly again. For users of lpd/lprng, efax-gtk-socket-client now logs error messages via syslog(). Version 2.2.5 (5th February 2004) ------------- The dialog which notifies whether a fax has been received for sending from the socket can be used to send the fax. The documentation (README and helpfile.cpp) has been updated to reflect this. Faxes received via the socket server from the print system are now stored in the user's home directory($HOME/efax-gtk-server), rather than in the /tmp directory for security reasons. The version number is correctly reported after enterering 'efax-gtk --help' or 'efax-gtk --version'. The order of entries in this ChangeLog/NEWS file has been reversed. Version 2.2.4 (10th January 2004) ------------- A potential race condition, which can manifest itself in Linux kernel 2.6 (but not kernel 2.4) can occur by efax_controller_childexit_handler() being called in efax_controller.cpp before fork() in EfaxController::sendfax() or EfaxController::receive() has returned in the parent process, so confusing the test of child_pid in fax_controller_childexit_handler(). This has been corrected by masking SIGCHLD immediately before the fork(), and unmasking it after fork() returns. Also a theoretical race condition in EfaxController::timer_event() has been corrected (efax_controller.cpp, sig_mask.h). Minor revision to efax-gtk.spec.in (Philip Tellis). MAXMSGBUF is now defined in efax/efaxmsg.c so that it does not exceed PIPE_BUF/2 in size. This is so that a message from efax does not overrun the pipe used to communicate with efax-gtk. Version 2.2.3 (29th December 2003) ------------- Choosing "Enter multiple files" in the File drop-down menu now brings up the correct dialog (MainWindow::MainWindow() in mainwindow.cpp). The socket server does not now run in its own thread (prog_defs.h, main.cpp, socket_server.h and socket_server.cpp). The need to make fork() calls in order to invoke gs, gv, efax or efix to create, view and print faxes (and to wait() on these child processes on occasions), and the fact that fax viewing could cause a child process to exit at a time not of the programs choosing (it will be at the time of the user's choosing), makes it practically impossible to employ threading and also write the program in a way which is reasonably clean and complies with the requirement that any system calls between fork()ing and exec()ing in a multi-threaded program should be designated as async-signal-safe: IEEE Std 1003.1, 2003 Edition: A process shall be created with a single thread. If a multi-threaded process calls fork(), the new process shall contain a replica of the calling thread and its entire address space, possibly including the states of mutexes and other resources. Consequently, to avoid errors, the child process may only execute async-signal-safe operations until such time as one of the exec functions is called. Clean up of return values of Pipe_fifo::read() and Pipe_fifo::write() (pipes.h and pipes.cpp) and related changes (efax_controller.cpp). Revision of childexit_signalhandler(), and clean-up related code in main.cpp (mainwindow.cpp and main.cpp). Version 2.2.2 (1st November 2003) ------------- The pop-up dialog which announces the receipt of a fax from the socket server will display itself even if efax-gtk is minimised (mainwindow.cpp - MainWindow::fax_received_notify_slot()). The fax lists, socket list and help dialog will be raised if they are selected and have already been created (mainwindow.h, mainwindow.cpp, helpfile.h and helpfile.cpp). Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window (mainwindow.h and mainwindow.cpp). When closing, the program will save its window size and whether fax input is selected as File or Socket. In Socket_server::is_valid_peer(), the parameter is passed by constant reference rather than by value (socket_server.h and socket_server.cpp). Starting efax-gtk with --version or --help as parameters gives an appropriate response (main.cpp). Clean-up of code using std::stringstream (efax_controller.ccp - EfaxController::make_fax(), EfaxController::save_sent_fax(), EfaxController::cleanup_fax_send_fail(); fax_list.cpp - FaxListDialog::fax_to_ps(); socket_list.cpp - SocketListDialog::set_socket_list_rows()). configure script now checks for libsigc++>= 1.2.3 (libsigc++1.2.2 and less have a bug causing a segfault when a slot deletes the object of which it is a member). Version 2.2.1 (20th October 2003) ------------- stringstream is used instead of strstream where available (and a test for stringstream added to the configure script). Changed user interface for choosing the file to be faxed (mainwindow.h/mainwindow.cpp). PS header in const char PSBEGIN [] in efax/efaxlib.c changed so that multi-page postscript files produced by efix will print correctly in CUPS 1.1.19 and above (EPS headers should only occur in single page files). Test for fully qualified localhost name included in Socket_server::is_valid_peer(). A efax-gtk.desktop file is installed in $datadir/gnome/apps/Applications Italian translation updated. Version 2.2.0 (8th September 2003) ------------- -pre (31st August 2003); -pre2 (1st September 2003); -pre3 (5th September 2003) -pre4 (6th September 2003); -pre5 (7th September 2003) A socket server is provided enabling the print system (particularly CUPS) to interface directly with efax-gtk. Patch level a: (14th September 2003) Fix a potential file descriptor leak in Socket_server:::make_socket_thread() and set up a signal mask for that thread to block SIGCHLD. Patch level b: (21st September 2003) UTF-8 conversion errors are now handled gracefully (that is, by reporting the error and proceeding as appropriately as possible), without terminating the program. This has required enabling exceptions. Version 1.0.8 and 2.0.9 (25th August 2003) ------------------------------------------ A postscript printer driver file (Fax-fax-printer.ppd) is provided to make it easier to print via CUPS, and installed by default in /usr/share/cups/model. In version 2.0.9, an issue with word wrapping in the main program text window (which shows progress in fax negotiations) is corrected. The build system has been rewritten so that it now uses automake. Version 1.0.7 and 2.0.8 ----------------------- A "Manage/reorder multiple files" button to the right of the "File to fax" entry brings up a dialog which enables the order of multiple files to be changed and for further files to be added. Version 1.0.6 and 2.0.7 ----------------------- The efax-gtk distribution now also compiles and installs a patched version of efax-0.9a-001114, so you do not need to separately build and install efax. A number of users reported problems sending or printing faxes when in locales which express their floating point numbers with a comma as the decimal designator instead of the full-stop (which applies to most of Europe outside the UK and Ireland): efax and efix incorrectly use C formatted text functions after calling setlocale(). The patch simply omits the call to setlocale(), so the C locale is used in all cases. To avoid name conflicts the patched versions of efax and efix are installed as efax-0.9a and efix-0.9a. If you want to use the standard distributions of efax, delete efax-0.9a and efix-0.9a, and then make a symbolic link from efax to efax-0.9a and from efix to efix-0.9a so that efax-gtk can find them. The program can now send multiple postscript files as a single fax. The files are included in the fax in the order in which they appear in the 'File to fax' box. The efax-gtkrc configuration file is now by default installed in $prefix/etc, rather than /etc (but the relevant directory can still be changed by passing the --sysconfdir=[dir] option to ./configure). Installed files can be uninstalled from the Makefile by entering 'make uninstall'. Version 2.0.6 ------------- Build system for translation (*.po) files provided. Translation files for it (by Luca De Rugeriis) and en_GB locales installed. Version 2.0.5 ------------- Automatic button re-sizing implemented properly. Internationalisation support correctly initialised. Patch level a: modal dialogs have appropriate window hints, and a window icon is provided for all top level windows. Version 2.0.4 ------------- Buttons with focus now show consistently with Gnome-2 style settings, and the buttons in the main program window will correctly resize for the application font size used. The focus chain for main program window has been corrected. Version 1.0.5 and 2.0.3 ----------------------- A more friendly help dialog is provided. Some minor improvements/fixes for version 2.0.*. Version 2.0.2 ------------- Fix bug in build system (this does not affect version 1.0.4). Versions 1.0.4 and 2.0.1 ------------------------ Insufficient read permissions on a file to be sent are now correctly reported. Minor change to the build system. The column headings in the fax received and fax sent dialogs are now corrected in efax-gtk-2.0. Versions 1.0.3 and 2.0.0 ------------------------ After sending a fax, the program cleans up after itself by deleting old tiffg3 files ([filesent].001, [filesent].002, etc.). There is a bug in efix in the efax-0.9a distribution which causes errors when used in certain locales (this appears to be connected with floating point representations). A work-around has been included to get round this (all page sizes and related dimensions are now given in whole numbers of millimetres). efax-2.0.0 is a port to Gtk+-2.*/Gtkmm-2.*. It is functionally identical to efax-1.0.3, but has internationalisation support. Version 1.0.2 ------------- Autconf 2.5 has been used to create the configure script. The settings dialog has been improved. There is a new "View" button in the dialog brought up from the "File to fax:" dialog, which enables files to be checked before they are sent. Faxes in the Sent fax list and the Received fax list are now viewed using a postcript viewer, such as gv, ggv or kghostscript. Patch level a: change to the efax-gtk-send script. Version 1.0.1 ------------- A bug in the setting up of the logfile through the Settings dialog has been corrected. A bug in aclocal.m4, which would cause the incorrect binary directory to be chosen if configure is run with the --prefix=[DIR] parameter, has been corrected. The Settings dialog now has a `Reset' button, which will reset all the settings in it from the global configuration file (/etc/efax-gtkrc or /usr/local/etc/efax-gtkrc). The source files now come with a RPM spec file, so that a RPM binary can be created by entering `rpm -tb efax-gtk-[version].src.tgz'. A man file is also now provided. Patch level a: a missing header in settings.cpp has been added, so the program now compiles with STLport. Patch level b: the configure script now checks for gtkmm-1.2.5 or higher (earlier versions, such as the one supplied with Redhat 7.2, do not compile efax-gtk correctly). A few minor bug fixes. Version 1.0.0 ------------- Program settings may now be changed by using the Settings dialog, which is brought up from the File/Settings pull-down menu. Various bug fixes (in particular Standby mode now has better modem/serial port error handling). Version 0.93 ------------ Progress on negotiations and fax status, and errors and warnings, can be logged to a log file specified in the efax-gtkrc configuration file, or by redirecting stdout and stderr. A few code clean-ups. Version 0.92 ------------ There is now a sent fax list as well as a received fax list. The lists are now automatically sorted in chronological order. The received fax list will not show any empty directory when the program is standing by, or in the middle of receiving a fax. Some unnecessary efax messages are not displayed in the efax messages box. Patch level a: program will compile with Redhat 7.1/7.2 Version 0.91 ------------ Addresses can be arranged (moved up and down) in the addressbook. An error in the description of the operation of the CLASS: parameter in efax-gtkrc has been corrected. Version 0.90 ------------ First publicly available release. efax-gtk-3.2.8/INSTALL0000644000175000001440000000022511466007655011211 00000000000000For more information and a list of requirements please consult the README file. INSTALLATION ./configure make su root make install efax-gtk-3.2.8/efax-gtk.spec.in0000644000175000001440000000302111477756511013150 00000000000000%define name efax-gtk %define version @VERSION@ %define release 1 Summary: A GUI front end for the efax fax program Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Applications/Communications Source0: %{name}-%{version}.src.tgz BuildRoot: %{_tmppath}/%{name}-root Requires: ghostscript, gtk2, glib2, dbus-glib BuildRequires: gtk2-devel, glib2-devel, dbus-glib-devel Url: http://efax-gtk.sourceforge.net/ %description Efax-gtk is a GUI front end for the efax fax program. It can be used to send and receive faxes with a fax modem, and to manage, view and print faxes sent or received. It replaces the scripts which come with the efax package. It also includes and installs a version of efax with the distribution. %prep %setup -q -n %{name}-%{version} %build CFLAGS="$RPM_OPT_FLAGS -pthread" CXXFLAGS="$RPM_OPT_FLAGS -fexceptions -frtti -fsigned-char -fno-check-new -pthread" %configure --with-spooldir=/var/spool/fax make %install [ "$RPM_BUILD_ROOT" != "" ] && rm -rf $RPM_BUILD_ROOT make SPOOLDIR=$RPM_BUILD_ROOT/var/spool/fax DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/%{name} %{_bindir}/efax-0.9a %{_bindir}/efix-0.9a %{_mandir}/man1/* /var/spool/fax/efax-gtk-faxfilter /var/spool/fax/efax-gtk-socket-client %{_datadir}/locale/*/* %{_datadir}/applications/efax-gtk.desktop %{_datadir}/pixmaps/efax-gtk.png %doc AUTHORS README BUGS COPYING ChangeLog print_fax mail_fax %config %{_sysconfdir}/efax-gtkrc %dir %attr(775, lp, lp) /var/spool/fax efax-gtk-3.2.8/Makefile.in0000644000175000001440000007316511544566737012252 00000000000000# 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@ subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(srcdir)/efax-gtk.spec.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS config.guess config.rpath config.sub depcomp \ install-sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac 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 = config.h CONFIG_CLEAN_FILES = efax-gtk.spec 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' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" \ "$(DESTDIR)$(icondir)" "$(DESTDIR)$(sysconfdir)" NROFF = nroff MANS = $(dist_man_MANS) DATA = $(desktop_DATA) $(icon_DATA) $(sysconf_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 dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AC_HAVE_RECURSIVE_MUTEX_RUNTIME = @AC_HAVE_RECURSIVE_MUTEX_RUNTIME@ AC_USE_GLIB_MEMORY_SLICES_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_COMPAT@ AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT@ AC_USE_SCHED_YIELD = @AC_USE_SCHED_YIELD@ AC_USE_SMART_PTR_COMPARISON = @AC_USE_SMART_PTR_COMPARISON@ AC_USE_TYPE_TUPLE_ARGS = @AC_USE_TYPE_TUPLE_ARGS@ AC_USING_NAMESPACE = @AC_USING_NAMESPACE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COND_CXXFLAG = @COND_CXXFLAG@ COND_INTERNAL = @COND_INTERNAL@ COND_INTERNAL_LIB = @COND_INTERNAL_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_GTK_UTILS_CFLAGS = @CXX_GTK_UTILS_CFLAGS@ CXX_GTK_UTILS_LIBS = @CXX_GTK_UTILS_LIBS@ CYGPATH_W = @CYGPATH_W@ DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ 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@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPOOLDIR = @SPOOLDIR@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src efax po efax-gtk-faxfilter desktopdir = $(datadir)/applications desktop_DATA = efax-gtk.desktop icondir = $(datadir)/pixmaps icon_DATA = efax-gtk.png sysconf_DATA = efax-gtkrc dist_man_MANS = efax-gtk.1 EXTRA_DIST = efax-gtkrc efax-gtk.spec config.rpath BUGS efax-gtk.desktop efax-gtk.png mail_fax print_fax all: config.h $(MAKE) $(AM_MAKEFLAGS) 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): 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 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 efax-gtk.spec: $(top_builddir)/config.status $(srcdir)/efax-gtk.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-man1: $(dist_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='$(dist_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='$(dist_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-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-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || 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)$(icondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(icondir)" || exit $$?; \ done uninstall-iconDATA: @$(NORMAL_UNINSTALL) @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(icondir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(icondir)" && rm -f $$files install-sysconfDATA: $(sysconf_DATA) @$(NORMAL_INSTALL) test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || 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)$(sysconfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ done uninstall-sysconfDATA: @$(NORMAL_UNINSTALL) @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(sysconfdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sysconfdir)" && 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) @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 $(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 $(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 $(MANS) $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(sysconfdir)"; 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 mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -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-desktopDATA install-iconDATA install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-sysconfDATA install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 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 pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-desktopDATA uninstall-iconDATA uninstall-man \ uninstall-sysconfDATA uninstall-man: uninstall-man1 .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 am--refresh check check-am clean clean-generic \ 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-hdr distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-desktopDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-iconDATA install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip install-sysconfDATA installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-desktopDATA uninstall-iconDATA uninstall-man \ uninstall-man1 uninstall-sysconfDATA release: dist mv @PACKAGE@-@VERSION@.tar.gz @PACKAGE@-@VERSION@.src.tgz snapshot: dist mv @PACKAGE@-@VERSION@.tar.gz @PACKAGE@3-`date +%y%m%d`.src.tgz # 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: efax-gtk-3.2.8/NEWS0000644000175000001440000000000011466007655010646 00000000000000efax-gtk-3.2.8/efax-gtk.10000644000175000001440000004631111466007655011756 00000000000000.TH EFAX-GTK 1 "9 September 2008" "" "" .SH NAME efax-gtk \- GUI front end for efax program .SH SYNOPSIS \fBefax-gtk [\fPoptions\fB]\fP [ \fIfile\fP ] .TP Options: \fB[\-rs]\fP \-r Start the program in receive standby mode \-s Start the program hidden in the system tray .SH COPYRIGHT Efax-gtk is Copyright (C) Chris Vine, 2001 - 2008. It is released under the General Public License, version 2. .SH DESCRIPTION \fBefax-gtk\fP is a GTK+ front end for the efax program. It can be used to send and receive faxes with a fax modem, and to view, print and manage faxes received. It also provides a socket interface to provide a "virtual printer" for sending faxes from word processors and similar programs, and can automatically e-mail a received fax to a designated user. The efax-gtk distribution compiles and installs a patched version of efax-0.9a-001114, so you do not need to separately build and install efax. In particular, the version of efax supplied with efax-gtk provides internationalization support, and resolves certain difficulties with locales in the standard distribution. To avoid name conflicts the patched versions of efax and efix are installed as efax-0.9a and efix-0.9a. If you want to use the standard distributions of efax, delete efax-0.9a and efix-0.9a, and then make a symbolic link from efax to efax-0.9a and from efix to efix-0.9a so that efax-gtk can find them. efax-0.9 or higher is recommended, although the program will work with older versions of efax - with older versions, some automatic configuration options will not be available and the different lock file semantics means that a binary and not UUCP lock file will be created, which may confuse some other programs trying to access the same serial port. Any files to be faxed must be in postscript format, which is the generic printer format for Unix/Linux systems. The program will use ghostscript to convert these into the Group 3 fax format which the fax modem will understand. .SH ARGUMENTS A file may be passed as an argument to the program, in which case that file will automatically appear in the "File to send" box when the program starts. .SH USE The first time you use the program, you will be asked if you accept the terms of the General Public Licence, version 2. .SS Sending faxes Before sending a fax, the name of the file to be sent must be specified in the "File to fax" box. The file specified must be in postscript format, and will be converted by the program into the correct tiffg3 fax format. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. (If entering multiple files manually rather than by means of the "Multiple Files" dialog, use a `,\' or a `;\' as the file name separator.) The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book\' pull-down menu item. See "Using the address book" further below. However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing - this does the same thing as `fax send \-m ...\' using the efax `fax\' script from the command line). When a fax is received from the print system via the socket server, the program settings can be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes\' pull down menu item. See "Using the fax lists" further below. The program can send a fax when it is in receive standby mode. If sending a fax from receive standby mode, when the fax has been sent (or there is an error in sending the fax), the program will return to receive standby mode. To make sending faxes from word processors easy, a socket server is provided interfacing directly with the print system. See below for further details. Ordinary ascii text files can be converted into postscript if required using a number of programs, of which probably the easiest to use are nenscript or GNU enscript (`man enscript\'). .SS Receiving faxes Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. A fax can also be sent when the program is in receive standby mode. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when the relevant "Answer call", "Take over call" or "Standby" button was pressed. (Where in standby mode after a fax has been received, any further fax will derive its name from the time when receipt of the last received fax has been completed and the program goes back into standby mode.) Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes\' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed whenever a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax to a user or print a fax automatically when it is received. (These scripts are not installed by `make install\' - if you want to use them, make them executable with `chmod +x\' and copy them to a directory which is in the system path, such as /usr/local/bin, and then specify the script name in the settings dialog). .SS Using the address book To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address. Addresses are stored in file `$HOME/.efax-gtk_addressbook\'. .SS Using the fax lists To bring up the fax lists, go to the the `File\' menu and pick the `List received faxes\' or `List sent faxes\' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings\' dialog and entering it into the `Print/Print Shrink\' box. A fax can be deleted from a fax list by pressing the delete (trashcan) button. This will place the deleted fax in the `Trash\' folder. If the delete (trashcan) button is pressed in relation to a fax in the `Trash\' folder, it will be deleted from the file system. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the "tooltips" for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. .SS Settings The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings\' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset\' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. .SH LOGGING Errors and warnings from efax are displayed in red in the application text window, and information messages and reports on the progress of negotiations and on fax status are displayed in black in the window. In addition, these messages are sent to stderr and stdout respectively. Accordingly, fax status can be logged by redirecting stderr and stdout to a log file. As an alternative, a log file can also be maintained by setting the LOG_FILE parameter in the efax-gtkrc configuration file, or by entering a log file name via the Settings dialog. If no log file is specified, no log file will be maintained. If a log file is specified, then it can be viewed from the "Log" pull-down menu, and if efax-gtk is compiled against GTK+\-2.10 or greater, the log file can also be printed from the pull-down menu. .SH USING WITH A WORD PROCESSOR .SS Printing to file from the program itself Probably the simplest way of using the program with a word processor is to print to file from the print dialog of the word processor program concerned, and choosing a file name in the $HOME/faxout directory which can then be selected with the file selector dialog in efax-gtk. All Unix/Linux word and document processing programs will print to file in Postscript format, ready to be faxed by efax-gtk. (At least, if there is one which does not, I do not know of it). .SS Printing via CUPS Efax-gtk can run a socket server, which CUPS can connect to. When the socket server is running, fax files received from CUPS will automatically be displayed in a "Queued faxes from socket" list maintained by efax-gtk. From this list, a fax can be selected for sending by efax-gtk, so there is no need to print to file from the word processor and then select the file with the file selection dialog in efax-gtk. When a fax is received in this way from the print system via the socket, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes, the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. If you are using CUPS and you want to connect it directly to efax-gtk as mentioned above, you can do so by bringing up the fax administration page for CUPS in a web browser, installing a new printer with a name of "fax" (or whatever other name you want), choose the IPP protocol, pick a URI of "socket://[hostname]:[port]", and choose the "Raw" CUPS printer driver. The port number can be any port number less than 65536 and more than 1023 which is not used by any other service on your machine/network (this can be checked out by using nmap, but it is best to avoid any listed in /etc/services). For example, as you will usually be printing from a local computer, if you choose a port number of 9900 (which would be quite reasonable) the URI would be: .br socket://localhost:9900 As an alternative, rather easier than the web interface is adding a new CUPS virtual printer for efax-gtk by using lpadmin. To do this, log in as whatever user has appropriate permissions (usually root) and do it from the command line with: .br /usr/sbin/lpadmin \-p FaxPrinter \-E \-v socket://localhost:9900 That will create a printer name for efax-gtk called FaxPrinter for a case where efax-gtk is listening on port 9900. You should then start efax-gtk, go to the Socket tab in the settings dialog, check the "Run socket server" box, and enter 9900 in the "Port to which faxes to be sent" box. To send a fax from the "Queued faxes from socket" dialog, highlight the one to be sent, press the "Enter selected fax to send" button in the dialog (the one with an icon representing a fax machine) which will enter the fax in the "File to fax" box in efax-gtk, and then choose a telephone number to send it to and press the "Send fax" button in the ordinary way. If efax-gtk isn't running when you attempt to send a file via CUPS to efax-gtk don't worry. CUPS will queue the fax until it detects that the efax-gtk socket server is running, and then send it to efax-gtk. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. .SS Printing via lpd/lprng The socket server can also be used in the same way with lpd/lprng. The files efax-gtk-faxfilter and efax-gtk-socket-client are installed in /var/spool/fax, when you run `make install\' (the installation directory can be changed at the ./configure stage using the "./configure \-\-spooldir=[dir]" parameter. You should add at the end of /etc/printcap the following - fax:\\ .br :sd=/var/spool/fax:\\ .br :mx#0:\\ .br :sh:\\ .br :lp=/dev/null:\\ .br :if=/var/spool/fax/efax-gtk-faxfilter: This will cause a printer by the name of "fax" to be available, which (if printed to) will send the file to the efax-gtk socket server. If you set efax-gtk to listen on a port other than port 9900, you will need to amend the file /var/spool/fax/efax-gtk-faxfilter by hand to specify the correct port number on which efax-gtk is listening. Don't forget to restart the lpd printer daemon after amending /etc/printcap. (An equivalent addition to /etc/printcap can also be made by using the printer configuration tool with your distribution, choosing a printer name of "fax" (or whatever other name you want), choosing a printer device of "/dev/null", a spool directory of "/var/spool/fax" and an input filter of "/var/spool/fax/efax-gtk-faxfilter".) .SH SYSTEM TRAY Efax-gtk has been written so that it will sit in the system tray in GNOME and KDE when the program is running. From the system tray, the program can be hidden and raised again by left-clicking with the mouse on the icon, and right-clicking on it will bring up a menu from which certain program operations can be performed. A `tips\' display will also indicate the program state if the mouse is left hovering over the efax-gtk icon. Clicking on the top right (delete) button of the window frame will not cause the program to terminate if the program is embedded in the system tray. Instead it will hide it in the tray. If you want to close the program when it is embedded in the tray, either select the "Quit" menu item in the system tray efax-gtk menu, or select the "Quit" menu item in the "File" pull-down menu in the program toolbar. Recent versions of GNOME call the system tray a "Notification Area". If your desktop panel does not have a Notification Area installed, it can be placed on the panel by right clicking on the panel, and going to Add to Panel -> Utility -> Notification Area. .SH WORKING DIRECTORY A working sub-directory for the storage of .efax-gtk_addressbook, .efax-gtk_mainwin_save and .efax-gtk_queued_server_files and the faxin, faxout, faxsent and efax-gtk-server directories can be specified in the efax-gtkrc configuration file with the WORK_SUBDIR: parameter. This working subdirectory will appear as a subdirectory of $HOME (so if WORK_SUBDIR: is specified as efax-gtk, $HOME/efax-gtk will be the working directory). If none is specified, which is the default, then these files/directories will be stored directly in $HOME (which was what happened before the option was available, so past efax-gtk installations will not be broken if this option is left unset). The WORK_SUBDIR: parameter enables these files and folders to be kept together in a separate directory if wanted. If a WORK_SUBDIR: parameter is specified, only .efax-gtkrc will appear directly in $HOME. Note that if you specify a value for WORK_SUBDIR: in the efax-gtkrc configuration file, you will need to shift old versions of the files and directories mentioned above into the new working directory or efax-gtk will not be able to find them, so use this option with caution. In addition, if you wish to use the "print_fax" or "mail_fax" scripts, you will need to set the WORK_SUBDIR option in the relevant script. .SH FILES .TP \fIefax-gtk\fP The efax-gtk executable. .TP \fIefax-gtk-faxfilter\fP A filter script for lpd/lprng which will send files to the efax-gtk socket server .TP \fIefax-gtk-socket-client\fP The companion socket client for efax-gtk-faxfilter .TP \fIefax-gtkrc\fP The efax-gtk configuration file. .TP \fIefax-gtk.po\fP Various translation files for different locales. .TP \fIefax-gtk.1\fP Efax-gtk manual file .TP In addition some files from efax itself are installed, as follows: .TP \fIefax-0.9a\fP The efax executable .TP \fIefix-0.9a\fP The efix executable .TP \fIefax.1 efix.1\fP Efax manual files .SH SEE ALSO efax(1) .SH AUTHOR Chris Vine .br cvine@users.sourceforge.net efax-gtk-3.2.8/AUTHORS0000644000175000001440000000147111466007655011234 00000000000000Please read the BUGS file to see how to report bugs. AUTHORS Chris Vine PATCHES BY Jean-Baptiste Quenot - move the test for HAVE_PTHREAD_SIGMASK which includes after the local header files have been included (efax_controller.cpp, fax_list.cpp and mainwindow.cpp) store the result of gethostbyaddr() in a std::string to prevent static data being overwritten (socket_server.cpp). Pavel Vainerman - include an option for user files to be stored in a sub-directory of the $HOME directory to be specified in the efax-gtkrc configuration file (re-implemented by Chris Vine). add a date column to the fax lists ICON The efax-gtk.png icon is the former gnome (<= 2.28) stock_send-fax.png icon, and copyright of the icon is owned accordingly. efax-gtk-3.2.8/mkinstalldirs0000755000175000001440000000664711466007655013004 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2006-05-11.19 # Original author: Noah Friedman # 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-end: "$" # End: efax-gtk-3.2.8/BUGS0000644000175000001440000000020711466007655010643 00000000000000Please report any bugs to: cvine@users.sourceforge.net Please report the circumstances and in particular whether it is reproducible. efax-gtk-3.2.8/config.guess0000644000175000001440000012751611466007655012512 00000000000000#! /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 # Free Software Foundation, Inc. timestamp='2008-01-08' # 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 to . Submit a context # diff and a properly formatted 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. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. 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 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 __ELF__ >/dev/null 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'` exit ;; 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 ;; 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:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-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:*:[456]) 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 __LP64__ >/dev/null 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*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) 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 ;; 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 ;; 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 echo ${UNAME_MACHINE}-unknown-linux-gnueabi 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 ;; 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:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu 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 ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 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 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-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 ;; 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:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*) 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 i386. echo i386-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; } ;; 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.0*:*) 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 ;; 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 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 ;; 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 ;; 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: efax-gtk-3.2.8/efax-gtk.spec0000644000175000001440000000301511544567005012537 00000000000000%define name efax-gtk %define version 3.2.8 %define release 1 Summary: A GUI front end for the efax fax program Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Applications/Communications Source0: %{name}-%{version}.src.tgz BuildRoot: %{_tmppath}/%{name}-root Requires: ghostscript, gtk2, glib2, dbus-glib BuildRequires: gtk2-devel, glib2-devel, dbus-glib-devel Url: http://efax-gtk.sourceforge.net/ %description Efax-gtk is a GUI front end for the efax fax program. It can be used to send and receive faxes with a fax modem, and to manage, view and print faxes sent or received. It replaces the scripts which come with the efax package. It also includes and installs a version of efax with the distribution. %prep %setup -q -n %{name}-%{version} %build CFLAGS="$RPM_OPT_FLAGS -pthread" CXXFLAGS="$RPM_OPT_FLAGS -fexceptions -frtti -fsigned-char -fno-check-new -pthread" %configure --with-spooldir=/var/spool/fax make %install [ "$RPM_BUILD_ROOT" != "" ] && rm -rf $RPM_BUILD_ROOT make SPOOLDIR=$RPM_BUILD_ROOT/var/spool/fax DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/%{name} %{_bindir}/efax-0.9a %{_bindir}/efix-0.9a %{_mandir}/man1/* /var/spool/fax/efax-gtk-faxfilter /var/spool/fax/efax-gtk-socket-client %{_datadir}/locale/*/* %{_datadir}/applications/efax-gtk.desktop %{_datadir}/pixmaps/efax-gtk.png %doc AUTHORS README BUGS COPYING ChangeLog print_fax mail_fax %config %{_sysconfdir}/efax-gtkrc %dir %attr(775, lp, lp) /var/spool/fax efax-gtk-3.2.8/src/0000755000175000001440000000000011544574523011030 500000000000000efax-gtk-3.2.8/src/socket_notify.cpp0000644000175000001440000001165711466007653014344 00000000000000/* Copyright (C) 2004, 2006, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include "addressbook.h" #include "socket_notify.h" #ifdef ENABLE_NLS #include #endif void SocketNotifyDialogCB::socket_notify_dialog_button_clicked(GtkWidget* widget_p, void* data) { SocketNotifyDialog* instance_p = static_cast(data); if (widget_p == instance_p->number_button_p) { if (!AddressBook::get_is_address_list()) { AddressBook* dialog_p = new AddressBook(instance_p->standard_size, instance_p->get_win()); dialog_p->accepted.connect(Callback::make(*instance_p, &SocketNotifyDialog::set_number_cb)); // there is no memory leak -- AddressBook will delete its own memory // when it is closed } } else if (widget_p == instance_p->send_button_p) { gtk_widget_hide(GTK_WIDGET(instance_p->get_win())); instance_p->send_signals(); instance_p->close(); } else if (widget_p == instance_p->queue_button_p) { gtk_widget_hide(GTK_WIDGET(instance_p->get_win())); instance_p->queue_sig(); instance_p->close(); } else { write_error("Callback error in SocketNotifyDialogCB::socket_notify_button_clicked()\n"); gtk_widget_hide(GTK_WIDGET(instance_p->get_win())); instance_p->queue_sig(); instance_p->close(); } } SocketNotifyDialog::SocketNotifyDialog(const int size, const std::pair& fax_pair): WinBase(gettext("efax-gtk: print job received on socket"), prog_config.window_icon_h), standard_size(size) { number_button_p = gtk_button_new_with_label(gettext("Tel number: ")); send_button_p = gtk_button_new_with_label(gettext("Send fax")); queue_button_p = gtk_button_new_with_label(gettext("Queue fax")); number_entry_p = gtk_entry_new(); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkWidget* number_box_p = gtk_hbox_new(false, 0); GtkWidget* window_box_p = gtk_vbox_new(false, 0); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(button_box_p), standard_size/3); gtk_container_add(GTK_CONTAINER(button_box_p), queue_button_p); gtk_container_add(GTK_CONTAINER(button_box_p), send_button_p); fax_name.second = fax_pair.first; std::ostringstream strm; strm << gettext("PRINT JOB: ") << fax_pair.second; fax_name.first = strm.str(); strm << gettext(" has been received on socket.\n" "Send or queue fax?"); GtkWidget* label_p = gtk_label_new(strm.str().c_str()); gtk_widget_set_size_request(number_entry_p, standard_size * 7, standard_size); gtk_box_pack_start(GTK_BOX(number_box_p), number_button_p, false, false, standard_size/3); gtk_box_pack_start(GTK_BOX(number_box_p), number_entry_p, true, true, standard_size/3); gtk_box_pack_start(GTK_BOX(window_box_p), label_p, true, true, standard_size/2); gtk_box_pack_start(GTK_BOX(window_box_p), number_box_p, false, false, standard_size/3); gtk_box_pack_start(GTK_BOX(window_box_p), button_box_p, false, false, standard_size/3); g_signal_connect(G_OBJECT(number_button_p), "clicked", G_CALLBACK(SocketNotifyDialogCB::socket_notify_dialog_button_clicked), this); g_signal_connect(G_OBJECT(send_button_p), "clicked", G_CALLBACK(SocketNotifyDialogCB::socket_notify_dialog_button_clicked), this); g_signal_connect(G_OBJECT(queue_button_p), "clicked", G_CALLBACK(SocketNotifyDialogCB::socket_notify_dialog_button_clicked), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(number_button_p, true); gtk_widget_set_can_default(send_button_p, true); gtk_widget_set_can_default(queue_button_p, true); #else GTK_WIDGET_SET_FLAGS(number_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(send_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(queue_button_p, GTK_CAN_DEFAULT); #endif gtk_container_add(GTK_CONTAINER(get_win()), window_box_p); gtk_container_set_border_width(GTK_CONTAINER(get_win()), standard_size/2); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_widget_grab_focus(number_button_p); gtk_widget_show_all(GTK_WIDGET(get_win())); } void SocketNotifyDialog::set_number_cb(const std::string& number) { if (!number.empty()) { gtk_entry_set_text(GTK_ENTRY(number_entry_p), number.c_str()); // reset this window as sensitive to make grab_focus() work gtk_widget_set_sensitive(GTK_WIDGET(get_win()), true); gtk_widget_grab_focus(queue_button_p); } } void SocketNotifyDialog::send_signals(void) { fax_name_sig(fax_name); fax_number_sig(gtk_entry_get_text(GTK_ENTRY(number_entry_p))); sendfax_sig(); } void SocketNotifyDialog::on_delete_event(void) { gtk_widget_hide(GTK_WIDGET(get_win())); queue_sig(); close(); } efax-gtk-3.2.8/src/redial_queue_icons.h0000644000175000001440000000150011466007653014752 00000000000000#ifndef REDIAL_QUEUE_ICONS_H #define REDIAL_QUEUE_ICONS_H /* These icons were taken from those supplied with KDE 2.1 and 3.1 and are copyrighted accordingly */ /* XPM */ static const char* remove_xpm[]={ "22 22 2 1", "# c #000000", ". c None", "......................", "......................", "......................", "......................", "......................", "....##.........##.....", "....####......##......", ".....####....##.......", ".......###..#.........", "........#####.........", ".........###..........", "........#####.........", ".......###..##........", "......###....##.......", ".....###......#.......", ".....###.......#......", "......#...............", "................#.....", "......................", "......................", "......................", "......................"}; #endif efax-gtk-3.2.8/src/addressbook.cpp0000644000175000001440000005354311512434150013750 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include // the key codes are here #include "addressbook.h" #include "dialogs.h" #include "utils/tree_path_handle.h" #include "addressbook_icons.h" #include #ifdef ENABLE_NLS #include #endif #define ADDRESS_FILE ".efax-gtk_addressbook" #define ADDRESS_DIVIDER 3 int AddressBook::is_address_list = 0; namespace { namespace ModelColumns { enum {name, number, cols_num}; } // namespace ModelColumns } // anonymous namespace void AddressBookCB::addr_book_button_clicked(GtkWidget* widget_p, void* data) { AddressBook* instance_p = static_cast(data); if (widget_p == instance_p->ok_button_p) { if (instance_p->ok_impl()) instance_p->close(); } else if (widget_p == instance_p->cancel_button_p) { instance_p->result = ""; instance_p->close(); } else if (widget_p == instance_p->add_button_p) { instance_p->add_address_prompt(); } else if (widget_p == instance_p->delete_button_p) { instance_p->delete_address_prompt(); } else if (widget_p == instance_p->up_button_p) { instance_p->move_up_impl(); } else if (widget_p == instance_p->down_button_p) { instance_p->move_down_impl(); } else { write_error("Callback error in AddressBookCB::addr_book_button_clicked()\n"); instance_p->close(); } } void AddressBookCB::addr_book_drag_n_drop(GtkTreeModel*, GtkTreePath*, void* data) { static_cast(data)->save_list(); } AddressBook::AddressBook(const int size, GtkWindow* parent_p): WinBase(gettext("efax-gtk: Address book"), prog_config.window_icon_h, true, parent_p), standard_size(size) { // notify the existence of this object in case I later decide to use this dialog as modeless // by changing the modal parameter above to false is_address_list++; ok_button_p = gtk_button_new_from_stock(GTK_STOCK_OK); cancel_button_p = gtk_button_new_from_stock(GTK_STOCK_CANCEL); add_button_p = gtk_button_new(); delete_button_p = gtk_button_new(); up_button_p = gtk_button_new(); down_button_p = gtk_button_new(); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkTable* table_p = GTK_TABLE(gtk_table_new(2, 1, false)); GtkTable* list_table_p = GTK_TABLE(gtk_table_new(5, 2, false)); GtkScrolledWindow* scrolled_window_p = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(0, 0)); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(button_box_p), standard_size/2); gtk_container_add(GTK_CONTAINER(button_box_p), cancel_button_p); gtk_container_add(GTK_CONTAINER(button_box_p), ok_button_p); gtk_scrolled_window_set_shadow_type(scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(scrolled_window_p, GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS); // create the tree model and put it in a GobjHandle to handle its // lifetime, because it is not owned by a GTK+ container list_store_h = GobjHandle(GTK_TREE_MODEL(gtk_list_store_new(ModelColumns::cols_num, G_TYPE_STRING, G_TYPE_STRING))); // populate the model (containing the address list) read_list(); // create the tree view tree_view_p = GTK_TREE_VIEW(gtk_tree_view_new_with_model(list_store_h)); gtk_container_add(GTK_CONTAINER(scrolled_window_p), GTK_WIDGET(tree_view_p)); // provide renderers for tree view, pack into tree view columns // and connect to the tree model columns GtkCellRenderer* renderer_p = gtk_cell_renderer_text_new(); GtkTreeViewColumn* column_p = gtk_tree_view_column_new_with_attributes(gettext("Name"), renderer_p, "text", ModelColumns::name, static_cast(0)); gtk_tree_view_append_column(tree_view_p, column_p); renderer_p = gtk_cell_renderer_text_new(); column_p = gtk_tree_view_column_new_with_attributes(gettext("Number"), renderer_p, "text", ModelColumns::number, static_cast(0)); gtk_tree_view_append_column(tree_view_p, column_p); GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); // single line selection gtk_tree_selection_set_mode(selection_p, GTK_SELECTION_SINGLE); // make drag and drop work gtk_tree_view_set_reorderable(tree_view_p, true); // get any drag and drop to be saved to the addresses file g_signal_connect(G_OBJECT(list_store_h.get()), "row_deleted", G_CALLBACK(AddressBookCB::addr_book_drag_n_drop), this); // bring up the icon size registered in MainWindow::MainWindow() GtkIconSize efax_gtk_button_size = gtk_icon_size_from_name("EFAX_GTK_BUTTON_SIZE"); GtkWidget* image_p; { // provide a scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(add_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(add_button_p), image_p); } image_p = gtk_image_new_from_stock(GTK_STOCK_DELETE, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(delete_button_p), image_p); image_p = gtk_image_new_from_stock(GTK_STOCK_GO_UP, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(up_button_p), image_p); image_p = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(down_button_p), image_p); GtkWidget* dummy_p = gtk_label_new(0); gtk_table_attach(list_table_p, add_button_p, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/2, 0); gtk_table_attach(list_table_p, delete_button_p, 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/2, 0); gtk_table_attach(list_table_p, up_button_p, 0, 1, 2, 3, GTK_SHRINK, GTK_SHRINK, standard_size/2, 0); gtk_table_attach(list_table_p, down_button_p, 0, 1, 3, 4, GTK_SHRINK, GTK_SHRINK, standard_size/2, 0); gtk_table_attach(list_table_p, dummy_p, 0, 1, 4, 5, GTK_SHRINK, GTK_EXPAND, standard_size/2, 0); gtk_table_attach(list_table_p, GTK_WIDGET(scrolled_window_p), 1, 2, 0, 5, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), 0, 0); gtk_widget_set_tooltip_text(add_button_p, gettext("Add new address")); gtk_widget_set_tooltip_text(delete_button_p, gettext("Delete address")); gtk_widget_set_tooltip_text(up_button_p, gettext("Move address up")); gtk_widget_set_tooltip_text(down_button_p, gettext("Move address down")); gtk_table_attach(table_p, GTK_WIDGET(list_table_p), 0, 1, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/3, standard_size/3); gtk_table_attach(table_p, button_box_p, 0, 1, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); g_signal_connect(G_OBJECT(ok_button_p), "clicked", G_CALLBACK(AddressBookCB::addr_book_button_clicked), this); g_signal_connect(G_OBJECT(cancel_button_p), "clicked", G_CALLBACK(AddressBookCB::addr_book_button_clicked), this); g_signal_connect(G_OBJECT(add_button_p), "clicked", G_CALLBACK(AddressBookCB::addr_book_button_clicked), this); g_signal_connect(G_OBJECT(delete_button_p), "clicked", G_CALLBACK(AddressBookCB::addr_book_button_clicked), this); g_signal_connect(G_OBJECT(up_button_p), "clicked", G_CALLBACK(AddressBookCB::addr_book_button_clicked), this); g_signal_connect(G_OBJECT(down_button_p), "clicked", G_CALLBACK(AddressBookCB::addr_book_button_clicked), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(ok_button_p, true); gtk_widget_set_can_default(cancel_button_p, true); gtk_widget_set_can_default(add_button_p, false); gtk_widget_set_can_default(delete_button_p, false); gtk_widget_set_can_focus(up_button_p, false); gtk_widget_set_can_focus(down_button_p, false); #else GTK_WIDGET_SET_FLAGS(ok_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(cancel_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_UNSET_FLAGS(add_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_UNSET_FLAGS(delete_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_UNSET_FLAGS(up_button_p, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(down_button_p, GTK_CAN_FOCUS); #endif gtk_container_set_border_width(GTK_CONTAINER(table_p), standard_size/3); gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(table_p)); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_widget_grab_focus(cancel_button_p); gtk_window_set_default_size(get_win(), standard_size * 15, standard_size * 8); gtk_widget_show_all(GTK_WIDGET(get_win())); } AddressBook::~AddressBook(void) { // notify the destruction of this object is_address_list--; } void AddressBook::on_delete_event(void) { gtk_widget_hide(GTK_WIDGET(get_win())); result = ""; close(); } bool AddressBook::ok_impl(void) { bool return_val = false; if (get_number().get()) result = get_number().get(); if (!result.empty()) { accepted(result); return_val = true; } else beep(); return return_val; } GcharSharedHandle AddressBook::get_number(void) { GtkTreeIter iter; GtkTreeModel* model_p; gchar* number_p = 0; GtkTreeSelection* selection_p(gtk_tree_view_get_selection(tree_view_p)); if (gtk_tree_selection_get_selected(selection_p, &model_p, &iter)) { gtk_tree_model_get(model_p, &iter, ModelColumns::number, &number_p, -1); } return GcharSharedHandle(number_p); } void AddressBook::add_address_prompt(void) { AddressDialog* dialog_p = new AddressDialog(standard_size, this->get_win()); dialog_p->accepted.connect(Callback::make(*this, &AddressBook::add_address_impl)); // there is no memory leak -- AddressDailog will delete its own memory // when it is closed } void AddressBook::add_address_impl(const std::vector& address) { GtkTreeIter iter; gtk_list_store_append(GTK_LIST_STORE(list_store_h.get()), &iter); gtk_list_store_set(GTK_LIST_STORE(list_store_h.get()), &iter, ModelColumns::name, address[0].c_str(), ModelColumns::number, address[1].c_str(), -1); save_list(); } void AddressBook::delete_address_prompt(void) { GtkTreeIter iter; GtkTreeSelection* selection_p(gtk_tree_view_get_selection(tree_view_p)); if (gtk_tree_selection_get_selected(selection_p, 0, &iter)) { PromptDialog* dialog_p = new PromptDialog(gettext("Delete selected address?"), gettext("efax-gtk: Delete address"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &AddressBook::delete_address_impl)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } else beep(); } void AddressBook::delete_address_impl(void) { GtkTreeIter iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p(gtk_tree_view_get_selection(tree_view_p)); if (gtk_tree_selection_get_selected(selection_p, &model_p, &iter)) { // delete the address by removing it from the list store gtk_list_store_remove(GTK_LIST_STORE(model_p), &iter); save_list(); } } void AddressBook::read_list(void) { std::string filename(prog_config.working_dir); filename += "/" ADDRESS_FILE; #ifdef HAVE_IOS_NOCREATE std::ifstream filein(filename.c_str(), std::ios::in | std::ios::nocreate); #else // we must have Std C++ so we probably don't need a ios::nocreate // flag on a read open to ensure uniqueness std::ifstream filein(filename.c_str(), std::ios::in); #endif if (filein) { gtk_list_store_clear(GTK_LIST_STORE(list_store_h.get())); std::string line; while (std::getline(filein, line)) { if (!line.empty()) { std::string::size_type pos = line.find(ADDRESS_DIVIDER, 0); // pos now is set to end of name value // get a list store row to insert the number and name in GtkTreeIter iter; gtk_list_store_append(GTK_LIST_STORE(list_store_h.get()), &iter); try { gtk_list_store_set(GTK_LIST_STORE(list_store_h.get()), &iter, ModelColumns::name, Utf8::locale_to_utf8(line.substr(0, pos)).c_str(), -1); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in AddressBook::read_list()\n"); } pos++; // pos now is set to the beginning of the number value try { gtk_list_store_set(GTK_LIST_STORE(list_store_h.get()), &iter, ModelColumns::number, Utf8::locale_to_utf8(line.substr(pos, line.size() - pos)).c_str(), -1); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in AddressBook::read_list()\n"); } } } } } void AddressBook::save_list(void) { std::string filename(prog_config.working_dir); filename += "/" ADDRESS_FILE; std::ofstream fileout(filename.c_str(), std::ios::out); if (fileout) { gchar* name_p; gchar* number_p; GtkTreeIter iter; bool not_at_end = gtk_tree_model_get_iter_first(list_store_h, &iter); while(not_at_end) { // the try()/catch() blocks here are ultra cautious - something must be // seriously wrong if model_columns.name and model_columns.number are not // in valid UTF-8 format, since they are tested where necessary at input gtk_tree_model_get(list_store_h, &iter, ModelColumns::name, &name_p, ModelColumns::number, &number_p, -1); GcharScopedHandle name_h(name_p); GcharScopedHandle number_h(number_p); try { fileout << Utf8::locale_from_utf8(name_h.get()); fileout << static_cast(ADDRESS_DIVIDER); fileout << Utf8::locale_from_utf8(number_h.get()); fileout << '\n'; } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in AddressBook::save_list()\n"); // end the line comprising whatever we have put there fileout << '\n'; } not_at_end = gtk_tree_model_iter_next(list_store_h, &iter); } } } void AddressBook::move_up_impl(void) { GtkTreeIter selected_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &selected_iter)) { TreePathScopedHandle path_h(gtk_tree_model_get_path(model_p, &selected_iter)); if (gtk_tree_path_prev(path_h)) { GtkTreeIter prev_iter; if (!gtk_tree_model_get_iter(model_p, &prev_iter, path_h)) { write_error("Iterator error in AddressBook::move_up_impl()\n"); beep(); } else { gchar* selected_name_p = 0; gchar* selected_number_p = 0; gchar* prev_name_p = 0; gchar* prev_number_p = 0; // just do a swap of values gtk_tree_model_get(model_p, &selected_iter, ModelColumns::name, &selected_name_p, ModelColumns::number, &selected_number_p, -1); gtk_tree_model_get(model_p, &prev_iter, ModelColumns::name, &prev_name_p, ModelColumns::number, &prev_number_p, -1); gtk_list_store_set(GTK_LIST_STORE(model_p), &selected_iter, ModelColumns::name, prev_name_p, ModelColumns::number, prev_number_p, -1); gtk_list_store_set(GTK_LIST_STORE(model_p), &prev_iter, ModelColumns::name, selected_name_p, ModelColumns::number, selected_number_p, -1); // we have not placed the gchar* strings given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free them by hand g_free(selected_name_p); g_free(selected_number_p); g_free(prev_name_p); g_free(prev_number_p); gtk_tree_selection_select_iter(selection_p, &prev_iter); save_list(); } } else beep(); } else beep(); } void AddressBook::move_down_impl(void) { GtkTreeIter selected_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &selected_iter)) { GtkTreeIter next_iter = selected_iter;; if (gtk_tree_model_iter_next(model_p, &next_iter)) { gchar* selected_name_p = 0; gchar* selected_number_p = 0; gchar* next_name_p = 0; gchar* next_number_p = 0; // just do a swap of values gtk_tree_model_get(model_p, &selected_iter, ModelColumns::name, &selected_name_p, ModelColumns::number, &selected_number_p, -1); gtk_tree_model_get(model_p, &next_iter, ModelColumns::name, &next_name_p, ModelColumns::number, &next_number_p, -1); gtk_list_store_set(GTK_LIST_STORE(model_p), &selected_iter, ModelColumns::name, next_name_p, ModelColumns::number, next_number_p, -1); gtk_list_store_set(GTK_LIST_STORE(model_p), &next_iter, ModelColumns::name, selected_name_p, ModelColumns::number, selected_number_p, -1); // we have not placed the gchar* strings given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free them by hand g_free(selected_name_p); g_free(selected_number_p); g_free(next_name_p); g_free(next_number_p); gtk_tree_selection_select_iter(selection_p, &next_iter); save_list(); } else beep(); } else beep(); } void AddressDialogCB::addr_dialog_selected(GtkWidget* widget_p, void* data) { AddressDialog* instance_p = static_cast(data); if (widget_p == instance_p->ok_button_p) { if (instance_p->selected_impl()) instance_p->close(); } else if (widget_p == instance_p->cancel_button_p) instance_p->close(); else { write_error("Callback error in AddressDialogCB::addr_dialog_selected()\n"); instance_p->close(); } } gboolean AddressDialogCB::addr_dialog_key_press_event(GtkWidget*, GdkEventKey* event_p, void* data) { AddressDialog* instance_p = static_cast(data); int keycode = event_p->keyval; #if GTK_CHECK_VERSION(2,20,0) bool cancel_focus = gtk_widget_has_focus(instance_p->cancel_button_p); #else bool cancel_focus = GTK_WIDGET_HAS_FOCUS(instance_p->cancel_button_p); #endif #if GTK_CHECK_VERSION(2,99,0) if (keycode == GDK_KEY_Return && !cancel_focus) { if (instance_p->selected_impl()) instance_p->close(); return true; // stop processing here } #else if (keycode == GDK_Return && !cancel_focus) { if (instance_p->selected_impl()) instance_p->close(); return true; // stop processing here } #endif return false; // continue processing key events } AddressDialog::AddressDialog(const int standard_size, GtkWindow* parent_p): WinBase(gettext("efax-gtk: Add address"), prog_config.window_icon_h, true, parent_p) { ok_button_p = gtk_button_new_from_stock(GTK_STOCK_OK); cancel_button_p = gtk_button_new_from_stock(GTK_STOCK_CANCEL); GtkWidget* name_label_p = gtk_label_new(gettext("Name:")); GtkWidget* number_label_p = gtk_label_new(gettext("Number:")); gtk_label_set_justify(GTK_LABEL(name_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(number_label_p), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(name_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(number_label_p), 1, 0.5); name_entry_p = gtk_entry_new(); number_entry_p = gtk_entry_new(); gtk_widget_set_size_request(name_entry_p, standard_size * 8, standard_size); gtk_widget_set_size_request(number_entry_p, standard_size * 8, standard_size); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkTable* table_p = GTK_TABLE(gtk_table_new(3, 2, false)); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(button_box_p), standard_size/2); gtk_container_add(GTK_CONTAINER(button_box_p), cancel_button_p); gtk_container_add(GTK_CONTAINER(button_box_p), ok_button_p); gtk_table_attach(table_p, name_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/2, standard_size/4); gtk_table_attach(table_p, name_entry_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/2, standard_size/4); gtk_table_attach(table_p, number_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, standard_size/2, standard_size/4); gtk_table_attach(table_p, number_entry_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/2, standard_size/4); gtk_table_attach(table_p, button_box_p, 0, 2, 2, 3, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/2, standard_size/4); g_signal_connect(G_OBJECT(ok_button_p), "clicked", G_CALLBACK(AddressDialogCB::addr_dialog_selected), this); g_signal_connect(G_OBJECT(cancel_button_p), "clicked", G_CALLBACK(AddressDialogCB::addr_dialog_selected), this); g_signal_connect(G_OBJECT(get_win()), "key_press_event", G_CALLBACK(AddressDialogCB::addr_dialog_key_press_event), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(ok_button_p, true); gtk_widget_set_can_default(cancel_button_p, true); #else GTK_WIDGET_SET_FLAGS(ok_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(cancel_button_p, GTK_CAN_DEFAULT); #endif gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(table_p)); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_container_set_border_width(GTK_CONTAINER(get_win()), standard_size/2); gtk_widget_grab_focus(name_entry_p); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_resizable(get_win(), false); gtk_widget_show_all(GTK_WIDGET(get_win())); } bool AddressDialog::selected_impl(void) { bool return_val = false; const gchar* name_text = gtk_entry_get_text(GTK_ENTRY(name_entry_p)); const gchar* number_text = gtk_entry_get_text(GTK_ENTRY(number_entry_p)); if (!*name_text || !*number_text) beep(); else { std::vector out_val; out_val.push_back((const char*)name_text); out_val.push_back((const char*)number_text); accepted(out_val); return_val = true; } return return_val; } efax-gtk-3.2.8/src/utils/0000755000175000001440000000000011544574524012171 500000000000000efax-gtk-3.2.8/src/utils/icon_info_handle.h0000644000175000001440000000260711466007653015542 00000000000000/* Copyright (C) 2004 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef ICON_INFO_HANDLE_H #define ICON_INFO_HANDLE_H #include #include #include class GtkIconInfoFree { public: void operator()(GtkIconInfo* obj_p) { if (obj_p) { gtk_icon_info_free(obj_p); } } }; typedef ScopedHandle IconInfoScopedHandle; #endif efax-gtk-3.2.8/src/utils/Makefile.in0000644000175000001440000003565511544566737014203 00000000000000# 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@ subdir = src/utils DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libutils_a_AR = $(AR) $(ARFLAGS) libutils_a_LIBADD = am_libutils_a_OBJECTS = selected_rows_handle.$(OBJEXT) \ utf8_utils.$(OBJEXT) toolbar_append_widget.$(OBJEXT) \ mono_tiff_print_manager.$(OBJEXT) libutils_a_OBJECTS = $(am_libutils_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(libutils_a_SOURCES) DIST_SOURCES = $(libutils_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AC_HAVE_RECURSIVE_MUTEX_RUNTIME = @AC_HAVE_RECURSIVE_MUTEX_RUNTIME@ AC_USE_GLIB_MEMORY_SLICES_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_COMPAT@ AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT@ AC_USE_SCHED_YIELD = @AC_USE_SCHED_YIELD@ AC_USE_SMART_PTR_COMPARISON = @AC_USE_SMART_PTR_COMPARISON@ AC_USE_TYPE_TUPLE_ARGS = @AC_USE_TYPE_TUPLE_ARGS@ AC_USING_NAMESPACE = @AC_USING_NAMESPACE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COND_CXXFLAG = @COND_CXXFLAG@ COND_INTERNAL = @COND_INTERNAL@ COND_INTERNAL_LIB = @COND_INTERNAL_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_GTK_UTILS_CFLAGS = @CXX_GTK_UTILS_CFLAGS@ CXX_GTK_UTILS_LIBS = @CXX_GTK_UTILS_LIBS@ CYGPATH_W = @CYGPATH_W@ DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ 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@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPOOLDIR = @SPOOLDIR@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libutils.a libutils_a_SOURCES = selected_rows_handle.cpp \ utf8_utils.cpp \ toolbar_append_widget.cpp \ mono_tiff_print_manager.cpp noinst_HEADERS = icon_info_handle.h \ selected_rows_handle.h \ sem_sync.h utf8_utils.h \ tree_path_handle.h \ tree_row_reference_handle.h \ toolbar_append_widget.h \ mono_tiff_print_manager.h \ pango_layout_iter_handle.h \ tiff_handle.h cairo_handle.h AM_CXXFLAGS = -D_XOPEN_SOURCE=600 @GTK_CFLAGS@ @GTHREAD_CFLAGS@ @CXX_GTK_UTILS_CFLAGS@ @COND_CXXFLAG@ -I.. EXTRA_DIST = LGPL.TXT all: all-am .SUFFIXES: .SUFFIXES: .cpp .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 src/utils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libutils.a: $(libutils_a_OBJECTS) $(libutils_a_DEPENDENCIES) -rm -f libutils.a $(libutils_a_AR) libutils.a $(libutils_a_OBJECTS) $(libutils_a_LIBADD) $(RANLIB) libutils.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono_tiff_print_manager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selected_rows_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_append_widget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8_utils.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 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) $(HEADERS) 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-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 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-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic 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 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: efax-gtk-3.2.8/src/utils/tree_path_handle.h0000644000175000001440000000365111466007653015552 00000000000000/* Copyright (C) 2005 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef TREE_PATH_HANDLE_H #define TREE_PATH_HANDLE_H #include #include #include class GtkTreePathFree { public: void operator()(GtkTreePath* obj_p) { if (obj_p) gtk_tree_path_free(obj_p); } }; typedef ScopedHandle TreePathScopedHandle; typedef SharedHandle TreePathSharedHandle; inline bool operator==(TreePathScopedHandle& h1, TreePathScopedHandle& h2) { return !(gtk_tree_path_compare(h1, h2)); } inline bool operator!=(TreePathScopedHandle& h1, TreePathScopedHandle& h2) { return gtk_tree_path_compare(h1, h2); } inline bool operator==(TreePathSharedHandle& h1, TreePathSharedHandle& h2) { return !(gtk_tree_path_compare(h1, h2)); } inline bool operator!=(TreePathSharedHandle& h1, TreePathSharedHandle& h2) { return gtk_tree_path_compare(h1, h2); } #endif efax-gtk-3.2.8/src/utils/tree_row_reference_handle.h0000644000175000001440000000347111466007653017443 00000000000000/* Copyright (C) 2005 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef TREE_ROW_REFERENCE_HANDLE_H #define TREE_ROW_REFERENCE_HANDLE_H #include #include "tree_path_handle.h" #include #include class GtkTreeRowRefFree { public: void operator()(GtkTreeRowReference* obj_p) { gtk_tree_row_reference_free(obj_p); } }; typedef SharedHandle TreeRowRefSharedHandle; // provide operator<() so that a TreeRowRefSharedHandle // can be a key in an associative container inline bool operator<(const TreeRowRefSharedHandle& h1, const TreeRowRefSharedHandle& h2) { return (gtk_tree_path_compare(TreePathScopedHandle(gtk_tree_row_reference_get_path(h1.get())), TreePathScopedHandle(gtk_tree_row_reference_get_path(h2.get()))) == -1); } #endif efax-gtk-3.2.8/src/utils/selected_rows_handle.cpp0000644000175000001440000000507011466007653016771 00000000000000/* Copyright (C) 2004 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include "selected_rows_handle.h" class SelectedRowsHandle::CB { public: static void fill(GtkTreePath* path_p, void* data) { SelectedRowsHandle* instance_p = static_cast(data); instance_p->path_list.push_back(TreePathSharedHandle(gtk_tree_path_copy(path_p))); } }; // the GObject callback function with both C linkage // specification and internal linkage extern "C" { static void srh_fill_cb(GtkTreeModel*, GtkTreePath* path_p, GtkTreeIter*, void* data) { SelectedRowsHandle::CB::fill(path_p, data); } } // extern "C" // this is a functor for converting a TreePathSharedHandle to a TreeRowRefSharedHandle // and is suitable for use with std::transform() class PathToRowRef { GtkTreeModel* model_p; public: TreeRowRefSharedHandle operator()(const TreePathSharedHandle& path_h) { return TreeRowRefSharedHandle(gtk_tree_row_reference_new(model_p, path_h)); } PathToRowRef(GtkTreeModel* model_p_): model_p(model_p_) {} }; void SelectedRowsHandle::fill(const GtkTreeView* tree_view_p) { path_list.clear(); GtkTreeSelection* selection_p = gtk_tree_view_get_selection(const_cast(tree_view_p)); gtk_tree_selection_selected_foreach(selection_p, srh_fill_cb, this); } void SelectedRowsHandle::get_ref_list(GtkTreeModel* model_p, RowRefList& row_ref_list) const { row_ref_list.clear(); std::transform(path_list.begin(), path_list.end(), std::back_inserter(row_ref_list), PathToRowRef(model_p)); } efax-gtk-3.2.8/src/utils/toolbar_append_widget.cpp0000644000175000001440000000261311466007653017150 00000000000000/* Copyright (C) 2006 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include "toolbar_append_widget.h" void toolbar_append_widget(GtkToolbar* toolbar_p, GtkWidget* widget_p, const char* tooltip_text_p) { GtkToolItem* toolitem_p = gtk_tool_item_new(); gtk_container_add(GTK_CONTAINER(toolitem_p), widget_p); gtk_tool_item_set_tooltip_text(toolitem_p, tooltip_text_p); gtk_toolbar_insert(toolbar_p, toolitem_p, -1); } efax-gtk-3.2.8/src/utils/tiff_handle.h0000644000175000001440000000254111466007653014524 00000000000000/* Copyright (C) 2008 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef TIFF_HANDLE_H #define TIFF_HANDLE_H #include #include #include class TiffFileClose { public: void operator()(TIFF* obj_p) { if (obj_p) { TIFFClose(obj_p); } } }; typedef ScopedHandle TiffFileScopedHandle; #endif efax-gtk-3.2.8/src/utils/mono_tiff_print_manager.cpp0000644000175000001440000004305311544200716017475 00000000000000/* Copyright (C) 2008 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include // we only compile this file if GTK+ version is 2.10 or higher #if GTK_CHECK_VERSION(2,10,0) #include #include #include #include #include #include #include "mono_tiff_print_manager.h" #include "tiff_handle.h" #include "cairo_handle.h" #include #ifdef ENABLE_NLS #include #endif // uncomment the following if the specialist write_error() function in // prog_defs.h and definition of MEM_ERROR are not available in the // application in question /* #include #ifdef HAVE_OSTREAM #include #endif inline void write_error(const char* message) { std::cerr << message; } #define MEM_ERROR 10 */ inline uint32 cr_get_stride(uint32 width) { #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 6, 0) return cairo_format_stride_for_width (CAIRO_FORMAT_A1, width); #else return ((width + 7)/8 + 3) & (~3); #endif } // define this if asynchronous printing is permitted - this only works // with GTK+2.10.13 or greater (printing to file doesn't work before // GTK+2.10.14, whether synchronously or asynchronously) #define MONO_TIFF_PRINT_MANAGER_ALLOW_ASYNC 1 #if !(GTK_CHECK_VERSION(2,10,13)) #undef MONO_TIFF_PRINT_MANAGER_ALLOW_ASYNC #endif GobjHandle MonoTiffPrintManager::print_settings_h; GobjHandle MonoTiffPrintManager::page_setup_h; class MonoTiffPrintManager::CB { public: static void begin_print(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, void* data) { static_cast(data)->begin_print_impl(print_operation_p, context_p); } static void draw_page(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, gint page_nr, void* data) { static_cast(data)->draw_page_impl(print_operation_p, context_p, page_nr); } static void done(GtkPrintOperation* print_operation_p, GtkPrintOperationResult result, void* data) { MonoTiffPrintManager* instance_p = static_cast(data); if (result == GTK_PRINT_OPERATION_RESULT_ERROR) { write_error("Print error in MonoTiffPrintManagerCB::mono_tiff_print_done()\n"); GError* error_p; gtk_print_operation_get_error(print_operation_p, &error_p); GerrorScopedHandle handle_h(error_p); write_error(error_p->message); write_error("\n"); } else if (result == GTK_PRINT_OPERATION_RESULT_APPLY) { // save the print settings MonoTiffPrintManager::print_settings_h = GobjHandle(gtk_print_operation_get_print_settings(print_operation_p)); // and take ownership of the GtkPrintSettings object g_object_ref(G_OBJECT(MonoTiffPrintManager::print_settings_h.get())); } else if (result == GTK_PRINT_OPERATION_RESULT_CANCEL && instance_p->parent_p && !instance_p->cancelled_when_drawing) { // the parent will not be set sensitive if MonoTiffPrintManager::begin_print_impl() // has not been entered because the print job was cancelled from the print dialog gtk_widget_set_sensitive(GTK_WIDGET(instance_p->parent_p), true); } { // scope block for mutex lock Thread::Mutex::Lock lock(instance_p->mutex); instance_p->ready = true; } instance_p->unref(); } static void page_setup_done(GtkPageSetup* page_setup_p, void* data) { if (page_setup_p) { // The documentation is unclear whether we get a new GtkPageSetup // object back if an existing GtkPageSetup object was passed to // gtk_print_run_page_setup_dialog_async(). However this is safe // even if we get the same object back again - see GobjHandle // implementation MonoTiffPrintManager::page_setup_h = GobjHandle(page_setup_p); } if (data) gtk_widget_set_sensitive(GTK_WIDGET(data), true); } static void request_page_setup(GtkPageSetup* page_setup_p) { // we want to remove the right and bottom margins, as these will // be established by the fax as sent. If the recipient wants to // scale them to fit different printer margins, the user should // set scaling from the print dialog. We need to keep the left // and top margins so that the top fax header line will print - // the draw_page_impl() method will automatically scale for these. gtk_page_setup_set_bottom_margin(page_setup_p, 0.0, GTK_UNIT_MM); gtk_page_setup_set_right_margin(page_setup_p, 0.0, GTK_UNIT_MM); } }; // the GObject callback functions with both C linkage // specification and internal linkage extern "C" { static void mtp_begin_print(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, void* data) { MonoTiffPrintManager::CB::begin_print(print_operation_p, context_p, data); } static void mtp_draw_page(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, gint page_nr, void* data) { MonoTiffPrintManager::CB::draw_page(print_operation_p, context_p, page_nr, data); } static void mtp_done(GtkPrintOperation* print_operation_p, GtkPrintOperationResult result, void* data) { MonoTiffPrintManager::CB::done(print_operation_p, result, data); } static void mtp_page_setup_done(GtkPageSetup* page_setup_p, void* data) { MonoTiffPrintManager::CB::page_setup_done(page_setup_p, data); } static void mtp_request_page_setup(GtkPrintOperation*, GtkPrintContext*, gint, GtkPageSetup* page_setup_p, void*) { MonoTiffPrintManager::CB::request_page_setup(page_setup_p); } } // extern "C" MonoTiffPrintManager::~MonoTiffPrintManager(void) { // clear the filenames vector through a mutex to synchronise memory Thread::Mutex::Lock lock(mutex); filenames.clear(); } IntrusivePtr MonoTiffPrintManager::create_manager(GtkWindow* parent) { MonoTiffPrintManager* instance_p = new MonoTiffPrintManager; instance_p->print_notifier.connect(Callback::make(*instance_p, &MonoTiffPrintManager::print_files)); Thread::Mutex::Lock lock(instance_p->mutex); std::memset(&(instance_p->destroy_key), 0, sizeof(cairo_user_data_key_t)); instance_p->parent_p = parent; instance_p->cancelled_when_drawing = false; instance_p->ready = true; return IntrusivePtr(instance_p); } void MonoTiffPrintManager::page_setup(GtkWindow* parent) { if (!print_settings_h.get()) { print_settings_h = GobjHandle(gtk_print_settings_new()); } if (parent) gtk_widget_set_sensitive(GTK_WIDGET(parent), false); gtk_print_run_page_setup_dialog_async(parent, page_setup_h, print_settings_h, mtp_page_setup_done, parent); } bool MonoTiffPrintManager::set_filenames(const std::vector& filenames_) { Thread::Mutex::Lock lock(mutex); if (!ready) return false; filenames = filenames_; return true; } bool MonoTiffPrintManager::print(void) { { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); if (!ready) return false; mode = print_mode; // protect our innards ready = false; } // take ownership of ourselves ref(); print_notifier(); return true; } bool MonoTiffPrintManager::view(void) { { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); if (!ready) return false; mode = view_mode; // protect our innards ready = false; } // take ownership of ourselves ref(); print_notifier(); return true; } bool MonoTiffPrintManager::print_to_file(const char* filename) { { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); if (!ready) return false; write_filename = filename; if (write_filename.empty()) { write_error(gettext("No file to print specified")); return false; } mode = file_mode; // protect our innards ready = false; } // take ownership of ourselves ref(); print_notifier(); return true; } void MonoTiffPrintManager::print_files(void) { // hand back ownership to local scope so that if there is a problem // or an exception is thrown this method cleans itself up, and it also // automatically cleans up if we do not do an asynchronous print (we will // ref() again later in this method if we are going to do an asynchronous // print and everything is set up) IntrusivePtr temp(this); unref(); GobjHandle print_operation_h(gtk_print_operation_new()); if (print_settings_h.get()) { gtk_print_operation_set_print_settings(print_operation_h, print_settings_h); } if (page_setup_h.get()) { gtk_print_operation_set_default_page_setup(print_operation_h, page_setup_h); } g_signal_connect(G_OBJECT(print_operation_h.get()), "begin_print", G_CALLBACK(mtp_begin_print), this); g_signal_connect(G_OBJECT(print_operation_h.get()), "draw_page", G_CALLBACK(mtp_draw_page), this); g_signal_connect(G_OBJECT(print_operation_h.get()), "request_page_setup", G_CALLBACK(mtp_request_page_setup), 0); #ifdef MONO_TIFF_PRINT_MANAGER_ALLOW_ASYNC g_signal_connect(G_OBJECT(print_operation_h.get()), "done", G_CALLBACK(mtp_done), this); gtk_print_operation_set_allow_async(print_operation_h, true); // regain ownership of ourselves (the print system will do the final // unreference in the MonoTiffPrintManagerCB::mono_tiff_print_done() callback) ref(); #endif GError* error_p = 0; GtkPrintOperationResult result; Mode mode_chosen; { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); mode_chosen = mode; } if (parent_p) gtk_widget_set_sensitive(GTK_WIDGET(parent_p), false); if (mode_chosen == file_mode) { { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); gtk_print_operation_set_export_filename(print_operation_h, write_filename.c_str()); } result = gtk_print_operation_run(print_operation_h, GTK_PRINT_OPERATION_ACTION_EXPORT, parent_p, &error_p); } else if (mode_chosen == view_mode) { result = gtk_print_operation_run(print_operation_h, GTK_PRINT_OPERATION_ACTION_PREVIEW, parent_p, &error_p); } else { result = gtk_print_operation_run(print_operation_h, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent_p, &error_p); } if (result == GTK_PRINT_OPERATION_RESULT_ERROR) { write_error("GtkPrintOperation error in MonoTiffPrintManager::print_text()\n"); if (error_p) { GerrorScopedHandle handle_h(error_p); write_error(error_p->message); write_error("\n"); } } #ifndef MONO_TIFF_PRINT_MANAGER_ALLOW_ASYNC else if (result == GTK_PRINT_OPERATION_RESULT_APPLY) { print_settings_h = GobjHandle(gtk_print_operation_get_print_settings(print_operation_h.get())); // take ownership of the GtkPrintSettings object g_object_ref(G_OBJECT(print_settings_h.get())); } else if (result == GTK_PRINT_OPERATION_RESULT_CANCEL && parent_p && !cancelled_when_drawing) { // the parent will not be set sensitive if MonoTiffPrintManager::begin_print_impl() // has not been entered because the print job was cancelled from the print dialog gtk_widget_set_sensitive(GTK_WIDGET(parent_p), true); } { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); ready = true; } #endif } void MonoTiffPrintManager::begin_print_impl(GtkPrintOperation* print_operation_p, GtkPrintContext*) { // The 'filenames' variable is protected by a mutex in // set_filenames(). In the print(), view() and print_file() methods // the 'ready' variable is unset and the 'mode' variable written to, // under a lock of the same mutex. The unsetting of the 'ready' // variable in those methods will prevent any further actions on // 'filenames' until the current print job has completed. // Furthermore, the call to print_files() always occurs in the GUI // thread, and access to the 'mode' variable in print_files() is // protected by the same mutex. This means that no read access to // 'filenames' in this method can "happen before" the release of the // mutex in set_filenames(), and no subsequent write access to // 'filenames' in set_filenames() can "happen before" completion of // the current print job, and there will be memory visibility // between the respective threads, according to both the POSIX and // proposed C++-0x standards. No further mutex locking is therefore // required here. gtk_print_operation_set_n_pages(print_operation_p, filenames.size()); if (parent_p) gtk_widget_set_sensitive(GTK_WIDGET(parent_p), true); } void MonoTiffPrintManager::draw_page_impl(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, int page_nr) { // With respect to the 'filenames' variable, no further locking is // required in this method for the reasons given in the comments in // the begin_print_impl() method. // check initial conditions if (page_nr >= static_cast(filenames.size()) || page_nr < 0) { write_error("Yikes, invalid page number passed to MonoTiffPrintManager::draw_page_impl()\n"); cancelled_when_drawing = true; gtk_print_operation_cancel(print_operation_p); return; } TiffFileScopedHandle tif_h(TIFFOpen(filenames[page_nr].c_str(), "r")); if (!tif_h.get()) { write_error("Cannot open file "); write_error(filenames[page_nr].c_str()); write_error(" for reading\n"); cancelled_when_drawing = true; gtk_print_operation_cancel(print_operation_p); return; } uint16 samples_per_pixel; uint16 bits_per_sample; TIFFGetField(tif_h, TIFFTAG_SAMPLESPERPIXEL, &samples_per_pixel); TIFFGetField(tif_h, TIFFTAG_BITSPERSAMPLE, &bits_per_sample); if (samples_per_pixel != 1 || bits_per_sample != 1) { write_error("Error: file "); write_error(filenames[page_nr].c_str()); write_error(" does not have 1 bit per pixel monochrome format\n"); cancelled_when_drawing = true; gtk_print_operation_cancel(print_operation_p); return; } // initial conditions OK - now process the tiff file uint32 height; uint32 width; TIFFGetField(tif_h, TIFFTAG_IMAGELENGTH, &height); TIFFGetField(tif_h, TIFFTAG_IMAGEWIDTH, &width); // get a stride acceptable for both libtiff and cairo const uint32 tiff_stride = TIFFScanlineSize(tif_h); const uint32 cr_stride = cr_get_stride(tiff_stride * 8); if (static_cast(cr_stride) == -1) { write_error("Cannot calculate cairo stride width in MonoTiffPrintManager::draw_page_impl()\n"); cancelled_when_drawing = true; gtk_print_operation_cancel(print_operation_p); return; } // provide a buffer for the image raster unsigned char* buf = static_cast(calloc(cr_stride * height, 1)); if (!buf) { write_error("Memory allocation error in MonoTiffPrintManager::draw_page_impl()\n"); exit(MEM_ERROR); } // fill up the image raster buffer uint32 row; unsigned char* tmp = buf; for (row = 0; row < height; ++row, tmp += cr_stride) { TIFFReadScanline(tif_h, tmp, row); } #if G_BYTE_ORDER == G_LITTLE_ENDIAN TIFFReverseBits(buf, cr_stride * height); #endif // now form the image surface CairoSurfaceScopedHandle surface_h(cairo_image_surface_create_for_data(buf, CAIRO_FORMAT_A1, width, height, cr_stride)); if (cairo_surface_status(surface_h) != CAIRO_STATUS_SUCCESS) { write_error("Cairo surface error in MonoTiffPrintManager::draw_page_impl()\n"); cancelled_when_drawing = true; gtk_print_operation_cancel(print_operation_p); free(buf); } else { // the gtk+ print system keeps a reference to the surface after // this method returns so set up a callback to free buf cairo_surface_set_user_data(surface_h, &destroy_key, buf, (cairo_destroy_func_t)free); // get the cairo context and scale it so that the pixel size of // the image pattern matches the pixel size of the print context double width_ratio = gtk_print_context_get_width(context_p)/width; double height_ratio = gtk_print_context_get_height(context_p)/height; double scale = (width_ratio < height_ratio) ? width_ratio : height_ratio; cairo_t* cairo_p = gtk_print_context_get_cairo_context(context_p); cairo_scale(cairo_p, scale, scale); // and paint the image in the source surface to the destination surface // maintained by the GtkPrint system CairoPatternScopedHandle pattern_h(cairo_pattern_create_for_surface(surface_h)); // does setting the filter for the pattern have any effect in this usage and // is it necessary? cairo_pattern_set_filter(pattern_h, CAIRO_FILTER_BILINEAR); cairo_set_source(cairo_p, pattern_h); cairo_paint(cairo_p); } } #endif // GTK_CHECK_VERSION efax-gtk-3.2.8/src/utils/mono_tiff_print_manager.h0000644000175000001440000001631011506611477017146 00000000000000/* Copyright (C) 2008 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef MONO_TIFF_PRINTMANAGER_H #define MONO_TIFF_PRINTMANAGER_H #include #include // we only compile this file if GTK+ version is 2.10 or higher #if GTK_CHECK_VERSION(2,10,0) #include #include #include #include #include #include #include #include /* The MonoTiffPrintManager class prints monochrome (1 bit per pixel) TIFF image files using the GTK+ printer interface provided with GTK+ 2.10.0 onwards, and libtiff. Each page of a document to be printed must comprise a separate file, and the pages will print in the order in which their respective files are placed in the std::vector object passed to MonoTiffPrintManager::set_filenames(). To obtain a MonoTiffPrintManager object, call MonoTiffPrintManager::create_manager(), and that method is thread safe provided that, if it is called in a thread other than the one in which the GTK+ event loop runs, Cgu::Notifier::init() has previously been called in the GTK+ event loop thread. MonoTiffPrintManager::set_filenames(), which as mentioned above passes the filenames to be printed for any one print job, can be called in any thread. To print the files, call MonoTiffPrintManager::print(), which may also be done in any thread (assuming the gdk global lock is not used - if it is, it must be called in the main GUI thread). The MonoTiffPrintManager::view() and MonoTiffPrintManager::print_to_file() methods are also available, which may be called in any thread (assuming as mentioned above). The MonoTiffPrintManager::page_setup() method can be used as a callback to display a document page setup dialog prior to printing, and this method should only be called in the thread in which the main GTK+ event loop runs. It is a static method (a MonoTiffPrintManager object does not need to have been created before it is called). Once MonoTiffPrintManager::print(), MonoTiffPrintManager::view() or MonoTiffPrintManager::print_to_file() has been called, the MonoTiffPrintManager class owns a reference to itself and so manages its own lifetime - so once one of the methods has been called it doesn't matter if the IntrusivePtr returned by MonoTiffPrintManager::create_manager() goes out of scope (however, once MonoTiffPrintManager::print(), MonoTiffPrintManager::view() or MonoTiffPrintManager::print_to_file() has been called, the object will not be deleted until both printing has completed or failed AND the IntrusivePtr returned by MonoTiffPrintManager::create_manager() has gone out of scope or has been reset()). Normally, you would probably only want to use any one MonoTiffPrintManager object to print files forming a single print job (it has been designed with that in mind). Nevertheless, if you keep a reference to the object alive via an active IntrusivePtr you can use it to print more than one print job. However, if that is done it is not possible to call MonoTiffPrintManager::print() MonoTiffPrintManager::view(), MonoTiffPrintManager::print_to_file() or MonoTiffPrintManager::set_filenames() until the previous print job (if any) has been dispatched to the GTK+ print system (or cancelled). If the MonoTiffPrintManager object is not ready because it is in the middle of handling an earlier print job, then the call to MonoTiffPrintManager::print(), MonoTiffPrintManager::view(), MonoTiffPrintManager::print_to_file() or MonoTiffPrintManager::set_filenames() will return false; if however the new print job was successfully started or filenames successfully set, they will return true. You do not need to check the return value of these methods for the first print job despatched by any one MonoTiffPrintManager object. MonoTiffPrintManager::print_to_file() will also return false if no file name to which to print was specified. */ class MonoTiffPrintManager: public IntrusiveLockCounter { enum Mode {print_mode, view_mode, file_mode} mode; Thread::Mutex mutex; GtkWindow* parent_p; std::vector filenames; std::string write_filename; Notifier print_notifier; bool ready; bool cancelled_when_drawing; cairo_user_data_key_t destroy_key; static GobjHandle print_settings_h; static GobjHandle page_setup_h; void print_files(void); void begin_print_impl(GtkPrintOperation*, GtkPrintContext*); void draw_page_impl(GtkPrintOperation*, GtkPrintContext*, int); // private constructor MonoTiffPrintManager(void) {} // and this class may not be copied MonoTiffPrintManager(const MonoTiffPrintManager&); MonoTiffPrintManager& operator=(const MonoTiffPrintManager&); public: // this helper class avoids exposing GObject callbacks with C // linkage to the global namespace class CB; friend class CB; // if a particular font is wanted, then this can be entered as the font_family and font_size // arguments to the create_manager() method.. If the default of an empty string for // font_family and 0 for font_size is used, then printing will use the previous font settings // (if any), or if not a font of "Mono" and a size of 10. The fonts passed in this method can // in any event be overridden from the "Print font" page in the print dialog. If a font size is // passed as an argument, then the value must be 0 (default) or between 8 and 24 (actual). static IntrusivePtr create_manager(GtkWindow* parent = 0); static void page_setup(GtkWindow* parent = 0); // for efficiency reasons (the string could hold a lot of text and we do not // want more copies than necessary hanging around) the text is passed by // reference (by std::auto_ptr<>). We pass by std::auto_ptr so that the // string cannot be modified after it has been passed to the MonoTiffPrintManager // object - we take ownership of it bool set_filenames(const std::vector&); bool print(void); bool view(void); bool print_to_file(const char* filename); ~MonoTiffPrintManager(void); }; #endif // GTK_CHECK_VERSION #endif // MONO_TIFF_PRINTMANAGER_H efax-gtk-3.2.8/src/utils/utf8_utils.cpp0000644000175000001440000000244311466007653014723 00000000000000/* Copyright (C) 2005 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include "utf8_utils.h" #include std::string utf8_to_lower(const std::string& text) { GcharScopedHandle g_str_h(g_utf8_strdown(text.data(), text.size())); return g_str_h.get(); } efax-gtk-3.2.8/src/utils/pango_layout_iter_handle.h0000644000175000001440000000267511466007653017330 00000000000000/* Copyright (C) 2007 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef PANGO_LAYOUT_ITER_HANDLE_H #define PANGO_LAYOUT_ITER_HANDLE_H #include #include #include class PangoLayoutIterFree { public: void operator()(PangoLayoutIter* obj_p) { if (obj_p) { pango_layout_iter_free(obj_p); } } }; typedef SharedHandle PangoLayoutIterSharedHandle; #endif efax-gtk-3.2.8/src/utils/toolbar_append_widget.h0000644000175000001440000000340011466007653016610 00000000000000/* Copyright (C) 2006 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef TOOLBAR_APPEND_WIDGET_H #define TOOLBAR_APPEND_WIDGET_H /* This is a utility function which mimics gtk_toolbar_append_widget() but uses the GtkToolItem interface introduced in GTK+-2.4 instead of that function (which was deprecated in GTK+-2.4). If compiled with GTK+-2.0 or GTK+-2.2, a call to toolbar_append_widget() will just pass it on to gtk_toolbar_append_widget(); otherwise it will insert an appropriate GtkToolItem object into the toolbar. The parameters passed are the same as those in gtk_toolbar_append_widget(), so the third argument is a tooltip and the fourth a private tooltip (if any). */ #include void toolbar_append_widget(GtkToolbar*, GtkWidget*, const char*); #endif efax-gtk-3.2.8/src/utils/utf8_utils.h0000644000175000001440000000223011466007653014362 00000000000000/* Copyright (C) 2005 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef UTF8_UTILS_H #define UTF8_UTILS_H #include std::string utf8_to_lower(const std::string& text); #endif efax-gtk-3.2.8/src/utils/cairo_handle.h0000644000175000001440000000352711466007653014676 00000000000000/* Copyright (C) 2008 and 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CAIRO_HANDLE_H #define CAIRO_HANDLE_H #include #include #include class CairoSurfaceDestroy { public: void operator()(cairo_surface_t* obj_p) { if (obj_p) { cairo_surface_destroy(obj_p); } } }; class CairoPatternDestroy { public: void operator()(cairo_pattern_t* obj_p) { if (obj_p) { cairo_pattern_destroy(obj_p); } } }; class CairoContextDestroy { public: void operator()(cairo_t* obj_p) { if (obj_p) { cairo_destroy(obj_p); } } }; typedef ScopedHandle CairoSurfaceScopedHandle; typedef ScopedHandle CairoPatternScopedHandle; typedef ScopedHandle CairoContextScopedHandle; #endif efax-gtk-3.2.8/src/utils/sem_sync.h0000644000175000001440000000362511466007653014105 00000000000000/* Copyright (C) 2004 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef SEM_SYNC_H #define SEM_SYNC_H #include #include class SemSync { bool valid; sem_t sem; // this class cannot be copied - the semaphore is owned by the class and not shared SemSync(const SemSync&); SemSync& operator=(const SemSync&); public: bool is_valid(void) const {return valid;} int getvalue(void); int post(void) {return sem_post(&sem);} void wait(void); SemSync(unsigned int init_count = 0); ~SemSync(void); }; inline int SemSync::getvalue(void) { int count; sem_getvalue(&sem, &count); return count; } inline void SemSync::wait(void) { while (sem_wait(&sem) == -1 && errno == EINTR); } inline SemSync::SemSync(unsigned int init_count): valid(false) { if(sem_init(&sem, 0, init_count) == 0) valid = true; } inline SemSync::~SemSync(void) { while (getvalue() < 1) post(); sem_destroy(&sem); } #endif efax-gtk-3.2.8/src/utils/LGPL.TXT0000644000175000001440000006346511466007653013263 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 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. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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) This 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. 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; 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. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! efax-gtk-3.2.8/src/utils/Makefile.am0000644000175000001440000000126311466007653014144 00000000000000## Process this file with automake to produce Makefile.in noinst_LIBRARIES = libutils.a libutils_a_SOURCES = selected_rows_handle.cpp \ utf8_utils.cpp \ toolbar_append_widget.cpp \ mono_tiff_print_manager.cpp noinst_HEADERS = icon_info_handle.h \ selected_rows_handle.h \ sem_sync.h utf8_utils.h \ tree_path_handle.h \ tree_row_reference_handle.h \ toolbar_append_widget.h \ mono_tiff_print_manager.h \ pango_layout_iter_handle.h \ tiff_handle.h cairo_handle.h AM_CXXFLAGS = -D_XOPEN_SOURCE=600 @GTK_CFLAGS@ @GTHREAD_CFLAGS@ @CXX_GTK_UTILS_CFLAGS@ @COND_CXXFLAG@ -I.. EXTRA_DIST = LGPL.TXT efax-gtk-3.2.8/src/utils/selected_rows_handle.h0000644000175000001440000000524711466007653016444 00000000000000/* Copyright (C) 2004 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef SELECTED_ROWS_HANDLE_H #define SELECTED_ROWS_HANDLE_H #include #include #include "tree_row_reference_handle.h" #include "tree_path_handle.h" typedef std::list RowPathList; typedef std::list RowRefList; class SelectedRowsHandle { RowPathList path_list; public: // this helper class avoids exposing GObject callbacks with C // linkage to the global namespace class CB; friend class CB; void fill(const GtkTreeView* tree_view_p); RowPathList::size_type size(void) const {return path_list.size();} bool is_empty(void) const {return path_list.empty();} // get_ref_list() should be called and the result stored before anything is done to // the tree view which invalidates the selected paths it provides (row references // are not invalidated by things done to the tree view, but paths can be) // this method will change the RowRefList argument - it will empty it of // any previous selection and then fill it with the current one void get_ref_list(GtkTreeModel*, RowRefList&) const; // the method front() can also be invalidated by things done to the tree // view as it returns a path. If the tree view might change use get_ref_list() // first and then call RowRefList::front() with respect to that list TreePathSharedHandle front(void) const {return path_list.front();} SelectedRowsHandle() {} // if a Gtk::TreeView object is passed to the constructor, then the // path list will be filled immediately without the need to call // SelectedRowsHandle::fill() SelectedRowsHandle(const GtkTreeView* tree_view_p) {fill(tree_view_p);} }; #endif efax-gtk-3.2.8/src/Makefile.in0000644000175000001440000005731211544566736013034 00000000000000# 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@ bin_PROGRAMS = efax-gtk$(EXEEXT) subdir = src DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_efax_gtk_OBJECTS = main.$(OBJEXT) mainwindow.$(OBJEXT) \ dialogs.$(OBJEXT) fax_list.$(OBJEXT) \ fax_list_manager.$(OBJEXT) file_list.$(OBJEXT) \ efax_controller.$(OBJEXT) addressbook.$(OBJEXT) \ settings.$(OBJEXT) settings_help.$(OBJEXT) helpfile.$(OBJEXT) \ socket_server.$(OBJEXT) socket_list.$(OBJEXT) \ socket_notify.$(OBJEXT) logger.$(OBJEXT) tray_icon.$(OBJEXT) \ redial_queue.$(OBJEXT) efax_gtk_OBJECTS = $(am_efax_gtk_OBJECTS) efax_gtk_DEPENDENCIES = utils/libutils.a DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(efax_gtk_SOURCES) DIST_SOURCES = $(efax_gtk_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 HEADERS = $(noinst_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@ AC_HAVE_RECURSIVE_MUTEX_RUNTIME = @AC_HAVE_RECURSIVE_MUTEX_RUNTIME@ AC_USE_GLIB_MEMORY_SLICES_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_COMPAT@ AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT@ AC_USE_SCHED_YIELD = @AC_USE_SCHED_YIELD@ AC_USE_SMART_PTR_COMPARISON = @AC_USE_SMART_PTR_COMPARISON@ AC_USE_TYPE_TUPLE_ARGS = @AC_USE_TYPE_TUPLE_ARGS@ AC_USING_NAMESPACE = @AC_USING_NAMESPACE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COND_CXXFLAG = @COND_CXXFLAG@ COND_INTERNAL = @COND_INTERNAL@ COND_INTERNAL_LIB = @COND_INTERNAL_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_GTK_UTILS_CFLAGS = @CXX_GTK_UTILS_CFLAGS@ CXX_GTK_UTILS_LIBS = @CXX_GTK_UTILS_LIBS@ CYGPATH_W = @CYGPATH_W@ DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ 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@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPOOLDIR = @SPOOLDIR@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = internal utils efax_gtk_SOURCES = main.cpp mainwindow.cpp dialogs.cpp fax_list.cpp \ fax_list_manager.cpp file_list.cpp \ efax_controller.cpp addressbook.cpp settings.cpp \ settings_help.cpp helpfile.cpp socket_server.cpp \ socket_list.cpp socket_notify.cpp logger.cpp \ tray_icon.cpp redial_queue.cpp noinst_HEADERS = mainwindow.h dialogs.h fax_list.h \ fax_list_manager.h file_list.h efax_controller.h \ addressbook.h settings.h settings_help.h \ helpfile.h socket_server.h socket_list.h \ socket_notify.h logger.h tray_icon.h \ redial_queue.h gpl.h prog_defs.h menu_icons.h \ addressbook_icons.h settings_icons.h window_icon.h \ socket_list_icons.h file_list_icons.h \ fax_list_icons.h fax_list_manager_icons.h \ redial_queue_icons.h INCLUDES = -DDATADIR=\"$(datadir)\" -DRC_DIR=\"$(sysconfdir)\" AM_CXXFLAGS = -D_XOPEN_SOURCE=600 @GTK_CFLAGS@ @GTHREAD_CFLAGS@ @X11_CFLAGS@ \ @CXX_GTK_UTILS_CFLAGS@ @COND_CXXFLAG@ -I./utils efax_gtk_LDADD = utils/libutils.a @COND_INTERNAL_LIB@ @LIBINTL@ @GTK_LIBS@ @GTHREAD_LIBS@ \ @X11_LIBS@ @DBUS_GLIB_LIBS@ @GIO_LIBS@ @CXX_GTK_UTILS_LIBS@ -ltiff all: all-recursive .SUFFIXES: .SUFFIXES: .cpp .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 src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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; \ 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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(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: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) efax-gtk$(EXEEXT): $(efax_gtk_OBJECTS) $(efax_gtk_DEPENDENCIES) @rm -f efax-gtk$(EXEEXT) $(CXXLINK) $(efax_gtk_OBJECTS) $(efax_gtk_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addressbook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialogs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efax_controller.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax_list_manager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helpfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mainwindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redial_queue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings_help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket_notify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tray_icon.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # 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) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; 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-binPROGRAMS clean-generic 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-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 pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .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 ctags ctags-recursive distclean \ distclean-compile distclean-generic 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 \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-recursive 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: efax-gtk-3.2.8/src/logger.cpp0000644000175000001440000003631211525600172012725 00000000000000/* Copyright (C) 2001 to 2009 and 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include #include #include // the key codes are here #include "logger.h" #include "dialogs.h" #include #include #include #include #include #include #include #include #ifdef ENABLE_NLS #include #endif #define LOGFILE_TIMER_INTERVAL 60000 // number of milliseconds between flushing of logfile #define LOGFILE_MARK_COUNT 15*60000/LOGFILE_TIMER_INTERVAL // to mark the logfile at 15 minute intervals Logger::Logger(const char* default_dir, GtkWindow* parent_p_): logfile_count(0), default_dirname(default_dir), parent_p(parent_p_) { default_dirname += '/'; // open the log file if required if (!prog_config.logfile_name.empty()) { try { std::string temp(Utf8::filename_from_utf8(prog_config.logfile_name)); if (temp[0] != '/') temp.insert(0, default_dirname); // provide an absolute path name logfile.open(temp.c_str(), std::ios::app | std::ios::out); if (!logfile) { std::string message("Can't open logfile "); message += temp; message += '\n'; write_error(message.c_str()); temp = ""; // lock the Prog_config object while we modify it Thread::Mutex::Lock lock(*prog_config.mutex_p); prog_config.logfile_name = ""; } else { struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); const char date_description_format[] = "%H%M %Z %d %b %Y"; const int max_description_datesize = 126; char date_description[max_description_datesize]; std::strftime(date_description, max_description_datesize, date_description_format, time_p); std::string date_desc(date_description); if (!Utf8::validate(date_desc)) { try { date_desc = Utf8::locale_to_utf8(date_desc); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in Logger::Logger()\n"); date_desc = ""; } } logfile << "\n***** " << gettext("Beginning fax log: ") << date_desc << " *****\n" << std::endl; // set a timeout to flush every one minute #if GLIB_CHECK_VERSION(2,14,0) timer_tag = start_timeout_seconds(LOGFILE_TIMER_INTERVAL/1000, Callback::make(*this, &Logger::logfile_timer_cb)); #else timer_tag = start_timeout(LOGFILE_TIMER_INTERVAL, Callback::make(*this, &Logger::logfile_timer_cb)); #endif } // save the logfile name in the local version of logfile_name // in case reset_logfile() is called later so we can test whether // it has changed, and so we can print and view the file logfile_name = temp; } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in Logger::Logger()\n"); beep(); // lock the Prog_config object while we modify it Thread::Mutex::Lock lock(*prog_config.mutex_p); prog_config.logfile_name = ""; } } } Logger::~Logger(void) { if (!logfile_name.empty()) { g_source_remove(timer_tag); struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); const char date_description_format[] = "%H%M %Z %d %b %Y"; const int max_description_datesize = 126; char date_description[max_description_datesize]; std::strftime(date_description, max_description_datesize, date_description_format, time_p); std::string date_desc(date_description); if (!Utf8::validate(date_desc)) { try { date_desc = Utf8::locale_to_utf8(date_desc); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in Logger::~Logger()\n"); date_desc = ""; } } logfile << "\n***** " << gettext("Ending fax log: ") << date_desc << " *****\n" << std::endl; logfile.close(); logfile.clear(); } } void Logger::write_to_log(const char* text) { if (!logfile_name.empty()) logfile << text; } void Logger::reset_logfile(void) { // check pre-conditions try { if (logfile_name == Utf8::filename_from_utf8(prog_config.logfile_name)) return; // no change! } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in Logger::reset_logfile()\n"); beep(); // lock the Prog_config object while we modify it Thread::Mutex::Lock lock(*prog_config.mutex_p); prog_config.logfile_name = ""; return; } // proceed // first close the log file if required if (!logfile_name.empty()) { struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); const char date_description_format[] = "%H%M %Z %d %b %Y"; const int max_description_datesize = 126; char date_description[max_description_datesize]; std::strftime(date_description, max_description_datesize, date_description_format, time_p); std::string date_desc(date_description); if (!Utf8::validate(date_desc)) { try { date_desc = Utf8::locale_to_utf8(date_desc); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in Logger::reset_logfile()\n"); date_desc = ""; } } logfile << "\n***** " << gettext("Ending fax log: ") << date_desc << " *****\n" << std::endl; logfile.close(); logfile.clear(); logfile_name = ""; logfile_count = 0; // and now disconnect the old timer connection g_source_remove(timer_tag); } // now open the new log file if required if (!prog_config.logfile_name.empty()) { try { std::string temp(Utf8::filename_from_utf8(prog_config.logfile_name)); if (temp[0] != '/') temp.insert(0, default_dirname); // provide an absolute path name logfile.open(temp.c_str(), std::ios::app | std::ios::out); if (!logfile) { std::string message("Can't open logfile "); message += temp; message += '\n'; write_error(message.c_str()); temp = ""; // lock the Prog_config object while we modify it Thread::Mutex::Lock lock(*prog_config.mutex_p); prog_config.logfile_name = ""; } else { struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); const char date_description_format[] = "%H%M %Z %d %b %Y"; const int max_description_datesize = 126; char date_description[max_description_datesize]; std::strftime(date_description, max_description_datesize, date_description_format, time_p); std::string date_desc(date_description); if (!Utf8::validate(date_desc)) { try { date_desc = Utf8::locale_to_utf8(date_desc); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in Logger::reset_logfile()\n"); date_desc = ""; } } logfile << "\n***** " << gettext("Beginning fax log: ") << date_desc << " *****\n" << std::endl; // set a timeout to flush every one minute #if GLIB_CHECK_VERSION(2,14,0) timer_tag = start_timeout_seconds(LOGFILE_TIMER_INTERVAL/1000, Callback::make(*this, &Logger::logfile_timer_cb)); #else timer_tag = start_timeout(LOGFILE_TIMER_INTERVAL, Callback::make(*this, &Logger::logfile_timer_cb)); #endif } logfile_count = 0; // save the logfile name in the local version of logfile_name // in case reset_logfile() is called later so we can test whether // it has changed, and so we can print and view the file logfile_name = temp; } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in Logger::reset_logfile()\n"); beep(); // lock the Prog_config object while we modify it Thread::Mutex::Lock lock(*prog_config.mutex_p); prog_config.logfile_name = ""; } } } bool Logger::log_to_string(std::string& text) { if (logfile_name.empty()) return false; logfile.flush(); text = ""; std::ifstream infile; infile.open(logfile_name.c_str(), std::ios::in | std::ios:: binary); if (!infile) { new InfoDialog(gettext("Cannot open log file for reading"), gettext("efax-gtk: print logfile"), GTK_MESSAGE_ERROR, parent_p, true); // there is no memory leak - the exec() method has not been called so the dialog // is self-owning and will delete itself when it is closed return false; } const int BLOCKSIZE = 1024; char block[BLOCKSIZE]; while (infile) { infile.read(block, BLOCKSIZE - 1); std::streamsize extracted = infile.gcount(); if (extracted > 0) { block[extracted] = 0; text += block; } } return true; } void Logger::print_log(void) { #if !defined(CGU_USE_AUTO_PTR) && CGU_API_VERSION>=20 std::unique_ptr text(new std::string); #else std::auto_ptr text(new std::string); #endif if (log_to_string(*text)) { IntrusivePtr print_manager_i(TextPrintManager::create_manager(parent_p)); print_manager_i->set_text(text); print_manager_i->print(); } } void Logger::print_page_setup(GtkWindow* parent_p) { TextPrintManager::page_setup(parent_p); } void Logger::view_log(const int standard_size) { if (logfile_name.empty()) return; logfile.flush(); try { new LogViewDialog(standard_size, logfile_name, parent_p); // there is no memory leak - the exec() method has not been called so the dialog // is self-owning and will delete itself when it is closed } catch (LogViewFileError&) { new InfoDialog(gettext("Cannot open log file for viewing"), gettext("efax-gtk: view logfile"), GTK_MESSAGE_ERROR, parent_p, true); // there is no memory leak - the exec() method has not been called so the dialog // is self-owning and will delete itself when it is closed } } void Logger::logfile_timer_cb(bool&) { logfile_count++; if (logfile_count >= LOGFILE_MARK_COUNT) { logfile_count = 0; struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); const char date_description_format[] = "%H%M %Z %d %b %Y"; const int max_description_datesize = 126; char date_description[max_description_datesize]; std::strftime(date_description, max_description_datesize, date_description_format, time_p); std::string date_desc(date_description); if (!Utf8::validate(date_desc)) { try { date_desc = Utf8::locale_to_utf8(date_desc); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in Logger::logfile_timer_cb()\n"); date_desc = ""; } } logfile << "\n** " << date_desc << " **\n" << std::endl; } logfile.flush(); } void LogViewDialogCB::log_view_dialog_button_clicked(GtkWidget*, void* data) { static_cast(data)->close(); } gboolean LogViewDialogCB::log_view_dialog_key_press_event(GtkWidget*, GdkEventKey* event_p, void* data) { LogViewDialog* instance_p = static_cast(data); int keycode = event_p->keyval; #if GTK_CHECK_VERSION(2,99,0) if (keycode == GDK_KEY_Home || keycode == GDK_KEY_End || keycode == GDK_KEY_Up || keycode == GDK_KEY_Down || keycode == GDK_KEY_Page_Up || keycode == GDK_KEY_Page_Down) { gtk_widget_event(GTK_WIDGET(instance_p->text_view_p), (GdkEvent*)event_p); return true; // stop processing here } #else if (keycode == GDK_Home || keycode == GDK_End || keycode == GDK_Up || keycode == GDK_Down || keycode == GDK_Page_Up || keycode == GDK_Page_Down) { gtk_widget_event(GTK_WIDGET(instance_p->text_view_p), (GdkEvent*)event_p); return true; // stop processing here } #endif return false; // pass on the key event } LogViewDialog::LogViewDialog(const int standard_size, const std::string& logfile_name, GtkWindow* parent_p): WinBase(gettext("efax-gtk: View log"), prog_config.window_icon_h, true, parent_p) { GtkBox* vbox_p = GTK_BOX(gtk_vbox_new(false, 0)); gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(vbox_p)); GtkWidget* scrolled_window_p = gtk_scrolled_window_new(0, 0); gtk_box_pack_start(vbox_p, scrolled_window_p, true, true, standard_size/3); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window_p), GTK_SHADOW_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window_p), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); GtkWidget* button_box_p = gtk_hbutton_box_new(); gtk_box_pack_start(vbox_p, button_box_p, false, false, standard_size/3); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_SPREAD); GtkWidget* close_button_p = gtk_button_new_from_stock(GTK_STOCK_CLOSE); gtk_container_add(GTK_CONTAINER(button_box_p), close_button_p); text_view_p = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(scrolled_window_p), text_view_p); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view_p), GTK_WRAP_WORD); gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view_p), false); PangoFontDescription* font_description = pango_font_description_from_string(prog_config.fixed_font.c_str()); #if GTK_CHECK_VERSION(2,99,0) gtk_widget_override_font(text_view_p, font_description); #else gtk_widget_modify_font(text_view_p, font_description); #endif pango_font_description_free(font_description); std::ifstream infile; infile.open(logfile_name.c_str(), std::ios::in | std::ios:: binary); if (!infile) { throw LogViewFileError(); } GtkTextIter end_iter; GtkTextBuffer* buffer_p = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view_p)); gtk_text_buffer_get_end_iter(buffer_p, &end_iter); Utf8::Reassembler reassembler; const int BLOCKSIZE = 1024; char block[BLOCKSIZE]; while (infile) { infile.read(block, BLOCKSIZE); std::streamsize extracted = infile.gcount(); if (extracted > 0) { SharedHandle read_text_h(reassembler(block, extracted)); if (!read_text_h.get()) { const char message[] = "Invalid UTF-8 text found in logfile\n"; write_error(message); gtk_text_buffer_insert(buffer_p, &end_iter, message, sizeof(message) - 1); } else { gtk_text_buffer_insert(buffer_p, &end_iter, read_text_h.get(), std::strlen(read_text_h)); } } } g_signal_connect(G_OBJECT(close_button_p), "clicked", G_CALLBACK(LogViewDialogCB::log_view_dialog_button_clicked), this); g_signal_connect(G_OBJECT(get_win()), "key_press_event", G_CALLBACK(LogViewDialogCB::log_view_dialog_key_press_event), this); gtk_window_set_default_size(get_win(), standard_size * 25, standard_size * 16); gtk_container_set_border_width(GTK_CONTAINER(get_win()), standard_size/4); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_widget_grab_focus(GTK_WIDGET(get_win())); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_focus(text_view_p, false); #else GTK_WIDGET_UNSET_FLAGS(text_view_p, GTK_CAN_FOCUS); #endif gtk_widget_show_all(GTK_WIDGET(get_win())); } efax-gtk-3.2.8/src/settings.cpp0000644000175000001440000034605111534423564013322 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include #include #include #include #include #include #include "settings.h" #include "settings_icons.h" #include "dialogs.h" #include "utils/utf8_utils.h" #ifdef HAVE_STREAM_IMBUE #include #endif #ifdef ENABLE_NLS #include #endif static inline bool not_ascii_char(char c) { if (static_cast(c) < 0) return true; return false; } int SettingsDialog::dialog_count = 0; void IdentityPageCB::identity_page_button_clicked(GtkWidget* widget_p, void* data) { IdentityPage* instance_p = static_cast(data); int message_index; if (widget_p == instance_p->name_help_button_p) { message_index = IdentityMessages::name; } else if (widget_p == instance_p->number_help_button_p) { message_index = IdentityMessages::number; } else { write_error("Callback error in IdentityPageCB::identity_page_button_clicked()\n"); return; } instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(message_index), instance_p->help_messages.get_caption(message_index))); } IdentityPage::IdentityPage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(2, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* name_label_p = gtk_label_new(gettext("Name: ")); GtkWidget* number_label_p = gtk_label_new(gettext("Number: ")); gtk_label_set_justify(GTK_LABEL(name_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(number_label_p), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(name_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(number_label_p), 1, 0.5); name_entry_p = gtk_entry_new(); number_entry_p = gtk_entry_new(); gtk_widget_set_size_request(name_entry_p, standard_size * 7, standard_size); gtk_widget_set_size_request(number_entry_p, standard_size * 7, standard_size); name_help_button_p = gtk_button_new(); number_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(name_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(number_help_button_p), image_p); } gtk_table_attach(table_p, name_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, name_entry_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, name_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, number_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, number_entry_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, number_help_button_p, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); g_signal_connect(G_OBJECT(name_help_button_p), "clicked", G_CALLBACK(IdentityPageCB::identity_page_button_clicked), this); g_signal_connect(G_OBJECT(number_help_button_p), "clicked", G_CALLBACK(IdentityPageCB::identity_page_button_clicked), this); gtk_widget_set_tooltip_text(name_help_button_p, help_messages.get_message(IdentityMessages::name).c_str()); gtk_widget_set_tooltip_text(number_help_button_p, help_messages.get_message(IdentityMessages::number).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string IdentityPage::get_name(void) const { return gtk_entry_get_text(GTK_ENTRY(name_entry_p)); } std::string IdentityPage::get_number(void) const { return gtk_entry_get_text(GTK_ENTRY(number_entry_p)); } void IdentityPage::set_name(const std::string& name) { gtk_entry_set_text(GTK_ENTRY(name_entry_p), name.c_str()); } void IdentityPage::set_number(const std::string& number) { gtk_entry_set_text(GTK_ENTRY(number_entry_p), number.c_str()); } void IdentityPage::clear(void) { gtk_entry_set_text(GTK_ENTRY(name_entry_p), ""); gtk_entry_set_text(GTK_ENTRY(number_entry_p), ""); } void ModemPageCB::modem_page_button_clicked(GtkWidget* widget_p, void* data) { ModemPage* instance_p = static_cast(data); int message_index; if (widget_p == instance_p->device_help_button_p) { message_index = ModemMessages::device; } else if (widget_p == instance_p->lock_help_button_p) { message_index = ModemMessages::lock; } else if (widget_p == instance_p->capabilities_help_button_p) { message_index = ModemMessages::capabilities; } else if (widget_p == instance_p->rings_help_button_p) { message_index = ModemMessages::rings; } else if (widget_p == instance_p->class_help_button_p) { message_index = ModemMessages::modem_class; } else if (widget_p == instance_p->dialmode_help_button_p) { message_index = ModemMessages::dialmode; } else { write_error("Callback error in ModemPageCB::modem_page_button_clicked()\n"); return; } instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(message_index), instance_p->help_messages.get_caption(message_index))); } ModemPage::ModemPage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(6, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* device_label_p = gtk_label_new(gettext("Serial Device: ")); GtkWidget* lock_label_p = gtk_label_new(gettext("Lock File: ")); GtkWidget* capabilities_label_p = gtk_label_new(gettext("Capabilities: ")); GtkWidget* rings_label_p = gtk_label_new(gettext("Rings (1-9): ")); GtkWidget* class_label_p = gtk_label_new(gettext("Modem Class: ")); GtkWidget* dialmode_label_p = gtk_label_new(gettext("Dial Mode: ")); gtk_label_set_justify(GTK_LABEL(device_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(lock_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(capabilities_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(rings_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(class_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(dialmode_label_p), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(device_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(lock_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(capabilities_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(rings_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(class_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(dialmode_label_p), 1, 0.5); auto_button_p = gtk_radio_button_new_with_label(0, gettext("Auto")); class1_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(auto_button_p), gettext("Class 1")); class2_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(auto_button_p), gettext("Class 2")); class20_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(auto_button_p), gettext("Class 2.0")); GtkBox* class_box_p = GTK_BOX(gtk_hbox_new(false, 2)); gtk_box_pack_start(class_box_p, auto_button_p, false, false, 0); gtk_box_pack_start(class_box_p, class1_button_p, false, false, 0); gtk_box_pack_start(class_box_p, class2_button_p, false, false, 0); gtk_box_pack_start(class_box_p, class20_button_p, false, false, 0); GtkWidget* class_box_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(class_box_alignment_p), GTK_WIDGET(class_box_p)); GtkWidget* class_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(class_frame_p), class_box_alignment_p); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(auto_button_p), true); tone_button_p = gtk_radio_button_new_with_label(0, gettext("Tone")); pulse_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(tone_button_p), gettext("Pulse")); GtkBox* dialmode_box_p = GTK_BOX(gtk_hbox_new(false, 2)); gtk_box_pack_start(dialmode_box_p, tone_button_p, false, false, 0); gtk_box_pack_start(dialmode_box_p, pulse_button_p, false, false, 0); GtkWidget* dialmode_box_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(dialmode_box_alignment_p), GTK_WIDGET(dialmode_box_p)); GtkWidget* dialmode_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(dialmode_frame_p), dialmode_box_alignment_p); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tone_button_p), true); device_entry_p = gtk_entry_new(); lock_entry_p = gtk_entry_new(); capabilities_entry_p = gtk_entry_new(); gtk_widget_set_size_request(device_entry_p, standard_size * 7, standard_size); gtk_widget_set_size_request(lock_entry_p, standard_size * 7, standard_size); gtk_widget_set_size_request(capabilities_entry_p, standard_size * 7, standard_size); rings_spin_button_p = gtk_spin_button_new_with_range(1, 9, 1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(rings_spin_button_p), true); gtk_widget_set_size_request(rings_spin_button_p, -1, standard_size); GtkWidget* rings_spin_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(rings_spin_button_alignment_p), rings_spin_button_p); device_help_button_p = gtk_button_new(); lock_help_button_p = gtk_button_new(); capabilities_help_button_p = gtk_button_new(); rings_help_button_p = gtk_button_new(); class_help_button_p = gtk_button_new(); dialmode_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(device_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(lock_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(capabilities_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(rings_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(class_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(dialmode_help_button_p), image_p); } gtk_table_attach(table_p, device_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, device_entry_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, device_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/5); gtk_table_attach(table_p, lock_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, lock_entry_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, lock_help_button_p, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/5); gtk_table_attach(table_p, capabilities_label_p, 0, 1, 2, 3, GTK_FILL, GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, capabilities_entry_p, 1, 2, 2, 3, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, capabilities_help_button_p, 2, 3, 2, 3, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/5); gtk_table_attach(table_p, rings_label_p, 0, 1, 3, 4, GTK_FILL, GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, rings_spin_button_alignment_p, 1, 2, 3, 4, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, rings_help_button_p, 2, 3, 3, 4, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/5); gtk_table_attach(table_p, class_label_p, 0, 1, 4, 5, GTK_FILL, GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, class_frame_p, 1, 2, 4, 5, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, class_help_button_p, 2, 3, 4, 5, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/5); gtk_table_attach(table_p, dialmode_label_p, 0, 1, 5, 6, GTK_FILL, GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, dialmode_frame_p, 1, 2, 5, 6, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/5, standard_size/5); gtk_table_attach(table_p, dialmode_help_button_p, 2, 3, 5, 6, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/5); g_signal_connect(G_OBJECT(device_help_button_p), "clicked", G_CALLBACK(ModemPageCB::modem_page_button_clicked), this); g_signal_connect(G_OBJECT(lock_help_button_p), "clicked", G_CALLBACK(ModemPageCB::modem_page_button_clicked), this); g_signal_connect(G_OBJECT(capabilities_help_button_p), "clicked", G_CALLBACK(ModemPageCB::modem_page_button_clicked), this); g_signal_connect(G_OBJECT(rings_help_button_p), "clicked", G_CALLBACK(ModemPageCB::modem_page_button_clicked), this); g_signal_connect(G_OBJECT(class_help_button_p), "clicked", G_CALLBACK(ModemPageCB::modem_page_button_clicked), this); g_signal_connect(G_OBJECT(dialmode_help_button_p), "clicked", G_CALLBACK(ModemPageCB::modem_page_button_clicked), this); gtk_widget_set_tooltip_text(device_help_button_p, help_messages.get_message(ModemMessages::device).c_str()); gtk_widget_set_tooltip_text(lock_help_button_p, help_messages.get_message(ModemMessages::lock).c_str()); gtk_widget_set_tooltip_text(capabilities_help_button_p, help_messages.get_message(ModemMessages::capabilities).c_str()); gtk_widget_set_tooltip_text(rings_help_button_p, help_messages.get_message(ModemMessages::rings).c_str()); gtk_widget_set_tooltip_text(class_help_button_p, help_messages.get_message(ModemMessages::modem_class).c_str()); gtk_widget_set_tooltip_text(dialmode_help_button_p, help_messages.get_message(ModemMessages::dialmode).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string ModemPage::get_device(void) const { return gtk_entry_get_text(GTK_ENTRY(device_entry_p)); } std::string ModemPage::get_lock(void) const { return gtk_entry_get_text(GTK_ENTRY(lock_entry_p)); } std::string ModemPage::get_capabilities(void) const { return gtk_entry_get_text(GTK_ENTRY(capabilities_entry_p)); } std::string ModemPage::get_rings(void) const { std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE strm << gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(rings_spin_button_p)); return strm.str(); } std::string ModemPage::get_class(void) const { std::string return_val; // an empty string will indicate an "Auto" setting if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(class1_button_p))) return_val = "1"; else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(class2_button_p))) return_val = "2"; else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(class20_button_p))) return_val = "2.0"; return return_val; } std::string ModemPage::get_dialmode(void) const { std::string return_val("tone"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pulse_button_p))) return_val = "pulse"; return return_val; } void ModemPage::set_device(const std::string& device) { gtk_entry_set_text(GTK_ENTRY(device_entry_p), device.c_str()); } void ModemPage::set_lock(const std::string& lock) { gtk_entry_set_text(GTK_ENTRY(lock_entry_p), lock.c_str()); } void ModemPage::set_capabilities(const std::string& capabilities) { gtk_entry_set_text(GTK_ENTRY(capabilities_entry_p), capabilities.c_str()); } void ModemPage::set_rings(const std::string& rings) { int val = std::atoi(rings.c_str()); if (val <= 0) val = 1; gtk_spin_button_set_value(GTK_SPIN_BUTTON(rings_spin_button_p), val); } void ModemPage::set_class(const std::string& class_string) { if (!class_string.compare("1")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(class1_button_p), true); } else if (!class_string.compare("2")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(class2_button_p), true); } else if (!class_string.compare("2.0")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(class20_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(auto_button_p), true); // "Auto" setting } void ModemPage::set_dialmode(const std::string& mode_string) { std::string temp(utf8_to_lower(mode_string)); if (!temp.compare("tone")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tone_button_p), true); } else if (!temp.compare("pulse")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pulse_button_p), true); } } void ModemPage::clear(void) { gtk_entry_set_text(GTK_ENTRY(device_entry_p), ""); gtk_entry_set_text(GTK_ENTRY(lock_entry_p), ""); gtk_entry_set_text(GTK_ENTRY(capabilities_entry_p), ""); gtk_spin_button_set_value(GTK_SPIN_BUTTON(rings_spin_button_p), 1); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(auto_button_p), true); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tone_button_p), true); } void ParmsPageCB::parms_page_button_clicked(GtkWidget* widget_p, void* data) { ParmsPage* instance_p = static_cast(data); int message_index; if (widget_p == instance_p->init_help_button_p) { message_index = ParmsMessages::init; } else if (widget_p == instance_p->reset_help_button_p) { message_index = ParmsMessages::reset; } else if (widget_p == instance_p->parms_help_button_p) { message_index = ParmsMessages::extra_parms; } else { write_error("Callback error in ParmsPageCB::parms_page_button_clicked()\n"); return; } instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(message_index), instance_p->help_messages.get_caption(message_index))); } ParmsPage::ParmsPage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(3, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* init_label_p = gtk_label_new(gettext("Initialization Params:")); GtkWidget* reset_label_p = gtk_label_new(gettext("Reset Params: ")); GtkWidget* parms_label_p = gtk_label_new(gettext("Other Params: ")); gtk_label_set_justify(GTK_LABEL(init_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(reset_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(parms_label_p), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(init_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(reset_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(parms_label_p), 1, 0.5); init_entry_p = gtk_entry_new(); reset_entry_p = gtk_entry_new(); parms_entry_p = gtk_entry_new(); gtk_widget_set_size_request(init_entry_p, standard_size * 7, standard_size); gtk_widget_set_size_request(reset_entry_p, standard_size * 7, standard_size); gtk_widget_set_size_request(parms_entry_p, standard_size * 7, standard_size); init_help_button_p = gtk_button_new(); reset_help_button_p = gtk_button_new(); parms_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(init_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(reset_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(parms_help_button_p), image_p); } gtk_table_attach(table_p, init_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, init_entry_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, init_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, reset_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, reset_entry_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, reset_help_button_p, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, parms_label_p, 0, 1, 2, 3, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, parms_entry_p, 1, 2, 2, 3, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, parms_help_button_p, 2, 3, 2, 3, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/2); g_signal_connect(G_OBJECT(init_help_button_p), "clicked", G_CALLBACK(ParmsPageCB::parms_page_button_clicked), this); g_signal_connect(G_OBJECT(reset_help_button_p), "clicked", G_CALLBACK(ParmsPageCB::parms_page_button_clicked), this); g_signal_connect(G_OBJECT(parms_help_button_p), "clicked", G_CALLBACK(ParmsPageCB::parms_page_button_clicked), this); gtk_widget_set_tooltip_text(init_help_button_p, help_messages.get_message(ParmsMessages::init).c_str()); gtk_widget_set_tooltip_text(reset_help_button_p, help_messages.get_message(ParmsMessages::reset).c_str()); gtk_widget_set_tooltip_text(parms_help_button_p, help_messages.get_message(ParmsMessages::extra_parms).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string ParmsPage::get_init(void) const { return gtk_entry_get_text(GTK_ENTRY(init_entry_p)); } std::string ParmsPage::get_reset(void) const { return gtk_entry_get_text(GTK_ENTRY(reset_entry_p)); } std::string ParmsPage::get_parms(void) const { return gtk_entry_get_text(GTK_ENTRY(parms_entry_p)); } void ParmsPage::set_init(const std::string& init) { gtk_entry_set_text(GTK_ENTRY(init_entry_p), init.c_str()); } void ParmsPage::set_reset(const std::string& reset) { gtk_entry_set_text(GTK_ENTRY(reset_entry_p), reset.c_str()); } void ParmsPage::set_parms(const std::string& parms) { gtk_entry_set_text(GTK_ENTRY(parms_entry_p), parms.c_str()); } void ParmsPage::clear(void) { gtk_entry_set_text(GTK_ENTRY(init_entry_p), ""); gtk_entry_set_text(GTK_ENTRY(reset_entry_p), ""); gtk_entry_set_text(GTK_ENTRY(parms_entry_p), ""); } void PrintPageCB::print_page_button_clicked(GtkWidget* widget_p, void* data) { PrintPage* instance_p = static_cast(data); int message_index; if (widget_p == instance_p->gtkprint_check_button_h.get()) { instance_p->gtkprint_button_toggled_impl(); return; } else if (widget_p == instance_p->gtkprint_help_button_h.get()) { message_index = PrintMessages::gtkprint; } else if (widget_p == instance_p->command_help_button_p) { message_index = PrintMessages::command; } else if (widget_p == instance_p->shrink_help_button_p) { message_index = PrintMessages::shrink; } else if (widget_p == instance_p->popup_help_button_p) { message_index = PrintMessages::popup; } else { write_error("Callback error in PrintPageCB::print_page_button_clicked()\n"); return; } instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(message_index), instance_p->help_messages.get_caption(message_index))); } PrintPage::PrintPage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(4, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GobjHandle gtkprint_label_h(gtk_label_new(gettext("Use GTK+ Print System"))); command_label_p = gtk_label_new(gettext("Print Program: ")); shrink_label_p = gtk_label_new(gettext("Print Shrink (50-100):")); popup_label_p = gtk_label_new(gettext("Popup confirmation dialog\nbefore printing")); gtk_label_set_justify(GTK_LABEL(gtkprint_label_h.get()), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(command_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(shrink_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(popup_label_p), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(gtkprint_label_h.get()), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(command_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(shrink_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(popup_label_p), 1, 0.5); GobjHandle gtkprint_button_alignment_h(gtk_alignment_new(0, 0.5, 0, 1)); gtkprint_check_button_h = GobjHandle(gtk_check_button_new()); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtkprint_check_button_h.get()), false); // this is the default gtk_container_add(GTK_CONTAINER(gtkprint_button_alignment_h.get()), gtkprint_check_button_h); command_entry_p = gtk_entry_new(); gtk_widget_set_size_request(command_entry_p, standard_size * 7, standard_size); shrink_spin_button_p = gtk_spin_button_new_with_range(50, 100, 1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(shrink_spin_button_p), true); gtk_widget_set_size_request(shrink_spin_button_p, -1, standard_size); GtkWidget* shrink_spin_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(shrink_spin_button_alignment_p), shrink_spin_button_p); GtkWidget* popup_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); popup_check_button_p = gtk_check_button_new(); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_check_button_p), true); // this is the default gtk_container_add(GTK_CONTAINER(popup_button_alignment_p), popup_check_button_p); gtkprint_help_button_h = GobjHandle(gtk_button_new()); command_help_button_p = gtk_button_new(); shrink_help_button_p = gtk_button_new(); popup_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(gtkprint_help_button_h.get()), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(command_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(shrink_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(popup_help_button_p), image_p); } gtk_table_attach(table_p, gtkprint_label_h, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/4, standard_size/2); gtk_table_attach(table_p, gtkprint_button_alignment_h, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/4, standard_size/2); gtk_table_attach(table_p, gtkprint_help_button_h, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/4, standard_size/2); gtk_table_attach(table_p, command_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, command_entry_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, command_help_button_p, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, shrink_label_p, 0, 1, 2, 3, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, shrink_spin_button_alignment_p, 1, 2, 2, 3, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, shrink_help_button_p, 2, 3, 2, 3, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, popup_label_p, 0, 1, 3, 4, GTK_FILL, GTK_SHRINK, standard_size/4, standard_size/2); gtk_table_attach(table_p, popup_button_alignment_p, 1, 2, 3, 4, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/4, standard_size/2); gtk_table_attach(table_p, popup_help_button_p, 2, 3, 3, 4, GTK_SHRINK, GTK_SHRINK, standard_size/4, standard_size/2); g_signal_connect(G_OBJECT(gtkprint_check_button_h.get()), "clicked", G_CALLBACK(PrintPageCB::print_page_button_clicked), this); g_signal_connect(G_OBJECT(gtkprint_help_button_h.get()), "clicked", G_CALLBACK(PrintPageCB::print_page_button_clicked), this); g_signal_connect(G_OBJECT(command_help_button_p), "clicked", G_CALLBACK(PrintPageCB::print_page_button_clicked), this); g_signal_connect(G_OBJECT(shrink_help_button_p), "clicked", G_CALLBACK(PrintPageCB::print_page_button_clicked), this); g_signal_connect(G_OBJECT(popup_help_button_p), "clicked", G_CALLBACK(PrintPageCB::print_page_button_clicked), this); gtk_widget_set_tooltip_text(gtkprint_help_button_h, help_messages.get_message(PrintMessages::gtkprint).c_str()); gtk_widget_set_tooltip_text(command_help_button_p, help_messages.get_message(PrintMessages::command).c_str()); gtk_widget_set_tooltip_text(shrink_help_button_p, help_messages.get_message(PrintMessages::shrink).c_str()); gtk_widget_set_tooltip_text(popup_help_button_p, help_messages.get_message(PrintMessages::popup).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string PrintPage::get_gtkprint(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtkprint_check_button_h.get()))) { return std::string("Yes"); } return std::string("No"); } std::string PrintPage::get_command(void) const { return gtk_entry_get_text(GTK_ENTRY(command_entry_p)); } std::string PrintPage::get_shrink(void) const { std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE strm << gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(shrink_spin_button_p)); return strm.str(); } std::string PrintPage::get_popup(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(popup_check_button_p))) { return std::string("Yes"); } return std::string("No"); } void PrintPage::set_gtkprint(const std::string& gtkprint_string) { std::string temp(utf8_to_lower(gtkprint_string)); if (!temp.compare("no")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtkprint_check_button_h.get()), false); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtkprint_check_button_h.get()), true); } void PrintPage::set_command(const std::string& command) { gtk_entry_set_text(GTK_ENTRY(command_entry_p), command.c_str()); } void PrintPage::set_shrink(const std::string& shrink) { int val = std::atoi(shrink.c_str()); if (val < 50) val = 100; gtk_spin_button_set_value(GTK_SPIN_BUTTON(shrink_spin_button_p), val); } void PrintPage::set_popup(const std::string& popup_string) { std::string temp(utf8_to_lower(popup_string)); if (!temp.compare("no")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_check_button_p), false); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_check_button_p), true); } void PrintPage::clear(void) { gtk_entry_set_text(GTK_ENTRY(command_entry_p), ""); gtk_spin_button_set_value(GTK_SPIN_BUTTON(shrink_spin_button_p), 100); } void PrintPage::gtkprint_button_toggled_impl(void) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtkprint_check_button_h.get()))) { gtk_widget_set_sensitive(GTK_WIDGET(command_label_p), false); gtk_editable_set_editable(GTK_EDITABLE(command_entry_p), false); gtk_widget_set_sensitive(GTK_WIDGET(command_entry_p), false); gtk_widget_set_sensitive(GTK_WIDGET(shrink_label_p), false); gtk_editable_set_editable(GTK_EDITABLE(shrink_spin_button_p), false); gtk_widget_set_sensitive(GTK_WIDGET(shrink_spin_button_p), false); gtk_widget_set_sensitive(GTK_WIDGET(popup_label_p), false); gtk_widget_set_sensitive(GTK_WIDGET(popup_check_button_p), false); } else { gtk_widget_set_sensitive(GTK_WIDGET(command_label_p), true); gtk_editable_set_editable(GTK_EDITABLE(command_entry_p), true); gtk_widget_set_sensitive(GTK_WIDGET(command_entry_p), true); gtk_widget_set_sensitive(GTK_WIDGET(shrink_label_p), true); gtk_editable_set_editable(GTK_EDITABLE(shrink_spin_button_p), true); gtk_widget_set_sensitive(GTK_WIDGET(shrink_spin_button_p), true); gtk_widget_set_sensitive(GTK_WIDGET(popup_label_p), true); gtk_widget_set_sensitive(GTK_WIDGET(popup_check_button_p), true); } } void ViewPageCB::view_page_button_clicked(GtkWidget*, void* data) { ViewPage* instance_p = static_cast(data); instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(ViewMessages::ps_view_command), instance_p->help_messages.get_caption(ViewMessages::ps_view_command))); } ViewPage::ViewPage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(1, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* ps_view_command_label_p = gtk_label_new(gettext("Postscript viewer\nprogram:")); gtk_label_set_justify(GTK_LABEL(ps_view_command_label_p), GTK_JUSTIFY_RIGHT); ps_view_command_entry_p = gtk_entry_new(); gtk_widget_set_size_request(ps_view_command_entry_p, standard_size * 7, standard_size); GtkWidget* ps_view_command_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(ps_view_command_help_button_p), image_p); } gtk_table_attach(table_p, ps_view_command_label_p, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, ps_view_command_entry_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, ps_view_command_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); g_signal_connect(G_OBJECT(ps_view_command_help_button_p), "clicked", G_CALLBACK(ViewPageCB::view_page_button_clicked), this); gtk_widget_set_tooltip_text(ps_view_command_help_button_p, help_messages.get_message(ViewMessages::ps_view_command).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string ViewPage::get_ps_view_command(void) const { return gtk_entry_get_text(GTK_ENTRY(ps_view_command_entry_p)); } void ViewPage::set_ps_view_command(const std::string& command) { gtk_entry_set_text(GTK_ENTRY(ps_view_command_entry_p), command.c_str()); } void ViewPage::clear(void) { gtk_entry_set_text(GTK_ENTRY(ps_view_command_entry_p), ""); } void SockPageCB::sock_page_button_clicked(GtkWidget* widget_p, void* data) { SockPage* instance_p = static_cast(data); int message_index; if (widget_p == instance_p->other_address_button_p) { instance_p->other_address_button_toggled_impl(); return; } else if (widget_p == instance_p->run_server_help_button_p) { message_index = SockMessages::run_server; } else if (widget_p == instance_p->popup_help_button_p) { message_index = SockMessages::popup; } else if (widget_p == instance_p->port_help_button_p) { message_index = SockMessages::port; } else if (widget_p == instance_p->client_address_help_button_p) { message_index = SockMessages::client_address; } else if (widget_p == instance_p->ip_family_help_button_p) { message_index = SockMessages::ip_family; } else { write_error("Callback error in SockPageCB::sock_page_button_clicked()\n"); return; } instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(message_index), instance_p->help_messages.get_caption(message_index))); } SockPage::SockPage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(5, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* run_server_label_p = gtk_label_new(gettext("Run socket server")); GtkWidget* popup_label_p = gtk_label_new(gettext("Popup dialog when fax\nreceived from socket")); GtkWidget* port_label_p = gtk_label_new(gettext("Port to which faxes to\nbe sent:")); GtkWidget* client_address_label_p = gtk_label_new(gettext("Addresses allowed to\nconnect")); GtkWidget* ip_family_label_p = gtk_label_new(gettext("IP family for socket\nserver")); gtk_label_set_justify(GTK_LABEL(run_server_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(popup_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(port_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(client_address_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(ip_family_label_p), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(run_server_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(popup_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(port_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(client_address_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(ip_family_label_p), 1, 0.5); GtkWidget* run_server_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); GtkWidget* popup_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); run_server_button_p = gtk_check_button_new(); popup_button_p = gtk_check_button_new(); gtk_container_add(GTK_CONTAINER(run_server_button_alignment_p), run_server_button_p); gtk_container_add(GTK_CONTAINER(popup_button_alignment_p), popup_button_p); port_spin_button_p = gtk_spin_button_new_with_range(1024, 65535, 1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(port_spin_button_p), true); gtk_widget_set_size_request(port_spin_button_p, -1, standard_size); GtkWidget* port_spin_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(port_spin_button_alignment_p), port_spin_button_p); other_addresses_entry_p = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(other_addresses_entry_p), false); gtk_widget_set_sensitive(GTK_WIDGET(other_addresses_entry_p), false); localhost_button_p = gtk_radio_button_new_with_label(0, gettext("localhost ")); other_address_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(localhost_button_p), gettext("other")); GtkBox* client_address_box_p = GTK_BOX(gtk_hbox_new(false, 2)); gtk_box_pack_start(client_address_box_p, localhost_button_p, false, false, 0); gtk_box_pack_start(client_address_box_p, other_address_button_p, false, false, 0); GtkWidget* client_address_box_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(client_address_box_alignment_p), GTK_WIDGET(client_address_box_p)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(localhost_button_p), true); GtkBox* client_address_frame_box_p = GTK_BOX(gtk_vbox_new(false, 0)); gtk_box_pack_start(client_address_frame_box_p, client_address_box_alignment_p, false, false, 0); gtk_box_pack_start(client_address_frame_box_p, other_addresses_entry_p, false, false, 0); gtk_container_set_border_width(GTK_CONTAINER(client_address_frame_box_p), 4); GtkWidget* client_address_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(client_address_frame_p), GTK_WIDGET(client_address_frame_box_p)); ipv4_button_p = gtk_radio_button_new_with_label(0, gettext("IPv4 ")); ipv6_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(ipv4_button_p), gettext("IPv6")); GtkBox* ip_family_box_p = GTK_BOX(gtk_hbox_new(false, 2)); gtk_box_pack_start(ip_family_box_p, ipv4_button_p, false, false, 0); gtk_box_pack_start(ip_family_box_p, ipv6_button_p, false, false, 0); GtkWidget* ip_family_box_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(ip_family_box_alignment_p), GTK_WIDGET(ip_family_box_p)); GtkWidget* ip_family_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(ip_family_frame_p), ip_family_box_alignment_p); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ipv4_button_p), true); run_server_help_button_p = gtk_button_new(); popup_help_button_p = gtk_button_new(); port_help_button_p = gtk_button_new(); client_address_help_button_p = gtk_button_new(); ip_family_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(run_server_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(popup_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(port_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(client_address_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(ip_family_help_button_p), image_p); } gtk_table_attach(table_p, run_server_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, run_server_button_alignment_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, run_server_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, popup_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, popup_button_alignment_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, popup_help_button_p, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, port_label_p, 0, 1, 2, 3, GTK_FILL, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, port_spin_button_alignment_p, 1, 2, 2, 3, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, port_help_button_p, 2, 3, 2, 3, GTK_SHRINK, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, client_address_label_p, 0, 1, 3, 4, GTK_FILL, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, client_address_frame_p, 1, 2, 3, 4, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, client_address_help_button_p, 2, 3, 3, 4, GTK_SHRINK, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, ip_family_label_p, 0, 1, 4, 5, GTK_FILL, GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, ip_family_frame_p, 1, 2, 4, 5, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/4, standard_size/5); gtk_table_attach(table_p, ip_family_help_button_p, 2, 3, 4, 5, GTK_SHRINK, GTK_SHRINK, standard_size/4, standard_size/5); g_signal_connect(G_OBJECT(other_address_button_p), "clicked", G_CALLBACK(SockPageCB::sock_page_button_clicked), this); g_signal_connect(G_OBJECT(run_server_help_button_p), "clicked", G_CALLBACK(SockPageCB::sock_page_button_clicked), this); g_signal_connect(G_OBJECT(popup_help_button_p), "clicked", G_CALLBACK(SockPageCB::sock_page_button_clicked), this); g_signal_connect(G_OBJECT(port_help_button_p), "clicked", G_CALLBACK(SockPageCB::sock_page_button_clicked), this); g_signal_connect(G_OBJECT(client_address_help_button_p), "clicked", G_CALLBACK(SockPageCB::sock_page_button_clicked), this); g_signal_connect(G_OBJECT(ip_family_help_button_p), "clicked", G_CALLBACK(SockPageCB::sock_page_button_clicked), this); gtk_widget_set_tooltip_text(run_server_help_button_p, help_messages.get_message(SockMessages::run_server).c_str()); gtk_widget_set_tooltip_text(popup_help_button_p, help_messages.get_message(SockMessages::popup).c_str()); gtk_widget_set_tooltip_text(port_help_button_p, help_messages.get_message(SockMessages::port).c_str()); gtk_widget_set_tooltip_text(client_address_help_button_p, help_messages.get_message(SockMessages::client_address).c_str()); gtk_widget_set_tooltip_text(ip_family_help_button_p, help_messages.get_message(SockMessages::ip_family).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string SockPage::get_run_server(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(run_server_button_p))) { return std::string("Yes"); } return std::string("No"); } std::string SockPage::get_popup(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(popup_button_p))) { return std::string("Yes"); } return std::string("No"); } std::string SockPage::get_port(void) const { std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE strm << gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(port_spin_button_p)); return strm.str(); } std::string SockPage::get_if_other_address(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(other_address_button_p))) { return std::string("other");; } return std::string("localhost"); } std::string SockPage::get_other_addresses(void) const { return gtk_entry_get_text(GTK_ENTRY(other_addresses_entry_p)); } std::string SockPage::get_ip_family(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ipv6_button_p))) { return std::string("ipv6");; } return std::string("ipv4"); } void SockPage::set_run_server(const std::string& run_server_string) { std::string temp(utf8_to_lower(run_server_string)); if (!temp.compare("yes")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(run_server_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(run_server_button_p), false); } void SockPage::set_popup(const std::string& popup_string) { std::string temp(utf8_to_lower(popup_string)); if (!temp.compare("yes")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_button_p), false); } void SockPage::set_port(const std::string& port_string) { int val = std::atoi(port_string.c_str()); if (val < 1024) val = 9900; gtk_spin_button_set_value(GTK_SPIN_BUTTON(port_spin_button_p), val); } void SockPage::set_if_other_address(const std::string& if_other_address_string) { std::string temp(utf8_to_lower(if_other_address_string)); if (!temp.compare("other")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(other_address_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(localhost_button_p), true); } void SockPage::set_other_addresses(const std::string& other_addresses_string) { gtk_entry_set_text(GTK_ENTRY(other_addresses_entry_p), other_addresses_string.c_str()); } void SockPage::set_ip_family(const std::string& ip_family_string) { std::string temp(utf8_to_lower(ip_family_string)); if (!temp.compare("ipv6")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ipv6_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ipv4_button_p), true); } void SockPage::clear(void) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(run_server_button_p), false); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_button_p), false); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(other_address_button_p), false); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ipv6_button_p), false); gtk_spin_button_set_value(GTK_SPIN_BUTTON(port_spin_button_p), 9900); gtk_entry_set_text(GTK_ENTRY(other_addresses_entry_p), ""); } void SockPage::other_address_button_toggled_impl(void) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(other_address_button_p))) { gtk_editable_set_editable(GTK_EDITABLE(other_addresses_entry_p), true); gtk_widget_set_sensitive(GTK_WIDGET(other_addresses_entry_p), true); } else { gtk_editable_set_editable(GTK_EDITABLE(other_addresses_entry_p), false); gtk_widget_set_sensitive(GTK_WIDGET(other_addresses_entry_p), false); } } void ReceivePageCB::receive_page_button_clicked(GtkWidget* widget_p, void* data) { ReceivePage* instance_p = static_cast(data); int message_index; if (widget_p == instance_p->exec_button_p) { instance_p->exec_button_toggled_impl(); return; } else if (widget_p == instance_p->popup_help_button_p) { message_index = ReceiveMessages::popup; } else if (widget_p == instance_p->exec_help_button_p) { message_index = ReceiveMessages::exec; } else { write_error("Callback error in ReceivePageCB::receive_page_button_clicked()\n"); return; } instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(message_index), instance_p->help_messages.get_caption(message_index))); } ReceivePage::ReceivePage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(2, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* popup_label_p = gtk_label_new(gettext("Popup dialog when fax\nreceived by modem")); GtkWidget* exec_label_p = gtk_label_new(gettext("Execute a program or script\nwhen fax received by modem")); gtk_label_set_justify(GTK_LABEL(popup_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(exec_label_p), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(popup_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(exec_label_p), 1, 0.5); GtkWidget* popup_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); GtkWidget* exec_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); popup_button_p = gtk_check_button_new(); exec_button_p = gtk_check_button_new(); gtk_container_add(GTK_CONTAINER(popup_button_alignment_p), popup_button_p); gtk_container_add(GTK_CONTAINER(exec_button_alignment_p), exec_button_p); prog_entry_p = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(prog_entry_p), false); gtk_widget_set_sensitive(GTK_WIDGET(prog_entry_p), false); gtk_widget_set_size_request(prog_entry_p, standard_size * 7, standard_size); GtkBox* exec_frame_box_p = GTK_BOX(gtk_vbox_new(false, 0)); gtk_box_pack_start(exec_frame_box_p, exec_button_alignment_p, false, false, 0); gtk_box_pack_start(exec_frame_box_p, prog_entry_p, false, false, 0); gtk_container_set_border_width(GTK_CONTAINER(exec_frame_box_p), 4); GtkWidget* exec_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(exec_frame_p), GTK_WIDGET(exec_frame_box_p)); // set the defaults gtk_editable_set_editable(GTK_EDITABLE(prog_entry_p), false); gtk_widget_set_sensitive(GTK_WIDGET(prog_entry_p), false); popup_help_button_p = gtk_button_new(); exec_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(popup_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(exec_help_button_p), image_p); } gtk_table_attach(table_p, popup_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, popup_button_alignment_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, popup_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, exec_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, exec_frame_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, exec_help_button_p, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); g_signal_connect(G_OBJECT(exec_button_p), "clicked", G_CALLBACK(ReceivePageCB::receive_page_button_clicked), this); g_signal_connect(G_OBJECT(popup_help_button_p), "clicked", G_CALLBACK(ReceivePageCB::receive_page_button_clicked), this); g_signal_connect(G_OBJECT(exec_help_button_p), "clicked", G_CALLBACK(ReceivePageCB::receive_page_button_clicked), this); gtk_widget_set_tooltip_text(popup_help_button_p, help_messages.get_message(ReceiveMessages::popup).c_str()); gtk_widget_set_tooltip_text(exec_help_button_p, help_messages.get_message(ReceiveMessages::exec).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string ReceivePage::get_popup(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(popup_button_p))) { return std::string("Yes"); } return std::string("No"); } std::string ReceivePage::get_exec(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(exec_button_p))) { return std::string("Yes"); } return std::string("No"); } std::string ReceivePage::get_prog(void) const { return gtk_entry_get_text(GTK_ENTRY(prog_entry_p)); } void ReceivePage::set_popup(const std::string& popup_string) { std::string temp(utf8_to_lower(popup_string)); if (!temp.compare("yes")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_button_p), false); } void ReceivePage::set_exec(const std::string& exec_string) { std::string temp(utf8_to_lower(exec_string)); if (!temp.compare("yes")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(exec_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(exec_button_p), false); } void ReceivePage::set_prog(const std::string& prog_string) { gtk_entry_set_text(GTK_ENTRY(prog_entry_p), prog_string.c_str()); } void ReceivePage::clear(void) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(popup_button_p), false); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(exec_button_p), false); gtk_entry_set_text(GTK_ENTRY(prog_entry_p), ""); } void ReceivePage::exec_button_toggled_impl(void) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(exec_button_p))) { gtk_editable_set_editable(GTK_EDITABLE(prog_entry_p), true); gtk_widget_set_sensitive(GTK_WIDGET(prog_entry_p), true); } else { gtk_editable_set_editable(GTK_EDITABLE(prog_entry_p), false); gtk_widget_set_sensitive(GTK_WIDGET(prog_entry_p), false); } } void SendPageCB::send_page_button_clicked(GtkWidget* widget_p, void* data) { SendPage* instance_p = static_cast(data); int message_index; if (widget_p == instance_p->redial_check_button_p) { instance_p->redial_check_button_toggled_impl(); return; } else if (widget_p == instance_p->res_help_button_p) { message_index = SendMessages::res; } else if (widget_p == instance_p->header_help_button_p) { message_index = SendMessages::header; } else if (widget_p == instance_p->redial_help_button_p) { message_index = SendMessages::redial; } else if (widget_p == instance_p->dial_prefix_help_button_p) { message_index = SendMessages::dial_prefix; } else { write_error("Callback error in SendPageCB::send_page_button_clicked()\n"); return; } instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(message_index), instance_p->help_messages.get_caption(message_index))); } SendPage::SendPage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(4, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* res_label_p = gtk_label_new(gettext("Sent Fax Resolution:")); GtkWidget* header_label_p = gtk_label_new(gettext("Include destination\nfax number on fax\npage top header line")); GtkWidget* redial_label_p = gtk_label_new(gettext("Automatic redial")); redial_spin_label_p = gtk_label_new(gettext("Interval (minutes):")); GtkWidget* dial_prefix_label_p = gtk_label_new(gettext("Dial Prefix:")); gtk_label_set_justify(GTK_LABEL(res_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(header_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(redial_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(redial_spin_label_p), GTK_JUSTIFY_RIGHT); gtk_label_set_justify(GTK_LABEL(dial_prefix_label_p), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment(GTK_MISC(res_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(header_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(redial_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(redial_spin_label_p), 1, 0.5); gtk_misc_set_alignment(GTK_MISC(dial_prefix_label_p), 1, 0.5); standard_button_p = gtk_radio_button_new_with_label(0, gettext("Standard")); fine_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(standard_button_p), gettext("Fine")); GtkWidget* res_box_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); GtkBox* res_box_p = GTK_BOX(gtk_hbox_new(false, 2)); gtk_box_pack_start(res_box_p, standard_button_p, false, false, 10); gtk_box_pack_start(res_box_p, fine_button_p, false, false, 10); gtk_container_add(GTK_CONTAINER(res_box_alignment_p), GTK_WIDGET(res_box_p)); GtkWidget* res_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(res_frame_p), res_box_alignment_p); header_check_button_p = gtk_check_button_new(); GtkWidget* header_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(header_button_alignment_p), header_check_button_p); redial_check_button_p = gtk_check_button_new(); GtkWidget* redial_box_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); GtkBox* redial_box_p = GTK_BOX(gtk_hbox_new(false, 2)); gtk_box_pack_start(redial_box_p, redial_check_button_p, false, false, 10); gtk_box_pack_start(redial_box_p, redial_spin_label_p, false, false, 0); redial_spin_button_p = gtk_spin_button_new_with_range(5, 1440, 1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(redial_spin_button_p), true); gtk_widget_set_size_request(redial_spin_button_p, -1, standard_size); gtk_box_pack_start(redial_box_p, redial_spin_button_p, false, false, 0); gtk_container_add(GTK_CONTAINER(redial_box_alignment_p), GTK_WIDGET(redial_box_p)); GtkWidget* redial_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(redial_frame_p), redial_box_alignment_p); // set the defaults gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fine_button_p), true); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(header_check_button_p), true); gtk_spin_button_set_value(GTK_SPIN_BUTTON(redial_spin_button_p), 15); gtk_widget_set_sensitive(GTK_WIDGET(redial_spin_label_p), false); gtk_editable_set_editable(GTK_EDITABLE(redial_spin_button_p), false); gtk_widget_set_sensitive(GTK_WIDGET(redial_spin_button_p), false); dial_prefix_entry_p = gtk_entry_new(); gtk_widget_set_size_request(dial_prefix_entry_p, standard_size * 7, standard_size); res_help_button_p = gtk_button_new(); header_help_button_p = gtk_button_new(); redial_help_button_p = gtk_button_new(); dial_prefix_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(res_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(header_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(redial_help_button_p), image_p); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(dial_prefix_help_button_p), image_p); } gtk_table_attach(table_p, res_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, res_frame_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, res_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, header_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, standard_size/4, standard_size/2); gtk_table_attach(table_p, header_button_alignment_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/4, standard_size/2); gtk_table_attach(table_p, header_help_button_p, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/4, standard_size/2); gtk_table_attach(table_p, redial_label_p, 0, 1, 2, 3, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, redial_frame_p, 1, 2, 2, 3, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, redial_help_button_p, 2, 3, 2, 3, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, dial_prefix_label_p, 0, 1, 3, 4, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, dial_prefix_entry_p, 1, 2, 3, 4, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/2); gtk_table_attach(table_p, dial_prefix_help_button_p, 2, 3, 3, 4, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size/2); g_signal_connect(G_OBJECT(redial_check_button_p), "clicked", G_CALLBACK(SendPageCB::send_page_button_clicked), this); g_signal_connect(G_OBJECT(res_help_button_p), "clicked", G_CALLBACK(SendPageCB::send_page_button_clicked), this); g_signal_connect(G_OBJECT(header_help_button_p), "clicked", G_CALLBACK(SendPageCB::send_page_button_clicked), this); g_signal_connect(G_OBJECT(redial_help_button_p), "clicked", G_CALLBACK(SendPageCB::send_page_button_clicked), this); g_signal_connect(G_OBJECT(dial_prefix_help_button_p), "clicked", G_CALLBACK(SendPageCB::send_page_button_clicked), this); gtk_widget_set_tooltip_text(res_help_button_p, help_messages.get_message(SendMessages::res).c_str()); gtk_widget_set_tooltip_text(header_help_button_p, help_messages.get_message(SendMessages::header).c_str()); gtk_widget_set_tooltip_text(redial_help_button_p, help_messages.get_message(SendMessages::redial).c_str()); gtk_widget_set_tooltip_text(dial_prefix_help_button_p, help_messages.get_message(SendMessages::dial_prefix).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string SendPage::get_res(void) const { std::string return_val("fine"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(standard_button_p))) return_val = "standard"; return return_val; } std::string SendPage::get_addr_in_header(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(header_check_button_p))) { return std::string("Yes"); } return std::string("No"); } std::string SendPage::get_redial(void) const { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(redial_check_button_p))) { return std::string("Yes"); } return std::string("No"); } std::string SendPage::get_redial_interval(void) const { std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE strm << gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(redial_spin_button_p)); return strm.str(); } std::string SendPage::get_dial_prefix(void) const { return gtk_entry_get_text(GTK_ENTRY(dial_prefix_entry_p)); } void SendPage::set_res(const std::string& res_string) { std::string temp(utf8_to_lower(res_string)); if (!temp.compare("fine")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fine_button_p), true); } else if (!temp.compare("standard")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(standard_button_p), true); } } void SendPage::set_addr_in_header(const std::string& header_string) { std::string temp(utf8_to_lower(header_string)); if (!temp.compare("no")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(header_check_button_p), false); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(header_check_button_p), true); } void SendPage::set_redial(const std::string& redial) { std::string temp(utf8_to_lower(redial)); if (!temp.compare("yes")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(redial_check_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(redial_check_button_p), false); } void SendPage::set_redial_interval(const std::string& interval) { int val = std::atoi(interval.c_str()); if (val < 5) val = 15; gtk_spin_button_set_value(GTK_SPIN_BUTTON(redial_spin_button_p), val); } void SendPage::set_dial_prefix(const std::string& prefix) { gtk_entry_set_text(GTK_ENTRY(dial_prefix_entry_p), prefix.c_str()); } void SendPage::clear(void) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fine_button_p), true); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(header_check_button_p), true); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(redial_check_button_p), false); gtk_spin_button_set_value(GTK_SPIN_BUTTON(redial_spin_button_p), 15); gtk_entry_set_text(GTK_ENTRY(dial_prefix_entry_p), ""); gtk_widget_set_sensitive(GTK_WIDGET(redial_spin_label_p), false); gtk_editable_set_editable(GTK_EDITABLE(redial_spin_button_p), false); gtk_widget_set_sensitive(GTK_WIDGET(redial_spin_button_p), false); } void SendPage::redial_check_button_toggled_impl(void) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(redial_check_button_p))) { gtk_widget_set_sensitive(GTK_WIDGET(redial_spin_label_p), true); gtk_editable_set_editable(GTK_EDITABLE(redial_spin_button_p), true); gtk_widget_set_sensitive(GTK_WIDGET(redial_spin_button_p), true); } else { gtk_widget_set_sensitive(GTK_WIDGET(redial_spin_label_p), false); gtk_editable_set_editable(GTK_EDITABLE(redial_spin_button_p), false); gtk_widget_set_sensitive(GTK_WIDGET(redial_spin_button_p), false); } } void LoggingPageCB::logging_page_button_clicked(GtkWidget*, void* data) { LoggingPage* instance_p = static_cast(data); instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(LoggingMessages::logfile), instance_p->help_messages.get_caption(LoggingMessages::logfile))); } LoggingPage::LoggingPage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(1, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* logfile_label_p = gtk_label_new(gettext("Log File: ")); gtk_label_set_justify(GTK_LABEL(logfile_label_p), GTK_JUSTIFY_RIGHT); logfile_entry_p = gtk_entry_new(); gtk_widget_set_size_request(logfile_entry_p, standard_size * 7, standard_size); GtkWidget* logfile_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(logfile_help_button_p), image_p); } gtk_table_attach(table_p, logfile_label_p, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, logfile_entry_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, logfile_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); g_signal_connect(G_OBJECT(logfile_help_button_p), "clicked", G_CALLBACK(LoggingPageCB::logging_page_button_clicked), this); gtk_widget_set_tooltip_text(logfile_help_button_p, help_messages.get_message(LoggingMessages::logfile).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string LoggingPage::get_logfile(void) const { return gtk_entry_get_text(GTK_ENTRY(logfile_entry_p)); } void LoggingPage::set_logfile(const std::string& logfile) { gtk_entry_set_text(GTK_ENTRY(logfile_entry_p), logfile.c_str()); } void LoggingPage::clear(void) { gtk_entry_set_text(GTK_ENTRY(logfile_entry_p), ""); } void PagePageCB::page_page_button_clicked(GtkWidget* widget_p, void* data) { PagePage* instance_p = static_cast(data); instance_p->show_help_sig(std::pair( instance_p->help_messages.get_message(PageMessages::page), instance_p->help_messages.get_caption(PageMessages::page))); } PagePage::PagePage(const int standard_size): MainWidgetBase(gtk_alignment_new(0.5, 0.5, 1, 0)) { GtkTable* table_p = GTK_TABLE(gtk_table_new(1, 3, false)); gtk_container_add(GTK_CONTAINER(get_main_widget()), GTK_WIDGET(table_p)); GtkWidget* page_label_p = gtk_label_new(gettext("Page Size: ")); gtk_label_set_justify(GTK_LABEL(page_label_p), GTK_JUSTIFY_RIGHT); a4_button_p = gtk_radio_button_new_with_label(0, "A4"); letter_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(a4_button_p), "Letter"); legal_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(a4_button_p), "Legal"); GtkWidget* page_box_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); GtkBox* page_box_p = GTK_BOX(gtk_hbox_new(false, 2)); gtk_box_pack_start(page_box_p, a4_button_p, false, false, 10); gtk_box_pack_start(page_box_p, letter_button_p, false, false, 10); gtk_box_pack_start(page_box_p, legal_button_p, false, false, 10); gtk_container_add(GTK_CONTAINER(page_box_alignment_p), GTK_WIDGET(page_box_p)); GtkWidget* page_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(page_frame_p), page_box_alignment_p); // set the defaults gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(a4_button_p), true); page_help_button_p = gtk_button_new(); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(help_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(page_help_button_p), image_p); } gtk_table_attach(table_p, page_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, page_frame_p, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size); gtk_table_attach(table_p, page_help_button_p, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, standard_size/3, standard_size); g_signal_connect(G_OBJECT(page_help_button_p), "clicked", G_CALLBACK(PagePageCB::page_page_button_clicked), this); gtk_widget_set_tooltip_text(page_help_button_p, help_messages.get_message(PageMessages::page).c_str()); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), standard_size/3); } std::string PagePage::get_page(void) const { std::string return_val("a4"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(letter_button_p))) return_val = "letter"; else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(legal_button_p))) return_val = "legal"; return return_val; } void PagePage::set_page(const std::string& page_string) { std::string temp(utf8_to_lower(page_string)); if (!temp.compare("a4")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(a4_button_p), true); } else if (!temp.compare("letter")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(letter_button_p), true); } else if (!temp.compare("legal")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(legal_button_p), true); } } void PagePage::clear(void) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(a4_button_p), true); } void SettingsDialogCB::settings_dialog_button_clicked(GtkWidget* widget_p, void* data) { SettingsDialog* instance_p = static_cast(data); if (widget_p == instance_p->ok_button_p) { if (instance_p->write_config()) { gtk_widget_hide(GTK_WIDGET(instance_p->get_win())); instance_p->accepted(configure_prog(true)); instance_p->close(); } } else if (widget_p == instance_p->cancel_button_p) { instance_p->close(); } else if (widget_p == instance_p->reset_button_p) { instance_p->get_reset_settings_prompt(); } else { write_error("Callback error in SettingsDialogCB::settings_dialog_button_clicked()\n"); instance_p->close(); } } SettingsDialog::SettingsDialog(const int size, GtkWindow* parent_p, bool skip_old_settings): // skip_old_settings has a default value of false WinBase(gettext("efax-gtk: settings"), prog_config.window_icon_h, true, parent_p), standard_size(size), is_home_config(false), identity_page(standard_size), modem_page(standard_size), parms_page(standard_size), print_page(standard_size), view_page(standard_size), sock_page(standard_size), receive_page(standard_size), send_page(standard_size), logging_page(standard_size), page_page(standard_size) { ++dialog_count; ok_button_p = gtk_button_new_from_stock(GTK_STOCK_OK); cancel_button_p = gtk_button_new_from_stock(GTK_STOCK_CANCEL); reset_button_p = 0; GtkWidget* label_p = gtk_label_new(0); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkTable* window_table_p = GTK_TABLE(gtk_table_new(2, 2, false)); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(button_box_p), standard_size/2); // we set skip_old_settings as true in MainWindow::MainWindow(), where no config file has // been found, to prevent that fact being reported twice if (!skip_old_settings) read_config(); if (!is_home_config) { // if skip_old_settings is true, then is_home_config is always false gtk_label_set_line_wrap(GTK_LABEL(label_p), true); std::string label_text(gettext("Note: pressing the OK button will save the " "settings in file")); label_text += " ~/." RC_FILE; gtk_label_set_text(GTK_LABEL(label_p), label_text.c_str()); } else { reset_button_p = gtk_button_new_with_label(gettext("Reset")); g_signal_connect(G_OBJECT(reset_button_p), "clicked", G_CALLBACK(SettingsDialogCB::settings_dialog_button_clicked), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(reset_button_p, true); #else GTK_WIDGET_SET_FLAGS(reset_button_p, GTK_CAN_DEFAULT); #endif gtk_container_add(GTK_CONTAINER(button_box_p), reset_button_p); } gtk_container_add(GTK_CONTAINER(button_box_p), cancel_button_p); gtk_container_add(GTK_CONTAINER(button_box_p), ok_button_p); GtkNotebook* notebook_p = GTK_NOTEBOOK(gtk_notebook_new()); gtk_table_attach(window_table_p, GTK_WIDGET(notebook_p), 0, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/2, standard_size/4); gtk_table_attach(window_table_p, label_p, 0, 1, 1, 2, GTK_EXPAND, GTK_SHRINK, standard_size/2, standard_size/4); gtk_table_attach(window_table_p, button_box_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/2, standard_size/4); gtk_notebook_set_tab_pos(notebook_p, GTK_POS_TOP); gtk_notebook_set_scrollable(notebook_p, true); GtkWidget* tab_label_p; tab_label_p = gtk_label_new(gettext("Identity")); gtk_notebook_append_page(notebook_p, identity_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("Modem")); gtk_notebook_append_page(notebook_p, modem_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("Params")); gtk_notebook_append_page(notebook_p, parms_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("Print")); gtk_notebook_append_page(notebook_p, print_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("View")); gtk_notebook_append_page(notebook_p, view_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("Socket")); gtk_notebook_append_page(notebook_p, sock_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("Receive")); gtk_notebook_append_page(notebook_p, receive_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("Send")); gtk_notebook_append_page(notebook_p, send_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("Logging")); gtk_notebook_append_page(notebook_p, logging_page.get_main_widget(), tab_label_p); tab_label_p = gtk_label_new(gettext("Page")); gtk_notebook_append_page(notebook_p, page_page.get_main_widget(), tab_label_p); g_signal_connect(G_OBJECT(ok_button_p), "clicked", G_CALLBACK(SettingsDialogCB::settings_dialog_button_clicked), this); g_signal_connect(G_OBJECT(cancel_button_p), "clicked", G_CALLBACK(SettingsDialogCB::settings_dialog_button_clicked), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(ok_button_p, true); gtk_widget_set_can_default(cancel_button_p, true); #else GTK_WIDGET_SET_FLAGS(ok_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(cancel_button_p, GTK_CAN_DEFAULT); #endif identity_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); modem_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); parms_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); print_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); view_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); sock_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); receive_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); send_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); logging_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); page_page.show_help_sig.connect(Callback::make(*this, &SettingsDialog::show_help)); gtk_container_set_border_width(GTK_CONTAINER(get_win()), standard_size/2); gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(window_table_p)); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_widget_set_size_request(GTK_WIDGET(notebook_p), standard_size * 25, standard_size * 12); gtk_widget_grab_focus(cancel_button_p); gtk_widget_show_all(GTK_WIDGET(get_win())); } bool SettingsDialog::write_config(void) { // returns false if any of the entered parameters is invalid, otherwise it returns true bool return_val = true; std::ifstream filein; if (!rcfile.empty()) { filein.open(rcfile.c_str(), std::ios::in); if (!filein) { std::string message("Can't open file "); message += rcfile; message += "\n\n"; write_error(message.c_str()); } } std::vector file_list; std::string file_read; std::string temp; std::string name_line("NAME: "); temp = identity_page.get_name(); strip(temp); if (!is_ascii(temp)) { return_val = false; InfoDialog dialog(gettext("Invalid user name specified in \"Identity\" tab - " "it must be in plain ASCII characters. If this " "is a problem, leave it blank as the fax station " "number will always be given on the top header"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else name_line += temp; std::string number_line("NUMBER: "); temp = identity_page.get_number(); strip(temp); number_line += temp; std::string device_line; temp = modem_page.get_device(); strip(temp); if (temp.empty()) device_line = "#DEVICE: modem"; else { device_line = "DEVICE: "; device_line += temp; } std::string lock_line; temp = modem_page.get_lock(); strip(temp); if (temp.empty()) lock_line = "#LOCK: /var/lock"; else { lock_line = "LOCK: "; lock_line += temp; } std::string class_line; temp = modem_page.get_class(); strip(temp); if (temp.empty()) class_line = "#CLASS: 2"; else { if (temp.compare("1") && temp.compare("2") && temp.compare("2.0")) { class_line = "#CLASS: 2"; return_val = false; InfoDialog dialog(gettext("Invalid modem class specified"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else { class_line = "CLASS: "; class_line += temp; } } std::string page_line; temp = page_page.get_page(); strip(temp); if (temp.empty()) page_line = "#PAGE: a4"; else { if (temp.compare("a4") && temp.compare("letter") && temp.compare("legal")) { page_line = "#PAGE: a4"; return_val = false; InfoDialog dialog(gettext("Invalid page size specified"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else { page_line = "PAGE: "; page_line += temp; } } std::string res_line; temp = send_page.get_res(); strip(temp); if (temp.empty()) res_line = "#RES: fine"; else { if (temp.compare("fine") && temp.compare("standard")) { res_line = "#RES: fine"; return_val = false; InfoDialog dialog(gettext("Invalid sent fax resolution specified"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else { res_line = "RES: "; res_line += temp; } } std::string dial_prefix_line; temp = send_page.get_dial_prefix(); strip(temp); if (temp.empty()) dial_prefix_line = "#DIAL_PREFIX: "; else { dial_prefix_line = "DIAL_PREFIX: "; dial_prefix_line += temp; } std::string rings_line; temp = modem_page.get_rings(); strip(temp); if (temp.empty()) rings_line = "#RINGS: 1"; else { if (temp.size() > 1 || temp[0] < '1' ||temp[0] > '9') { rings_line = "#RINGS: 1"; return_val = false; InfoDialog dialog(gettext("Invalid rings number specified"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else { rings_line = "RINGS: "; rings_line += temp; } } std::string dialmode_line; temp = modem_page.get_dialmode(); strip(temp); if (temp.empty()) dialmode_line = "#DIALMODE: tone"; else { if (temp.compare("tone") && temp.compare("pulse")) { dialmode_line = "#DIALMODE: tone"; return_val = false; InfoDialog dialog(gettext("Invalid dial mode specified"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else { dialmode_line = "DIALMODE: "; dialmode_line += temp; } } std::string init_line; temp = parms_page.get_init(); strip(temp); if (temp.empty()) init_line = "#INIT: Z &FE&D2S7=120 &C0 M1L0"; else { init_line = "INIT: "; init_line += temp; } std::string reset_line; temp = parms_page.get_reset(); strip(temp); if (temp.empty()) reset_line = "#RESET: Z"; else { reset_line = "RESET: "; reset_line += temp; } std::string capabilities_line; temp = modem_page.get_capabilities(); strip(temp); if (temp.empty()) capabilities_line = "#CAPABILITIES: 1,5,0,2,0,0,0,0"; else { capabilities_line = "CAPABILITIES: "; capabilities_line += temp; } std::string extra_parms_line; temp = parms_page.get_parms(); strip(temp); if (temp.empty()) extra_parms_line = "#PARMS: "; else { extra_parms_line = "PARMS: "; extra_parms_line += temp; } std::string print_cmd_line; temp = print_page.get_command(); strip(temp); if (temp.empty()) print_cmd_line = "#PRINT_CMD: lpr"; else { print_cmd_line = "PRINT_CMD: "; print_cmd_line += temp; } std::string gtkprint_line; temp = print_page.get_gtkprint(); strip(temp); if (temp.empty()) gtkprint_line = "#USE_GTKPRINT: No"; else { gtkprint_line = "USE_GTKPRINT: "; gtkprint_line += temp; } std::string print_shrink_line; temp = print_page.get_shrink(); strip(temp); if (temp.empty()) print_shrink_line = "#PRINT_SHRINK: 100"; else { if (std::atoi(temp.c_str()) < 50 || std::atoi(temp.c_str()) > 100) { print_shrink_line = "#PRINT_SHRINK: 100"; return_val = false; InfoDialog dialog(gettext("Invalid print shrink parameter specified"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else { print_shrink_line = "PRINT_SHRINK: "; print_shrink_line += temp; } } std::string print_popup_line; temp = print_page.get_popup(); strip(temp); if (temp.empty()) print_popup_line = "#PRINT_POPUP: Yes"; else { print_popup_line = "PRINT_POPUP: "; print_popup_line += temp; } std::string ps_view_cmd_line; temp = view_page.get_ps_view_command(); strip(temp); if (temp.empty()) ps_view_cmd_line = "#PS_VIEWER: gv"; else { ps_view_cmd_line = "PS_VIEWER: "; ps_view_cmd_line += temp; } std::string run_server_line; temp = sock_page.get_run_server(); strip(temp); if (temp.empty()) run_server_line = "#SOCK_SERVER: No"; else { run_server_line = "SOCK_SERVER: "; run_server_line += temp; } std::string sock_popup_line; temp = sock_page.get_popup(); strip(temp); if (temp.empty()) sock_popup_line = "#SOCK_POPUP: No"; else { sock_popup_line = "SOCK_POPUP: "; sock_popup_line += temp; } std::string sock_port_line; temp = sock_page.get_port(); strip(temp); if (temp.empty()) sock_port_line = "#SOCK_SERVER_PORT: 9900"; else { if (std::atoi(temp.c_str()) < 1024 || std::atoi(temp.c_str()) > 65535) { sock_port_line = "#SOCK_SERVER_PORT: 9900"; return_val = false; InfoDialog dialog(gettext("Invalid socket port number specified. " "It must be between 1024 and 65535"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else { sock_port_line = "SOCK_SERVER_PORT: "; sock_port_line += temp; } } std::string sock_client_address_line; temp = sock_page.get_if_other_address(); strip(temp); if (temp.empty()) sock_client_address_line = "#SOCK_CLIENT_ADDRESS: localhost"; else { sock_client_address_line = "SOCK_CLIENT_ADDRESS: "; sock_client_address_line += temp; } std::string sock_other_addresses_line; temp = sock_page.get_other_addresses(); strip(temp); if (temp.empty()) sock_other_addresses_line = "#SOCK_OTHER_ADDRESSES:"; else { sock_other_addresses_line = "SOCK_OTHER_ADDRESSES: "; sock_other_addresses_line += temp; } std::string ip_family_line; temp = sock_page.get_ip_family(); strip(temp); if (temp.empty()) sock_other_addresses_line = "#IP_FAMILY:"; else { ip_family_line = "IP_FAMILY: "; ip_family_line += temp; } std::string fax_received_popup_line; temp = receive_page.get_popup(); strip(temp); if (temp.empty()) fax_received_popup_line = "#FAX_RECEIVED_POPUP: No"; else { fax_received_popup_line = "FAX_RECEIVED_POPUP: "; fax_received_popup_line += temp; } std::string fax_received_exec_line; temp = receive_page.get_exec(); strip(temp); if (temp.empty()) fax_received_exec_line = "#FAX_RECEIVED_EXEC: No"; else { fax_received_exec_line = "FAX_RECEIVED_EXEC: "; fax_received_exec_line += temp; } std::string fax_received_prog_line; temp = receive_page.get_prog(); strip(temp); if (temp.empty()) fax_received_prog_line = "#FAX_RECEIVED_PROG: "; else { fax_received_prog_line = "FAX_RECEIVED_PROG: "; fax_received_prog_line += temp; } std::string addr_in_header_line; temp = send_page.get_addr_in_header(); strip(temp); if (temp.empty()) addr_in_header_line = "#ADDR_IN_HEADER: Yes"; else { addr_in_header_line = "ADDR_IN_HEADER: "; addr_in_header_line += temp; } std::string redial_line; temp = send_page.get_redial(); strip(temp); if (temp.empty()) redial_line = "#REDIAL: No"; else { redial_line = "REDIAL: "; redial_line += temp; } std::string redial_interval_line; temp = send_page.get_redial_interval(); strip(temp); if (temp.empty()) redial_interval_line = "#REDIAL_INTERVAL: 15"; else { if (std::atoi(temp.c_str()) < 5 || std::atoi(temp.c_str()) > 1440) { redial_interval_line = "#REDIAL_INTERVAL: 15"; return_val = false; InfoDialog dialog(gettext("Invalid redial interval specified. " "It must be between 5 and 1440 minutes"), gettext("Config Error"), GTK_MESSAGE_ERROR, get_win()); dialog.exec(); } else { redial_interval_line = "REDIAL_INTERVAL: "; redial_interval_line += temp; } } std::string logfile_line; temp = logging_page.get_logfile(); strip(temp); if (temp.empty()) logfile_line = "#LOG_FILE: logfile"; else { logfile_line = "LOG_FILE: "; logfile_line += temp; } if (return_val) { // no errors -- write out the configuration file bool found_name = false; bool found_number = false; bool found_device = false; bool found_lock = false; bool found_class = false; bool found_page = false; bool found_res = false; bool found_dial_prefix = false; bool found_rings = false; bool found_dialmode = false; bool found_init = false; bool found_reset = false; bool found_capabilities = false; bool found_parms = false; bool found_print_cmd = false; bool found_gtkprint = false; bool found_print_shrink = false; bool found_print_popup = false; bool found_ps_view_cmd = false; bool found_run_server = false; bool found_sock_popup = false; bool found_sock_port = false; bool found_sock_client_address = false; bool found_sock_other_addresses = false; bool found_ip_family = false; bool found_fax_received_popup = false; bool found_fax_received_exec = false; bool found_fax_received_prog = false; bool found_addr_in_header = false; bool found_redial = false; bool found_redial_interval = false; bool found_log_file = false; const char terminating_line[] = "## end of " RC_FILE " ##"; while (std::getline(filein, file_read)) { try { // look for "NAME:" if (find_prog_parm("NAME:", file_read) || find_prog_parm("#NAME:", file_read)) { if (!found_name) { found_name = true; file_list.push_back(Utf8::locale_from_utf8(name_line)); } } // look for "NUMBER:" else if (find_prog_parm("NUMBER:", file_read) || find_prog_parm("#NUMBER:", file_read)) { if (!found_number) { found_number = true; file_list.push_back(number_line); } } // look for "DEVICE:" else if (find_prog_parm("DEVICE:", file_read) || find_prog_parm("#DEVICE:", file_read)) { if (!found_device) { found_device = true; file_list.push_back(Utf8::locale_from_utf8(device_line)); } } // look for "LOCK:" else if (find_prog_parm("LOCK:", file_read) || find_prog_parm("#LOCK:", file_read)) { if (!found_lock) { found_lock = true; file_list.push_back(Utf8::filename_from_utf8(lock_line)); } } // look for "CLASS:" else if (find_prog_parm("CLASS:", file_read) || find_prog_parm("#CLASS:", file_read)) { if (!found_class) { found_class = true; file_list.push_back(class_line); } } // look for "PAGE:" else if (find_prog_parm("PAGE:", file_read) || find_prog_parm("#PAGE:", file_read)) { if (!found_page) { found_page = true; file_list.push_back(page_line); } } // look for "RES:" else if (find_prog_parm("RES:", file_read) || find_prog_parm("#RES:", file_read)) { if (!found_res) { found_res = true; file_list.push_back(res_line); } } // look for "DIAL_PREFIX:" else if (find_prog_parm("DIAL_PREFIX:", file_read) || find_prog_parm("#DIAL_PREFIX:", file_read)) { if (!found_dial_prefix) { found_dial_prefix = true; file_list.push_back(Utf8::locale_from_utf8(dial_prefix_line)); } } // look for "RINGS:" else if (find_prog_parm("RINGS:", file_read) || find_prog_parm("#RINGS:", file_read)) { if (!found_rings) { found_rings = true; file_list.push_back(rings_line); } } // look for "DIALMODE:" else if (find_prog_parm("DIALMODE:", file_read) || find_prog_parm("#DIALMODE:", file_read)) { if (!found_dialmode) { found_dialmode = true; file_list.push_back(dialmode_line); } } // look for "INIT:" else if (find_prog_parm("INIT:", file_read) || find_prog_parm("#INIT:", file_read)) { if (!found_init) { found_init = true; file_list.push_back(init_line); } } // look for "RESET:" else if (find_prog_parm("RESET:", file_read) || find_prog_parm("#RESET:", file_read)) { if (!found_reset) { found_reset = true; file_list.push_back(reset_line); } } // look for "CAPABILITIES:" else if (find_prog_parm("CAPABILITIES:", file_read) || find_prog_parm("#CAPABILITIES:", file_read)) { if (!found_capabilities) { found_capabilities = true; file_list.push_back(capabilities_line); } } // look for "PARMS:" else if (find_prog_parm("PARMS:", file_read) || find_prog_parm("#PARMS:", file_read)) { if (!found_parms) { found_parms = true; file_list.push_back(extra_parms_line); } } // look for "PRINT_CMD:" else if (find_prog_parm("PRINT_CMD:", file_read) || find_prog_parm("#PRINT_CMD:", file_read)) { if (!found_print_cmd) { found_print_cmd = true; file_list.push_back(Utf8::filename_from_utf8(print_cmd_line)); } } // look for "USE_GTKPRINT:" else if (find_prog_parm("USE_GTKPRINT:", file_read) || find_prog_parm("#USE_GTKPRINT:", file_read)) { if (!found_gtkprint) { found_gtkprint = true; file_list.push_back(gtkprint_line); } } // look for "PRINT_SHRINK:" else if (find_prog_parm("PRINT_SHRINK:", file_read) || find_prog_parm("#PRINT_SHRINK:", file_read)) { if (!found_print_shrink) { found_print_shrink = true; file_list.push_back(print_shrink_line); } } // look for "PRINT_POPUP:" else if (find_prog_parm("PRINT_POPUP:", file_read) || find_prog_parm("#PRINT_POPUP:", file_read)) { if (!found_print_popup) { found_print_popup = true; file_list.push_back(print_popup_line); } } // look for "PS_VIEWER:" else if (find_prog_parm("PS_VIEWER:", file_read) || find_prog_parm("#PS_VIEWER:", file_read)) { if (!found_ps_view_cmd) { found_ps_view_cmd = true; file_list.push_back(Utf8::filename_from_utf8(ps_view_cmd_line)); } } // look for "SOCK_SERVER:" else if (find_prog_parm("SOCK_SERVER:", file_read) || find_prog_parm("#SOCK_SERVER:", file_read)) { if (!found_run_server) { found_run_server = true; file_list.push_back(run_server_line); } } // look for "SOCK_POPUP:" else if (find_prog_parm("SOCK_POPUP:", file_read) || find_prog_parm("#SOCK_POPUP:", file_read)) { if (!found_sock_popup) { found_sock_popup = true; file_list.push_back(sock_popup_line); } } // look for "SOCK_SERVER_PORT:" else if (find_prog_parm("SOCK_SERVER_PORT:", file_read) || find_prog_parm("#SOCK_SERVER_PORT:", file_read)) { if (!found_sock_port) { found_sock_port = true; file_list.push_back(sock_port_line); } } // look for "SOCK_CLIENT_ADDRESS:" else if (find_prog_parm("SOCK_CLIENT_ADDRESS:", file_read) || find_prog_parm("#SOCK_CLIENT_ADDRESS:", file_read)) { if (!found_sock_client_address) { found_sock_client_address = true; file_list.push_back(sock_client_address_line); } } // look for "SOCK_OTHER_ADDRESSES:" else if (find_prog_parm("SOCK_OTHER_ADDRESSES:", file_read) || find_prog_parm("#SOCK_OTHER_ADDRESSES:", file_read)) { if (!found_sock_other_addresses) { found_sock_other_addresses = true; file_list.push_back(sock_other_addresses_line); } } // look for "IP_FAMILY:" else if (find_prog_parm("IP_FAMILY:", file_read) || find_prog_parm("#IP_FAMILY:", file_read)) { if (!found_ip_family) { found_ip_family = true; file_list.push_back(ip_family_line); } } // look for "FAX_RECEIVED_POPUP:" else if (find_prog_parm("FAX_RECEIVED_POPUP:", file_read) || find_prog_parm("#FAX_RECEIVED_POPUP:", file_read)) { if (!found_fax_received_popup) { found_fax_received_popup = true; file_list.push_back(fax_received_popup_line); } } // look for "FAX_RECEIVED_EXEC:" else if (find_prog_parm("FAX_RECEIVED_EXEC:", file_read) || find_prog_parm("#FAX_RECEIVED_EXEC:", file_read)) { if (!found_fax_received_exec) { found_fax_received_exec = true; file_list.push_back(fax_received_exec_line); } } // look for "FAX_RECEIVED_PROG:" else if (find_prog_parm("FAX_RECEIVED_PROG:", file_read) || find_prog_parm("#FAX_RECEIVED_PROG:", file_read)) { if (!found_fax_received_prog) { found_fax_received_prog = true; file_list.push_back(Utf8::filename_from_utf8(fax_received_prog_line)); } } // look for "ADDR_IN_HEADER:" else if (find_prog_parm("ADDR_IN_HEADER:", file_read) || find_prog_parm("#ADDR_IN_HEADER:", file_read)) { if (!found_addr_in_header) { found_addr_in_header = true; file_list.push_back(addr_in_header_line); } } // look for "REDIAL:" else if (find_prog_parm("REDIAL:", file_read) || find_prog_parm("#REDIAL:", file_read)) { if (!found_redial) { found_redial = true; file_list.push_back(redial_line); } } // look for "REDIAL_INTERVAL:" else if (find_prog_parm("REDIAL_INTERVAL:", file_read) || find_prog_parm("#REDIAL_INTERVAL:", file_read)) { if (!found_redial_interval) { found_redial_interval = true; file_list.push_back(redial_interval_line); } } // look for "LOG_FILE:" else if (find_prog_parm("LOG_FILE:", file_read) || find_prog_parm("#LOG_FILE:", file_read)) { if (!found_log_file) { found_log_file = true; file_list.push_back(Utf8::filename_from_utf8(logfile_line)); } } // add any residual lines to the list, except the terminating line else if (!find_prog_parm(terminating_line, file_read)) file_list.push_back(file_read); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SettingsDialog::write_config()\n"); } } if (found_number == false) file_list.push_back(number_line); if (found_device == false) file_list.push_back(device_line); if (found_class == false) file_list.push_back(class_line); if (found_page == false) file_list.push_back(page_line); if (found_res == false) file_list.push_back(res_line); if (found_rings == false) file_list.push_back(rings_line); if (found_dialmode == false) file_list.push_back(dialmode_line); if (found_init == false) file_list.push_back(init_line); if (found_reset == false) file_list.push_back(reset_line); if (found_capabilities == false) file_list.push_back(capabilities_line); if (found_parms == false) file_list.push_back(extra_parms_line); if (found_gtkprint == false) file_list.push_back(gtkprint_line); if (found_print_shrink == false) file_list.push_back(print_shrink_line); if (found_print_popup == false) file_list.push_back(print_popup_line); if (found_run_server == false) file_list.push_back(run_server_line); if (found_sock_popup == false) file_list.push_back(sock_popup_line); if (found_sock_port == false) file_list.push_back(sock_port_line); if (found_sock_client_address == false) file_list.push_back(sock_client_address_line); if (found_sock_other_addresses == false) file_list.push_back(sock_other_addresses_line); if (found_ip_family == false) file_list.push_back(ip_family_line); if (found_fax_received_popup == false) file_list.push_back(fax_received_popup_line); if (found_fax_received_exec == false) file_list.push_back(fax_received_exec_line); if (found_addr_in_header == false) file_list.push_back(addr_in_header_line); if (found_redial == false) file_list.push_back(redial_line); if (found_redial_interval == false) file_list.push_back(redial_interval_line); try { if (found_name == false) file_list.push_back(Utf8::locale_from_utf8(name_line)); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SettingsDialog::write_config()\n"); } try { if (found_lock == false) file_list.push_back(Utf8::filename_from_utf8(lock_line)); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SettingsDialog::write_config()\n"); } try { if (found_dial_prefix == false) file_list.push_back(Utf8::locale_from_utf8(dial_prefix_line)); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SettingsDialog::write_config()\n"); } try { if (found_print_cmd == false) file_list.push_back(Utf8::filename_from_utf8(print_cmd_line)); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SettingsDialog::write_config()\n"); } try { if (found_ps_view_cmd == false) file_list.push_back(Utf8::filename_from_utf8(ps_view_cmd_line)); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SettingsDialog::write_config()\n"); } try { if (found_fax_received_prog == false) file_list.push_back(Utf8::filename_from_utf8(fax_received_prog_line)); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SettingsDialog::write_config()\n"); } try { if (found_log_file == false) file_list.push_back(Utf8::filename_from_utf8(logfile_line)); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SettingsDialog::write_config()\n"); } // add the terminating line file_list.push_back(terminating_line); // now write out the new config file rcfile = prog_config.homedir; rcfile += "/." RC_FILE; std::ofstream fileout(rcfile.c_str(), std::ios::out); if (!fileout) { std::string message("Can't open file"); message += rcfile; message += '\n'; write_error(message.c_str()); return_val = false; } else { std::copy(file_list.begin(), file_list.end(), std::ostream_iterator(fileout, "\n")); } } return return_val; } void SettingsDialog::read_config(bool search_localfile) { // search_localfile has a default value of true // get rc file if (!get_rcfile_path(search_localfile)) { std::string message; if (search_localfile) { message = "Can't find or open file " RC_DIR "/" RC_FILE ",\n"; if (std::strcmp(RC_DIR, "/etc")) { message += "/etc/" RC_FILE ", "; } message += "or "; message += prog_config.homedir + "/." RC_FILE "\n"; } else { message = "Can't find or open file " RC_DIR "/" RC_FILE "\n"; if (std::strcmp(RC_DIR, "/etc")) { message += "or /etc/" RC_FILE "\n"; } } write_error(message.c_str()); } else { // now extract settings from file std::ifstream filein(rcfile.c_str(), std::ios::in); if (!filein) { std::string message("Can't open file "); message += rcfile; write_error(message.c_str()); } else { std::string file_read; std::string result; while (std::getline(filein, file_read)) { if (!file_read.empty() && file_read[0] != '#') { // valid line to check // now check for other comment markers std::string::size_type pos = file_read.find_first_of('#'); if (pos != std::string::npos) file_read.resize(pos); // truncate // look for "NAME:" if (get_prog_parm("NAME:", file_read, result)) { if (is_ascii(result)) identity_page.set_name(result); } // look for "NUMBER:" else if (get_prog_parm("NUMBER:", file_read, result)) { identity_page.set_number(result); } // look for "DEVICE:" else if (get_prog_parm("DEVICE:", file_read, result)) { modem_page.set_device(result); } // look for "LOCK:" else if (get_prog_parm("LOCK:", file_read, result, Utf8::filename_to_utf8)) { modem_page.set_lock(result); } // look for "CLASS:" else if (get_prog_parm("CLASS:", file_read, result)) { if (!result.compare("1") || !result.compare("2") || !result.compare("2.0")) { modem_page.set_class(result); } else modem_page.set_class("2"); } // look for "PAGE:" else if (get_prog_parm("PAGE:", file_read, result)) { page_page.set_page(result); } // look for "RES:" else if (get_prog_parm("RES:", file_read, result)) { send_page.set_res(result); } // look for "DIAL_PREFIX:" else if (get_prog_parm("DIAL_PREFIX:", file_read, result)) { send_page.set_dial_prefix(result); } // look for "RINGS:" else if (get_prog_parm("RINGS:", file_read, result)) { if (std::atoi(result.c_str()) < 1 || std::atoi(result.c_str()) > 9) { modem_page.set_rings("1"); } else modem_page.set_rings(result); } // look for "DIALMODE:" else if (get_prog_parm("DIALMODE:", file_read, result)) { modem_page.set_dialmode(result); } // look for "INIT:" else if (get_prog_parm("INIT:", file_read, result)) { parms_page.set_init(result); } // look for "RESET:" else if (get_prog_parm("RESET:", file_read, result)) { parms_page.set_reset(result); } // look for "CAPABILITIES:" else if (get_prog_parm("CAPABILITIES:", file_read, result)) { modem_page.set_capabilities(result); } // look for "PARMS:" else if (get_prog_parm("PARMS:", file_read, result)) { parms_page.set_parms(result); } // look for "PRINT_CMD:" else if (get_prog_parm("PRINT_CMD:", file_read, result)) { print_page.set_command(result); } // look for "USE_GTKPRINT:" else if (get_prog_parm("USE_GTKPRINT:", file_read, result)) { print_page.set_gtkprint(result); } // look for "PRINT_SHRINK:" else if (get_prog_parm("PRINT_SHRINK:", file_read, result)) { if (std::atoi(result.c_str()) < 50 || std::atoi(result.c_str()) > 100) { print_page.set_shrink("100"); } else print_page.set_shrink(result); } // look for "PRINT_POPUP:" else if (get_prog_parm("PRINT_POPUP:", file_read, result)) { print_page.set_popup(result); } // look for "PS_VIEWER:" else if (get_prog_parm("PS_VIEWER:", file_read, result)) { view_page.set_ps_view_command(result); } // look for "SOCK_SERVER:" else if (get_prog_parm("SOCK_SERVER:", file_read, result)) { sock_page.set_run_server(result); } // look for "SOCK_POPUP:" else if (get_prog_parm("SOCK_POPUP:", file_read, result)) { sock_page.set_popup(result); } // look for "SOCK_SERVER_PORT:" else if (get_prog_parm("SOCK_SERVER_PORT:", file_read, result)) { if (std::atoi(result.c_str()) < 1024 || std::atoi(result.c_str()) > 65535) { sock_page.set_port("9900"); } else sock_page.set_port(result); } // look for "SOCK_CLIENT_ADDRESS:" else if (get_prog_parm("SOCK_CLIENT_ADDRESS:", file_read, result)) { sock_page.set_if_other_address(result); } // look for "SOCK_OTHER_ADDRESSES:" else if (get_prog_parm("SOCK_OTHER_ADDRESSES:", file_read, result)) { sock_page.set_other_addresses(result); } // look for "IP_FAMILY:" else if (get_prog_parm("IP_FAMILY:", file_read, result)) { sock_page.set_ip_family(result); } // look for "FAX_RECEIVED_POPUP:" else if (get_prog_parm("FAX_RECEIVED_POPUP:", file_read, result)) { receive_page.set_popup(result); } // look for "FAX_RECEIVED_EXEC:" else if (get_prog_parm("FAX_RECEIVED_EXEC:", file_read, result)) { receive_page.set_exec(result); } // look for "FAX_RECEIVED_PROG:" else if (get_prog_parm("FAX_RECEIVED_PROG:", file_read, result)) { receive_page.set_prog(result); } // look for "ADDR_IN_HEADER:" else if (get_prog_parm("ADDR_IN_HEADER:", file_read, result)) { send_page.set_addr_in_header(result); } // look for "REDIAL:" else if (get_prog_parm("REDIAL:", file_read, result)) { send_page.set_redial(result); } // look for "REDIAL_INTERVAL:" else if (get_prog_parm("REDIAL_INTERVAL:", file_read, result)) { send_page.set_redial_interval(result); } // look for "LOG_FILE:" else if (get_prog_parm("LOG_FILE:", file_read, result, Utf8::filename_to_utf8)) { logging_page.set_logfile(result); } } } } } } void SettingsDialog::get_reset_settings_prompt(void) { std::string message(gettext("Enter settings from ")); message += RC_DIR "/" RC_FILE; if (std::strcmp(RC_DIR, "/etc")) { message += gettext(" or\n"); message += "/etc/" RC_FILE; } message += gettext("?"); PromptDialog* dialog_p = new PromptDialog(message.c_str(), gettext("Reset settings"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &SettingsDialog::get_reset_settings)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } void SettingsDialog::get_reset_settings(void) { // clear all the existing settings identity_page.clear(); modem_page.clear(); parms_page.clear(); print_page.clear(); view_page.clear(); sock_page.clear(); receive_page.clear(); send_page.clear(); logging_page.clear(); page_page.clear(); read_config(false); // read settings without searching for config file in home directory } bool SettingsDialog::get_prog_parm(const char* name, std::string& line, std::string& result, std::string(*convert_func)(const std::string&)) { // This function looks for a setting named `name' in the string `line' // and returns the values stated after it in string `result'. It returns // `true' if the setting was found. If there are trailing spaces or tabs, // string `line' will be modified. string `result' is only modified if // the `name' setting is found. Anything extracted from `line' will be // converted (when placed into `result') to UTF-8 as maintained by // std::string, using the function assigned to function pointer // convert_func (you would normally use Utf8::locale_to_utf8() or // Utf8::filename_to_utf8(), and there is a default inline method // using Utf8::locale_to_utf8() const std::string::size_type length = std::strlen(name); // we have to use std::string::substr() because libstdc++-2 // doesn't support the Std-C++ std::string::compare() functions if (!line.substr(0, length).compare(name)) { // erase any trailing space or tab while (line.find_last_of(" \t") == line.size() - 1) line.resize(line.size() - 1); if (line.size() > length) { // ignore any preceding space or tab from the setting value given std::string::size_type pos = line.find_first_not_of(" \t", length); // pos now is set to beginning of setting value if (pos != std::string::npos) { try { result.assign(convert_func(line.substr(pos))); } catch (Utf8::ConversionError&) { result = ""; write_error("UTF-8 conversion error in SettingsDialog::get_prog_parm()\n"); } } } return true; } return false; } bool SettingsDialog::find_prog_parm(const char* name, const std::string& line) { // this function looks for a setting named `name' in the string `line' // it returns `true' if the setting was found or false otherwise const std::string::size_type length = std::strlen(name); // we have to use std::string::substr() because libstdc++-2 // doesn't support the Std-C++ std::string::compare() functions if (!line.substr(0, length).compare(name)) return true; return false; } bool SettingsDialog::get_rcfile_path(bool search_localfile) { // search_localfile has a default value of true bool found_rcfile = false; if (search_localfile) { rcfile = prog_config.homedir; rcfile += "/." RC_FILE; if (!access(rcfile.c_str(), F_OK)) { found_rcfile = true; is_home_config = true; } } if (!found_rcfile) { rcfile = RC_DIR "/" RC_FILE; if (!access(rcfile.c_str(), F_OK)) found_rcfile = true; } if (!found_rcfile && std::strcmp(RC_DIR, "/etc")) { rcfile = "/etc/" RC_FILE; if (!access(rcfile.c_str(), F_OK)) found_rcfile = true; } if (!found_rcfile) rcfile = ""; return found_rcfile; } void SettingsDialog::show_help(const std::pair& text) { new SettingsHelpDialog(standard_size, text.first, text.second, get_win()); // there is no memory leak // the SettingsHelpDialog object will delete its own memory when it is closed } void SettingsDialog::strip(std::string& setting) { // erase any trailing space or tab while (!setting.empty() && setting.find_last_of(" \t") == setting.size() - 1) { setting.resize(setting.size() - 1); } // erase any leading space or tab while (!setting.empty() && (setting[0] == ' ' || setting[0] == '\t')) { setting.erase(0, 1); } } bool SettingsDialog::is_ascii(const std::string& text) { std::string::const_iterator end_iter = text.end(); if (std::find_if(text.begin(), end_iter, not_ascii_char) == end_iter) { return true; } return false; } efax-gtk-3.2.8/src/fax_list.h0000644000175000001440000000775411466007653012745 00000000000000/* Copyright (C) 2001 to 2007, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef FAX_LIST_H #define FAX_LIST_H #include "prog_defs.h" #include #include #include #include #include "fax_list_manager.h" #include "utils/mono_tiff_print_manager.h" #include #include #include #include #include #include #include namespace FaxListDialogCB { extern "C" void fax_list_dialog_button_clicked(GtkWidget*, void*); } class FaxListDialog: public WinBase { FaxListEnum::Mode mode; static int is_fax_received_list; static int is_fax_sent_list; const int standard_size; Thread::Mutex working_dir_mutex; std::string working_dir; std::vector > view_files; FaxListManager fax_list_manager; AsyncQueue > async_queue; GtkWidget* close_button_p; GtkWidget* page_setup_button_p; GtkWidget* print_button_p; GtkWidget* view_button_p; GtkWidget* describe_button_p; GtkWidget* delete_fax_button_p; GtkWidget* empty_trash_button_p; GtkWidget* add_folder_button_p; GtkWidget* delete_folder_button_p; GtkWidget* reset_button_p; GtkWidget* new_fax_label_p; void set_buttons_cb(void); void describe_fax_prompt(void); void delete_fax(void); void add_folder_prompt(void); void add_folder(const std::string&); void empty_trash_prompt(void); void delete_folder_prompt(void); void write_pipe_to_file(PipeFifo*, int); std::pair get_print_from_stdin_parms(void); std::pair get_fax_to_ps_parms(const std::string&, bool); std::pair get_ps_viewer_parms(const char*); void print_fax_prompt(void); void print_fax(void); void print_fax_thread(std::string*, bool); void view_fax(void); void view_fax_thread(std::string*, std::pair); void delete_parms(std::pair); public: friend void FaxListDialogCB::fax_list_dialog_button_clicked(GtkWidget*, void*); Releaser releaser; EmitterArg get_new_fax_count_sig; Emitter reset_sig; // display_new_fax_count() calls get_new_fax_count_sig, so until it has been // connected to a function which returns this, it will show 0 as the count void display_new_fax_count(void); static int get_is_fax_received_list(void) {return is_fax_received_list;} static int get_is_fax_sent_list(void) {return is_fax_sent_list;} void insert_new_fax_cb(const std::pair& fax_info) { fax_list_manager.insert_new_fax_in_base(fax_info.first, fax_info.second); display_new_fax_count(); } void set_page_setup_button(void); FaxListDialog(FaxListEnum::Mode, const int standard_size_); ~FaxListDialog(void); }; namespace EntryDialogCB { extern "C" { void entry_dialog_selected(GtkWidget*, void*); gboolean entry_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); } } class EntryDialog: public WinBase { GtkWidget* ok_button_p; GtkWidget* cancel_button_p; GtkWidget* entry_p; bool selected_impl(void); public: friend void EntryDialogCB::entry_dialog_selected(GtkWidget*, void*); friend gboolean EntryDialogCB::entry_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); EmitterArg accepted; EntryDialog(const int standard_size, const char* entry_text, const char* caption, const char* label_text, GtkWindow* parent_p); }; class DescriptionDialog: public EntryDialog { public: DescriptionDialog(const int standard_size, const char* text, GtkWindow* parent_p); }; class AddFolderDialog: public EntryDialog { public: AddFolderDialog(const int standard_size, GtkWindow* parent_p); }; #endif efax-gtk-3.2.8/src/settings_icons.h0000644000175000001440000000143611466007653014156 00000000000000#ifndef SETTINGS_ICONS_H #define SETTINGS_ICONS_H /* These icons were taken from those supplied with KDE 2.1 and are copyrighted accordingly */ /* XPM */ static const char *help_xpm[]={ "16 16 18 1", ". c None", "a c #000000", "# c #00385b", "d c #003e66", "j c #00406a", "f c #004572", "c c #00528c", "m c #00538e", "p c #005896", "o c #005a99", "b c #2982c0", "h c #2a82bf", "k c #408fc7", "i c #418fc6", "g c #4f97ca", "l c #66a7d1", "e c #6baad2", "n c #8bbbdc", "....######a.....", "...#bcaaaccaa...", "..deca...#bcca..", "..fga.....#bca..", "..#hca....dica..", "...#cca...jkca..", "....aaa..#lma...", "........#noa....", ".......#lpa.....", "......#bca......", "......#bca......", ".......aa.......", "................", ".......##.......", "......#lca......", ".......aa......."}; #endif efax-gtk-3.2.8/src/file_list_icons.h0000644000175000001440000002210211466007653014261 00000000000000#ifndef FAX_LIST_ICONS_H #define FAX_LIST_ICONS_H /* These icons were taken from those supplied with KDE 2.1 and 3.1 and are copyrighted accordingly */ /* XPM */ static const char* add_xpm[]={ "22 22 278 2", "Qt c None", ".r c #353535", "ct c #36332e", "ce c #383530", "bj c #39332d", "cs c #3a3731", "b1 c #3b3832", "cr c #3c3933", "bM c #3e3a34", "cq c #3e3b34", "cp c #403c36", "by c #413d36", "co c #433e37", ".T c #434343", "bg c #443f38", "cn c #454039", "cm c #46413a", "a3 c #47423a", "cl c #47423b", "bz c #49423a", "aK c #4a443c", "ck c #4a453d", "aA c #4c473f", "cj c #4e483f", "am c #4f4941", ".U c #4f4d49", "ci c #504a41", ".S c #505050", "ch c #524c42", "#8 c #524c43", "cg c #544e44", "#R c #554e45", "cf c #564f46", "bN c #574f46", "#v c #585147", "b2 c #595248", ".v c #595653", ".C c #595754", "#f c #5b5349", ".K c #5d5c5b", ".6 c #5e564b", ".k c #5e5952", ".p c #5e5a53", ".j c #5f5a54", ".W c #60584d", ".V c #635a4e", ".M c #635b4f", ".i c #645e57", ".h c #696259", ".g c #6e665c", ".R c #707070", ".f c #736a5f", ".e c #776e61", ".d c #7c7264", "bE c #815716", ".c c #817667", "bn c #855202", ".5 c #857f79", ".b c #867a69", "bD c #8b611c", ".a c #8b7e6c", "bm c #8c5802", "bk c #8c8a8a", "bo c #8f6c36", ".# c #8f816f", "ar c #918570", "aS c #925e02", "b. c #956405", "b# c #958265", ".q c #959594", ".4 c #96918a", "bS c #977d5e", "ad c #978054", ".x c #989898", "aF c #9a9794", ".y c #9b8650", "#1 c #9c7e41", "bl c #9c7e4a", "ae c #9c9996", "aE c #9d6f14", "a7 c #9e6d0d", "as c #9e9b97", "#J c #9f6902", "a6 c #9f6e07", "#e c #a09b97", "aq c #a16d06", "aT c #a29b93", "a8 c #a36e06", "#I c #a56e02", "#2 c #a8a5a2", "bi c #ab7402", "bT c #b0a196", ".o c #b0b0ae", "bh c #b17a03", "#K c #b18b47", "bC c #b4a591", "#H c #b58310", "bF c #b6aa9f", "b7 c #b7a79b", ".Z c #b9a05c", "#u c #bbb2ab", "aL c #bd8604", "#k c #bd9c4a", "af c #beb8b3", ".w c #bfbfbf", "a4 c #c08e14", ".P c #c1bdb4", "#j c #c28b05", ".F c #c49e2d", "#G c #c59821", "b6 c #c5b6ab", ".9 c #c69615", "#Q c #c6b8ac", "bA c #c6c3c2", ".n c #c6c6c6", "cd c #c7a081", "at c #c7c1bb", "ac c #c8981d", "aP c #c8991d", "b0 c #c8a487", "cc c #c8a488", "#3 c #c8c3be", "#. c #c8c8c8", "#F c #c99c26", "bL c #c9a88d", "cb c #c9a88e", ".E c #c9c9c9", "bx c #cbac93", "ca c #cbad94", "b8 c #cbb7a7", "aO c #cc9c20", "bf c #ccb099", "bp c #ccc0b6", "c# c #cdb09a", "a2 c #ceb49f", "c. c #ceb5a0", "az c #cfb8a5", "b9 c #cfb8a6", "al c #d0bcab", "#d c #d0c8c1", "aG c #d1cdca", "ap c #d2a424", "#7 c #d2c0b1", "b5 c #d2c4bb", "bR c #d2c6bb", "#g c #d49e07", "aD c #d4a624", "a9 c #d6a51a", ".m c #d6d6d6", "b4 c #d7ccc4", ".3 c #d7d4ce", ".Y c #d8a71b", "#l c #d8cbac", "b3 c #d8d0ca", ".O c #d9a408", "#0 c #d9b336", ".u c #d9d9d8", ".G c #dab74c", "bO c #dad6d3", ".L c #dbdbdb", "#E c #dcb63f", ".z c #dcd0a6", ".l c #dedede", ".N c #dfaa0a", ".X c #dfaf24", "#A c #dfb53b", "ba c #dfd5cd", "#9 c #e2b834", "#y c #e3b427", "#z c #e3ba40", "a5 c #e3c148", "bU c #e3cebc", "bB c #e3ddd9", "#x c #e4b00b", "an c #e4c152", "#c c #e4e0db", ".0 c #e4e4e4", "ag c #e5dcd4", "aU c #e5ded7", ".H c #e5e5e5", "aB c #e6ca64", "#m c #e6d8bb", "#n c #e6d8bc", ".8 c #e7c248", "bZ c #e7c2a2", "#B c #e7c868", "bG c #e7d6c6", "bY c #e8c5a6", "au c #e8ded5", "bK c #e9c5a6", "#w c #eab60c", "aR c #eabd2a", "bX c #eac9ac", "bw c #eac9ad", "#t c #eadfd5", ".D c #eaeaea", "bQ c #ebdfd6", ".B c #ebebeb", "bW c #eccdb3", "bv c #ecceb4", "be c #ecceb5", ".t c #ececec", ".7 c #edd17c", "bJ c #eed2ba", "bu c #eed2bb", "a1 c #eed3bc", "bq c #eeded0", "bV c #efd6c0", "bt c #efd6c1", "bI c #efd7c1", "bd c #efd8c2", "a0 c #efd8c3", "aH c #efe8e1", "#L c #efebe8", "aQ c #f0c635", "#S c #f0d472", "ay c #f0d8c3", "#4 c #f0e6de", "#o c #f0e9dc", "bH c #f1dac7", "bs c #f1dbc8", "aZ c #f1dcc9", ".2 c #f1efed", "ak c #f2ddcb", "br c #f2dfce", ".Q c #f2f2f2", "aN c #f3cf49", "aY c #f3e0d0", "ax c #f3e1d1", "#6 c #f3e1d2", "aj c #f4e1d2", "bc c #f4e4d6", "bb c #f4e7db", "aM c #f5dd71", "aX c #f5e5d7", "aw c #f5e5d8", "ai c #f5e6d8", "#P c #f5e6d9", "av c #f5e8dc", "ah c #f5e8dd", "aW c #f6e8dd", "#5 c #f6eadf", "## c #f6f6f6", "aC c #f7cf3f", "#i c #f7da62", "aJ c #f7eade", "#O c #f7ebe1", "aI c #f7ece3", "aV c #f7ede3", "ab c #f8d247", "aa c #f8d54e", "bP c #f8efe7", "#M c #f8f2ec", "a# c #f9d756", "#W c #f9da5c", "#N c #f9efe7", "#s c #f9f0e8", "#X c #fada5d", "#D c #fadc62", "#Y c #fadd5e", "ao c #fadd64", "a. c #fadf68", "#Z c #fae05c", ".I c #fafafa", "#V c #fbe57e", "#h c #fbeba4", "#r c #fbf3ee", ".A c #fbfbfb", "#C c #fce684", "#U c #fce88c", "#q c #fcf8f5", "#T c #fdefa7", "#b c #fdfaf7", ".1 c #fdfdfd", "#p c #fefdfb", "#a c #fefdfc", ".J c #fefefe", ".s c #ffffff", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQt.#.a.b.c.d.e.f.g.h.i.j.kQtQtQtQt", "QtQtQtQtQtQt.a.l.l.l.l.l.l.m.n.o.p.q.rQtQtQt", "QtQtQtQtQtQt.b.l.s.s.s.s.s.s.t.u.v.w.x.rQtQt", "QtQtQtQtQtQt.y.z.A.s.s.s.s.s.s.B.C.D.E.x.rQt", "QtQtQtQtQtQt.F.G.H.I.s.s.s.s.s.J.K.L.s.E.x.M", "QtQtQtQtQtQt.N.O.P.Q.s.s.s.s.s.s.R.S.T.U.V.W", "QtQtQtQtQtQt.X.Y.Z.0.1.s.s.s.s.s.I.2.3.4.5.6", "QtQtQtQtQtQt.7.8.9#.##.s.s.s.s.s#a#b#c#d#e#f", "QtQtQtQtQt#g#h#i#j#k#l#m#n#o.1#p#q#r#s#t#u#v", "#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R", "Qt.N#S#T#U#V#D#W#X#Y#Z#0#J#1#2#3#4#5#P#6#7#8", "QtQt#g#9a.#D#Wa#aaabac#Jadaeafagahaiajakalam", "QtQtQtQtanaoa#aaabapaqarasatauavawaxakayazaA", "QtQtQtQtaBa#aaabaCaDaEaFaGaHaIaJawaxakayazaK", "QtQtQtaLaMaNaOaPaQaRaSaTaUaVaWaXaYaZa0a1a2a3", "QtQtQta4a5Qta6a7a8a9b.b#babbbcaYaZbda1bebfbg", "QtQtQtbhbiQtbjbkblbmbnbobpbqbrbsbtbubvbwbxby", "QtQtQtQtQtQtbzbAbBbCbDbEbFbGbHbIbJbvbwbKbLbM", "QtQtQtQtQtQtbNbObPbQbRbSbTbUbVbJbWbXbYbZb0b1", "QtQtQtQtQtQtb2b3b3b4b5b6b7b8b9c.c#cacbcccdce", "QtQtQtQtQtQtcfcgchcicjckclcmcncocpcqcrcscect"}; static const char* view_xpm[]={ "22 22 113 2", "Qt c None", "#S c #06afb1", "#R c #0ae1df", "#N c #0cfdfa", ".# c #121212", "#O c #141414", "#Q c #3f3f40", "#T c #404041", "#w c #409fa8", "#r c #46a3ab", "#D c #46a5ad", "#x c #46a7b5", "#h c #4bacb4", "#q c #4bb3bd", "#g c #4db5bf", "#f c #4ec3ce", "#p c #50c8d3", "#C c #56adb6", ".6 c #56b8c6", ".7 c #57b5bd", ".W c #62bfc8", ".V c #65c1ce", "#E c #66bdc8", "#s c #6abdc9", "#U c #707071", ".5 c #73d0de", "#o c #74d0de", "#e c #76d1df", ".M c #79cad5", ".N c #7acad2", ".d c #7e8180", ".l c #7f8180", ".v c #7f8281", "#A c #808382", ".U c #81d5e1", "#n c #82d9e1", "#F c #83d6de", ".E c #84ced7", "#y c #84dae2", ".4 c #85d8e2", "#K c #86d4de", "#J c #8bd4dc", "#l c #8bd5e0", "#m c #91dae5", ".L c #92d8e3", ".D c #95d5dd", "#i c #95dbe6", ".3 c #98dde7", ".a c #999b9a", "#d c #99dce8", ".T c #99dee8", "#k c #9dd5de", "#I c #9fdbe3", "#B c #a4dce5", ".s c #a4dce7", ".X c #a5e1ea", "#c c #a6e4eb", ".K c #a7e5ec", "#M c #ababab", ".F c #abe0e9", ".8 c #abe4eb", ".C c #ace4eb", ".S c #ade5ec", ".b c #aeb6b7", "#H c #aee2ea", "#b c #aee6ed", "#v c #afe6ed", ".t c #b2e5ed", ".O c #b2e7ef", "#a c #b3e0e6", "#t c #b3e7ef", ".Y c #b5d1d5", ".r c #b5e7ef", ".P c #b6bdbc", ".9 c #b8dfe3", ".c c #b9c2c4", ".2 c #baebef", ".J c #bbeaf0", "#. c #bcc3c4", "#P c #c0e0e3", ".B c #c2ecf1", ".1 c #c4e9ec", ".R c #c7ebf2", ".q c #c7eef4", ".Z c #c8cecf", "#u c #cbe2e6", ".p c #cbf1f4", ".j c #ceeef2", ".e c #d1dbdc", ".w c #d2dddc", ".i c #d2f1f5", "#j c #d3eff4", ".I c #d5f1f4", ".m c #d8e3e2", ".A c #d8f3f5", "## c #d9eff2", ".f c #dbebec", ".h c #dbf4f6", "#G c #ddf2f4", ".G c #deebed", "#L c #def3f5", "#z c #dff3f5", ".g c #dff3f7", ".u c #e0f3f5", ".k c #e1f4f6", ".0 c #e5f6f9", ".o c #e6f7f9", ".H c #e7f7f8", ".n c #e8f8f9", ".Q c #e9f7f9", ".x c #eaf9f9", ".z c #ecfbfb", ".y c #edfcfb", "QtQtQtQtQt.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQt.#.#.a.b.c.b.a.#.#QtQtQtQtQtQtQtQtQtQt", "QtQt.#.d.e.f.g.h.i.j.k.l.#QtQtQtQtQtQtQtQtQt", "Qt.#.d.m.n.o.p.q.r.s.t.u.v.#QtQtQtQtQtQtQtQt", "Qt.#.w.x.y.z.A.B.C.D.E.F.u.#QtQtQtQtQtQtQtQt", ".#.a.G.o.z.H.I.J.K.L.M.N.O.a.#QtQtQtQtQtQtQt", ".#.P.Q.p.A.I.R.S.T.U.V.W.X.Y.#QtQtQtQtQtQtQt", ".#.Z.0.1.B.2.S.3.4.5.6.7.8.9.#QtQtQtQtQtQtQt", ".##.###a#b#c#d.4#e#f#g#h#i.Y.#QtQtQtQtQtQtQt", ".#.a#j#k#l#m#n#o#p#q#r#s#t.a.#QtQtQtQtQtQtQt", "Qt.##u#v.E.M.V.6#g#w#x#y#z.#QtQtQtQtQtQtQtQt", "Qt.##A.u#B.E.W#C#D#E#F.k.a.#QtQtQtQtQtQtQtQt", "QtQt.#.d#G#H#I#J#K#H#L.a.##M#NQtQtQtQtQtQtQt", "QtQtQt.##O.a.Y#P.Y.a.#.##Q#R#M.#QtQtQtQtQtQt", "QtQtQtQtQt#O.#.#.#.#QtQt#S#T#U#M.#QtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#Qt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U.#Qt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.#QtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; static const char* remove_xpm[]={ "22 22 2 1", "# c #000000", ". c None", "......................", "......................", "......................", "......................", "......................", "....##.........##.....", "....####......##......", ".....####....##.......", ".......###..#.........", "........#####.........", ".........###..........", "........#####.........", ".......###..##........", "......###....##.......", ".....###......#.......", ".....###.......#......", "......#...............", "................#.....", "......................", "......................", "......................", "......................"}; #endif efax-gtk-3.2.8/src/helpfile.cpp0000644000175000001440000004415111513027461013237 00000000000000/* Copyright (C) 2001 to 2005, 2010 and 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include // the key codes are here #include "helpfile.h" #ifdef ENABLE_NLS #include #endif int HelpDialog::is_helpfile = 0; void HelpDialogCB::help_dialog_button_clicked(GtkWidget*, void* data) { static_cast(data)->close(); } gboolean HelpDialogCB::help_dialog_key_press_event(GtkWidget*, GdkEventKey* event_p, void* data) { HelpDialog* instance_p = static_cast(data); int keycode = event_p->keyval; #if GTK_CHECK_VERSION(2,99,0) if (keycode == GDK_KEY_Home || keycode == GDK_KEY_End || keycode == GDK_KEY_Up || keycode == GDK_KEY_Down || keycode == GDK_KEY_Page_Up || keycode == GDK_KEY_Page_Down) { gtk_widget_event(gtk_notebook_get_nth_page(instance_p->notebook_p, gtk_notebook_get_current_page(instance_p->notebook_p)), (GdkEvent*)event_p); return true; // stop processing here } #else if (keycode == GDK_Home || keycode == GDK_End || keycode == GDK_Up || keycode == GDK_Down || keycode == GDK_Page_Up || keycode == GDK_Page_Down) { gtk_widget_event(gtk_notebook_get_nth_page(instance_p->notebook_p, gtk_notebook_get_current_page(instance_p->notebook_p)), (GdkEvent*)event_p); return true; // stop processing here } #endif return false; // pass on the key event } HelpDialog::HelpDialog(const int standard_size): WinBase(gettext("efax-gtk: Help"), prog_config.window_icon_h) { // notify the existence of this object is_helpfile++; GtkWidget* close_button_p = gtk_button_new_from_stock(GTK_STOCK_CLOSE); GtkWidget* button_box_p = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_SPREAD); gtk_container_add(GTK_CONTAINER(button_box_p), close_button_p); notebook_p = GTK_NOTEBOOK(gtk_notebook_new()); GtkWidget* scrolled_window_p; GtkWidget* label_p; // make and append sending help page scrolled_window_p = make_scrolled_window(); gtk_container_add(GTK_CONTAINER(scrolled_window_p), make_text_view(get_sending_help())); label_p = gtk_label_new(gettext("Sending")); gtk_notebook_append_page(notebook_p, scrolled_window_p, label_p); // make and append redialling help page scrolled_window_p = make_scrolled_window(); gtk_container_add(GTK_CONTAINER(scrolled_window_p), make_text_view(get_redial_help())); label_p = gtk_label_new(gettext("Auto redialing")); gtk_notebook_append_page(notebook_p, scrolled_window_p, label_p); // make and append receiving help page scrolled_window_p = make_scrolled_window(); gtk_container_add(GTK_CONTAINER(scrolled_window_p), make_text_view(get_receiving_help())); label_p = gtk_label_new(gettext("Receiving")); gtk_notebook_append_page(notebook_p, scrolled_window_p, label_p); // make and append addressbook help page scrolled_window_p = make_scrolled_window(); gtk_container_add(GTK_CONTAINER(scrolled_window_p), make_text_view(get_addressbook_help())); label_p = gtk_label_new(gettext("Address Book")); gtk_notebook_append_page(notebook_p, scrolled_window_p, label_p); // make and append fax list help page scrolled_window_p = make_scrolled_window(); gtk_container_add(GTK_CONTAINER(scrolled_window_p), make_text_view(get_fax_list_help())); label_p = gtk_label_new(gettext("Fax Lists")); gtk_notebook_append_page(notebook_p, scrolled_window_p, label_p); // make and append settings help page scrolled_window_p = make_scrolled_window(); gtk_container_add(GTK_CONTAINER(scrolled_window_p), make_text_view(get_settings_help())); label_p = gtk_label_new(gettext("Settings")); gtk_notebook_append_page(notebook_p, scrolled_window_p, label_p); gtk_notebook_set_tab_pos(notebook_p, GTK_POS_TOP); gtk_notebook_set_scrollable(notebook_p, true); GtkBox* vbox_p = GTK_BOX(gtk_vbox_new(false, 0)); gtk_box_pack_start(vbox_p, GTK_WIDGET(notebook_p), true, true, standard_size/3); gtk_box_pack_start(vbox_p, button_box_p, false, false, standard_size/3); g_signal_connect(G_OBJECT(close_button_p), "clicked", G_CALLBACK(HelpDialogCB::help_dialog_button_clicked), this); g_signal_connect(G_OBJECT(get_win()), "key_press_event", G_CALLBACK(HelpDialogCB::help_dialog_key_press_event), this); gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(vbox_p)); gtk_window_set_default_size(get_win(), standard_size * 25, standard_size * 14); gtk_container_set_border_width(GTK_CONTAINER(get_win()), standard_size/4); //gtk_window_set_position(get_win(), GTK_WIN_POS_NONE); gtk_widget_grab_focus(GTK_WIDGET(get_win())); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(close_button_p, true); #else GTK_WIDGET_SET_FLAGS(close_button_p, GTK_CAN_DEFAULT); #endif gtk_widget_show_all(GTK_WIDGET(get_win())); } HelpDialog::~HelpDialog(void) { // notify the destruction of this object is_helpfile--; } GtkWidget* HelpDialog::make_text_view(const char* text) { GtkTextView* text_view_p = GTK_TEXT_VIEW(gtk_text_view_new()); gtk_text_view_set_wrap_mode(text_view_p, GTK_WRAP_WORD); gtk_text_view_set_editable(text_view_p, false); PangoFontDescription* font_description = pango_font_description_from_string(prog_config.fixed_font.c_str()); #if GTK_CHECK_VERSION(2,99,0) gtk_widget_override_font(GTK_WIDGET(text_view_p), font_description); #else gtk_widget_modify_font(GTK_WIDGET(text_view_p), font_description); #endif pango_font_description_free(font_description); gtk_text_buffer_set_text(gtk_text_view_get_buffer(text_view_p), text, -1); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_focus(GTK_WIDGET(text_view_p), false); #else GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(text_view_p), GTK_CAN_FOCUS); #endif return GTK_WIDGET(text_view_p); } GtkWidget* HelpDialog::make_scrolled_window(void) { GtkScrolledWindow* scrolled_window_p = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(0, 0)); gtk_scrolled_window_set_shadow_type(scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(scrolled_window_p, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); return GTK_WIDGET(scrolled_window_p); } const char* HelpDialog::get_sending_help(void) { // Note for Translator: the sixth paragraph will require re-translation // if the most recent translation is dated before 6th November 2004 return gettext("\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. " "It must be in postscript or PDF format (formats produced by all Unix/Linux " "word and document processors), and will be converted by the program " "into the correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a " "file saved on the filesystem. It can be entered manually in the \"Fax " "to send\" box, or entered by means of the file selection dialog. If " "the file comprises a single postscript or PDF file, then you can find it by " "pressing the \"Single File\" button. It can be more easily found with " "this dialog if it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they " "will be sent as a single fax appended in the order in which they are " "entered in the box. Such multiple files can be more easily selected " "using the file list brought up by pressing the \"Multiple Files\" " "button. Pressing the \"Multiple Files\" button enables files to be " "found and added to the file list, and they can be reordered by using " "the Up or Down arrow buttons, or by dragging and dropping with the " "mouse.\n" "\n" "As an alternative, faxes can be received directly from the print " "system by means of a socket server provided by the program. Efax-gtk " "maintains a list of queued faxes received from the socket which can be " "accessed by choosing \"Socket\" as the fax entry method, and then " "bringing up the queued faxes list by pressing the \"Socket list\" " "button. This is a more convenient way of sending faxes from a word " "processor, and enables a fax to be sent for faxing to efax-gtk by " "printing from the word processor program. Where a fax is queued for " "sending in the socket list, a small red circle will appear in the main " "program window on the right hand side of the \"Fax to send\" box. For " "particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into " "the \"Tel number\" box. This can be entered directly into the box, or " "by using the built-in addressbook. The addressbook can be invoked by " "pressing the \"Tel number\" button, or from the `File/Address book' " "pull-down menu item (see the \"Address Book\" tag in this help dialog). " "However, if a telephone connection has already been established with " "the remote fax receiver, then the fax can be sent without dialing by " "leaving the \"Tel number\" box blank (a dialog will come up asking if " "you would like to send the fax without dialing).\n" "\n" "When a fax is received from the print system via the socket server, " "the program settings can also be configured to bring up a dialog " "automatically. If the program is inactive or is standing-by to " "receive faxes the fax can be sent directly from this dialog without " "the need to invoke the list of queued faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour " "and seconds when the sending of the fax was completed, and will appear " "in the faxes sent list. They are only included in that list if they " "have been sent without error. The efax message display box will " "report on the progress of a fax being sent. The fax list can be " "brought up from the `File/List sent faxes' pull down menu item. See " "\"Using the fax lists\" further below.\n"); } const char* HelpDialog::get_redial_help(void) { return gettext("\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax " "to be sent if the modem was in use or the receiving station was busy " "when the first attempt to send it was made. A list of the faxes " "queued for redialing can be brought up from the 'File' pull-down menu " "or from the icon in the system tray.\n" "\n" "If the program settings have been set to provide for automatic " "redialing, the program will keep trying to send the fax at the " "intervals chosen in the settings until either (a) the sending of the " "fax is successful, (b) there has been a failure arising from something " "other than the modem being in use or the recipient station being busy " "(such as a modem error, or the remote number ringing out without " "answering), (c) the fax is removed by the user from the list of faxes " "queued for redialing, (d) if the fax to be sent is a print job " "received from the print system, the print job is removed by the user " "from the dialog showing the list of queued faxes from the print " "socket, (e) if the fax to be sent comprises file(s) on the file " "system, the file(s) are deleted or moved (or their permissions changed " "to make them unreadable), or (f) the 'Stop' button is pressed while an " "attempt is being made to send the fax concerned which is queued for " "redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog " "is open. Instead, if the interval for resending such a fax has " "passed, a further sending attempt will take place once the Settings " "dialog has been closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the " "program is terminated. However, if any unsent faxes are print jobs " "received from the print system, they can still be found in the dialog " "showing the list of queued faxes from the print socket (assuming they " "have not been explicitly removed from that list by the user).\n"); } const char* HelpDialog::get_receiving_help(void) { return gettext("\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing " "but has not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been " "answered (say, by a telephone hand set) by pressing the \"Take over " "call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the " "\"Standby\" button. This will automatically answer any call after the " "number of rings specified in the efax-gtkrc file, and receive the fax. " "The program will keep on receiving faxes until the \"Stop\" button is " "pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in " "a directory in the $HOME/faxin directory, which has a name derived " "from the year, month, day, hour and seconds when reception of the fax " "was completed, and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the " "built in fax list facility. This can be brought up from the " "`File/List received faxes' pull down menu item. See \"Using the fax " "lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go " "to the Settings dialog to do this). In the settings dialog you can " "also specify a program to be executed when a fax is received. The " "fax ID number is passed as the first (and only) argument to the " "program, which enables the program to find the fax in $HOME/faxin. " "The distribution contains two executable scripts, mail_fax and " "print_fax, which can be used to e-mail a fax or print a fax to a user " "automatically when it is received. (These scripts are not installed " "by 'make install' - if you want to use them, make them executable with " "'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the " "settings dialog.)\n"); } const char* HelpDialog::get_addressbook_help(void) { return gettext("\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the " "relevant address by pressing the left mouse button over it, and then " "press the \"OK\" button.\n" "\n" "Addresses can be added to the address book by pressing the add button, " "and then completing the relevant dialog which will appear. To delete " "an address from the address book, highlight the relevant address and " "press the delete (trashcan) button. The addressbook can be sorted by " "using the up and down arrow buttons on a highlighted address, or by " "dragging and dropping using the mouse.\n"); } const char* HelpDialog::get_fax_list_help(void) { return gettext("\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the " "`List received faxes' or `List sent faxes' menu item. Highlight the " "fax to printed or viewed by pressing the left mouse button. The " "programs to be used to print and view the fax are specifed in the " "efax-gtkrc configuration file, or if none are specified, the program " "will print using lpr (which will work for most Unix systems) and view " "with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc " "to enable the fax page to fit within the printer margins. A parameter " "of 98 will work with most printers. This can be changed while the " "program is running by bringing up the `Settings' dialog and entering " "it into the `Print/Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax " "list (or subsequently amended) by pressing the relevant button -- this " "will enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, " "the number of faxes received since the program was last started. If " "efax-gtk is in receive standby mode, the `tooltips' for the program's " "icon in the system tray will also indicate this number. The count can " "be reset to 0 without restarting the program by pressing the reset " "button in the received faxes list.\n"); } const char* HelpDialog::get_settings_help(void) { return gettext("\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc. The file is searched for in that order, so " "$HOME/.efax-gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog " "launched from the `File/Settings' pull down menu item. The settings " "entered using this dialog are always stored as $HOME/.efax-gtkrc. " "Accordingly, if the Settings dialog has been used, and you want to " "revert to the global settings, this can be done either by deleting the " "$HOME/.efax-gtkrc file, or by pressing the `Reset' button in the " "Settings dialog, which will reload the Settings dialog from the " "global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding " "the mouse over the relevant help (?) button, which will bring up a " "\"Tips\" display, or by pressing the button, which will bring up an " "information display.\n"); } efax-gtk-3.2.8/src/dialogs.cpp0000644000175000001440000004744511524102655013103 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include // the key codes are here #include #include #include "dialogs.h" #include #include #include #include #include "gpl.h" #ifdef ENABLE_NLS #include #endif void FileReadSelectDialogCB::frs_dialog_selected(GtkWidget* widget_p, void* data) { FileReadSelectDialog* instance_p = static_cast(data); gtk_widget_hide(GTK_WIDGET(instance_p->get_win())); if (widget_p == instance_p->ok_button_p) instance_p->set_result(); else if (widget_p == instance_p->cancel_button_p) instance_p->result.clear(); else { instance_p->result.clear(); write_error("Callback error in FileReadSelectDialogCB::frs_dialog_selected()\n"); } instance_p->close(); } void FileReadSelectDialogCB::frs_dialog_view_file(GtkWidget*, void* data) { static_cast(data)->view_file_impl(); } FileReadSelectDialog::FileReadSelectDialog(int size, bool multi_files, GtkWindow* parent_p): WinBase(gettext("efax-gtk: File to fax"), prog_config.window_icon_h, true, parent_p, GTK_WINDOW(gtk_file_chooser_dialog_new(0, 0, GTK_FILE_CHOOSER_ACTION_OPEN, gettext("View"), GTK_RESPONSE_NONE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, static_cast(0)))), standard_size(size) { GtkWidget* view_button_p; GtkFileChooser* file_object_p = GTK_FILE_CHOOSER(get_win()); gtk_file_chooser_set_select_multiple(file_object_p, multi_files); if (!prog_config.working_dir.empty()) { std::string temp(prog_config.working_dir); temp += "/faxout"; gtk_file_chooser_set_current_folder(file_object_p, temp.c_str()); } #if GTK_CHECK_VERSION(2,14,0) GtkBox* hbox_p = GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(get_win()))); #else GtkBox* hbox_p = GTK_BOX(GTK_DIALOG(get_win())->action_area); #endif gtk_box_set_homogeneous(hbox_p, true); GList* button_list = gtk_container_get_children(GTK_CONTAINER(hbox_p)); if (g_list_length(button_list) < 3) { write_error("Button creation error in FileReadSelectDialog::FileReadSelectDialog()\n"); gtk_widget_show_all(GTK_WIDGET(get_win())); g_list_free(button_list); return; } ok_button_p = static_cast(g_list_nth_data(button_list, 0)); cancel_button_p = static_cast(g_list_nth_data(button_list, 1));; view_button_p = static_cast(g_list_nth_data(button_list, 2));; g_list_free(button_list); g_signal_connect(G_OBJECT(ok_button_p), "clicked", G_CALLBACK(FileReadSelectDialogCB::frs_dialog_selected), this); g_signal_connect(G_OBJECT(cancel_button_p), "clicked", G_CALLBACK(FileReadSelectDialogCB::frs_dialog_selected), this); g_signal_connect(G_OBJECT(view_button_p), "clicked", G_CALLBACK(FileReadSelectDialogCB::frs_dialog_view_file), this); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_widget_show_all(GTK_WIDGET(get_win())); } void FileReadSelectDialog::on_delete_event(void) { gtk_widget_hide(GTK_WIDGET(get_win())); result.clear(); close(); } std::pair FileReadSelectDialog::get_view_file_parms(void) { std::vector view_parms; std::string view_cmd; std::string view_name; std::string::size_type end_pos; try { // lock the Prog_config object to stop it being accessed in // FaxListDialog::get_ps_viewer_parms() while we are accessing it here // (this is ultra cautious as it is only copied/checked for emptiness // there, and the GUI interface is insensitive if we are here) Thread::Mutex::Lock lock(*prog_config.mutex_p); view_cmd = Utf8::filename_from_utf8(prog_config.ps_view_cmd); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in FileReadSelectDialog::get_view_file_parms()\n"); return std::pair(static_cast(0), static_cast(0)); } if ((end_pos = view_cmd.find_first_of(' ')) != std::string::npos) { // we have parms view_name.assign(view_cmd, 0, end_pos); view_parms.push_back(view_name); // find start of next parm std::string::size_type start_pos = view_cmd.find_first_not_of(' ', end_pos); while (start_pos != std::string::npos) { end_pos = view_cmd.find_first_of(' ', start_pos); if (end_pos != std::string::npos) { view_parms.push_back(view_cmd.substr(start_pos, end_pos - start_pos)); start_pos = view_cmd.find_first_not_of(' ', end_pos); // prepare for next interation } else { view_parms.push_back(view_cmd.substr(start_pos, view_cmd.size() - start_pos)); start_pos = end_pos; } } } else { // just a view command without parameters to be passed view_name = view_cmd; view_parms.push_back(view_name); } view_parms.push_back(get_filename_string()); char** exec_parms = new char*[view_parms.size() + 1]; char** temp_pp = exec_parms; std::vector::const_iterator iter; for (iter = view_parms.begin(); iter != view_parms.end(); ++iter, ++temp_pp) { *temp_pp = new char[iter->size() + 1]; std::strcpy(*temp_pp, iter->c_str()); } *temp_pp = 0; char* prog_name = new char[view_name.size() + 1]; std::strcpy(prog_name, view_name.c_str()); return std::pair(prog_name, exec_parms); } void FileReadSelectDialog::view_file_impl(void) { // check pre-conditions std::string filename(get_filename_string()); if (filename.empty() || filename[filename.size() - 1] == '/' || access(filename.c_str(), R_OK)) { beep(); return; } // get the arguments for the exec() call below (because this is a // multi-threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) std::pair view_file_parms(get_view_file_parms()); if (view_file_parms.first) { // this will be 0 if get_view_file_parms() // threw a Utf8::ConversionError) pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); std::exit(FORK_ERROR); } if (!pid) { // child process - as soon as everything is set up we are going to do an exec() connect_to_stderr(); execvp(view_file_parms.first, view_file_parms.second); // if we reached this point, then the execvp() call must have failed // report error and end process - use _exit() and not exit() write_error("Can't find the postscript viewer program - please check your installation\n" "and the PATH environmental variable\n"); _exit(0); } // end of view program process // release the memory allocated on the heap for // the redundant view_file_parms // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(view_file_parms); } } void FileReadSelectDialog::delete_parms(std::pair parms_pair) { delete[] parms_pair.first; char* const* temp_pp = parms_pair.second; for(; *temp_pp != 0; ++temp_pp) { delete[] *temp_pp; } delete[] parms_pair.second; } std::string FileReadSelectDialog::get_filename_string(void) { GcharScopedHandle file_name_h(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(get_win()))); if (file_name_h.get()) return std::string((const char*)file_name_h.get()); return std::string(); } void FileReadSelectDialog::set_result(void) { result.clear(); GSList* file_list_p = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(get_win())); void* elem = g_slist_nth_data(file_list_p, 0); // first element for (guint count = 1; elem; count++) { result.push_back((const char*)elem); g_free(elem); elem = g_slist_nth_data(file_list_p, count); } g_slist_free(file_list_p); try { std::transform(result.begin(), result.end(), result.begin(), Utf8::filename_to_utf8); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in FileReadSelectDialog::set_result()\n"); } } void GplDialogCB::gpl_dialog_selected(GtkWidget* widget_p, void* data) { GplDialog* instance_p = static_cast(data); gtk_widget_hide(GTK_WIDGET(instance_p->get_win())); if (widget_p == instance_p->accept_button_p) instance_p->result = GplDialog::accepted; else if (widget_p == instance_p->reject_button_p) instance_p->result = GplDialog::rejected; else write_error("Callback error in GplDialogCB::gpl_dialog_selected()\n"); instance_p->close(); } gboolean GplDialogCB::gpl_dialog_key_press_event(GtkWidget*, GdkEventKey* event_p, void* data) { GplDialog* instance_p = static_cast(data); int keycode = event_p->keyval; #if GTK_CHECK_VERSION(2,99,0) if (keycode == GDK_KEY_Escape) instance_p->on_delete_event(); else if (keycode == GDK_KEY_Home || keycode == GDK_KEY_End || keycode == GDK_KEY_Up || keycode == GDK_KEY_Down || keycode == GDK_KEY_Page_Up || keycode == GDK_KEY_Page_Down) { gtk_widget_event(GTK_WIDGET(instance_p->text_view_p), (GdkEvent*)event_p); } #else if (keycode == GDK_Escape) instance_p->on_delete_event(); else if (keycode == GDK_Home || keycode == GDK_End || keycode == GDK_Up || keycode == GDK_Down || keycode == GDK_Page_Up || keycode == GDK_Page_Down) { gtk_widget_event(GTK_WIDGET(instance_p->text_view_p), (GdkEvent*)event_p); } #endif return true; // stop processing here } GplDialog::GplDialog(int size): WinBase(gettext("efax-gtk: Conditions, Notices and Disclaimers"), prog_config.window_icon_h, true), standard_size(size), result(rejected) { accept_button_p = gtk_button_new_with_label(gettext("Accept")); reject_button_p = gtk_button_new_with_label(gettext("Reject")); GtkWidget* label_p = gtk_label_new(gettext("Do you accept the Conditions, Notices " "and Disclaimers shown above?")); GtkTable* table_p = GTK_TABLE(gtk_table_new(3, 2, false)); text_view_p = GTK_TEXT_VIEW(gtk_text_view_new()); gtk_text_view_set_editable(text_view_p, false); PangoFontDescription* font_description = pango_font_description_from_string(prog_config.fixed_font.c_str()); #if GTK_CHECK_VERSION(2,99,0) gtk_widget_override_font(GTK_WIDGET(text_view_p), font_description); #else gtk_widget_modify_font(GTK_WIDGET(text_view_p), font_description); #endif pango_font_description_free(font_description); gtk_text_buffer_set_text(gtk_text_view_get_buffer(text_view_p), gpl_copyright_msg()->c_str(), -1); GtkScrolledWindow* scrolled_window_p = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(0, 0)); gtk_scrolled_window_set_shadow_type(scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(scrolled_window_p, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(scrolled_window_p), GTK_WIDGET(text_view_p)); gtk_table_attach(table_p, GTK_WIDGET(scrolled_window_p), 0, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), 0, 0); gtk_table_attach(table_p, label_p, 0, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, 0, standard_size/3); gtk_table_attach(table_p, accept_button_p, 0, 1, 2, 3, GTK_SHRINK, GTK_SHRINK, 0, standard_size/3); gtk_table_attach(table_p, reject_button_p, 1, 2, 2, 3, GTK_SHRINK, GTK_SHRINK, 0, standard_size/3); GobjHandle group_h(gtk_size_group_new(GTK_SIZE_GROUP_BOTH)); gtk_size_group_add_widget(group_h, accept_button_p); gtk_size_group_add_widget(group_h, reject_button_p); g_signal_connect(G_OBJECT(accept_button_p), "clicked", G_CALLBACK(GplDialogCB::gpl_dialog_selected), this); g_signal_connect(G_OBJECT(reject_button_p), "clicked", G_CALLBACK(GplDialogCB::gpl_dialog_selected), this); g_signal_connect(G_OBJECT(get_win()), "key_press_event", G_CALLBACK(GplDialogCB::gpl_dialog_key_press_event), this); gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(table_p)); gtk_window_set_default_size(get_win(), standard_size * 25, standard_size * 16); gtk_container_set_border_width(GTK_CONTAINER(get_win()), standard_size/4); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_widget_grab_focus(GTK_WIDGET(get_win())); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_focus(GTK_WIDGET(text_view_p), false); gtk_widget_set_can_focus(accept_button_p, false); gtk_widget_set_can_focus(reject_button_p, false); #else GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(text_view_p), GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(accept_button_p, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(reject_button_p, GTK_CAN_FOCUS); #endif gtk_widget_show_all(GTK_WIDGET(get_win())); } int GplDialog::get_exec_val(void) const { return result; } void GplDialog::on_delete_event(void) { gtk_widget_hide(GTK_WIDGET(get_win())); result = rejected; close(); } void InfoDialogCB::info_dialog_selected(GtkDialog*, int, void* data) { static_cast(data)->close(); } InfoDialog::InfoDialog(const char* text, const char* caption, GtkMessageType message_type, GtkWindow* parent_p, bool modal): WinBase(caption, prog_config.window_icon_h, modal, parent_p, GTK_WINDOW(gtk_message_dialog_new(0, GtkDialogFlags(0), message_type, GTK_BUTTONS_CLOSE, text))) { // make further specialisations for a message dialog object #if GTK_CHECK_VERSION(2,14,0) GtkWidget* action_area_p = gtk_dialog_get_action_area(GTK_DIALOG(get_win())); #else GtkWidget* action_area_p = GTK_DIALOG(get_win())->action_area; #endif gtk_button_box_set_layout(GTK_BUTTON_BOX(action_area_p), GTK_BUTTONBOX_SPREAD); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); g_signal_connect(G_OBJECT(get_win()), "response", G_CALLBACK(InfoDialogCB::info_dialog_selected), this); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_resizable(get_win(), false); gtk_widget_show_all(GTK_WIDGET(get_win())); } void InfoDialog::on_delete_event(void) { // the response event handler will cause close() to be called for // the GTK_RESPONSE_DELETE_EVENT id, so just return when we // subsequently get the delete event return; } void PromptDialogCB::prompt_dialog_selected(GtkDialog*, int id, void* data) { PromptDialog* instance_p = static_cast(data); if (id == GTK_RESPONSE_ACCEPT) { instance_p->result = true; instance_p->accepted(); instance_p->close(); } else if (id == GTK_RESPONSE_REJECT) { instance_p->result = false; instance_p->rejected(); instance_p->close(); } } PromptDialog::PromptDialog(const char* text, const char* caption, int standard_size, GtkWindow* parent_p, bool modal): WinBase(caption, prog_config.window_icon_h, modal, parent_p, GTK_WINDOW(gtk_dialog_new_with_buttons(0, 0, #if GTK_CHECK_VERSION(2,99,0) GtkDialogFlags(0), #else GTK_DIALOG_NO_SEPARATOR, #endif GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, static_cast(0)))), result(false) { GtkWidget* label_p = gtk_label_new(text); gtk_label_set_line_wrap(GTK_LABEL(label_p), true); gtk_misc_set_padding(GTK_MISC(label_p), standard_size/2, standard_size/2); #if GTK_CHECK_VERSION(2,14,0) GtkWidget* content_area_p = gtk_dialog_get_content_area(GTK_DIALOG(get_win())); #else GtkWidget* content_area_p = GTK_DIALOG(get_win())->vbox; #endif gtk_container_add(GTK_CONTAINER(content_area_p), label_p); gtk_dialog_set_default_response(GTK_DIALOG(get_win()), GTK_RESPONSE_ACCEPT); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); g_signal_connect(G_OBJECT(get_win()), "response", G_CALLBACK(PromptDialogCB::prompt_dialog_selected), this); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_resizable(get_win(), false); gtk_widget_show_all(GTK_WIDGET(get_win())); } int PromptDialog::get_exec_val(void) const { return result; } void PromptDialog::on_delete_event(void) { result = false; rejected(); close(); } void AboutEfaxGtkDialogCB::about_efax_gtk_dialog_selected(GtkDialog*, int, void* data) { static_cast(data)->close(); } AboutEfaxGtkDialog::AboutEfaxGtkDialog(GtkWindow* parent_p, bool modal): WinBase(gettext("About efax-gtk"), prog_config.window_icon_h, modal, parent_p, GTK_WINDOW(gtk_about_dialog_new())) { gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); g_signal_connect(G_OBJECT(get_win()), "response", G_CALLBACK(AboutEfaxGtkDialogCB::about_efax_gtk_dialog_selected), this); gtk_window_set_resizable(get_win(), false); if (parent_p && modal) gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(get_win()), "efax-gtk"); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(get_win()), VERSION); gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(get_win()), gettext("Copyright (C) 2001 - 2011 Chris Vine")); gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(get_win()), gpl_copyright_msg()->c_str()); // this function calls g_strdup() gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(get_win()), gettext("This program was written by Chris Vine " "and is released under the GNU General " "Public License, version 2. It is a front " "end for efax. efax was written by Ed Casas")); gtk_widget_show_all(GTK_WIDGET(get_win())); } void AboutEfaxGtkDialog::on_delete_event(void) { // the response event handler will cause close() to be called for // the GTK_RESPONSE_DELETE_EVENT id, so just return when we // subsequently get the delete event return; } void AboutEfaxDialogCB::about_efax_dialog_selected(GtkDialog*, int, void* data) { static_cast(data)->close(); } AboutEfaxDialog::AboutEfaxDialog(GtkWindow* parent_p, bool modal): WinBase(gettext("About efax"), prog_config.window_icon_h, modal, parent_p, GTK_WINDOW(gtk_about_dialog_new())) { #if GTK_CHECK_VERSION(2,14,0) GtkWidget* action_area_p = gtk_dialog_get_action_area(GTK_DIALOG(get_win())); #else GtkWidget* action_area_p = GTK_DIALOG(get_win())->action_area; #endif gtk_button_box_set_layout(GTK_BUTTON_BOX(action_area_p), GTK_BUTTONBOX_SPREAD); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); g_signal_connect(G_OBJECT(get_win()), "response", G_CALLBACK(AboutEfaxDialogCB::about_efax_dialog_selected), this); gtk_window_set_resizable(get_win(), false); if (parent_p && modal) gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(get_win()), "efax"); gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(get_win()), gettext("efax is copyright (C) 1999 Ed Casas")); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(get_win()), gettext("This program (efax-gtk) is a front end " "for efax. efax is a program released " "under the GNU General Public License, " "version 2 by Ed Casas")); gtk_widget_show_all(GTK_WIDGET(get_win())); } void AboutEfaxDialog::on_delete_event(void) { // the response event handler will cause close() to be called for // the GTK_RESPONSE_DELETE_EVENT id, so just return when we // subsequently get the delete event return; } efax-gtk-3.2.8/src/addressbook.h0000644000175000001440000000472211466007653013424 00000000000000/* Copyright (C) 2001 to 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef ADDRESSBOOK_H #define ADDRESSBOOK_H #include "prog_defs.h" #include #include #include #include #include #include #include namespace AddressBookCB { extern "C" { void addr_book_button_clicked(GtkWidget*, void*); void addr_book_drag_n_drop(GtkTreeModel*, GtkTreePath*, void*); } } class AddressBook: public WinBase { static int is_address_list; const int standard_size; std::string result; GtkWidget* ok_button_p; GtkWidget* cancel_button_p; GtkWidget* add_button_p; GtkWidget* delete_button_p; GtkWidget* up_button_p; GtkWidget* down_button_p; GobjHandle list_store_h; GtkTreeView* tree_view_p; void read_list(void); void save_list(void); bool ok_impl(void); void finish(void); GcharSharedHandle get_number(void); void add_address_prompt(void); void add_address_impl(const std::vector& address); void delete_address_prompt(void); void delete_address_impl(void); void move_up_impl(void); void move_down_impl(void); protected: virtual void on_delete_event(void); public: friend void AddressBookCB::addr_book_button_clicked(GtkWidget*, void*); friend void AddressBookCB::addr_book_drag_n_drop(GtkTreeModel*, GtkTreePath*, void*); EmitterArg accepted; static int get_is_address_list(void) {return is_address_list;} std::string get_result(void) const {return result;} AddressBook(const int standard_size, GtkWindow* parent_p); ~AddressBook(void); }; namespace AddressDialogCB { extern "C" { void addr_dialog_selected(GtkWidget*, void*); gboolean addr_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); } } class AddressDialog: public WinBase { GtkWidget* ok_button_p; GtkWidget* cancel_button_p; GtkWidget* name_entry_p; GtkWidget* number_entry_p; bool selected_impl(void); public: friend void AddressDialogCB::addr_dialog_selected(GtkWidget*, void*); friend gboolean AddressDialogCB::addr_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); EmitterArg&> accepted; AddressDialog(const int standard_size, GtkWindow* parent_p); }; #endif efax-gtk-3.2.8/src/gpl.h0000644000175000001440000004450711525753333011712 00000000000000#ifndef GPL_H #define GPL_H #include #include #include const char copyright_msg_part_1[] = "\n\n" "-------------------------------------------------------------------------\n" "\n" "Copyright (C) 2001 to 2011 Chris Vine\n" "\n" "\n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" " the Free Software Foundation; either version 2 of the License, or\n" " (at your option) any later version.\n" "\n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" " GNU General Public License for more details.\n" "\n" " The GNU General Public License version 2 is set out below. You\n" " can obtain a written version from the Free Software Foundation,\n" " Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" " or from the COPYING file with this distribution\n" "\n" " Note that the copyright to the licence below is held by the Free\n" " Software Foundation, but the copyright to the instance of code that\n" " it refers to (this program) is held by me. The copyright to the efax\n" " program, to which this is a front end, is held by Ed Casas.\n" "\n" "Chris Vine\n" "\n" "-------------------------------------------------------------------------\n" "\n" ; const char copyright_msg_part_2[] = " GNU GENERAL PUBLIC LICENSE\n" " Version 2, June 1991\n" "\n" " Copyright (C) 1989, 1991 Free Software Foundation, Inc.\n" " 59 Temple Place, Suite 330, Boston, MA\n" " 02111-1307 USA\n" " Everyone is permitted to copy and distribute verbatim copies\n" " of this license document, but changing it is not allowed.\n" "\n" " Preamble\n" "\n" " The licenses for most software are designed to take away your\n" "freedom to share and change it. By contrast, the GNU General Public\n" "License is intended to guarantee your freedom to share and change free\n" "software--to make sure the software is free for all its users. This\n" "General Public License applies to most of the Free Software\n" "Foundation's software and to any other program whose authors commit to\n" "using it. (Some other Free Software Foundation software is covered by\n" "the GNU Library General Public License instead.) You can apply it to\n" "your programs, too.\n" "\n" " When we speak of free software, we are referring to freedom, not\n" "price. Our General Public Licenses are designed to make sure that you\n" "have the freedom to distribute copies of free software (and charge for\n" "this service if you wish), that you receive source code or can get it\n" "if you want it, that you can change the software or use pieces of it\n" "in new free programs; and that you know you can do these things.\n" "\n" " To protect your rights, we need to make restrictions that forbid\n" "anyone to deny you these rights or to ask you to surrender the rights.\n" "These restrictions translate to certain responsibilities for you if you\n" "distribute copies of the software, or if you modify it.\n" "\n" " For example, if you distribute copies of such a program, whether\n" "gratis or for a fee, you must give the recipients all the rights that\n" "you have. You must make sure that they, too, receive or can get the\n" "source code. And you must show them these terms so they know their\n" "rights.\n" "\n" " We protect your rights with two steps: (1) copyright the software, and\n" "(2) offer you this license which gives you legal permission to copy,\n" "distribute and/or modify the software.\n" "\n" " Also, for each author's protection and ours, we want to make certain\n" "that everyone understands that there is no warranty for this free\n" "software. If the software is modified by someone else and passed on, we\n" "want its recipients to know that what they have is not the original, so\n" "that any problems introduced by others will not reflect on the original\n" "authors' reputations.\n" "\n" ; const char copyright_msg_part_3[] = " Finally, any free program is threatened constantly by software\n" "patents. We wish to avoid the danger that redistributors of a free\n" "program will individually obtain patent licenses, in effect making the\n" "program proprietary. To prevent this, we have made it clear that any\n" "patent must be licensed for everyone's free use or not licensed at all.\n" "\n" " The precise terms and conditions for copying, distribution and\n" "modification follow.\n" "\n" "\n" " GNU GENERAL PUBLIC LICENSE\n" " TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n" "\n" " 0. This License applies to any program or other work which contains\n" "a notice placed by the copyright holder saying it may be distributed\n" "under the terms of this General Public License. The \"Program\", below,\n" "refers to any such program or work, and a \"work based on the Program\"\n" "means either the Program or any derivative work under copyright law:\n" "that is to say, a work containing the Program or a portion of it,\n" "either verbatim or with modifications and/or translated into another\n" "language. (Hereinafter, translation is included without limitation in\n" "the term \"modification\".) Each licensee is addressed as \"you\".\n" "\n" "Activities other than copying, distribution and modification are not\n" "covered by this License; they are outside its scope. The act of\n" "running the Program is not restricted, and the output from the Program\n" "is covered only if its contents constitute a work based on the\n" "Program (independent of having been made by running the Program).\n" "Whether that is true depends on what the Program does.\n" "\n" " 1. You may copy and distribute verbatim copies of the Program's\n" "source code as you receive it, in any medium, provided that you\n" "conspicuously and appropriately publish on each copy an appropriate\n" "copyright notice and disclaimer of warranty; keep intact all the\n" "notices that refer to this License and to the absence of any warranty;\n" "and give any other recipients of the Program a copy of this License\n" "along with the Program.\n" "\n" "You may charge a fee for the physical act of transferring a copy, and\n" "you may at your option offer warranty protection in exchange for a fee.\n" "\n" " 2. You may modify your copy or copies of the Program or any portion\n" "of it, thus forming a work based on the Program, and copy and\n" "distribute such modifications or work under the terms of Section 1\n" "above, provided that you also meet all of these conditions:\n" "\n" " a) You must cause the modified files to carry prominent notices\n" " stating that you changed the files and the date of any change.\n" "\n" " b) You must cause any work that you distribute or publish, that in\n" " whole or in part contains or is derived from the Program or any\n" " part thereof, to be licensed as a whole at no charge to all third\n" " parties under the terms of this License.\n" "\n" ; const char copyright_msg_part_4[] = " c) If the modified program normally reads commands interactively\n" " when run, you must cause it, when started running for such\n" " interactive use in the most ordinary way, to print or display an\n" " announcement including an appropriate copyright notice and a\n" " notice that there is no warranty (or else, saying that you provide\n" " a warranty) and that users may redistribute the program under\n" " these conditions, and telling the user how to view a copy of this\n" " License. (Exception: if the Program itself is interactive but\n" " does not normally print such an announcement, your work based on\n" " the Program is not required to print an announcement.)\n" "\n" "These requirements apply to the modified work as a whole. If\n" "identifiable sections of that work are not derived from the Program,\n" "and can be reasonably considered independent and separate works in\n" "themselves, then this License, and its terms, do not apply to those\n" "sections when you distribute them as separate works. But when you\n" "distribute the same sections as part of a whole which is a work based\n" "on the Program, the distribution of the whole must be on the terms of\n" "this License, whose permissions for other licensees extend to the\n" "entire whole, and thus to each and every part regardless of who wrote it.\n" "\n" "Thus, it is not the intent of this section to claim rights or contest\n" "your rights to work written entirely by you; rather, the intent is to\n" "exercise the right to control the distribution of derivative or\n" "collective works based on the Program.\n" "\n" "In addition, mere aggregation of another work not based on the Program\n" "with the Program (or with a work based on the Program) on a volume of\n" "a storage or distribution medium does not bring the other work under\n" "the scope of this License.\n" "\n" " 3. You may copy and distribute the Program (or a work based on it,\n" "under Section 2) in object code or executable form under the terms of\n" "Sections 1 and 2 above provided that you also do one of the following:\n" "\n" " a) Accompany it with the complete corresponding machine-readable\n" " source code, which must be distributed under the terms of Sections\n" " 1 and 2 above on a medium customarily used for software interchange; or,\n" "\n" " b) Accompany it with a written offer, valid for at least three\n" " years, to give any third party, for a charge no more than your\n" " cost of physically performing source distribution, a complete\n" " machine-readable copy of the corresponding source code, to be\n" " distributed under the terms of Sections 1 and 2 above on a medium\n" " customarily used for software interchange; or,\n" "\n" " c) Accompany it with the information you received as to the offer\n" " to distribute corresponding source code. (This alternative is\n" " allowed only for noncommercial distribution and only if you\n" " received the program in object code or executable form with such\n" " an offer, in accord with Subsection b above.)\n" "\n" ; const char copyright_msg_part_5[] = "The source code for a work means the preferred form of the work for\n" "making modifications to it. For an executable work, complete source\n" "code means all the source code for all modules it contains, plus any\n" "associated interface definition files, plus the scripts used to\n" "control compilation and installation of the executable. However, as a\n" "special exception, the source code distributed need not include\n" "anything that is normally distributed (in either source or binary\n" "form) with the major components (compiler, kernel, and so on) of the\n" "operating system on which the executable runs, unless that component\n" "itself accompanies the executable.\n" "\n" "If distribution of executable or object code is made by offering\n" "access to copy from a designated place, then offering equivalent\n" "access to copy the source code from the same place counts as\n" "distribution of the source code, even though third parties are not\n" "compelled to copy the source along with the object code.\n" "\n" " 4. You may not copy, modify, sublicense, or distribute the Program\n" "except as expressly provided under this License. Any attempt\n" "otherwise to copy, modify, sublicense or distribute the Program is\n" "void, and will automatically terminate your rights under this License.\n" "However, parties who have received copies, or rights, from you under\n" "this License will not have their licenses terminated so long as such\n" "parties remain in full compliance.\n" "\n" " 5. You are not required to accept this License, since you have not\n" "signed it. However, nothing else grants you permission to modify or\n" "distribute the Program or its derivative works. These actions are\n" "prohibited by law if you do not accept this License. Therefore, by\n" "modifying or distributing the Program (or any work based on the\n" "Program), you indicate your acceptance of this License to do so, and\n" "all its terms and conditions for copying, distributing or modifying\n" "the Program or works based on it.\n" "\n" " 6. Each time you redistribute the Program (or any work based on the\n" "Program), the recipient automatically receives a license from the\n" "original licensor to copy, distribute or modify the Program subject to\n" "these terms and conditions. You may not impose any further\n" "restrictions on the recipients' exercise of the rights granted herein.\n" "You are not responsible for enforcing compliance by third parties to\n" "this License.\n" "\n" " 7. If, as a consequence of a court judgment or allegation of patent\n" "infringement or for any other reason (not limited to patent issues),\n" "conditions are imposed on you (whether by court order, agreement or\n" "otherwise) that contradict the conditions of this License, they do not\n" "excuse you from the conditions of this License. If you cannot\n" "distribute so as to satisfy simultaneously your obligations under this\n" "License and any other pertinent obligations, then as a consequence you\n" "may not distribute the Program at all. For example, if a patent\n" "license would not permit royalty-free redistribution of the Program by\n" "all those who receive copies directly or indirectly through you, then\n" "the only way you could satisfy both it and this License would be to\n" "refrain entirely from distribution of the Program.\n" "\n" ; const char copyright_msg_part_6[] = "If any portion of this section is held invalid or unenforceable under\n" "any particular circumstance, the balance of the section is intended to\n" "apply and the section as a whole is intended to apply in other\n" "circumstances.\n" "\n" "It is not the purpose of this section to induce you to infringe any\n" "patents or other property right claims or to contest validity of any\n" "such claims; this section has the sole purpose of protecting the\n" "integrity of the free software distribution system, which is\n" "implemented by public license practices. Many people have made\n" "generous contributions to the wide range of software distributed\n" "through that system in reliance on consistent application of that\n" "system; it is up to the author/donor to decide if he or she is willing\n" "to distribute software through any other system and a licensee cannot\n" "impose that choice.\n" "\n" "This section is intended to make thoroughly clear what is believed to\n" "be a consequence of the rest of this License.\n" "\n" " 8. If the distribution and/or use of the Program is restricted in\n" "certain countries either by patents or by copyrighted interfaces, the\n" "original copyright holder who places the Program under this License\n" "may add an explicit geographical distribution limitation excluding\n" "those countries, so that distribution is permitted only in or among\n" "countries not thus excluded. In such case, this License incorporates\n" "the limitation as if written in the body of this License.\n" "\n" " 9. The Free Software Foundation may publish revised and/or new versions\n" "of the General Public License from time to time. Such new versions will\n" "be similar in spirit to the present version, but may differ in detail to\n" "address new problems or concerns.\n" "\n" "Each version is given a distinguishing version number. If the Program\n" "specifies a version number of this License which applies to it and \"any\n" "later version\", you have the option of following the terms and conditions\n" "either of that version or of any later version published by the Free\n" "Software Foundation. If the Program does not specify a version number of\n" "this License, you may choose any version ever published by the Free Software\n" "Foundation.\n" "\n" " 10. If you wish to incorporate parts of the Program into other free\n" "programs whose distribution conditions are different, write to the author\n" "to ask for permission. For software which is copyrighted by the Free\n" "Software Foundation, write to the Free Software Foundation; we sometimes\n" "make exceptions for this. Our decision will be guided by the two goals\n" "of preserving the free status of all derivatives of our free software and\n" "of promoting the sharing and reuse of software generally.\n" "\n" ; const char copyright_msg_part_7[] = " NO WARRANTY\n" "\n" " 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\n" "FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\n" "OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n" "PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\n" "OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n" "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\n" "TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\n" "PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\n" "REPAIR OR CORRECTION.\n" "\n" " 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n" "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n" "REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\n" "INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\n" "OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n" "TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n" "YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n" "PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n" "POSSIBILITY OF SUCH DAMAGES.\n" "\n" " END OF TERMS AND CONDITIONS\n" ; // if c++-gtk-utils-2.0 is being used, we know we are // compiling under C++0x/C++11 #if CGU_API_VERSION>=20 inline std::unique_ptr gpl_copyright_msg(void) { std::unique_ptr return_val(new std::string(copyright_msg_part_1)); #else inline std::auto_ptr gpl_copyright_msg(void) { std::auto_ptr return_val(new std::string(copyright_msg_part_1)); #endif return_val->append(copyright_msg_part_2); return_val->append(copyright_msg_part_3); return_val->append(copyright_msg_part_4); return_val->append(copyright_msg_part_5); return_val->append(copyright_msg_part_6); return_val->append(copyright_msg_part_7); return return_val; } #endif efax-gtk-3.2.8/src/mainwindow.h0000644000175000001440000001651411537767373013315 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include "prog_defs.h" #include #include #include #include #include #include #include #include #include #include "efax_controller.h" #include "fax_list_manager.h" #include "fax_list.h" #include "socket_server.h" #include "socket_list.h" #include "tray_icon.h" #include "helpfile.h" #include "logger.h" #include #include #include #include #include #include #include #include #define MAINWIN_SAVE_FILE ".efax-gtk_mainwin_save" class MessageText: public MainWidgetBase { GtkWidget* text_view_p; GtkTextMark* end_mark_p; GobjHandle red_tag_h; Logger logger; void cleanify(std::string&); public: void write_black_cb(const char* message); void write_red_cb(const char* message); void print_log(void) {logger.print_log();} static void print_page_setup(GtkWindow* parent_p) {Logger::print_page_setup(parent_p);} void view_log(const int standard_size) {logger.view_log(standard_size);} void reset_logfile(void) {logger.reset_logfile();} MessageText(GtkWindow* window_p); }; class StatusLine: public MainWidgetBase { const int standard_size; GtkWidget* status_label_p; int get_max_status_text_height(const std::vector&); public: void set_status_line(SharedPtr >); void write_status_cb(const char* text); StatusLine(const int); }; namespace MainWindowCB { extern "C" { void mainwin_button_clicked(GtkWidget*, void*); void mainwin_menuitem_activated(GtkMenuItem*, void*); gboolean mainwin_key_press_event(GtkWidget*, GdkEventKey*, void*); gboolean mainwin_visibility_notify_event(GtkWidget*, GdkEventVisibility*, void*); gboolean mainwin_window_state_event(GtkWidget*, GdkEventWindowState*, void*); gboolean mainwin_timer_event(void*); #if GTK_CHECK_VERSION(2,99,0) void mainwin_button_style_updated(GtkWidget*, void*); gboolean mainwin_drawing_area_draw(GtkWidget*, cairo_t*, void*); #else void mainwin_button_style_set(GtkWidget*, GtkStyle*, void*); gboolean mainwin_drawing_area_expose_event(GtkWidget*, GdkEventExpose*, void*); #endif } } class MainWindow: public WinBase { const int standard_size; static PipeFifo error_pipe; static bool connected_to_stderr; bool obscured; bool minimised; pid_t prog_pid; std::string prog_fifo_name; guint error_pipe_tag; Emitter close_socket_list_dialog; EmitterArg, SharedPtr > > update_socket_list; GtkWidget* drawing_area_p; GtkWidget* file_button_p; GtkWidget* socket_button_p; GtkWidget* file_entry_p; GtkWidget* number_entry_p; GtkWidget* single_file_button_p; GtkWidget* multiple_file_button_p; GtkWidget* socket_list_button_p; GtkWidget* number_button_p; GtkWidget* send_button_p; GtkWidget* receive_answer_button_p; GtkWidget* receive_takeover_button_p; GtkWidget* receive_standby_button_p; GtkWidget* stop_button_p; GtkMenuItem* list_received_faxes_item_p; GtkMenuItem* list_sent_faxes_item_p; GtkMenuItem* socket_list_item_p; GtkMenuItem* single_file_item_p; GtkMenuItem* multiple_file_item_p; GtkMenuItem* address_book_item_p; GtkMenuItem* redial_queue_item_p; GtkMenuItem* settings_item_p; GtkMenuItem* quit_item_p; GtkMenuItem* print_log_item_p; GtkMenuItem* page_setup_log_item_p; GtkMenuItem* view_log_item_p; GtkMenuItem* about_efax_gtk_item_p; GtkMenuItem* about_efax_item_p; GtkMenuItem* translations_item_p; GtkMenuItem* help_item_p; MessageText text_window; StatusLine status_line; EfaxController efax_controller; SocketServer socket_server; std::pair notified_fax; std::string selected_socket_list_file; FaxListDialog* received_fax_list_p; FaxListDialog* sent_fax_list_p; SocketListDialog* socket_list_p; HelpDialog* helpfile_p; TrayIcon tray_icon; Utf8::Reassembler error_pipe_reassembler; // these are called by handlers of GTK+ signals void close_impl(void); void get_file_impl(void); void file_list_impl(void); void socket_list_impl(void); void addressbook_impl(void); void redial_queue_impl(void); void receive_impl(EfaxController::State); void fax_list_impl(FaxListEnum::Mode); void settings_impl(void); void about_impl(bool); void translations_impl(void); void helpfile_impl(void); void set_file_items_sensitive_impl(void); void set_socket_items_sensitive_impl(void); // these are connected to Emitter or Notifier objects, or connected // to the callback of a WatchSource (iowatch) object, and might also be // called by the handlers of GTK+ signals void sendfax_cb(void); void set_files_cb(const std::string&); void fax_received_notify_cb(const std::pair&); void enter_socket_file_cb(const std::pair&); void settings_changed_cb(const std::string&); void socket_filelist_changed_notify_cb(void); void fax_to_send_notify_cb(void); void nullify_notified_fax_cb(void); void set_number_cb(const std::string&); void tray_icon_menu_cb(int); void tray_icon_activated_cb(void); void quit_cb(void); void read_error_pipe_cb(bool&); void sig_event_cb(bool&); void start_hidden_check_cb(bool&); void fax_to_send_dialog(const std::pair&); std::pair get_max_button_text_extents(void); void get_window_settings(void); void save_window_settings(void); void strip(std::string&); #if GTK_CHECK_VERSION(2,99,0) bool draw_fax_from_socket_notifier(cairo_t*); #else bool draw_fax_from_socket_notifier(GdkEventExpose*); void button_style_set_impl(GtkStyle*); #endif void button_style_updated_impl(void); protected: virtual void on_delete_event(void); public: friend void MainWindowCB::mainwin_button_clicked(GtkWidget*, void*); friend void MainWindowCB::mainwin_menuitem_activated(GtkMenuItem*, void*); friend gboolean MainWindowCB::mainwin_key_press_event(GtkWidget*, GdkEventKey*, void*); friend gboolean MainWindowCB::mainwin_visibility_notify_event(GtkWidget*, GdkEventVisibility*, void*); friend gboolean MainWindowCB::mainwin_window_state_event(GtkWidget*, GdkEventWindowState*, void*); #if GTK_CHECK_VERSION(2,99,0) friend void MainWindowCB::mainwin_button_style_updated(GtkWidget*, void*); friend gboolean MainWindowCB::mainwin_drawing_area_draw(GtkWidget*, cairo_t*, void*); #else friend void MainWindowCB::mainwin_button_style_set(GtkWidget*, GtkStyle*, void*); friend gboolean MainWindowCB::mainwin_drawing_area_expose_event(GtkWidget*, GdkEventExpose*, void*); #endif friend ssize_t write_error(const char*); friend int connect_to_stderr(void); void remove_from_socket_server_filelist(const std::string& file); void present_window(void); MainWindow(const std::string&, bool start_hidden = false, bool start_in_standby = false, const char* filename = 0); ~MainWindow(void); }; #endif efax-gtk-3.2.8/src/settings.h0000644000175000001440000002774611534424447012777 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef SETTINGS_H #define SETTINGS_H #include "prog_defs.h" #include #include #include #include #include "settings_help.h" #include #include #include #include #include namespace IdentityPageCB { extern "C" void identity_page_button_clicked(GtkWidget*, void*); } class IdentityPage: public MainWidgetBase { IdentityMessages help_messages; GtkWidget* name_entry_p; GtkWidget* number_entry_p; GtkWidget* name_help_button_p; GtkWidget* number_help_button_p; public: friend void IdentityPageCB::identity_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_name(void) const; std::string get_number(void) const; void set_name(const std::string& name); void set_number(const std::string& number); void clear(void); IdentityPage(const int); }; namespace ModemPageCB { extern "C" void modem_page_button_clicked(GtkWidget*, void*); } class ModemPage: public MainWidgetBase { ModemMessages help_messages; GtkWidget* device_entry_p; GtkWidget* lock_entry_p; GtkWidget* capabilities_entry_p; GtkWidget* rings_spin_button_p; GtkWidget* auto_button_p; GtkWidget* class1_button_p; GtkWidget* class2_button_p; GtkWidget* class20_button_p; GtkWidget* tone_button_p; GtkWidget* pulse_button_p; GtkWidget* device_help_button_p; GtkWidget* lock_help_button_p; GtkWidget* capabilities_help_button_p; GtkWidget* rings_help_button_p; GtkWidget* class_help_button_p; GtkWidget* dialmode_help_button_p; public: friend void ModemPageCB::modem_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_device(void) const; std::string get_lock(void) const; std::string get_capabilities(void) const; std::string get_rings(void) const; std::string get_class(void) const; std::string get_dialmode(void) const; void set_device(const std::string& device); void set_lock(const std::string& lock); void set_capabilities(const std::string& capabilities); void set_rings(const std::string& rings); void set_class(const std::string& class_string); void set_dialmode(const std::string& dialmode); void clear(void); ModemPage(const int); }; namespace ParmsPageCB { extern "C" void parms_page_button_clicked(GtkWidget*, void*); } class ParmsPage: public MainWidgetBase { ParmsMessages help_messages; GtkWidget* init_entry_p; GtkWidget* reset_entry_p; GtkWidget* parms_entry_p; GtkWidget* init_help_button_p; GtkWidget* reset_help_button_p; GtkWidget* parms_help_button_p; public: friend void ParmsPageCB::parms_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_init(void) const; std::string get_reset(void) const; std::string get_parms(void) const; void set_init(const std::string& init); void set_reset(const std::string& reset); void set_parms(const std::string& parms); void clear(void); ParmsPage(const int); }; namespace PrintPageCB { extern "C" void print_page_button_clicked(GtkWidget*, void*); } class PrintPage: public MainWidgetBase { PrintMessages help_messages; GtkWidget* command_label_p; GtkWidget* popup_label_p; GobjHandle gtkprint_check_button_h; GtkWidget* command_entry_p; GtkWidget* shrink_label_p; GtkWidget* shrink_spin_button_p; GtkWidget* popup_check_button_p; GobjHandle gtkprint_help_button_h; GtkWidget* command_help_button_p; GtkWidget* shrink_help_button_p; GtkWidget* popup_help_button_p; void gtkprint_button_toggled_impl(void); public: friend void PrintPageCB::print_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_gtkprint(void) const; std::string get_command(void) const; std::string get_shrink(void) const; std::string get_popup(void) const; void set_gtkprint(const std::string& gtkprint_string); void set_command(const std::string& command); void set_shrink(const std::string& shrink); void set_popup(const std::string& popup_string); void clear(void); PrintPage(const int); }; namespace ViewPageCB { extern "C" void view_page_button_clicked(GtkWidget*, void*); } class ViewPage: public MainWidgetBase { ViewMessages help_messages; GtkWidget* ps_view_command_entry_p; public: friend void ViewPageCB::view_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_ps_view_command(void) const; void set_ps_view_command(const std::string& command); void clear(void); ViewPage(const int); }; namespace SockPageCB { extern "C" void sock_page_button_clicked(GtkWidget*, void*); } class SockPage: public MainWidgetBase { SockMessages help_messages; GtkWidget* run_server_button_p; GtkWidget* popup_button_p; GtkWidget* localhost_button_p; GtkWidget* other_address_button_p; GtkWidget* port_spin_button_p; GtkWidget* other_addresses_entry_p; GtkWidget* ipv4_button_p; GtkWidget* ipv6_button_p; GtkWidget* run_server_help_button_p; GtkWidget* popup_help_button_p; GtkWidget* port_help_button_p; GtkWidget* client_address_help_button_p; GtkWidget* ip_family_help_button_p; void other_address_button_toggled_impl(void); public: friend void SockPageCB::sock_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_run_server(void) const ; std::string get_popup(void) const; std::string get_port(void) const; std::string get_if_other_address(void) const; std::string get_other_addresses(void) const; std::string get_ip_family(void) const; void set_run_server(const std::string& run_server_string); void set_popup(const std::string& popup_string); void set_port(const std::string& port_string); void set_if_other_address(const std::string& if_other_address_string); void set_other_addresses(const std::string& other_addresses_string); void set_ip_family(const std::string& ip_family_string); void clear(void); SockPage(const int); }; namespace ReceivePageCB { extern "C" void receive_page_button_clicked(GtkWidget*, void*); } class ReceivePage: public MainWidgetBase { ReceiveMessages help_messages; GtkWidget* popup_button_p; GtkWidget* exec_button_p; GtkWidget* prog_entry_p; GtkWidget* popup_help_button_p; GtkWidget* exec_help_button_p; void exec_button_toggled_impl(void); public: friend void ReceivePageCB::receive_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_popup(void) const; std::string get_exec(void) const; std::string get_prog(void) const; void set_popup(const std::string& popup_string); void set_exec(const std::string& exec_string); void set_prog(const std::string& prog_string); void clear(void); ReceivePage(const int); }; namespace SendPageCB { extern "C" void send_page_button_clicked(GtkWidget*, void*); } class SendPage: public MainWidgetBase { SendMessages help_messages; GtkWidget* standard_button_p; GtkWidget* fine_button_p; GtkWidget* header_check_button_p; GtkWidget* redial_check_button_p; GtkWidget* redial_spin_label_p; GtkWidget* redial_spin_button_p; GtkWidget* dial_prefix_entry_p; GtkWidget* res_help_button_p; GtkWidget* header_help_button_p; GtkWidget* redial_help_button_p; GtkWidget* dial_prefix_help_button_p; void redial_check_button_toggled_impl(void); public: friend void SendPageCB::send_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_res(void) const; std::string get_addr_in_header(void) const; std::string get_redial(void) const; std::string get_redial_interval(void) const; std::string get_dial_prefix(void) const; void set_res(const std::string& res); void set_addr_in_header(const std::string& res); void set_redial(const std::string& redial); void set_redial_interval(const std::string& interval); void set_dial_prefix(const std::string& prefix); void clear(void); SendPage(const int); }; namespace LoggingPageCB { extern "C" void logging_page_button_clicked(GtkWidget*, void*); } class LoggingPage: public MainWidgetBase { LoggingMessages help_messages; GtkWidget* logfile_entry_p; public: friend void LoggingPageCB::logging_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_logfile(void) const; void set_logfile(const std::string& logfile); void clear(void); LoggingPage(const int); }; namespace PagePageCB { extern "C" void page_page_button_clicked(GtkWidget*, void*); } class PagePage: public MainWidgetBase { PageMessages help_messages; GtkWidget* a4_button_p; GtkWidget* letter_button_p; GtkWidget* legal_button_p; GtkWidget* page_help_button_p; public: friend void PagePageCB::page_page_button_clicked(GtkWidget*, void*); //sigc::signal2 show_help_sig; EmitterArg&> show_help_sig; std::string get_page(void) const; void set_page(const std::string& page); void clear(void); PagePage(const int); }; namespace SettingsDialogCB { extern "C" void settings_dialog_button_clicked(GtkWidget*, void*); } class SettingsDialog: public WinBase { static int dialog_count; const int standard_size; bool is_home_config; std::string rcfile; GtkWidget* ok_button_p; GtkWidget* cancel_button_p; GtkWidget* reset_button_p; IdentityPage identity_page; ModemPage modem_page; ParmsPage parms_page; PrintPage print_page; ViewPage view_page; SockPage sock_page; ReceivePage receive_page; SendPage send_page; LoggingPage logging_page; PagePage page_page; void read_config(bool search_localfile = true); bool write_config(void); bool get_prog_parm(const char*, std::string&, std::string&, std::string(*)(const std::string&)); bool get_prog_parm(const char* name, std::string& line, std::string& result) {return get_prog_parm(name, line, result, Utf8::locale_to_utf8);} bool find_prog_parm(const char*, const std::string&); bool get_rcfile_path(bool search_localfile = true); void get_reset_settings_prompt(void); void get_reset_settings(void); void show_help(const std::pair&); void strip(std::string&); bool is_ascii(const std::string&); public: friend void SettingsDialogCB::settings_dialog_button_clicked(GtkWidget*, void*); static bool is_dialog(void) {return dialog_count;} // this signal can be used to indicate that settings have changed // it is emitted after this dialog has rewritten the ~/.efax-gtkrc // and has called configure_prog() and passes the messages // returned by configure_prog() EmitterArg accepted; SettingsDialog(const int standard_size, GtkWindow* parent_p, bool skip_old_settings = false); ~SettingsDialog(void) {--dialog_count;} }; #endif efax-gtk-3.2.8/src/fax_list_icons.h0000644000175000001440000003141711466007653014131 00000000000000#ifndef FAX_LIST_ICONS_H #define FAX_LIST_ICONS_H /* These icons were taken from those supplied with KDE 2.1 and are copyrighted accordingly */ /* XPM */ static const char* view_xpm[]={ "22 22 113 2", "Qt c None", "#S c #06afb1", "#R c #0ae1df", "#N c #0cfdfa", ".# c #121212", "#O c #141414", "#Q c #3f3f40", "#T c #404041", "#w c #409fa8", "#r c #46a3ab", "#D c #46a5ad", "#x c #46a7b5", "#h c #4bacb4", "#q c #4bb3bd", "#g c #4db5bf", "#f c #4ec3ce", "#p c #50c8d3", "#C c #56adb6", ".6 c #56b8c6", ".7 c #57b5bd", ".W c #62bfc8", ".V c #65c1ce", "#E c #66bdc8", "#s c #6abdc9", "#U c #707071", ".5 c #73d0de", "#o c #74d0de", "#e c #76d1df", ".M c #79cad5", ".N c #7acad2", ".d c #7e8180", ".l c #7f8180", ".v c #7f8281", "#A c #808382", ".U c #81d5e1", "#n c #82d9e1", "#F c #83d6de", ".E c #84ced7", "#y c #84dae2", ".4 c #85d8e2", "#K c #86d4de", "#J c #8bd4dc", "#l c #8bd5e0", "#m c #91dae5", ".L c #92d8e3", ".D c #95d5dd", "#i c #95dbe6", ".3 c #98dde7", ".a c #999b9a", "#d c #99dce8", ".T c #99dee8", "#k c #9dd5de", "#I c #9fdbe3", "#B c #a4dce5", ".s c #a4dce7", ".X c #a5e1ea", "#c c #a6e4eb", ".K c #a7e5ec", "#M c #ababab", ".F c #abe0e9", ".8 c #abe4eb", ".C c #ace4eb", ".S c #ade5ec", ".b c #aeb6b7", "#H c #aee2ea", "#b c #aee6ed", "#v c #afe6ed", ".t c #b2e5ed", ".O c #b2e7ef", "#a c #b3e0e6", "#t c #b3e7ef", ".Y c #b5d1d5", ".r c #b5e7ef", ".P c #b6bdbc", ".9 c #b8dfe3", ".c c #b9c2c4", ".2 c #baebef", ".J c #bbeaf0", "#. c #bcc3c4", "#P c #c0e0e3", ".B c #c2ecf1", ".1 c #c4e9ec", ".R c #c7ebf2", ".q c #c7eef4", ".Z c #c8cecf", "#u c #cbe2e6", ".p c #cbf1f4", ".j c #ceeef2", ".e c #d1dbdc", ".w c #d2dddc", ".i c #d2f1f5", "#j c #d3eff4", ".I c #d5f1f4", ".m c #d8e3e2", ".A c #d8f3f5", "## c #d9eff2", ".f c #dbebec", ".h c #dbf4f6", "#G c #ddf2f4", ".G c #deebed", "#L c #def3f5", "#z c #dff3f5", ".g c #dff3f7", ".u c #e0f3f5", ".k c #e1f4f6", ".0 c #e5f6f9", ".o c #e6f7f9", ".H c #e7f7f8", ".n c #e8f8f9", ".Q c #e9f7f9", ".x c #eaf9f9", ".z c #ecfbfb", ".y c #edfcfb", "QtQtQtQtQt.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQt.#.#.a.b.c.b.a.#.#QtQtQtQtQtQtQtQtQtQt", "QtQt.#.d.e.f.g.h.i.j.k.l.#QtQtQtQtQtQtQtQtQt", "Qt.#.d.m.n.o.p.q.r.s.t.u.v.#QtQtQtQtQtQtQtQt", "Qt.#.w.x.y.z.A.B.C.D.E.F.u.#QtQtQtQtQtQtQtQt", ".#.a.G.o.z.H.I.J.K.L.M.N.O.a.#QtQtQtQtQtQtQt", ".#.P.Q.p.A.I.R.S.T.U.V.W.X.Y.#QtQtQtQtQtQtQt", ".#.Z.0.1.B.2.S.3.4.5.6.7.8.9.#QtQtQtQtQtQtQt", ".##.###a#b#c#d.4#e#f#g#h#i.Y.#QtQtQtQtQtQtQt", ".#.a#j#k#l#m#n#o#p#q#r#s#t.a.#QtQtQtQtQtQtQt", "Qt.##u#v.E.M.V.6#g#w#x#y#z.#QtQtQtQtQtQtQtQt", "Qt.##A.u#B.E.W#C#D#E#F.k.a.#QtQtQtQtQtQtQtQt", "QtQt.#.d#G#H#I#J#K#H#L.a.##M#NQtQtQtQtQtQtQt", "QtQtQt.##O.a.Y#P.Y.a.#.##Q#R#M.#QtQtQtQtQtQt", "QtQtQtQtQt#O.#.#.#.#QtQt#S#T#U#M.#QtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#Qt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U.#Qt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.#QtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; static const char* describe_xpm[]={ "22 22 187 2", "Qt c None", "a4 c #000000", "aO c #040404", "aA c #090909", "am c #0d0d0d", ".4 c #0e0e0e", "aa c #101010", "#s c #151515", "#B c #161616", "#M c #171717", "#I c #2e2a22", "#3 c #32261e", "#J c #36322e", "ae c #363232", "#4 c #422e26", ".t c #4f4f4f", ".o c #505050", "aq c #524636", "aP c #535353", ".n c #545454", "#5 c #565252", "aB c #565656", ".m c #585858", "#V c #5a4a3e", "#z c #5a4e36", ".l c #5b5b5b", "#0 c #5e5e5e", ".k c #5f5f5f", "#N c #606060", ".j c #626262", "#C c #636363", ".i c #666666", "#k c #686868", ".h c #696969", "#e c #6b6b6b", ".g c #6d6d6d", ".9 c #6e6e6e", ".f c #707070", "#U c #724e3a", "#R c #72664e", ".Y c #737373", ".e c #747474", ".S c #767676", "#A c #776a56", ".d c #777777", ".N c #787878", ".c c #7b7b7b", "af c #7e766b", ".b c #7e7e7e", ".B c #808080", ".a c #828282", ".v c #838383", "#r c #864a1e", ".# c #868686", "as c #877c6e", "#L c #897960", ".p c #8e522a", ".D c #8e5e36", "#K c #908674", "ag c #908675", ".G c #92622e", "#W c #938978", "#6 c #93897a", "#y c #965a3a", "ar c #998e7f", "#d c #9a4606", ".K c #9a6636", "#X c #9d907d", "#7 c #9d9382", ".3 c #9e4a06", ".X c #a24e06", "ah c #a39882", "#Z c #a48f6f", "aH c #a49985", "#Y c #ac9d85", "#q c #ae6232", "#8 c #aea28d", "at c #afa38e", "ai c #b2a08a", "aV c #b2a38b", "aU c #b2a690", "aG c #b5a593", "#S c #b68a6a", "a# c #b69e7a", "aW c #b8a88c", "aj c #b9a688", ".O c #ba7a3e", "aF c #bbae9c", "a3 c #bc9d70", "aT c #bcb19c", "aN c #bd9f74", "a2 c #bda176", "az c #bda177", "al c #bda27a", "aX c #bdaa8d", "a1 c #bea37b", "a0 c #bea680", "aY c #beaa89", "aZ c #bfa885", "ak c #bfab8d", "#9 c #c0b29b", "#j c #c25e12", ".T c #c28246", "aS c #c3b9a6", ".y c #c3beb0", "aR c #c4bcac", "aQ c #c5bfb1", "#T c #c68662", ".s c #c6c1b6", "au c #c8b79f", "ad c #c9c6bf", ".r c #c9c9c9", ".W c #ca6206", "#p c #ca825e", "#2 c #caae82", ".2 c #ce6602", "#H c #ce8266", "ac c #cfc9c2", "a. c #d0ba9a", ".J c #d1d1d1", "#v c #d2cec8", "aI c #d3c1a8", "ab c #d3ccc5", "#u c #d3cfcf", "#. c #d3d0d0", ".5 c #d5d5d5", ".R c #d66a06", "#t c #d6d6d3", ".x c #d6d6d6", "#h c #da6e3e", ".U c #da924e", "aE c #dacfbd", "av c #dbcbb1", "aM c #dec6aa", "aJ c #e0c9ae", "#i c #e26a2e", ".z c #e29a56", "ay c #e2caa2", "aK c #e4cca8", "ax c #e5cda9", "aL c #e6ceaa", "aw c #e7cfb3", "#b c #ea8e5a", ".8 c #ea9a6e", ".0 c #eeb276", "ap c #efe3d3", "#c c #f27e0e", "#x c #f2b296", "aD c #f2eada", "aC c #f2eae2", "#Q c #f4ece4", "#1 c #f5f1e5", ".Q c #f68606", ".Z c #f6b696", "#a c #f6c6aa", "ao c #f6eee2", "an c #f6f2e6", "#F c #f7efe7", "#n c #f7f3eb", "#f c #f9f5f1", ".V c #fa820a", ".P c #fa8606", ".q c #faae5e", ".7 c #fae6d2", "#P c #faf2ea", "#E c #faf6ee", "#O c #faf6f6", "#m c #fafaf6", "#D c #fafafa", ".C c #fcfcfc", ".H c #fe8206", ".I c #fe8602", ".1 c #fe8606", ".M c #fe8a02", ".F c #fe8a06", ".A c #fe9632", ".L c #fecea6", "#G c #fed2b2", ".E c #fedaba", ".6 c #fedebe", "#w c #fee2c6", "#g c #fee6ca", ".u c #feeaae", "#o c #feead2", "## c #fef2e2", "#l c #fefefa", ".w c #fefefe", "QtQt.#.#.a.b.c.d.e.f.g.h.i.j.k.l.m.n.oQt.p.q", "QtQt.#.r.r.r.r.r.r.r.r.r.r.r.r.r.r.s.t.p.q.u", "QtQt.v.r.w.w.w.w.w.w.x.w.w.w.w.w.w.y.p.z.u.A", "QtQt.B.r.w.w.w.w.w.w.x.w.w.w.w.w.C.D.z.E.A.F", "QtQt.b.r.w.w.w.w.w.w.x.w.w.w.w.C.G.z.E.A.H.I", "QtQt.c.r.x.x.x.x.x.x.x.x.x.x.J.K.z.L.A.H.I.M", "QtQt.N.r.w.w.w.w.w.w.x.w.w.C.O.z.L.A.P.I.Q.R", "QtQt.S.r.w.w.w.w.w.w.x.w.C.T.U.L.A.V.I.Q.W.X", "QtQt.Y.r.w.w.w.w.w.w.x.C.Z.0.L.A.I.1.Q.2.3.4", "QtQt.f.r.x.x.x.x.x.x.5.Z.6.7.8.V.I.Q.W.3.4Qt", "QtQt.9.r.w.w.w.w.w.w#..L###a#b#c.V.2#d.4QtQt", "QtQt#e.r.w.w.w.w.w#f.Z#g.E.8#h#i#j#d.4QtQtQt", "QtQt#k.r.w.w.w#l#m#n.L#o.Z#p#q.p#r.4#sQtQtQt", "QtQt.i.r.x.x#t#u#v.Z#w#x#p#y.p#z.4#A#BQtQtQt", "QtQt#C.r.w#D#m#E#F#G#a#H#y#z#I#J#K#L#MQtQtQt", "QtQt#N.r#l#O#P#Q#R#S#T#U#V#J#W#X#Y#Z#sQtQtQt", "QtQt#0.r#m#E#1#2#R#3#4#5#6#7#8#9a.a#aaQtQtQt", "QtQt.l.rabacad#R#Iae#2afagahaiajakalamQtQtQt", "QtQt.m.ranaoapaq#2arasatauavawaxayazaAQtQtQt", "QtQtaB.raCaDapaEaFaGaHaIaJaKaLayaMaNaOQtQtQt", "QtQtaP.saQaRaSaTaUaVaWaXaYaZa0a1a2a3a4QtQtQt", "QtQta4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4QtQtQt"}; static const char* add_folder_xpm[]={ "22 22 149 2", "Qt c None", ".# c None", "an c None", "aq c None", "am c None", "#e c None", "ap c None", "as c None", "ar c None", "ao c None", "#d c None", "al c None", "ak c None", "#l c None", ".b c None", ".h c None", ".c c None", ".a c None", ".6 c None", ".n c None", ".f c None", "#u c None", ".p c None", ".d c None", ".g c None", ".e c None", ".i c None", "a. c #63b8af", ".r c #af63b8", ".m c #9cb863", ".o c #b8af63", "#W c #1c1f41", ".y c #8bb863", ".L c #090909", ".q c #63b89c", ".F c #090909", "aj c #090909", "#V c #090909", "a# c #17331f", "#9 c #090909", "#I c #0b0d1a", ".W c #090909", "#k c #090909", ".5 c #090909", "ai c #0e141d", "aa c #170f1f", "#C c #141209", "#8 c #080f0b", "ah c #120a11", "ad c #090a17", "ag c #09120d", "ab c #0a0a09", "af c #0b101a", "ae c #140910", "ac c #141209", ".K c #110d06", "#J c #090909", "#U c #080b09", ".V c #0a0806", "#7 c #07100a", "#K c #060c07", "#H c #080806", ".4 c #090706", "#b c #090706", "#M c #090909", "#c c #090706", "#P c #090909", "#N c #060a0e", "#L c #060c07", "#j c #080706", "#O c #09060e", "#Q c #0c060b", "#t c #080706", "#S c #0a0e06", "#R c #0c060b", "#X c #070a0f", "#T c #0e0d0b", "#6 c #080b0a", "#5 c #06070b", "#Y c #090a08", "#2 c #060e09", "#Z c #090909", "#0 c #0b0610", "#3 c #0e0c06", "#1 c #100b06", "#4 c #0e1108", "#G c #1a2039", "#B c #2b3162", "#s c #2f3569", "#D c #2f3463", "#a c #2f3469", ".E c #323b70", ".J c #2f3469", ".U c #2f3566", "#F c #313566", "#E c #31366c", ".k c #4c6d9e", ".s c #4d6fa0", ".l c #4e70a1", ".j c #5070a2", "#m c #5072a2", ".x c #5172a4", "#A c #5783aa", "#i c #5785aa", "## c #5883aa", ".3 c #5a87ab", ".T c #638baf", "#z c #87acc0", "#r c #88adc0", "#h c #89aec1", "#. c #8aafc2", ".2 c #8cb0c2", ".S c #8cb1c1", ".D c #95abc6", "#y c #98baca", "#q c #9cbbc8", ".9 c #9cbdcc", "#g c #9dbcc9", ".R c #9ebecd", ".1 c #9fbdcb", ".I c #b6d1db", "#p c #bbd1db", "#f c #bcd1db", ".0 c #bed3dc", ".Q c #bfd4dd", ".w c #c7d4e1", ".C c #c8dce3", "#x c #d3e3e8", "#o c #d5e3e9", ".8 c #d6e4e9", ".Z c #d8e5ea", ".P c #d8e6ea", ".B c #ddeaec", "#w c #e8f0f2", "#n c #e8f1f3", ".O c #e9f1f3", ".Y c #eaf2f3", ".H c #eef4f6", ".G c #eff5f6", ".u c #eff6f6", ".v c #f0f6f7", ".z c #f4f8f9", "#v c #f4f9f8", ".7 c #f5f9f9", ".X c #f6f9fa", ".N c #f6fafa", ".A c #f8fcfc", ".M c #fefffe", ".t c #ffffff", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "Qt.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#QtQtQtQtQt", "Qt.#.a.b.c.c.b.d.e.#.#.e.f.g.g.#.#QtQtQtQtQt", "Qt.h.i.j.k.k.l.k.m.h.n.d.m.o.p.e.o.q.r.rQtQt", "Qt.h.s.t.u.u.v.w.l.l.l.l.l.l.s.x.k.s.l.y.oQt", "Qt.c.s.z.A.A.B.C.D.D.D.D.D.D.D.D.D.D.D.E.FQt", "Qt.h.l.D.D.D.D.D.t.t.t.t.t.u.u.G.v.H.I.J.K.L", "Qt.b.s.M.M.M.M.M.N.M.M.N.N.O.P.Q.R.S.T.U.V.W", "Qt.h.k.M.M.M.M.M.X.M.M.X.X.Y.Z.0.1.2.3.J.4.5", "Qt.b.k.M.M.M.M.M.X.M.M.X.X.Y.Z.0.1.2.3.J.4.5", "Qt.h.k.M.M.M.M.M.X.M.M.X.X.Y.Z.0.1.2.3.J.4.5", "Qt.6.s.M.M.M.M.M.7.M.M.7.7.O.8.0.9#.###a#b.5", "Qt.h.k.M.M.M.M.M.7.M.M.7.7.O.8.0.9#.##.J#c.5", "Qt#d.k.M.M.M.M.M.7.M.M.7.7.O.8.0.9#.##.J#c.5", "Qt#e.s.M.M.M.M.M.7.M.M.7.7.O.8#f#g#h#i.U#j#k", "Qt#l#m.M.M.M.M.M.7.M.M.7.7#n#o#p#q#r#i#s#t.5", "Qt#u.s.M.M.M.M.M#v.M.M#v#v#w#x#p#y#z#A#B#j.5", "QtQt#C#D#E#E#F.J.U.U.U.U.U.U.J.U.J.J.J#G#H.5", "QtQt#I#J#K#K#L#M#N#N#N#N#N#N#O#P#Q#R#S#T#U#V", "QtQt#W#J#X#X#Y#Z#0#0#0#0#0#1#2#3#4#5#6#7#8#9", "QtQta.a#aaaaabacadadadadadaeadaeafagahaiajQt", "QtQt#uakalalam#dananananaoanaoapaqaras.#QtQt"}; static const char* delete_folder_xpm[]={ "22 22 86 2", "Qt c None", "#i c #06070b", ".9 c #060a0e", ".8 c #060c07", "#f c #060e09", "#b c #070a0f", ".U c #080706", ".7 c #080806", "#a c #080b09", "#j c #080f0b", "#. c #09060e", ".I c #090706", ".p c #090909", "#c c #090a08", "#o c #090a17", "#r c #09120d", ".C c #0a0806", "#n c #0a0a09", "#d c #0b0610", "#q c #0b101a", "## c #0c060b", "#g c #0e0c06", "#h c #0e1108", "#t c #0e141d", "#e c #100b06", ".v c #110d06", "#s c #120a11", "#p c #140910", ".4 c #141209", "#m c #170f1f", "#l c #17331f", ".6 c #1a2039", ".3 c #2b3162", ".u c #2f3469", ".B c #2f3566", ".Y c #2f3569", ".5 c #313566", ".o c #323b70", ".c c #4c6d9e", ".g c #4d6fa0", ".d c #4e70a1", ".V c #5072a2", ".j c #5172a4", ".2 c #5783aa", ".T c #5785aa", ".Q c #5883aa", ".H c #5a87ab", ".A c #638baf", "#k c #63b8af", ".b c #800000", ".X c #88adc0", ".S c #89aec1", ".P c #8aafc2", ".k c #8bb863", ".G c #8cb0c2", ".z c #8cb1c1", ".n c #95abc6", ".e c #9cb863", ".O c #9cbdcc", ".R c #9dbcc9", ".y c #9ebecd", ".F c #9fbdcb", ".t c #b6d1db", ".f c #b8af63", ".E c #bed3dc", ".i c #c7d4e1", ".m c #c8dce3", ".1 c #d3e3e8", ".N c #d6e4e9", ".J c #d8e5ea", ".0 c #e8f0f2", ".W c #e8f1f3", ".M c #e9f1f3", ".K c #eaf2f3", ".s c #eef4f6", ".r c #eff6f6", ".h c #f0f6f7", ".l c #f4f8f9", ".Z c #f4f9f8", ".L c #f5f9f9", ".D c #f6f9fa", ".x c #f6fafa", ".w c #fefffe", ".a c #ff0000", ".# c #ffc0c0", ".q c #ffffff", "QtQt.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#Qt", "QtQt.#.aQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.a.#Qt", "Qt.b.a.aQtQtQtQtQtQtQtQtQtQtQtQtQtQt.a.a.bQt", "QtQt.b.a.a.c.d.c.eQtQtQt.e.fQtQt.f.a.a.bQtQt", "QtQt.g.b.a.a.h.i.d.d.d.d.d.d.g.j.a.a.b.k.fQt", "QtQt.g.l.b.a.a.m.n.n.n.n.n.n.n.a.a.b.n.o.pQt", "QtQt.d.n.n.b.a.a.q.q.q.q.q.r.a.a.b.s.t.u.v.p", "QtQt.g.w.w.w.b.a.a.w.w.x.x.a.a.b.y.z.A.B.C.p", "QtQt.c.w.w.w.w.b.a.a.w.D.a.a.b.E.F.G.H.u.I.p", "QtQt.c.w.w.w.w.w.b.a.a.D.a.b.J.E.F.G.H.u.I.p", "QtQt.c.w.w.w.w.w.D.b.a.a.b.K.J.E.F.G.H.u.I.p", "QtQt.g.w.w.w.w.w.L.w.a.a.a.M.N.E.O.P.Q.u.I.p", "QtQt.c.w.w.w.w.w.a.a.b.b.a.a.N.E.O.P.Q.u.I.p", "QtQt.c.w.w.w.w.a.a.b.w.L.b.a.a.E.O.P.Q.u.I.p", "QtQt.g.w.w.w.a.a.b.w.w.L.L.b.a.a.R.S.T.B.U.p", "QtQt.V.w.w.a.a.b.L.w.w.L.L.W.b.a.a.X.T.Y.U.p", "QtQt.g.w.a.a.b.w.Z.w.w.Z.Z.0.1.b.a.a.2.3.U.p", "QtQt.4.a.a.b.5.u.B.B.B.B.B.B.u.B.b.a.a.6.7.p", "QtQt.a.a.b.8.8.p.9.9.9.9.9.9#..p##.b.a.a#a.p", "QtQt.a.b#b#b#c.p#d#d#d#d#d#e#f#g#h#i.b.a#j.p", "QtQt#k#l#m#m#n.4#o#o#o#o#o#p#o#p#q#r#s#t.pQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; #endif efax-gtk-3.2.8/src/fax_list_manager_icons.h0000644000175000001440000000404711466007653015622 00000000000000#ifndef FAX_LIST_MANAGER_ICONS_H #define FAX_LIST_MANAGER_ICONS_H /* These icons were taken from those supplied with the hicolor icons and are copyrighted accordingly */ /* XPM */ static const char* folder_xpm[]={ "16 16 52 1", ". c None", "# c #000000", "k c #000000", "a c #000000", "X c #646751", "j c #6e715c", "Q c #8b8f72", "W c #8c9073", "M c #8e9175", "V c #8e9276", "I c #909478", "D c #93967c", "d c #a5a797", "f c #abae99", "i c #b1b49f", "S c #b7baa0", "P c #babda3", "O c #bbbea5", "h c #bcbeaa", "g c #bdc0ad", "L c #bdc1a8", "K c #bfc2ab", "H c #c1c4ad", "G c #c3c6af", "r c #c4c6b6", "C c #c4c8b1", "B c #c6c9b3", "U c #c6c9ba", "A c #c8cbb6", "z c #cacdb9", "y c #ccceba", "x c #ced1bd", "w c #d0d2c0", "v c #d2d4c2", "c c #d3d5ca", "u c #d3d6c4", "t c #d3d6c5", "q c #dfe1d6", "p c #e1e3d8", "o c #e2e4d9", "n c #e4e5db", "b c #e4e5de", "l c #e6e7dd", "T c #e8e8e0", "R c #eceee7", "N c #edeee8", "J c #eff0eb", "E c #f0f0eb", "F c #f0f1ec", "e c #f3f4f0", "m c #f5f6f3", "s c #f7f7f6", "................", "................", "..#aaaa#........", ".#abccda#.......", ".aefghijaaaaaaak", ".almlllnlooppqra", ".astuvwxyzzABCDa", ".aEtuvwxyzzABCDa", ".aFvwxyzABBCGHIa", ".aJxyzABCGGHKLMa", ".aNzABCGHKKLOPQa", ".aRBCGHKLOOPSSQa", ".aTGHKLOPSSSSSQa", ".aUIVMWQQQQQQQXa", ".kaaaaaaaaaaaaak", "................"}; static const char* trash_xpm[]={ "16 18 23 1", ". c None", "n c #000000", "c c #000000", "b c #000000", "u c #000000", "r c #000000", "j c #000000", "p c #000000", "s c #000000", "l c #000000", "t c #000000", "q c #000000", "o c #000000", "m c #000000", "# c #000000", "f c #004040", "e c #404000", "k c #585858", "i c #808080", "d c #a0a0a0", "h c #c3c3c3", "a c #dcdcdc", "g c #ffffff", ".....##a#bc.....", "..###adef####bc.", ".#ggghhhi#hhd#jc", ".#adhggghhkkk#lb", ".bfiaaddddii#mlb", ".n#dddiikkik#opc", "..#dgdaiiikk#qr.", "..#dgdaiiikk#qr.", "..#dgdaiiikk#qr.", "..#dgdaiiikk#qr.", "..#dgdaiiikk#qr.", "..#dgdaiiikk#qr.", "..#dgdaiiikk#qr.", "..#agdaiiikk#qr.", "..b##aaddi##mlb.", "..njs#####moljc.", "...nbpstqqspbc..", ".....nburrbc...."}; #endif efax-gtk-3.2.8/src/socket_server.h0000644000175000001440000000742311543500444013773 00000000000000/* Copyright (C) 2003 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef SOCKET_SERVER_H #define SOCKET_SERVER_H #include "prog_defs.h" #include #include #include #include #include #include #include "utils/sem_sync.h" #include #include #include #include #include #include typedef std::list > FilenamesList; class SocketServer { bool server_running; bool other_sock_client_address; bool ipv6; int serve_sock_fd; unsigned int count; std::string working_dir; Thread::Mutex working_dir_mutex; // make filenames_mutex mutable so that we can use it in // the const member function SocketServer::get_filenames() // we can use a SharedPtr rather than a SharedLockPtr // object here - filenames_mutex will do the locking of the // contained object and we do not actually copy filenames_s // in more than one thread (it is only copied in the main (GUI) // thread) SharedPtr filenames_s; mutable Thread::Mutex filenames_mutex; #if !defined(CGU_USE_AUTO_PTR) && CGU_API_VERSION>=20 std::unique_ptr thread; #else std::auto_ptr thread; #endif Thread::Mutex stdout_mutex; Thread::Mutex fax_to_send_mutex; Notifier socket_error_notify; Notifier stdout_notify; Thread::Cond stdout_cond; Thread::Cond fax_to_send_cond; std::string stdout_text; void write_stdout_from_thread(const char*); void write_stdout_dispatcher_cb(void); std::string port; std::pair fax_to_send; void socket_thread(void); bool make_ipv4_socket(void); bool make_ipv6_socket(void); bool accept_on_client(void); void read_socket(int, int, const char*); void read_queued_faxes(void); void save_queued_faxes(void); bool is_valid_peer(const sockaddr_storage&, socklen_t); void cleanup(void); std::string normalise(const std::string&); std::string normalise_checked(const std::string&); static bool addr_compare(const std::string&, const std::string&); static std::string ascii_to_lower(const std::string&); // this is a concrete class not to be copied or assigned SocketServer(const SocketServer&); void operator=(const SocketServer&); public: // Notifier is a thread safe signal // the main GUI thread should connect to it to be // notified when the server has received a fax which // is to be sent by efax-gtk or a fax has been // removed from the list using SocketServer::remove_file() Notifier filelist_changed_notify; // this signal will also be emitted if the reason for the // change was a fax received from the socket for sending // (the fax particulars can be obtained with get_fax_to_send()) Notifier fax_to_send_notify; EmitterArg stdout_message; void add_file(const std::string&); int remove_file(const std::string&); std::pair, SharedPtr > get_filenames(void) const; std::pair get_fax_to_send(void); bool is_server_running(void) const {return server_running;} bool is_ipv6(void) const {return ipv6;} std::string get_port(void) const {return port;} bool get_other_sock_client_address(void) const {return other_sock_client_address;} int get_count(void) const {return count;} void start(const std::string& port, bool other_sock_client_address, bool ipv6); void stop(void); SocketServer(void); ~SocketServer(void) {if (server_running) stop();} }; #endif efax-gtk-3.2.8/src/file_list.cpp0000644000175000001440000005266011524105116013421 00000000000000/* Copyright (C) 2001 to 2005, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include #include #include "file_list.h" #include "dialogs.h" #include "file_list_icons.h" #include "utils/tree_path_handle.h" #include "utils/toolbar_append_widget.h" #include #include #include #include #ifdef ENABLE_NLS #include #endif int FileListDialog::is_file_list = 0; namespace { namespace ModelColumns { enum {file_name, cols_num}; } // namespace ModelColumns } // anonymous namespace void FileListDialogCB::file_list_dialog_button_clicked(GtkWidget* widget_p, void* data) { FileListDialog* instance_p = static_cast(data); if (widget_p == instance_p->ok_button_p) { instance_p->accepted(instance_p->get_files()); instance_p->close(); } else if (widget_p == instance_p->cancel_button_p) { instance_p->close(); } else if (widget_p == instance_p->up_button_p) { instance_p->move_up(); } else if (widget_p == instance_p->down_button_p) { instance_p->move_down(); } else if (widget_p == instance_p->add_button_p) { instance_p->add_files(); } else if (widget_p == instance_p->view_button_p) { instance_p->view_file(); } else if (widget_p == instance_p->remove_button_p) { instance_p->remove_file_prompt(); } else { write_error("Callback error in FileListDialogCB::file_list_dialog_button_clicked()\n"); instance_p->close(); } } void FileListDialogCB::file_list_dialog_set_buttons(GtkTreeSelection*, void* data) { FileListDialog* instance_p = static_cast(data); // see if anything is selected GtkTreeSelection* selection_p = gtk_tree_view_get_selection(instance_p->tree_view_p); if (gtk_tree_selection_get_selected(selection_p, 0, 0)) { gtk_widget_set_sensitive(instance_p->view_button_p, true); gtk_widget_set_sensitive(instance_p->remove_button_p, true); gtk_button_set_relief(GTK_BUTTON(instance_p->view_button_p), GTK_RELIEF_NORMAL); gtk_button_set_relief(GTK_BUTTON(instance_p->remove_button_p), GTK_RELIEF_NORMAL); } else { gtk_widget_set_sensitive(instance_p->view_button_p, false); gtk_widget_set_sensitive(instance_p->remove_button_p, false); gtk_button_set_relief(GTK_BUTTON(instance_p->view_button_p), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(instance_p->remove_button_p), GTK_RELIEF_NONE); } } FileListDialog::FileListDialog(const int standard_size_, GtkWindow* parent_p): WinBase(gettext("efax-gtk: File list"), prog_config.window_icon_h, true, parent_p), standard_size(standard_size_) { // notify the existence of this object in case I later decide to use this dialog as modeless // by omitting the set_modal() call below is_file_list++; ok_button_p = gtk_button_new_from_stock(GTK_STOCK_OK); cancel_button_p = gtk_button_new_from_stock(GTK_STOCK_CANCEL); up_button_p = gtk_button_new(); down_button_p = gtk_button_new(); add_button_p = gtk_button_new(); view_button_p = gtk_button_new(); remove_button_p = gtk_button_new(); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkWidget* file_list_box_p = gtk_vbox_new(false, 0); GtkTable* table_p = GTK_TABLE(gtk_table_new(5, 2, false)); GtkScrolledWindow* file_list_scrolled_window_p = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(0, 0)); GtkToolbar* toolbar_p = (GTK_TOOLBAR(gtk_toolbar_new())); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(button_box_p), standard_size/2); gtk_scrolled_window_set_shadow_type(file_list_scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(file_list_scrolled_window_p, GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS); // create the tree model and put it in a GobjHandle to handle its // lifetime, because it is not owned by a GTK+ container list_store_h = GobjHandle(GTK_TREE_MODEL(gtk_list_store_new(ModelColumns::cols_num, G_TYPE_STRING))); // create the tree view tree_view_p = GTK_TREE_VIEW(gtk_tree_view_new_with_model(list_store_h)); gtk_container_add(GTK_CONTAINER(file_list_scrolled_window_p), GTK_WIDGET(tree_view_p)); // provide a renderer for tree view, pack into tree view column // and connect to the tree model column GtkCellRenderer* renderer_p = gtk_cell_renderer_text_new(); GtkTreeViewColumn* column_p = gtk_tree_view_column_new_with_attributes(gettext("Files to fax"), renderer_p, "text", ModelColumns::file_name, static_cast(0)); gtk_tree_view_append_column(tree_view_p, column_p); GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); // single line selection gtk_tree_selection_set_mode(selection_p, GTK_SELECTION_SINGLE); // make drag and drop work gtk_tree_view_set_reorderable(tree_view_p, true); // set up the tool bar #if GTK_CHECK_VERSION(2,16,0) gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar_p), GTK_ORIENTATION_HORIZONTAL); #else gtk_toolbar_set_orientation(toolbar_p, GTK_ORIENTATION_HORIZONTAL); #endif gtk_toolbar_set_style(toolbar_p, GTK_TOOLBAR_ICONS); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(view_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(view_button_p), image_p); } toolbar_append_widget(toolbar_p, view_button_p, gettext("View selected file")); gtk_widget_set_sensitive(view_button_p, false); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(remove_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(remove_button_p), image_p); } toolbar_append_widget(toolbar_p, remove_button_p, gettext("Remove selected file from list")); gtk_widget_set_sensitive(remove_button_p, false); GtkWidget* add_hbox_p = gtk_hbox_new(false, 0); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(add_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); GtkWidget* label_p = gtk_label_new(gettext("Add files to list")); gtk_box_pack_start(GTK_BOX(add_hbox_p), image_p, false, false, 4); gtk_box_pack_start(GTK_BOX(add_hbox_p), label_p, false, false, 4); gtk_container_add(GTK_CONTAINER(add_button_p), add_hbox_p); } toolbar_append_widget(toolbar_p, add_button_p, gettext("Add files to the file list for faxing")); // bring up the icon size registered in MainWindow::MainWindow() GtkIconSize efax_gtk_button_size = gtk_icon_size_from_name("EFAX_GTK_BUTTON_SIZE"); image_p = gtk_image_new_from_stock(GTK_STOCK_GO_UP, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(up_button_p), image_p); image_p = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(down_button_p), image_p); gtk_widget_set_tooltip_text(up_button_p, gettext("Move file up")); gtk_widget_set_tooltip_text(down_button_p, gettext("Move file down")); gtk_container_add(GTK_CONTAINER(button_box_p), cancel_button_p); gtk_container_add(GTK_CONTAINER(button_box_p), ok_button_p); GtkWidget* dummy1_p = gtk_label_new(0); GtkWidget* dummy2_p = gtk_label_new(0); gtk_table_attach(table_p, dummy1_p, 0, 1, 0, 1, GTK_SHRINK, GTK_EXPAND, 0, 0); gtk_table_attach(table_p, up_button_p, 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, standard_size/2, standard_size/3); gtk_table_attach(table_p, down_button_p, 0, 1, 2, 3, GTK_SHRINK, GTK_SHRINK, standard_size/2, standard_size/3); gtk_table_attach(table_p, dummy2_p, 0, 1, 3, 4, GTK_SHRINK, GTK_EXPAND, 0, 0); gtk_table_attach(table_p, GTK_WIDGET(file_list_scrolled_window_p), 1, 2, 0, 4, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/3, standard_size/3); gtk_table_attach(table_p, button_box_p, 0, 2, 4, 5, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); gtk_box_pack_start(GTK_BOX(file_list_box_p), GTK_WIDGET(toolbar_p), false, false, 0); gtk_box_pack_start(GTK_BOX(file_list_box_p), GTK_WIDGET(table_p), true, true, 0); g_signal_connect(G_OBJECT(ok_button_p), "clicked", G_CALLBACK(FileListDialogCB::file_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(cancel_button_p), "clicked", G_CALLBACK(FileListDialogCB::file_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(up_button_p), "clicked", G_CALLBACK(FileListDialogCB::file_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(down_button_p), "clicked", G_CALLBACK(FileListDialogCB::file_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(add_button_p), "clicked", G_CALLBACK(FileListDialogCB::file_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(view_button_p), "clicked", G_CALLBACK(FileListDialogCB::file_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(remove_button_p), "clicked", G_CALLBACK(FileListDialogCB::file_list_dialog_button_clicked), this); // now connect up the signal which indicates a selection has been made selection_p = gtk_tree_view_get_selection(tree_view_p); g_signal_connect(G_OBJECT(selection_p), "changed", G_CALLBACK(FileListDialogCB::file_list_dialog_set_buttons), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(ok_button_p, true); gtk_widget_set_can_default(cancel_button_p, true); gtk_widget_set_can_focus(up_button_p, false); gtk_widget_set_can_focus(down_button_p, false); #else GTK_WIDGET_SET_FLAGS(ok_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(cancel_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_UNSET_FLAGS(up_button_p, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(down_button_p, GTK_CAN_FOCUS); #endif gtk_container_set_border_width(GTK_CONTAINER(table_p), standard_size/3); gtk_container_add(GTK_CONTAINER(get_win()), file_list_box_p); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_default_size(get_win(), standard_size * 15, standard_size * 12); gtk_toolbar_set_show_arrow(GTK_TOOLBAR(toolbar_p), false); gtk_widget_show_all(GTK_WIDGET(get_win())); gtk_button_set_relief(GTK_BUTTON(add_button_p), GTK_RELIEF_NORMAL); gtk_widget_set_sensitive(add_button_p, true); // not needed if gtk_toolbar_set_show_arrow() has been set false /* gtk_widget_set_size_request(GTK_WIDGET(toolbar_p), add_button_p->allocation.width + view_button_p->allocation.width + remove_button_p->allocation.width + 12, add_button_p->allocation.height); */ } FileListDialog::~FileListDialog(void) { // notify the destruction of this object is_file_list--; } std::string FileListDialog::get_files(void) { std::string text; GtkTreeIter row_iter; bool result = gtk_tree_model_get_iter_first(list_store_h, &row_iter); while (result) { gchar* file_name_p = 0; gtk_tree_model_get(list_store_h, &row_iter, ModelColumns::file_name, &file_name_p, -1); if (file_name_p) text += file_name_p; // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(file_name_p); result = gtk_tree_model_iter_next(list_store_h, &row_iter); if (result) text += ", "; } return text; } void FileListDialog::move_up(void) { GtkTreeIter selected_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &selected_iter)) { TreePathScopedHandle path_h(gtk_tree_model_get_path(model_p, &selected_iter)); if (gtk_tree_path_prev(path_h)) { GtkTreeIter prev_iter; if (!gtk_tree_model_get_iter(model_p, &prev_iter, path_h)) { write_error("Iterator error in FileListDialog::move_up()\n"); beep(); } else { gchar* selected_name_p; gchar* prev_name_p; // just do a swap of values gtk_tree_model_get(model_p, &selected_iter, ModelColumns::file_name, &selected_name_p, -1); gtk_tree_model_get(model_p, &prev_iter, ModelColumns::file_name, &prev_name_p, -1); gtk_list_store_set(GTK_LIST_STORE(model_p), &selected_iter, ModelColumns::file_name, prev_name_p, -1); gtk_list_store_set(GTK_LIST_STORE(model_p), &prev_iter, ModelColumns::file_name, selected_name_p, -1); // we have not placed the gchar* strings given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free them by hand g_free(selected_name_p); g_free(prev_name_p); gtk_tree_selection_select_iter(selection_p, &prev_iter); } } else beep(); } else beep(); } void FileListDialog::move_down(void) { GtkTreeIter selected_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &selected_iter)) { GtkTreeIter next_iter = selected_iter;; if (gtk_tree_model_iter_next(model_p, &next_iter)) { gchar* selected_name_p = 0; gchar* next_name_p = 0; // just do a swap of values gtk_tree_model_get(model_p, &selected_iter, ModelColumns::file_name, &selected_name_p, -1); gtk_tree_model_get(model_p, &next_iter, ModelColumns::file_name, &next_name_p, -1); gtk_list_store_set(GTK_LIST_STORE(model_p), &selected_iter, ModelColumns::file_name, next_name_p, -1); gtk_list_store_set(GTK_LIST_STORE(model_p), &next_iter, ModelColumns::file_name, selected_name_p, -1); // we have not placed the gchar* strings given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free them by hand g_free(selected_name_p); g_free(next_name_p); gtk_tree_selection_select_iter(selection_p, &next_iter); } else beep(); } else beep(); } void FileListDialog::add_files(void) { FileReadSelectDialog file_dialog(standard_size, true, get_win()); file_dialog.exec(); std::vector file_result = file_dialog.get_result(); if (!file_result.empty()) { std::for_each(file_result.begin(), file_result.end(), MemFun::make(*this, &FileListDialog::add_file_item)); } } void FileListDialog::add_file_item(const std::string& item) { GtkTreeIter row_iter; gtk_list_store_append(GTK_LIST_STORE(list_store_h.get()), &row_iter); gtk_list_store_set(GTK_LIST_STORE(list_store_h.get()), &row_iter, ModelColumns::file_name, item.c_str(), -1); } std::pair FileListDialog::get_view_file_parms(const std::string& file_name) { std::vector view_parms; std::string view_cmd; std::string view_name; std::string::size_type end_pos; try { // lock the Prog_config object to stop it being accessed in // FaxListDialog::get_ps_viewer_parms() while we are accessing it here // (this is ultra cautious as it is only copied/checked for emptiness // there, and the GUI interface is insensitive if we are here) Thread::Mutex::Lock lock(*prog_config.mutex_p); view_cmd = Utf8::filename_from_utf8(prog_config.ps_view_cmd); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in FileListDialog::get_view_file_parms()\n"); return std::pair(static_cast(0), static_cast(0)); } if ((end_pos = view_cmd.find_first_of(' ')) != std::string::npos) { // we have parms view_name.assign(view_cmd, 0, end_pos); view_parms.push_back(view_name); // find start of next parm std::string::size_type start_pos = view_cmd.find_first_not_of(' ', end_pos); while (start_pos != std::string::npos) { end_pos = view_cmd.find_first_of(' ', start_pos); if (end_pos != std::string::npos) { view_parms.push_back(view_cmd.substr(start_pos, end_pos - start_pos)); start_pos = view_cmd.find_first_not_of(' ', end_pos); // prepare for next interation } else { view_parms.push_back(view_cmd.substr(start_pos, view_cmd.size() - start_pos)); start_pos = end_pos; } } } else { // just a view command without parameters to be passed view_name = view_cmd; view_parms.push_back(view_name); } view_parms.push_back(file_name); char** exec_parms = new char*[view_parms.size() + 1]; char** temp_pp = exec_parms; std::vector::const_iterator iter; for (iter = view_parms.begin(); iter != view_parms.end(); ++iter, ++temp_pp) { *temp_pp = new char[iter->size() + 1]; std::strcpy(*temp_pp, iter->c_str()); } *temp_pp = 0; char* prog_name = new char[view_name.size() + 1]; std::strcpy(prog_name, view_name.c_str()); return std::pair(prog_name, exec_parms); } void FileListDialog::view_file(void) { bool is_ps_view_cmd_empty; { // lock the Prog_config object to stop it being accessed in // FaxListDialog::get_ps_viewer_parms() while we are accessing it here // (this is ultra cautious as it is only copied/checked for emptiness // there, and the GUI interface is insensitive if we are here) Thread::Mutex::Lock lock(*prog_config.mutex_p); is_ps_view_cmd_empty = prog_config.ps_view_cmd.empty(); } GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (!is_ps_view_cmd_empty && gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { std::string file_name; try { gchar* name_p = 0; gtk_tree_model_get(model_p, &row_iter, ModelColumns::file_name, &name_p, -1); // place name_p in a handle class in case Utf8::filename_from_utf8() throws GcharScopedHandle name_h(name_p); name_p = 0; // we don't need it any more if (name_h.get()) file_name = Utf8::filename_from_utf8(name_h.get()); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in FileListDialog::view_file()\n"); beep(); return; } // get the arguments for the exec() call below (because this is a // multi-threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) std::pair view_file_parms(get_view_file_parms(file_name)); if (view_file_parms.first) { // this will be 0 if get_view_file_parms() // threw a Utf8::ConversionError) pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); std::exit(FORK_ERROR); } if (!pid) { // child process - as soon as everything is set up we are going to do an exec() connect_to_stderr(); execvp(view_file_parms.first, view_file_parms.second); // if we reached this point, then the execvp() call must have failed // report error and end process - use _exit() and not exit() write_error("Can't find the postscript viewer program - please check your installation\n" "and the PATH environmental variable\n"); _exit(0); } // end of view program process // release the memory allocated on the heap for // the redundant view_file_parms // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(view_file_parms); } } } void FileListDialog::delete_parms(std::pair parms_pair) { delete[] parms_pair.first; char* const* temp_pp = parms_pair.second; for(; *temp_pp != 0; ++temp_pp) { delete[] *temp_pp; } delete[] parms_pair.second; } void FileListDialog::remove_file_prompt(void) { GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { gchar* name_p = 0; gtk_tree_model_get(model_p, &row_iter, ModelColumns::file_name, &name_p, -1); std::string msg(gettext("Remove file ")); if (name_p) msg += name_p; msg += gettext(" from the list?"); // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free them by hand g_free(name_p); PromptDialog* dialog_p = new PromptDialog(msg.c_str(), gettext("Remove file"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &FileListDialog::remove_file)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } } void FileListDialog::remove_file(void) { GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { gtk_list_store_remove(GTK_LIST_STORE(model_p), &row_iter); } } efax-gtk-3.2.8/src/efax_controller.cpp0000644000175000001440000013427611524216534014650 00000000000000/* Copyright (C) 2001 to 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "efax_controller.h" #include "fax_list_manager.h" #include "settings.h" #include #include #include #include #include #include #include #include #ifdef HAVE_STREAM_IMBUE #include #endif #ifdef ENABLE_NLS #include #endif // there can be certain circumstances where PIPE_BUF is not // defined in . If so, just define the minimum // required by POSIX #ifndef PIPE_BUF #define PIPE_BUF 512 #endif // the headers on one of my machines does not properly include the declaration // of getpgid() for some reason, so declare it here explicitly extern "C" pid_t getpgid(pid_t); EfaxController::EfaxController(const int size): standard_size(size), state(inactive), close_down(false), received_fax_count(0), redial_queue(standard_size) { // set up state_messages state_messages.push_back(gettext("Inactive")); state_messages.push_back(gettext("Sending fax")); state_messages.push_back(gettext("Answering call")); state_messages.push_back(gettext("Answering call")); state_messages.push_back(gettext("Standing by to receive calls")); state_messages.push_back(gettext("Sending fax")); state_messages.push_back(gettext("Sending fax")); } void EfaxController::efax_closedown(void) { if (state == inactive) ready_to_quit_notify(); else if (!close_down) { close_down = true; stop(); } } void EfaxController::init_sendfax_parms(void) { // we do not need a mutex when accessing efax_parms_vec. It is only // accessed in init_sendfax_parms() and init_receive_parms() (in the // GUI thread) followed by sendfax_thread() or receive_thread() (in // a worker thread) and cannot then be accessed by any thread until // child_ended_cb() has been called via Callback::post(), which will // have forced memory synchronisation efax_parms_vec = prog_config.parms; // now add the first set of arguments to the copy of prog_config.parms // in efax_parms_vec struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); char date_string[150]; // create the date and time in an internationally acceptable // numeric (ASCII) only character format which efax can make sense of const char format[] = "%Y-%m-%d %H:%M"; std::strftime(date_string, sizeof(date_string), format, time_p); std::string temp("-h"); temp += date_string; temp += " "; temp += prog_config.my_name; temp += " ("; temp += prog_config.my_number + ") --> "; if (prog_config.addr_in_header) temp += last_fax_item_sent.number; temp += " %d/%d"; efax_parms_vec.push_back(temp); if (last_fax_item_sent.number.empty()) { efax_parms_vec.push_back("-jX3"); efax_parms_vec.push_back("-t"); efax_parms_vec.push_back(""); } else { temp = "-t"; if (prog_config.tone_dial) temp += 'T'; else temp += 'P'; temp += last_fax_item_sent.number; efax_parms_vec.push_back(temp); } } void EfaxController::sendfax_impl(const Fax_item& fax_item, bool in_child_ended_cb, bool in_redial_cb) { if (state == receive_standby) { if (!is_receiving_fax()) { last_fax_item_sent = fax_item; state = start_send_on_standby; kill_child(); } else { if (in_redial_cb) { // just start another timeout start_redial_timeout(fax_item); } else { if (prog_config.redial) { write_error(gettext("Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n")); start_redial_timeout(fax_item); } else { write_error(gettext("Cannot send fax - a fax is being received\n")); } } } } // the in_child_ended_cb argument is a guard. It stops a user, by pressing the // Send button, from starting a new fax send in start_send_on_standby mode // before the listening child process has terminated and been cleaned up: we // we can only do that via EfaxController::child_ended_cb() else if (state == inactive || (in_child_ended_cb && state == start_send_on_standby)) { stdout_pipe.open(PipeFifo::non_block); // efax is sensitive to timing, so set pipe write to non-block also stdout_pipe.make_write_non_block(); if (state == inactive) { state = sending; last_fax_item_sent = fax_item; } // else state == start_send_on_standby - we don't need to assign to // last_fax_item_sent in this case as it has already been done in the // 'if' block opening this function on the previous call to this function else state = send_on_standby; display_state(); // get the first set of arguments for the exec() call in sendfax_thread (because // this is a multi-threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) // the arguments are loaded into the EfaxController object member efax_parms_vec init_sendfax_parms(); // now launch a worker thread to make up the fax pages in tiffg3 format // for sending by efax - if the fax is correctly made up, the worker thread // will invoke efax and sends the fax, and when the fax has been sent (or // sending has failed) it will post child_ended_cb() to clean up, which will // execute in this initial (GUI) thread. If the fax is not correctly make // up, the worker thread will post no_fax_made_cb() which will execute in // this initial (GUI) thread so as to clean up correctly // first block off the signals for which we have set handlers so that the worker // thread does not receive the signals, otherwise we will have memory synchronisation // issues in multi-processor systems - we will unblock in the initial (GUI) thread // as soon as the worker thread has been launched sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); pthread_sigmask(SIG_BLOCK, &sig_mask, 0); if (!Thread::Thread::start(Callback::make(*this, &EfaxController::sendfax_thread, in_redial_cb), false).get()) { write_error("Cannot start thread to make fax for sending\n"); stdout_pipe.close(); state = inactive; display_state(); } // now unblock signals so that the initial (GUI) thread can receive them pthread_sigmask(SIG_UNBLOCK, &sig_mask, 0); } else { beep(); if (prog_config.redial) { // we cannot reach here via redial_cb() // (state must be 'receive_standby' or // 'inactive' to do that) so this is the // first attempt to send write_error(gettext("Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n")); start_redial_timeout(fax_item); } } } void EfaxController::no_fax_made_cb(void) { cleanup_fax_send_fail(); stdout_pipe.close(); State state_val = state; state = inactive; if (state_val == send_on_standby) receive(receive_standby); // we don't need to call display_state() if we have called receive(), as // receive() will call display_state() itself else display_state(); } std::pair EfaxController::get_gs_parms(const std::string& basename) { std::vector parms; { // scope block for mutex lock // lock the Prog_config object to stop it being modified in the intial (GUI) thread // while we are accessing it here Thread::Mutex::Lock lock(*prog_config.mutex_p); std::string temp; parms.push_back("gs"); parms.push_back("-q"); parms.push_back("-sDEVICE=tiffg3"); parms.push_back("-dMaxStripSize=0"); temp = "-r"; temp += prog_config.resolution; parms.push_back(temp); parms.push_back("-dNOPAUSE"); parms.push_back("-dSAFER"); temp = "-sOutputFile="; temp += basename + ".%03d"; parms.push_back(temp); temp = "-sPAPERSIZE="; temp += prog_config.page_size; parms.push_back(temp); parms.push_back(basename); } char** exec_parms = new char*[parms.size() + 1]; std::vector::const_iterator iter; char** temp_pp = exec_parms; for (iter = parms.begin(); iter != parms.end(); ++iter, ++temp_pp) { *temp_pp = new char[iter->size() + 1]; std::strcpy(*temp_pp, iter->c_str()); } *temp_pp = 0; char* prog_name = new char[std::strlen("gs") + 1]; std::strcpy(prog_name, "gs"); return std::pair(prog_name, exec_parms); } void EfaxController::sendfax_thread(bool redialling) { // convert the postscript file(s) into tiffg3 fax files, beginning at [filename].001 // we will use ghostscript. we will also load the results into efax_parms_vec try { std::for_each(last_fax_item_sent.file_list.begin(), last_fax_item_sent.file_list.end(), MemFun::make(*this, &EfaxController::ps_file_to_tiff_files)); } catch (const std::string& msg) { // cause no_fax_made_cb to be executed in the initial (GUI) thread // for clean up and then end this worker thread // it is safe not to use a Releaser object here because the MainWindow // object, and so this object, exists throughout execution of the glib // main loop // if we are redialling a fax received from the print system // and that fax has been deleted via the socket list dialog, // then just treat it as cancelled and don't print a diagnostic if (!redialling || !last_fax_item_sent.is_socket_file) write_error(msg.c_str()); Callback::post(Callback::make(*this, &EfaxController::no_fax_made_cb)); return; } // we have now made the fax pages in tiffg3 format and entered // them into efax_parms_vec. // get the arguments for the exec() call below (because this is a // multi-threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) std::pair exec_parms(get_efax_parms()); // set up a synchronising pipe in case the child process finishes before // fork() in parent space has returned (yes, with an exec() error that can // happen with Linux kernel 2.6) SyncPipe sync_pipe; pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); std::exit(FORK_ERROR); } if (!pid) { // child process - as soon as everything is set up we are going to do an exec() // unblock signals as these are blocked for all worker threads // (the child process inherits the signal mask of the thread // creating it with the fork() call) sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); // this child process is single threaded, so we can use sigprocmask() // rather than pthread_sigmask() (and should do so as sigprocmask() // is guaranteed to be async-signal-safe) // this process will not be receiving interrupts so we do not need // to test for EINTR on the call to sigprocmask() sigprocmask(SIG_UNBLOCK, &sig_mask, 0); // now we have forked, we can connect stdout_pipe to stdout // and connect MainWindow::error_pipe to stderr stdout_pipe.connect_to_stdout(); connect_to_stderr(); // wait before we call execvp() until the parent process has set itself up // and releases this process sync_pipe.wait(); execvp(exec_parms.first, exec_parms.second); // if we reached this point, then the execvp() call must have failed // report error and exit - uses _exit() and not exit() write_error("Can't find the efax-0.9a program - please check your installation\n" "and the PATH environmental variable\n"); _exit(EXEC_ERROR); } // end of child process // this is the parent process { // use a mutex because we may access prog_config.efax_controller_child_pid // in kill_child() before a call to Callback::post() has forced memory // synchronisation Thread::Mutex::Lock lock(*prog_config.mutex_p); prog_config.efax_controller_child_pid = pid; } stdout_pipe.make_readonly(); // since the pipe is unidirectional, we can close the write fd join_child(); // now we have set up, release the child process sync_pipe.release(); // release the memory allocated on the heap for // the redundant exec_parms pair // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(exec_parms); // now wait for the child process to terminate so we can post to child_ended_cb() pid_t ret; int status; do { ret = waitpid(pid, &status, 0); } while (ret == -1 && errno == EINTR); int exit_code = -1; if (ret != -1 && WIFEXITED(status)) exit_code = WEXITSTATUS(status); Callback::post(Callback::make(*this, &EfaxController::child_ended_cb, exit_code)); } // throws bool if there is an error void EfaxController::ps_file_to_tiff_files(const std::string& filename) { std::string::size_type pos = filename.find_last_of('/'); if (pos == std::string::npos || pos + 2 > filename.size()) { throw std::string(gettext("Not valid file name\n")); } else if (access(filename.c_str(), F_OK)) { throw std::string(gettext("File does not exist\n")); } else if (access(filename.c_str(), R_OK)) { throw std::string(gettext("User does not have read permission on the file\n")); } // unfortunately ghostscript does not handle long file names // so we need to separate the file name from the full path (we will chdir() to the directory later) // pos is already set to the position of the last '/' character std::string dirname(filename.substr(0, pos)); pos++; std::string basename(filename.substr(pos)); // get the arguments for the exec() call below (because this is a // multi-threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) std::pair gs_parms(get_gs_parms(basename)); pid_t pid = fork(); if (pid == -1) { write_error("Fork error\n"); std::exit(FORK_ERROR); } if (!pid) { // child process // unblock signals as these are blocked for all worker threads // (the child process inherits the signal mask of the thread // creating it with the fork() call) sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); // this child process is single threaded, so we can use sigprocmask() // rather than pthread_sigmask() (and should do so as sigprocmask() // is guaranteed to be async-signal-safe) // this process will not be receiving interrupts so we do not need // to test for EINTR on the call to sigprocmask() sigprocmask(SIG_UNBLOCK, &sig_mask, 0); connect_to_stderr(); int fd = open("/dev/null", O_RDWR); if (fd == -1) { write_error("Cannot open /dev/null in EfaxController::ps_file_to_tiff_files()\n"); // in case of error end child process here _exit(FILEOPEN_ERROR); } dup2(fd, 0); // now close stdout dup2(fd, 1); close(fd); // now stdin and stdout read/write to /dev/null, we can close the /dev/null file descriptor // unfortunately ghostscript does not handle long file names // so we need to chdir() chdir(dirname.c_str()); execvp(gs_parms.first, gs_parms.second); // if we reached this point, then the execvp() call must have failed write_error("Can't find the ghostscript program - please check your installation\n" "and the PATH environmental variable\n"); // this child process must end here - use _exit() not exit() _exit(EXEC_ERROR); } // end of child process // this is the parent process // release the memory allocated on the heap for // the redundant gs_parms // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(gs_parms); // wait for the child process to terminate pid_t ret; int status; do { ret = waitpid(pid, &status, 0); } while (ret == -1 && errno == EINTR); if (ret == -1 || !WIFEXITED(status)) { throw std::string(gettext("Not valid postscript/PDF file\n")); } // now enter the names of the created files in efax_parms_vec bool valid_file = false; int partnumber = 1; std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE strm << filename << '.' << std::setfill('0') << std::setw(3) << partnumber; int result = access(strm.str().c_str(), R_OK); while (!result) { // file OK // valid_file only needs to be set true once, but it is more // convenient to do it in this loop valid_file = true; // we do not need a mutex when accessing efax_parms_vec. It is only // accessed in init_sendfax_parms() and init_receive_parms() (in the // GUI thread) followed by sendfax_thread() or receive_thread() (in // a worker thread) and cannot then be accessed by any thread until // child_ended_cb() has been called via Callback::post(), which will // have forced memory synchronisation efax_parms_vec.push_back(strm.str()); partnumber++; strm.str(""); strm << filename << '.' << std::setfill('0') << std::setw(3) << partnumber; result = access(strm.str().c_str(), R_OK); } if (!valid_file) { throw std::string(gettext("Not valid postscript/PDF file\n")); } } void EfaxController::init_receive_parms(State mode) { // we do not need a mutex when accessing efax_parms_vec. It is only // accessed in init_sendfax_parms() and init_receive_parms() (in the // GUI thread) followed by sendfax_thread() or receive_thread() (in // a worker thread) and cannot then be accessed by any thread until // child_ended_cb() has been called via Callback::post(), which will // have forced memory synchronisation efax_parms_vec = prog_config.parms; // now add the first set of arguments to the copy of prog_config.parms // in efax_parms_vec efax_parms_vec.push_back("-rcurrent"); if (mode == receive_takeover) efax_parms_vec.push_back("-w"); else if (mode == receive_standby) { std::string temp = "-jS0="; temp += prog_config.rings; efax_parms_vec.push_back(temp); efax_parms_vec.push_back("-s"); efax_parms_vec.push_back("-w"); } } void EfaxController::receive(State mode) { // check pre-conditions if (state != inactive) { beep(); return; } if (prog_config.working_dir.empty()) { write_error(gettext("You don't have the $HOME environmental variable set\n")); beep(); return; } // now proceed to put the program in receive mode std::string fax_pathname(prog_config.working_dir); fax_pathname += "/faxin/current"; ScopedHandle fax_pathname_h(new char[fax_pathname.size() + 1]); std::strcpy(fax_pathname_h.get(), fax_pathname.c_str()); if (mkdir(fax_pathname_h.get(), S_IRUSR | S_IWUSR | S_IXUSR) == -1) { write_error(gettext("SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n")); } else { stdout_pipe.open(PipeFifo::non_block); // efax is sensitive to timing, so set pipe write to non-block also stdout_pipe.make_write_non_block(); state = mode; display_state(); // get the first set of arguments for the exec() call in receive_thread (because // this is a multi-threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) // the arguments are loaded into the EfaxController object member efax_parms_vec init_receive_parms(mode); // now launch a worker thread to invoke efax and receive a fax. When a fax // has been sent (or a receiving session has been stopped or failed) it will // post child_ended_cb() to clean up, which will execute in this initial (GUI) // thread. // first block off the signals for which we have set handlers so that the worker // thread does not receive the signals, otherwise we will have memory synchronisation // issues in multi-processor systems - we will unblock in the initial (GUI) thread // as soon as the worker thread has been launched sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); pthread_sigmask(SIG_BLOCK, &sig_mask, 0); const char* thread_arg = fax_pathname_h.release(); if (!Thread::Thread::start(Callback::make(*this, &EfaxController::receive_thread, thread_arg), false).get()) { write_error("Cannot start thread to receive fax\n"); stdout_pipe.close(); state = inactive; delete thread_arg; display_state(); } // now unblock signals so that the initial (GUI) thread can receive them pthread_sigmask(SIG_UNBLOCK, &sig_mask, 0); } } void EfaxController::receive_thread(const char* pathname_p) { ScopedHandle pathname_h(pathname_p); // get the arguments for the exec() call below (because this is a // multi-threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) std::pair exec_parms(get_efax_parms()); // set up a synchronising pipe in case the child process finishes before // fork() in parent space has returned (yes, with an exec() error that can // happen with Linux kernel 2.6) SyncPipe sync_pipe; pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); std::exit(FORK_ERROR); } if (!pid) { // child process - as soon as everything is set up we are going to do an exec() // unblock signals as these are blocked for all worker threads // (the child process inherits the signal mask of the thread // creating it with the fork() call) sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); // this child process is single threaded, so we can use sigprocmask() // rather than pthread_sigmask() (and should do so as sigprocmask() // is guaranteed to be async-signal-safe) // this process will not be receiving interrupts so we do not need // to test for EINTR on the call to sigprocmask() sigprocmask(SIG_UNBLOCK, &sig_mask, 0); // now we have forked, we can connect stdout_pipe to stdout // and connect MainWindow::error_pipe to stderr stdout_pipe.connect_to_stdout(); connect_to_stderr(); chdir(pathname_h.get()); // wait before we call execvp() until the parent process has set itself up // and releases this process sync_pipe.wait(); execvp(exec_parms.first, exec_parms.second); // if we reached this point, then the execvp() call must have failed // report the error and end this process - use _exit() and not exit() write_error("Can't find the efax-0.9a program - please check your installation\n" "and the PATH environmental variable\n"); _exit(EXEC_ERROR); } // end of child process // this is the parent process { // use a mutex because we may access prog_config.efax_controller_child_pid // in kill_child() before a call to Callback::post() has forced memory // synchronisation Thread::Mutex::Lock lock(*prog_config.mutex_p); prog_config.efax_controller_child_pid = pid; } stdout_pipe.make_readonly(); // since the pipe is unidirectional, we can close the write fd join_child(); // now we have set up, release the child process sync_pipe.release(); // release the memory allocated on the heap for // the redundant exec_parms pair // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(exec_parms); // now wait for the child process to terminate so we can post to child_ended_cb() pid_t ret; int status; do { ret = waitpid(pid, &status, 0); } while (ret == -1 && errno == EINTR); int exit_code = -1; if (ret != -1 && WIFEXITED(status)) exit_code = WEXITSTATUS(status); Callback::post(Callback::make(*this, &EfaxController::child_ended_cb, exit_code)); } std::pair EfaxController::get_efax_parms(void) { // efax_parms_vec has already been filled by init_sendfax_parms() and // ps_file_to_tiff_files() if sending, or by init_receive_parms() if // receiving - so make up the C style arrays for the execvp() call in // sendfax_thread() and receive_thread() char** exec_parms = new char*[efax_parms_vec.size() + 1]; std::vector::const_iterator iter; char** temp_pp = exec_parms; for (iter = efax_parms_vec.begin(); iter != efax_parms_vec.end(); ++iter, ++temp_pp) { *temp_pp = new char[iter->size() + 1]; std::strcpy(*temp_pp, iter->c_str()); } *temp_pp = 0; char* prog_name = new char[std::strlen("efax-0.9a") + 1]; std::strcpy(prog_name, "efax-0.9a"); return std::pair(prog_name, exec_parms); } void EfaxController::delete_parms(std::pair parms_pair) { delete[] parms_pair.first; char* const* temp_pp = parms_pair.second; for(; *temp_pp != 0; ++temp_pp) { delete[] *temp_pp; } delete[] parms_pair.second; } void EfaxController::stop(void) { if (state != inactive) { stdout_message(gettext("\n*** Stopping send/receive session ***\n\n")); kill_child(); } else beep(); } void EfaxController::child_ended_cb(int exit_code) { // if a fax list is in the process of being constructed, we need to wait until // construction has completed before acting on efax exit status, so reload the // event in the glib main loop (we might have reached here through the call to // gtk_main_iteration() in FaxListManager::populate_fax_list()) if (FaxListManager::is_fax_received_list_main_iteration() || FaxListManager::is_fax_sent_list_main_iteration()) { Callback::post(Callback::make(*this, &EfaxController::child_ended_cb, exit_code)); return; } // preconditions are OK - proceed // we don't need a mutex here - memory will have synchronised through the // call to Callback::post() and we don't now have a worker thread running prog_config.efax_controller_child_pid = 0; // this won't work if efax is suid root and we are not root if (!prog_config.lock_file.empty()) unlink(prog_config.lock_file.c_str()); bool restart_standby = false; bool end_receive = false; switch(state) { case EfaxController::sending: case EfaxController::send_on_standby: if (!exit_code) { std::pair fax_info(save_sent_fax()); // notify that the fax has been sent if (!fax_info.first.empty()) fax_sent_notify(fax_info); if (last_fax_item_sent.is_socket_file) { // if we are sending a print job via the socket server, notify the // SocketServer object which created the temporary file (the server // object will clean up by deleting it and also cause the socket // file list to be updated - we do not need to do that here) remove_from_socket_server_filelist(last_fax_item_sent.file_list[0]); } } else { cleanup_fax_send_fail(); if (exit_code == 1 && prog_config.redial) start_redial_timeout(last_fax_item_sent); } unjoin_child(); { State state_val = state; state = inactive; if (state_val == send_on_standby && !close_down) { receive(receive_standby); } // we do not need to call display_state() if we have called receive(), as // receive() will call display_state() itself else display_state(); } break; case EfaxController::start_send_on_standby: receive_cleanup(); unjoin_child(); if (!close_down) sendfax_impl(last_fax_item_sent, true, false); else { state = inactive; display_state(); } break; case EfaxController::receive_standby: if ((!exit_code || exit_code == 3) && !close_down) { restart_standby = true; } else end_receive = true; break; default: if (state != inactive) end_receive = true; break; } if (end_receive || restart_standby) { receive_cleanup(); unjoin_child(); state = inactive; // this is needed even if we are going to call receive() // now restart if in standby mode if (restart_standby) receive(receive_standby); // we do not need to call display_state() if we have called receive(), as // receive() will call display_state() itself (calling display_state() will // also update the received fax count displayed in the tray icon tooltip if we are // in receive_standby mode - this will appear in the tray_item tooltip, because // TrayIcon::set_tooltip_cb() is connected to the write_state signal in the // MainWindow::MainWindow() constructor) else display_state(); restart_standby = false; end_receive = false; } if (close_down && state == inactive) ready_to_quit_notify(); } void EfaxController::receive_cleanup(void) { // delete the "current" receive directory if it is empty std::string full_dirname(prog_config.working_dir); full_dirname += "/faxin/current"; int result = rmdir(full_dirname.c_str()); // only deletes the directory if it is empty if (result == -1 && errno == ENOTEMPTY) { // before assuming a fax has been successfully received, check to see // if current.001 is of 0 size (if it is delete it) struct stat statinfo; std::string file_name(full_dirname); file_name += "/current.001"; if (!stat(file_name.c_str(), &statinfo) && !statinfo.st_size) { unlink(file_name.c_str()); rmdir(full_dirname.c_str()); } else { // we have received a fax - save it std::pair fax_info(save_received_fax()); // notify that the fax has been received if (!fax_info.first.empty()) { received_fax_count++; fax_received_notify(fax_info); } } } } std::pair EfaxController::save_received_fax(void) { char faxname[18]; *faxname = 0; // get a time value to create the directory name into which the fax is to be saved struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); std::string new_dirname(prog_config.working_dir); new_dirname += "/faxin/"; const char format[] = "%Y%m%d%H%M%S"; std::strftime(faxname, sizeof(faxname), format, time_p); std::string temp(new_dirname); temp += faxname; // check whether directory already exists or can't be created int count; for (count = 0; count < 4 && mkdir(temp.c_str(), S_IRUSR | S_IWUSR | S_IXUSR); count++) { // it is not worth checking for a short sleep because of a signal as we will // repeat the attempt four times anyway sleep(1); // wait a second to get a different time std::time(&time_count); time_p = std::localtime(&time_count); std::strftime(faxname, sizeof(faxname), format, time_p); temp = new_dirname + faxname; } if (count == 4) { write_error(gettext("SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n")); *faxname = 0; } else { // move the faxes into the new directory // make new_dirname the same as the directory name for the saved faxes // that we have just created new_dirname += faxname; std::string old_dirname(prog_config.working_dir); old_dirname += "/faxin/current"; std::vector filelist; struct dirent* direntry; struct stat statinfo; DIR* dir_p; if ((dir_p = opendir(old_dirname.c_str())) == 0) { write_error(gettext("SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n")); } else { chdir(old_dirname.c_str()); while ((direntry = readdir(dir_p)) != 0) { stat(direntry->d_name, &statinfo); if (S_ISREG(statinfo.st_mode)) { filelist.push_back(direntry->d_name); } } closedir(dir_p); bool failure = false; std::vector::const_iterator iter; std::string old_filename; std::string new_filename; for (iter = filelist.begin(); iter != filelist.end(); ++iter) { old_filename = old_dirname; old_filename += '/'; old_filename += *iter; if (!iter->substr(0, std::strlen("current.")).compare("current.")) { new_filename = new_dirname; new_filename += '/'; new_filename += faxname; new_filename += iter->substr(std::strlen("current")); // add the suffix (".001" etc.) if (link(old_filename.c_str(), new_filename.c_str())) { failure = true; break; } } } if (failure) { write_error(gettext("SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n")); } else { for (iter = filelist.begin(); iter != filelist.end(); ++iter) { old_filename = old_dirname; old_filename += '/'; old_filename += *iter; unlink(old_filename.c_str()); } if (rmdir(old_dirname.c_str())) { std::string msg("Can't delete directory "); msg += old_dirname; msg += "\nThe contents should have been moved to "; msg += new_dirname; msg += "\nand it should now be empty -- please check\n"; write_error(msg.c_str()); } } } // reset current directory std::string temp(prog_config.working_dir + "/faxin"); chdir(temp.c_str()); } // this program does not provide an automatic fax description at the moment // so pass an empty string as the secong member of the pair return std::pair(std::string(faxname), std::string()); } void EfaxController::read_pipe_cb(bool&) { char pipe_buffer[PIPE_BUF + 1]; ssize_t result; while ((result = stdout_pipe.read(pipe_buffer, PIPE_BUF)) > 0) { SharedHandle output_h(stdout_pipe_reassembler(pipe_buffer, result)); if (output_h.get()) stdout_message(output_h.get()); else write_error(gettext("Invalid Utf8 received in EfaxController::read_pipe_cb()\n")); } } void EfaxController::join_child(void) { // we do not need a mutex for this - join_child() is only ever called by // a worker thread in sendfax_thread() or receive_thread() and unjoin_child() // is only called in the initial (GUI) thread in child_ended_cb() after a // call to Callback::post() has forced memory synchronisation iowatch_tag = start_iowatch(stdout_pipe.get_read_fd(), Callback::make(*this, &EfaxController::read_pipe_cb), G_IO_IN); } void EfaxController::unjoin_child(void) { // we do not need a mutex for this - join_child() is only ever called by // a worker thread in sendfax_thread() or receive_thread() and unjoin_child() // is only called in the initial (GUI) thread in child_ended_cb() after a // call to Callback::post() has forced memory synchronisation g_source_remove(iowatch_tag); stdout_pipe.close(); stdout_pipe_reassembler.reset(); } void EfaxController::kill_child(void) { // it shouldn't be necessary to check whether the process group id of // the process whose pid is in prog_config.efax_controller_child_pid // is the same as efax-gtk (that is, prog_config.efax_controller_child_pid // is not out of date) because it shouldn't happen - even if efax has ended // we cannot have reaped its exit value yet if prog_config.efax_controller_child_pid // is not 0 so it should still be a zombie in the process table, but for // safety's sake let's just check it // use a mutex as we set prog_config.efax_controller_child_pid in // sendfax_thread() or receive_thread() and memory may not yet // have synchronised pid_t pid; { Thread::Mutex::Lock lock(*prog_config.mutex_p); pid = prog_config.efax_controller_child_pid; } if (pid > 0 && getpgid(0) == getpgid(pid)) { kill(pid, SIGTERM); // one second delay g_usleep(1000000); // now really make sure (we don't need to check // prog_config.efax_controller_child_pid again in this // implementation because the child exit handling is in this // thread, via EfaxController::child_ended_cb(), but we would need // to check it again (and protect it with a mutex) if the program // is modified to put child exit handling in a signal handling // thread waiting on sigwait() which resets the value of // prog_config.efax_controller_child_pid) kill(pid, SIGKILL); } } std::pair EfaxController::save_sent_fax(void) { char faxname[18]; *faxname = 0; std::string description; // get a time value to create the directory name into which the fax is to be saved struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); // now create the directory into which the fax files to be saved std::string fileout_name(prog_config.working_dir); fileout_name += "/faxsent/"; const char dirname_format[] = "%Y%m%d%H%M%S"; std::strftime(faxname, sizeof(faxname), dirname_format, time_p); std::string temp(fileout_name); temp += faxname; // check whether directory already exists or can't be created int count; for (count = 0; count < 4 && mkdir(temp.c_str(), S_IRUSR | S_IWUSR | S_IXUSR); count++) { // it is not worth checking for a short sleep because of a signal as we will // repeat the attempt four times anyway sleep(1); // wait a second to get a different time std::time(&time_count); time_p = std::localtime(&time_count); std::strftime(faxname, sizeof(faxname), dirname_format, time_p); temp = fileout_name + faxname; } if (count == 4) { write_error(gettext("SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n")); *faxname = 0; } else { // now make fileout_name the same as the directory name for the saved faxes // that we have just created fileout_name += faxname; const std::string fileout_dirname(fileout_name); // keep for later to enter a description // and now complete the unsuffixed file name of the destination files fileout_name += '/'; fileout_name += faxname; // now create a string containing the date for the fax description // glibc has const struct tm* as last param of strftime() // but the const does not appear to be guaranteed by POSIX // so do localtime() again just in case time_p = std::localtime(&time_count); const char date_description_format[] = "(%H%M %Z %d %b %Y)"; const int max_description_datesize = 126; char date_description[max_description_datesize]; std::strftime(date_description, max_description_datesize, date_description_format, time_p); // now copy files into the relevant directory for the fax pages to be saved std::vector file_basename_vec; // this is used in making the fax description int out_partnumber = 1; // in order to generate the suffix for each fax page as saved std::vector::const_iterator sentname_iter; for (sentname_iter = last_fax_item_sent.file_list.begin(); sentname_iter != last_fax_item_sent.file_list.end(); ++sentname_iter) { std::string::size_type pos = sentname_iter->find_last_of('/'); if (pos == std::string::npos || pos + 2 > sentname_iter->size()) { write_error("Not valid file name to save -- can't save sent fax\n"); } else { // save the file base name for later use in making the fax description pos++; file_basename_vec.push_back(sentname_iter->substr(pos)); // make the suffixes int in_partnumber = 1; std::ostringstream in_suffix_strm; #ifdef HAVE_STREAM_IMBUE in_suffix_strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE in_suffix_strm << '.' << std::setfill('0') << std::setw(3) << in_partnumber; std::ostringstream out_suffix_strm; #ifdef HAVE_STREAM_IMBUE out_suffix_strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE out_suffix_strm << '.' << std::setfill('0') << std::setw(3) << out_partnumber; // make the suffixed source and destination files std::string suffixed_inname = *sentname_iter + in_suffix_strm.str(); std::string suffixed_outname = fileout_name + out_suffix_strm.str(); std::ifstream filein; std::ofstream fileout; const int BLOCKSIZE = 1024; char block[BLOCKSIZE]; while (!access(suffixed_inname.c_str(), R_OK) && (filein.open(suffixed_inname.c_str(), std::ios::in), filein) // use comma operator to check filein && (fileout.open(suffixed_outname.c_str(), std::ios::out), fileout)) { // ditto for fileout while (filein) { filein.read(block, BLOCKSIZE); fileout.write(block, filein.gcount()); } filein.close(); filein.clear(); fileout.close(); fileout.clear(); unlink(suffixed_inname.c_str()); in_partnumber++; out_partnumber++; in_suffix_strm.str(""); in_suffix_strm << '.' << std::setfill('0') << std::setw(3) << in_partnumber; out_suffix_strm.str(""); out_suffix_strm << '.' << std::setfill('0') << std::setw(3) << out_partnumber; // make the suffixed source and destination files suffixed_inname = *sentname_iter + in_suffix_strm.str(); suffixed_outname = fileout_name + out_suffix_strm.str(); } fileout.clear(); if (in_partnumber < 2) write_error("There was a problem saving all or part of the sent fax\n"); } } // now save the sent fax description if (out_partnumber > 1) { const std::string description_filename(fileout_dirname + "/Description"); std::ofstream fileout(description_filename.c_str(), std::ios::out); if (fileout) { if (last_fax_item_sent.is_socket_file) description = gettext("PRINT JOB"); else { std::vector::const_iterator filename_iter; for (filename_iter = file_basename_vec.begin(); filename_iter != file_basename_vec.end(); ++filename_iter) { if (filename_iter != file_basename_vec.begin()) description += '+'; try { description += Utf8::filename_to_utf8(*filename_iter); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in EfaxController::save_sent_fax()\n"); } } } if (!last_fax_item_sent.number.empty()) { description += " --> "; description += last_fax_item_sent.number; } description += ' '; try { description += Utf8::locale_to_utf8(date_description); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in EfaxController::save_sent_fax()\n"); } fileout << description; } else write_error("Cannot save sent fax description\n"); } } return std::pair(std::string(faxname), description); } void EfaxController::cleanup_fax_send_fail(void) { // delete the tiff g3 files for each ps file prepared for sending std::for_each(last_fax_item_sent.file_list.begin(), last_fax_item_sent.file_list.end(), MemFun::make(*this, &EfaxController::cleanup_fail_item)); } void EfaxController::cleanup_fail_item(const std::string& base_filename) { // make the suffix int partnumber = 1; std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE strm << '.' << std::setfill('0') << std::setw(3) << partnumber; // make the suffixed file name std::string filename = base_filename + strm.str(); while (!access(filename.c_str(), R_OK)) { unlink(filename.c_str()); partnumber++; strm.str(""); strm << '.' << std::setfill('0') << std::setw(3) << partnumber; filename = base_filename + strm.str(); } } bool EfaxController::is_receiving_fax(void) const { bool return_val = false; std::string file_name(prog_config.working_dir); file_name += "/faxin/current/current.001"; struct stat statinfo; if (!stat(file_name.c_str(), &statinfo)) return_val = true; return return_val; } void EfaxController::start_redial_timeout(const Fax_item& fax_item) { int seconds = std::atoi(prog_config.redial_interval.c_str()) * 60; if (seconds > 60) { guint* id = new guint; #if GLIB_CHECK_VERSION(2,14,0) *id = start_timeout_seconds(seconds, Callback::make(*this, &EfaxController::redial_cb, fax_item, id)); #else *id = start_timeout(seconds * 1000, Callback::make(*this, &EfaxController::redial_cb, fax_item, id)); #endif // redial_queue takes ownership of the id argument redial_queue.add(QueueItem(id, fax_item.number)); } else write_error("Incorrect timeout value in EfaxController::child_ended_cb\n"); } void EfaxController::redial_cb(Fax_item fax_item, guint* id, bool&) { // check preconditions // if the user has decided to change settings since the timeout was set // and we no longer automatically redial, just remove the timeout if (!prog_config.redial) { redial_queue.remove(id); return; } // we don't want to start a fax when the settings dialog is open // so have a one minute delay if (SettingsDialog::is_dialog()) { redial_queue.remove(id); id = new guint; #if GLIB_CHECK_VERSION(2,14,0) *id = start_timeout_seconds(60, Callback::make(*this, &EfaxController::redial_cb, fax_item, id)); #else *id = start_timeout(60 * 1000, Callback::make(*this, &EfaxController::redial_cb, fax_item, id)); #endif // redial_queue takes ownership of the new id argument redial_queue.add(QueueItem(id, fax_item.number)); return; } // try again later if we are not inactive or receive_standby mode if (state != inactive && state != receive_standby) return; // all OK // now proceed redial_queue.remove(id); // we set another timeout in child_ended_cb() // or sendfax_cb() if this attempt fails sendfax_impl(fax_item, false, true); } efax-gtk-3.2.8/src/tray_icon.cpp0000644000175000001440000002116311466007653013444 00000000000000/* Copyright (C) 2004, 2006, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include "tray_icon.h" #include "efax_controller.h" #ifdef ENABLE_NLS #include #endif class TrayIcon::CB { public: static void tray_icon_activated(void* data) { static_cast(data)->activated(); } static void tray_icon_popup(guint button, guint time, void* data) { TrayIcon* instance_p = static_cast(data); int state; instance_p->get_state(state); if (state == EfaxController::inactive) { gtk_widget_set_sensitive(GTK_WIDGET(instance_p->stop_item_p), false); gtk_widget_set_sensitive(GTK_WIDGET(instance_p->receive_takeover_item_p), true); gtk_widget_set_sensitive(GTK_WIDGET(instance_p->receive_answer_item_p), true); gtk_widget_set_sensitive(GTK_WIDGET(instance_p->receive_standby_item_p), true); } else { gtk_widget_set_sensitive(GTK_WIDGET(instance_p->stop_item_p), true); gtk_widget_set_sensitive(GTK_WIDGET(instance_p->receive_takeover_item_p), false); gtk_widget_set_sensitive(GTK_WIDGET(instance_p->receive_answer_item_p), false); gtk_widget_set_sensitive(GTK_WIDGET(instance_p->receive_standby_item_p), false); } gtk_menu_popup(GTK_MENU(instance_p->menu_h.get()), 0, 0, 0, 0, button, time); } static void menu_item_activated(GtkMenuItem* item_p, void* data) { TrayIcon* instance_p = static_cast(data); if (item_p == instance_p->list_received_faxes_item_p) { instance_p->menu_item_chosen(TrayIcon::list_received_faxes); } else if (item_p == instance_p->list_sent_faxes_item_p) { instance_p->menu_item_chosen(TrayIcon::list_sent_faxes); } else if (item_p == instance_p->redial_queue_item_p) { instance_p->menu_item_chosen(TrayIcon::redial_queue); } else if (item_p == instance_p->receive_takeover_item_p) { instance_p->menu_item_chosen(TrayIcon::receive_takeover); } else if (item_p == instance_p->receive_answer_item_p) { instance_p->menu_item_chosen(TrayIcon::receive_answer); } else if (item_p == instance_p->receive_standby_item_p) { instance_p->menu_item_chosen(TrayIcon::receive_standby); } else if (item_p == instance_p->stop_item_p) { instance_p->menu_item_chosen(TrayIcon::stop); } else if (item_p == instance_p->quit_item_p) { instance_p->menu_item_chosen(TrayIcon::quit); } else { write_error("Callback error in TrayIcon::CB::menu_item_activated()\n"); } } }; extern "C" { static void tray_icon_activated_cb(GtkStatusIcon*, void* data) { TrayIcon::CB::tray_icon_activated(data); } static void tray_icon_popup_cb(GtkStatusIcon*, guint button, guint time, void* data) { TrayIcon::CB::tray_icon_popup(button, time, data); } static void menu_item_activated_cb(GtkMenuItem* item_p, void* data) { TrayIcon::CB::menu_item_activated(item_p, data); } } // extern "C" TrayIcon::TrayIcon(void): status_icon_h(gtk_status_icon_new()), menu_h(gtk_menu_new()) { GtkWidget* image_p; image_p = gtk_image_new_from_stock(GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); list_received_faxes_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_label(gettext("List received faxes"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(list_received_faxes_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), GTK_WIDGET(list_received_faxes_item_p)); gtk_widget_show(GTK_WIDGET(list_received_faxes_item_p)); image_p = gtk_image_new_from_stock(GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); list_sent_faxes_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_label(gettext("List sent faxes"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(list_sent_faxes_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), GTK_WIDGET(list_sent_faxes_item_p)); gtk_widget_show(GTK_WIDGET(list_sent_faxes_item_p)); // insert separator GtkWidget* separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), separator_item_p); gtk_widget_show(separator_item_p); image_p = gtk_image_new_from_stock(GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); redial_queue_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_label(gettext("Redial queue"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(redial_queue_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), GTK_WIDGET(redial_queue_item_p)); gtk_widget_show(GTK_WIDGET(redial_queue_item_p)); // insert separator separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), separator_item_p); gtk_widget_show(separator_item_p); receive_takeover_item_p = GTK_MENU_ITEM(gtk_menu_item_new_with_label(gettext("Take over call"))); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), GTK_WIDGET(receive_takeover_item_p)); gtk_widget_show(GTK_WIDGET(receive_takeover_item_p)); receive_answer_item_p = GTK_MENU_ITEM(gtk_menu_item_new_with_label(gettext("Answer call"))); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), GTK_WIDGET(receive_answer_item_p)); gtk_widget_show(GTK_WIDGET(receive_answer_item_p)); receive_standby_item_p = GTK_MENU_ITEM(gtk_menu_item_new_with_label(gettext("Receive standby"))); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), GTK_WIDGET(receive_standby_item_p)); gtk_widget_show(GTK_WIDGET(receive_standby_item_p)); image_p = gtk_image_new_from_stock(GTK_STOCK_STOP, GTK_ICON_SIZE_MENU); stop_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_label(gettext("Stop"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(stop_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), GTK_WIDGET(stop_item_p)); gtk_widget_show(GTK_WIDGET(stop_item_p)); // insert separator separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), separator_item_p); gtk_widget_show(separator_item_p); image_p = gtk_image_new_from_stock(GTK_STOCK_QUIT, GTK_ICON_SIZE_MENU); quit_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_label(gettext("Quit"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(quit_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(menu_h.get()), GTK_WIDGET(quit_item_p)); gtk_widget_show(GTK_WIDGET(quit_item_p)); g_signal_connect(G_OBJECT(list_received_faxes_item_p), "activate", G_CALLBACK(menu_item_activated_cb), this); g_signal_connect(G_OBJECT(list_sent_faxes_item_p), "activate", G_CALLBACK(menu_item_activated_cb), this); g_signal_connect(G_OBJECT(redial_queue_item_p), "activate", G_CALLBACK(menu_item_activated_cb), this); g_signal_connect(G_OBJECT(receive_takeover_item_p), "activate", G_CALLBACK(menu_item_activated_cb), this); g_signal_connect(G_OBJECT(receive_answer_item_p), "activate", G_CALLBACK(menu_item_activated_cb), this); g_signal_connect(G_OBJECT(receive_standby_item_p), "activate", G_CALLBACK(menu_item_activated_cb), this); g_signal_connect(G_OBJECT(stop_item_p), "activate", G_CALLBACK(menu_item_activated_cb), this); g_signal_connect(G_OBJECT(quit_item_p), "activate", G_CALLBACK(menu_item_activated_cb), this); { // scope block for the GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_scale_simple(prog_config.window_icon_h, 22, 22, GDK_INTERP_HYPER)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_status_icon_set_from_pixbuf(status_icon_h, pixbuf_h); } set_tooltip_cb(gettext("Inactive")); g_signal_connect(G_OBJECT(status_icon_h.get()), "activate", G_CALLBACK(tray_icon_activated_cb), this); g_signal_connect(G_OBJECT(status_icon_h.get()), "popup-menu", G_CALLBACK(tray_icon_popup_cb), this); } void TrayIcon::set_tooltip_cb(const char* text) { int state; get_state(state); std::ostringstream strm; strm << gettext("efax-gtk: ") << text; if (state == EfaxController::receive_standby) { int count; get_new_fax_count(count); strm << '\n' << gettext("New faxes:") << ' ' << count; } #if GTK_CHECK_VERSION(2,16,0) gtk_status_icon_set_tooltip_text(status_icon_h, strm.str().c_str()); #else gtk_status_icon_set_tooltip(status_icon_h, strm.str().c_str()); #endif } bool TrayIcon::is_embedded(void) { gboolean embedded; g_object_get(status_icon_h.get(), "embedded", &embedded, static_cast(0)); return embedded; } efax-gtk-3.2.8/src/logger.h0000644000175000001440000000360111466007653012376 00000000000000/* Copyright (C) 2001 to 2007 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef LOGGER_H #define LOGGER_H #include "prog_defs.h" #include #include #include #include #include #include #include class Logger { int logfile_count; std::ofstream logfile; std::string logfile_name; std::string default_dirname; guint timer_tag; GtkWindow* parent_p; void logfile_timer_cb(bool&); bool log_to_string(std::string&); public: void write_to_log(const char*); void reset_logfile(void); // only call print_log(), print_page_setup() and view_log() in the // main GUI thread. print_log() and print_page_setup() will compile // but won't do anything unless this program is compiled against // GTK+-2.10.0 or higher, so that the GTK+ printing API is available void print_log(void); static void print_page_setup(GtkWindow* parent_p); void view_log(const int standard_size); Logger(const char* default_dir, GtkWindow* parent_p = 0); ~Logger(void); }; namespace LogViewDialogCB { extern "C" { void log_view_dialog_button_clicked(GtkWidget*, void*); gboolean log_view_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); } } struct LogViewFileError: public std::exception { virtual const char* what() const throw() {return "Cannot open log file for viewing";} }; class LogViewDialog: public WinBase { GtkWidget* text_view_p; public: friend void LogViewDialogCB::log_view_dialog_button_clicked(GtkWidget*, void*); friend gboolean LogViewDialogCB::log_view_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); LogViewDialog(const int standard_size, const std::string& logfile_name, GtkWindow* parent_p = 0); }; #endif efax-gtk-3.2.8/src/settings_help.h0000644000175000001440000000634011534424436013770 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef SETTINGS_HELP_H #define SETTINGS_HELP_H #include "prog_defs.h" #include #include #include #include struct SettingsMessagesBase { std::vector captions; std::vector messages; std::string get_caption(std::vector::size_type); std::string get_message(std::vector::size_type); SettingsMessagesBase(std::vector::size_type size): captions(size), messages(size) {} }; class IdentityMessages: private SettingsMessagesBase { public: enum {name = 0, number}; IdentityMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class ModemMessages: private SettingsMessagesBase { public: enum {device = 0, lock, modem_class, dialmode, capabilities, rings}; ModemMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class ParmsMessages: private SettingsMessagesBase { public: enum {init = 0, reset, extra_parms}; ParmsMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class PrintMessages: private SettingsMessagesBase { public: enum {gtkprint = 0, command, shrink, popup}; PrintMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class ViewMessages: private SettingsMessagesBase { public: enum {ps_view_command = 0}; ViewMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class SockMessages: private SettingsMessagesBase { public: enum {run_server = 0, popup, port, client_address, ip_family}; SockMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class ReceiveMessages: private SettingsMessagesBase { public: enum {popup = 0, exec}; ReceiveMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class SendMessages: private SettingsMessagesBase { public: enum {res = 0, header, redial, dial_prefix}; SendMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class LoggingMessages: private SettingsMessagesBase { public: enum {logfile = 0}; LoggingMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; class PageMessages: private SettingsMessagesBase { public: enum {page = 0}; PageMessages(void); using SettingsMessagesBase::get_caption; using SettingsMessagesBase::get_message; }; namespace SettingsHelpDialogCB { extern "C" void settings_help_dialog_button_clicked(GtkWidget*, void*); } class SettingsHelpDialog: public WinBase { GtkWidget* close_button_p; public: friend void SettingsHelpDialogCB::settings_help_dialog_button_clicked(GtkWidget*, void*); SettingsHelpDialog(const int standard_size, const std::string& text, const std::string& caption, GtkWindow* parent_p); }; #endif efax-gtk-3.2.8/src/efax_controller.h0000644000175000001440000000637211466337122014312 00000000000000/* Copyright (C) 2001 to 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef EFAX_CONTROLLER_H #define EFAX_CONTROLLER_H #include "prog_defs.h" #include #include #include #include #include #include #include #include #include #include #include "redial_queue.h" struct Fax_item { std::vector file_list; std::string number; bool is_socket_file; }; class EfaxController { public: enum State {inactive = 0, sending, receive_answer, receive_takeover, receive_standby, start_send_on_standby, send_on_standby}; private: const int standard_size; State state; bool close_down; int received_fax_count; std::vector efax_parms_vec; Fax_item last_fax_item_sent; PipeFifo stdout_pipe; guint iowatch_tag; Utf8::Reassembler stdout_pipe_reassembler; RedialQueue redial_queue; void receive_cleanup(void); std::pair save_received_fax(void); std::pair save_sent_fax(void); void join_child(void); void unjoin_child(void); void kill_child(void); void cleanup_fax_send_fail(void); void cleanup_fail_item(const std::string&); std::vector state_messages; void sendfax_thread(bool); void receive_thread(const char*); void ps_file_to_tiff_files(const std::string&); void init_sendfax_parms(void); void init_receive_parms(State); void no_fax_made_cb(void); void read_pipe_cb(bool&); void sendfax_impl(const Fax_item&, bool, bool); void child_ended_cb(int); void start_redial_timeout(const Fax_item&); void redial_cb(Fax_item, guint*, bool&); std::pair get_gs_parms(const std::string&); std::pair get_efax_parms(void); void delete_parms(std::pair); // we don't want to permit copies of this class EfaxController(const EfaxController&); void operator=(const EfaxController&); public: EmitterArg&> fax_received_notify; EmitterArg&> fax_sent_notify; Emitter ready_to_quit_notify; EmitterArg stdout_message; EmitterArg write_state; EmitterArg remove_from_socket_server_filelist; void display_state(void) {write_state(state_messages[state].c_str());} void get_state(int& arg) const {arg = state;} bool is_receiving_fax(void) const; // get_state_messages() is used in order to set text widgets // to the size necessary to display the largest messages std::vector get_state_messages(void) const {return state_messages;} void get_count(int& arg) {arg = received_fax_count;} void reset_count(void) {received_fax_count = 0; display_state();} void stop(void); void show_redial_queue(void) {redial_queue.show_dialog();} void efax_closedown(void); void sendfax(const Fax_item& fax_item) {sendfax_impl(fax_item, false, false);} void receive(State); EfaxController(const int); }; #endif efax-gtk-3.2.8/src/socket_server.cpp0000644000175000001440000006414511543501777014344 00000000000000/* Copyright (C) 2003 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include // include rather than for mkstemp #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "socket_server.h" #include #include #include #ifdef ENABLE_NLS #include #endif #define SAVED_FAX_FILENAME ".efax-gtk_queued_server_files" #define BUFFER_LENGTH 1024 SocketServer::SocketServer(void): server_running(false), serve_sock_fd(-1), count (0), working_dir(prog_config.working_dir), filenames_s(new(FilenamesList)) { // we have included std::string working_dir member so that we can access it in the // socket server thread created by SocketServer::start() without having to // introduce locking of accesses to prog_config.working_dir by the main GUI thread // it is fine to initialise it in the initialisation list of this constructor // as prog_config.working_dir is only set once, on the first call to configure_prog() // (that is, when configure_prog() is passed false as its argument) fax_to_send.second = 0; stdout_notify.connect(Callback::make(*this, &SocketServer::write_stdout_dispatcher_cb)); socket_error_notify.connect(Callback::make(*this, &SocketServer::cleanup)); // make sure that we have the $HOME/efax-gtk-server directory // (we do not need to lock working_dir_mutex as the socket server thread cannot // be running at this point) std::string dir_name(working_dir); dir_name += "/efax-gtk-server"; mkdir(dir_name.c_str(), S_IRUSR | S_IWUSR | S_IXUSR); // now populate the queued faxes from server list read_queued_faxes(); } void SocketServer::start(const std::string& port_, bool other_sock_client_address_, bool ipv6_) { if (!server_running) { port = port_; other_sock_client_address = other_sock_client_address_; ipv6 = ipv6_; server_running = true; // now block off the signals for which we have set handlers so that the socket server // thread does not receive the signals, otherwise we will have memory synchronisation // issues in multi-processor systems - we will unblock in the initial (GUI) thread // as soon as the socket server thread has been launched sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); pthread_sigmask(SIG_BLOCK, &sig_mask, 0); thread = Thread::Thread::start(Callback::make(*this, &SocketServer::socket_thread), true); if (!thread.get()) { write_error("Cannot start new socket thread, fax socket will not run\n"); server_running = false; } // now unblock the signals so that the initial (GUI) thread can receive them pthread_sigmask(SIG_UNBLOCK, &sig_mask, 0); } } void SocketServer::socket_thread(void) { bool running; // we don't want this thread to be cancelled until we reach accept_on_client() // make scope block for Thread::CancelBlock object { Thread::CancelBlock cancel_block; if (ipv6) running = make_ipv6_socket(); else running = make_ipv4_socket(); if (running) { std::string message(gettext("Socket running on port ")); message += port; message += '\n'; write_stdout_from_thread(message.c_str()); } } // end of CancelBlock block - thread can now be cancelled // wait for clients to connect, and continue while (accept_on_client()); } bool SocketServer::make_ipv4_socket(void) { if ((serve_sock_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { write_error("Cannot create IPv4 socket for socket server\n"); socket_error_notify(); return false; } sockaddr_in serve_address; std::memset(&serve_address, 0, sizeof(serve_address)); serve_address.sin_family = AF_INET; if (other_sock_client_address) serve_address.sin_addr.s_addr = htonl(INADDR_ANY); else { int res = inet_pton(AF_INET, "127.0.0.1", &(serve_address.sin_addr)); if (res <= 0) { write_error("Cannot create IPv4 network address for localhost\n"); socket_error_notify(); return false; } } serve_address.sin_port = htons(std::atoi(port.c_str())); if ((bind(serve_sock_fd, (sockaddr*)&serve_address, sizeof(serve_address))) < 0) { write_error("Cannot bind to socket for socket server\n"); socket_error_notify(); return false; } if ((listen(serve_sock_fd, 5)) < 0) { write_error("Cannot listen on socket of socket server\n"); socket_error_notify(); return false; } return true; } bool SocketServer::make_ipv6_socket(void) { if ((serve_sock_fd = socket(AF_INET6, SOCK_STREAM, 0)) < 0) { write_error("Cannot create IPv6 socket for socket server\n"); socket_error_notify(); return false; } sockaddr_in6 serve_address; std::memset(&serve_address, 0, sizeof(serve_address)); serve_address.sin6_family = AF_INET6; if (other_sock_client_address) serve_address.sin6_addr = in6addr_any; else { int res = inet_pton(AF_INET6, "::1", &(serve_address.sin6_addr)); if (res <= 0) { write_error("Cannot create IPv6 network address for localhost\n"); socket_error_notify(); return false; } } serve_address.sin6_port = htons(std::atoi(port.c_str())); if ((bind(serve_sock_fd, (sockaddr*)&serve_address, sizeof(serve_address))) < 0) { write_error("Cannot bind to socket for socket server\n"); socket_error_notify(); return false; } if ((listen(serve_sock_fd, 5)) < 0) { write_error("Cannot listen on socket of socket server\n"); socket_error_notify(); return false; } return true; } bool SocketServer::accept_on_client(void) { bool return_val = false; sockaddr_storage connect_address; std::memset(&connect_address, 0, sizeof(connect_address)); socklen_t client_len = sizeof(connect_address); // the calls to pthread_testcancel() are a workaround for Linuxthreads - // with POSIX conforming threads the calls are unnecessary but harmless pthread_testcancel(); // don't test for EINTR here - it is emitted by Linuxthreads if a thread cancellation // request is received and we do not use signals in this program any more now int connect_sock_fd = accept(serve_sock_fd, (sockaddr*)&connect_address, &client_len); pthread_testcancel(); // we only want thread cancellation to occur while accept() is blocking above Thread::CancelBlock cancel_block; if (connect_sock_fd >= 0 && is_valid_peer(connect_address, client_len)) { std::string filename; { Thread::Mutex::Lock lock(working_dir_mutex); filename = working_dir; } filename += "/efax-gtk-server/efax-gtk-server-XXXXXX"; std::string::size_type size = filename.size() + 1; ScopedHandle tempfile_h(new char[size]); std::memcpy(tempfile_h.get(), filename.c_str(), size); // this will include the terminating '\0' in the copy int file_fd = mkstemp(tempfile_h.get()); if (file_fd == -1) { write_error("Can't open temporary file for socket server\n" "This fax will not be processed. Is the disk full?\n"); return_val = false; } else { read_socket(file_fd, connect_sock_fd, tempfile_h.get()); while (close(file_fd) == -1 && errno == EINTR); return_val = true; } while (close(connect_sock_fd) == -1 && errno == EINTR); } else if (connect_sock_fd >= 0) { // if we have got here then the peer is invalid - reject it by // closing connect_sock_fd write_error("Invalid host tried to connect to the socket server\n"); while (close(connect_sock_fd) == -1 && errno == EINTR); return_val = true; } else { // if we have got here, connect_sock_fd is in error condition (otherwise it // would have been picked up in the previous else_if blocks) - report the // problem and close the thread write_error("There is a problem with receiving a connection on the socket server\n" "Closing the socket\n"); return_val = false; } if (!return_val) socket_error_notify(); return return_val; // the CancelBlock object will release and allow thread cancellation // at this point } void SocketServer::read_socket(int file_fd, int connect_sock_fd, const char* file) { char buffer[BUFFER_LENGTH]; ssize_t read_result; ssize_t write_result; ssize_t written; while ((read_result = read(connect_sock_fd, buffer, BUFFER_LENGTH)) > 0 || (read_result == -1 && errno == EINTR)) { if (read_result > 0) { written = 0; do { write_result = write(file_fd, buffer + written, read_result); if (write_result > 0) { written += write_result; read_result -= write_result; } } while (read_result && (write_result != -1 || errno == EINTR)); } } if (!read_result) { // normal close by client write_stdout_from_thread(gettext("Print job received on socket\n")); if (count < 9999) count++; else count = 1; add_file(file); filelist_changed_notify(); Thread::Mutex::Lock lock(fax_to_send_mutex); // use a Thread::Cond object to avoid overwriting an earlier fax to send entry while (fax_to_send.second) fax_to_send_cond.wait(fax_to_send_mutex); fax_to_send.first = file; fax_to_send.second = count; fax_to_send_notify(); } else write_error("Error in receiving print job on socket\n"); } void SocketServer::stop(void) { // this should only be run in the main GUI thread - check (we can // use any convenient Notifier object for this) if (!socket_error_notify.in_main_thread()) { write_error("Call to SocketServer::stop() in other than the main thread\n"); return; } if (server_running) { thread->cancel(); cleanup(); } } void SocketServer::cleanup(void) { // this should only be run in the main GUI thread, either by a call // by the Notifier object socket_error_notify or by a call from // SocketServer::stop() - check (we can use any convenient Notifier // object for this) if (!socket_error_notify.in_main_thread()) { write_error("Call to SocketServer::cleanup() in other than the main thread\n"); return; } thread->join(); // this method is running in the main GUI thread so use stdout_message directly stdout_message(gettext("Closing the socket\n")); if (serve_sock_fd >= 0) { shutdown(serve_sock_fd, SHUT_RDWR); while (close(serve_sock_fd) == -1 && errno == EINTR); serve_sock_fd = -1; } server_running = false; // the thread has ended so destroy the Thread object held by thread thread.reset(); } void SocketServer::add_file(const std::string& filename) { Thread::Mutex::Lock lock(filenames_mutex); std::pair file_item; file_item.first = filename; file_item.second = count; filenames_s->push_back(file_item); save_queued_faxes(); } std::pair, SharedPtr > SocketServer::get_filenames(void) const { // we will use a SharedPtr, which automatically controls object life, to hold a Thread::Mutex::Lock // this tunnelling lock will automatically be released once the object using the FilenamesList // object has finished with it and the lock is deleted by the destructor of the last SharedPtr // holding it (namely when SocketListDialog::set_socket_list_rows() has completed its task) SharedPtr lock_s(new Thread::Mutex::Lock(filenames_mutex)); return std::pair, SharedPtr >(filenames_s, lock_s); } std::pair SocketServer::get_fax_to_send(void) { Thread::Mutex::Lock lock(fax_to_send_mutex); std::pair return_val(fax_to_send); fax_to_send.second = 0; // release the Thread::Cond object if it is blocking fax_to_send_cond.signal(); return return_val; } int SocketServer::remove_file(const std::string& filename) { int return_val = 0; bool found_file = false; { // mutex lock scope block Thread::Mutex::Lock lock(filenames_mutex); FilenamesList::iterator iter; for (iter = filenames_s->begin(); !found_file && iter != filenames_s->end(); ++iter) { if (iter->first == filename) { filenames_s->erase(iter); found_file = true; } } } // end of mutex lock scope block if (!found_file) return_val = -1; else { // update the display in any socket list object filelist_changed_notify(); // clean up by deleting the temporary file we created earlier // in accept_on_client() above unlink(filename.c_str()); // write out the new list of queued fax files save_queued_faxes(); } return return_val; } void SocketServer::read_queued_faxes(void) { // we do not need a mutex here as it is only called in // SocketServer::SocketServer() before a new thread // has been launched // we do not need to use working_dir_mutex here either, for the same reason std::string filename(working_dir); filename += "/" SAVED_FAX_FILENAME; std::ifstream filein(filename.c_str(), std::ios::in); if (filein) { filenames_s->clear(); // may sure the files list is empty std::string file_read; while (std::getline(filein, file_read)) { if (!file_read.empty() && file_read[0] != '#' && file_read[0] != '!') { // find the last '?' (in theory, mkstemp() could use it in the filename, // so there may be a preceding one, so use a reverse find) std::string::size_type pos = file_read.rfind('?'); if (pos != std::string::npos && file_read.size() > pos + 1) { if (!access(file_read.substr(0, pos).c_str(), R_OK)) { // file exists and can be read std::pair file_item; // file_item.first is the filename // file_item second is the print job number file_item.first = file_read.substr(0, pos); file_item.second = std::atoi(file_read.substr(pos + 1).c_str()); filenames_s->push_back(file_item); } } } else if (file_read[0] == '!' && file_read.size() > 1) { count = std::atoi(file_read.substr(1).c_str()); } } } } void SocketServer::save_queued_faxes(void) { // we do not need a filenames mutex here as this method is only called by // SocketServer::add_file() and SocketServer::remove_file() // which are already protected by a mutex std::string filename; { Thread::Mutex::Lock lock(working_dir_mutex); filename = working_dir; } filename += "/" SAVED_FAX_FILENAME; std::ofstream fileout(filename.c_str(), std::ios::out); if (!fileout) { std::string message("Can't open file "); message += filename; message += ", so the list of queued files can't be saved\n"; write_error(message.c_str()); } else { #ifdef HAVE_STREAM_IMBUE fileout.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE FilenamesList::const_iterator iter; for (iter = filenames_s->begin(); iter != filenames_s->end(); ++iter) { fileout << iter->first << '?' << iter->second << '\n'; } fileout << '!' << count << '\n'; } } void SocketServer::write_stdout_from_thread(const char* message) { // this should only be run in a thread other than the main GUI thread, or // we can have deadlocks - check if (stdout_notify.in_main_thread()) { write_error("Call to SocketServer::write_stdout_from_thread() from " "the main GUI thread\n"); return; } Thread::Mutex::Lock lock(stdout_mutex); // use a Thread::Cond object to avoid overwriting an earlier message while (!stdout_text.empty()) stdout_cond.wait(stdout_mutex); stdout_text = message; stdout_notify(); } void SocketServer::write_stdout_dispatcher_cb(void) { Thread::Mutex::Lock lock(stdout_mutex); stdout_message(stdout_text.c_str()); stdout_text = ""; // release the Thread::Cond object if it is blocking stdout_cond.signal(); } bool SocketServer::is_valid_peer(const sockaddr_storage& address, socklen_t len) { bool return_val = false; std::vector peer_names; char buffer[INET6_ADDRSTRLEN + 512]; // general buffer which must be at least INET6_ADDRSTRLEN in // size because we use it in inet_ntop() (INET6_ADDRSTRLEN // is bigger than INET_ADDRSTRLEN) // deal with the peer // get unqualified domain name of peer (if any) if (!getnameinfo((sockaddr*)&address, len, buffer, sizeof(buffer), 0, 0, NI_NAMEREQD | NI_NOFQDN)) { peer_names.push_back(buffer); } // get fully qualified domain name of peer if (!getnameinfo((sockaddr*)&address, len, buffer, sizeof(buffer), 0, 0, NI_NAMEREQD)) { peer_names.push_back(buffer); } // get full list of peer's addresses in numeric string format if (!getnameinfo((sockaddr*)&address, len, buffer, sizeof(buffer), 0, 0, NI_NUMERICHOST)) { // now obtain all the numeric addresses of the connecting peer addrinfo hints; std::memset(&hints, 0, sizeof(hints)); if (ipv6) hints.ai_family = AF_INET6; else hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; addrinfo* res; if (getaddrinfo(buffer, 0, &hints, &res)) { write_error("Cannot look up peer's numeric addresses\n"); } else { for (addrinfo* tmp = res; tmp; tmp = tmp->ai_next) { void* addr; if (ipv6) { sockaddr_in6* in = (sockaddr_in6*)tmp->ai_addr; addr = &(in->sin6_addr); } else { sockaddr_in* in = (sockaddr_in*)tmp->ai_addr; addr = &(in->sin_addr); } if (inet_ntop(tmp->ai_family, addr, buffer, sizeof(buffer))) { std::string tmp(normalise(buffer)); if (!tmp.empty()) peer_names.push_back(tmp); } } freeaddrinfo(res); } } else { write_error("Cannot obtain numeric address of peer\n"); } // now generate the valid names std::vector valid_names; valid_names.push_back("localhost"); // localhost is always valid if (ipv6) { valid_names.push_back("0000:0000:0000:0000:0000:0000:0000:0001"); // we compare on expanded addresses } else { valid_names.push_back("127.0.0.1"); // ditto } if (gethostname(buffer, sizeof(buffer)) < 0) { // we probably don't need to emit a warning with IPv6 if (!ipv6) write_error("Cannot get our hostname\n"); } else { buffer[sizeof(buffer) - 1] = 0; // make sure it is null terminated valid_names.push_back(buffer); // our own hostname is also always valid addrinfo hints; std::memset(&hints, 0, sizeof(hints)); if (ipv6) hints.ai_family = AF_INET6; else hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; addrinfo* res; if (!getaddrinfo(buffer, 0, &hints, &res)) { for (addrinfo* tmp = res; tmp; tmp = tmp->ai_next) { void* addr; if (tmp->ai_family == AF_INET6) { sockaddr_in6* in = (sockaddr_in6*)tmp->ai_addr; addr = &(in->sin6_addr); } else { sockaddr_in* in = (sockaddr_in*)tmp->ai_addr; addr = &(in->sin_addr); } if (inet_ntop(tmp->ai_family, addr, buffer, sizeof(buffer))) { std::string tmp(normalise(buffer)); if (!tmp.empty()) valid_names.push_back(tmp); } } freeaddrinfo(res); } } // and now add the permitted clients from the settings dialog // lock the Prog_config object to stop it being modified or accessed in the initial // (GUI) thread while we are accessing it here Thread::Mutex::Lock lock(*prog_config.mutex_p); // if there is a bad IPv6 address this will cause an empty string to be inserted // but that's OK as addr_compare() checks for that std::transform(prog_config.permitted_clients_list.begin(), prog_config.permitted_clients_list.end(), std::back_inserter(valid_names), Cgu::MemFun::make(*this, &SocketServer::normalise_checked)); std::vector::const_iterator peer_names_iter; std::vector::const_iterator valid_names_iter; for (peer_names_iter = peer_names.begin(); !return_val && peer_names_iter != peer_names.end(); ++peer_names_iter) { for (valid_names_iter = valid_names.begin(); !return_val && valid_names_iter != valid_names.end(); ++valid_names_iter) { return_val = addr_compare(*valid_names_iter, *peer_names_iter); } } return return_val; } bool SocketServer::addr_compare(const std::string& wild_str, const std::string& in_str) { // check pre-conditions if (wild_str.empty()) return false; if (wild_str[wild_str.size() - 1] == '*' && wild_str.find_first_not_of("0123456789abcdefABCDEF.:*") == std::string::npos) { // take trailing '*' characters out of the comparison std::string::size_type length = wild_str.size(); do { length--; } while (length > 0 && wild_str[length - 1] == '*'); return wild_str.substr(0, length) == in_str.substr(0, length); } return wild_str == in_str; } std::string SocketServer::ascii_to_lower(const std::string& in) { std::locale loc("C"); Cgu::GcharScopedHandle str(g_strdup(in.c_str())); std::use_facet >(loc).tolower((char*)str.get(), (char*)str.get() + in.size()); return std::string((char*)str.get()); } std::string SocketServer::normalise(const std::string& in) { if (!ipv6) return in; // if there is a wildcard, the '::' compression feature may not be used (but // other forms of 0 suppression are OK) // cursory first-sift check whether it appears to be a valid ipv6 address // (this is mainly to ensure that the following implementation doesn't do // anything too stupid, such as pass non-ASCII characters to ascii_to_lower(), // than as a real check) if (in.empty() || in.size() > 45 // big enough for IPv4 mapped IPv6 addresses || in.find_first_not_of("0123456789abcdefABCDEF:.*") != std::string::npos) { write_error("Invalid IPv6 address entered\n"); return std::string(); } std::size_t partition = in.find("::"); bool wildcard = in[in.size() - 1] == '*'; if (partition != std::string::npos && wildcard) { write_error("Invalid wildcard supplied: cannot use wildcard with '::'\n"); return std::string(); } // preconditions checked: now proceed // deal with first part (this will never be entered if we have a // wildcard, begin with '::' or have no '::') std::size_t start = 0; // first nibble of address word std::size_t end; // one past last nibble of address word std::string part1; if (partition // the address doesn't begin with '::' && partition != std::string::npos) { // but we have a '::' for (;;) { bool finished = false; end = in.find(':', start); if (end == partition) { finished = true; } for (int missing = 4 - static_cast(end - start); missing > 0; --missing) { part1 += '0'; } for (; start < end; ++start) { part1 += in[start]; } if (!finished) { part1 += ':'; start = end; ++start; } else { start = end + 2; // jump over '::' for next if block break; } } } // deal with second part int ipv4_count = 0; // IPv4-mapped IPv6 addresses consume the last two 16 bit // words for the IPv4 address and are of indeterminate length std::string part2; if (!partition) start = 2; // address begins with '::' - jump over it if (start != in.size()) { // the address doesn't end with '::' for (;;) { bool finished = false; end = in.find(':', start); if (end == std::string::npos) { finished = true; end = in.size(); // one past last character if (in.find('.', start) != std::string::npos) ipv4_count = end - start; // number of characters in IPv4 address } if (!wildcard || !finished) { // don't expand last element before wild card for (int missing = 4 - static_cast(end - start); missing > 0; --missing) { // The IPv4 address of IPv4-mapped IPv6 addresses will // always occupy more than 4 characters so this will // be passed over without a further test being necessary part2 += '0'; } } for (; start < end; ++start) { part2 += in[start]; } if (!finished) { part2 += ':'; start = end; ++start; } else break; } } // insert part1 in result std::string result; if (!part1.empty()) { result += ascii_to_lower(part1); result += ':'; // this will always be correct: if there is no '::' then part1 is empty. // If there is a '::', there is more to come } // now deal with the '::' expansion if (!wildcard) { int total; // 40 not 39 - if the address ends with :: we only have part 1, which is an // exact multiple of 5 in size, and an empty part 2. Discarding any remainder // (which will be 1 if part 2 has something in it) is therefore correct. (It // could in fact be anything between 40 and 43.) if (!ipv4_count) total = 40; // for IPv4 mapping we substitute the IPv4 address for the last 2 words, and // have 30 not 29 because the IPv6 element in part1 and part2 will always sum // to a whole multiple of 5 in size with or without '::' else total = 30; for (int missing = (total - static_cast(result.size() + part2.size() - ipv4_count))/5; missing > 0; --missing) { result += "0000"; if (missing > 1 || !part2.empty()) // part2 cannot be empty for IPv4 mapped addresses result += ':'; } } // add part2 in result result += ascii_to_lower(part2); return result; } // for IPv6 addresses which could be in either numeric or domain name // form (we might get these from prog_config.permitted_clients_list) std::string SocketServer::normalise_checked(const std::string& in) { // check to see if 'in' is in domain name format - if so just return // it (as it happens, this will also sift out ipv4 addresses) if (std::count(in.begin(), in.end(), ':') < 2) return in; return normalise(in); } efax-gtk-3.2.8/src/main.cpp0000644000175000001440000011212411534255110012364 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include "prog_defs.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mainwindow.h" #include "dialogs.h" #include "window_icon.h" #include "utils/icon_info_handle.h" #include "utils/utf8_utils.h" #ifdef HAVE_STREAM_IMBUE #include #endif #ifdef HAVE_X11_XLIB_H #include #include // for GDK_DISPLAY_XDISPLAY() #endif #ifdef HAVE_X11_XKBLIB_H #include // for beep #endif #include #include #include #include #include #include #include #ifdef ENABLE_NLS #include #include #endif #ifndef EXIT_SUCCESS #define EXIT_SUCCESS 0 #endif // the headers on one of my machines does not properly include the declaration // of getpgid() for some reason, so declare it here explicitly extern "C" pid_t getpgid(pid_t); Prog_config prog_config; void get_fonts(void); void get_window_icon(void); int mkdir_with_parent(const std::string&); bool is_arg(const char*, int, char*[]); void display_dbus_error_dialog(void); void clean_up_receive_dir(void); bool is_ascii(const std::string&); bool get_prog_parm(const char*, std::string&, std::string&, std::string(*)(const std::string&)); extern "C" void atexit_cleanup(void); gboolean present_prog(void*, const char**); inline bool get_prog_parm(const char* name, std::string& line, std::string& result) { return get_prog_parm(name, line, result, Utf8::locale_to_utf8); } inline bool not_ascii_char(char c) { if (static_cast(c) < 0) return true; return false; } static MainWindow* main_win_p = 0; int main(int argc, char* argv[]) { // set up the locale for gettext() and base locale domain name of this program #ifdef ENABLE_NLS bindtextdomain("efax-gtk", DATADIR "/locale"); bind_textdomain_codeset("efax-gtk", "UTF-8"); textdomain("efax-gtk"); setlocale(LC_ALL,""); # ifdef HAVE_STREAM_IMBUE // make sure that the locale is set for C++ objects also // (this should also set it for C functions but calling setlocale() // explicitly above will also ensure POSIX compliance) try { std::locale::global(std::locale("")); } catch (std::exception& except) { const std::string message(except.what()); write(2, message.data(), message.size()); } # endif #endif // provide a new process group with this process as the process group leader // so we can check whether another process is one of our children (ie a member // of our process group) and also call kill(0, SIGTERM) in atexit_cleanup() if (setpgid(getpid(), getpid()) == -1) { const std::string message("Error in creating new process group\n"); write(2, message.data(), message.size()); } if (argc > 1) { if (is_arg("--version", argc, argv)) { std::string message("efax-gtk-" VERSION "\n"); message += gettext("Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the " "GNU General Public License, version 2\n"); try { message = Utf8::locale_from_utf8(message); write(1, message.data(), message.size()); } catch (Utf8::ConversionError&) { std::string err_message("UTF-8 conversion error in main()\n"); write(2, err_message.data(), err_message.size()); } return 0; } if (is_arg("--help", argc, argv)) { std::string message("efax-gtk-" VERSION "\n"); message += gettext("Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n"); try { message = Utf8::locale_from_utf8(message); write(1, message.data(), message.size()); } catch (Utf8::ConversionError&) { std::string err_message("UTF-8 conversion error in main()\n"); write(2, err_message.data(), err_message.size()); } return 0; } } // although we use Thread::Thread and Thread::Mutex classes based on pthreads, // we need to call g_thread_init() in order to make glib thread safe // (we do not use the GTK global thread lock, so there is no need to // call gdk_threads_init()) g_thread_init(0); gtk_init(&argc, &argv); if (register_prog("efax_gtk", present_prog, 0)) { prog_config.mutex_p = new Thread::Mutex; std::string messages(configure_prog(false)); g_atexit(atexit_cleanup); // initialise Notifier objects try { Notifier::init(); } catch (PipeError& error) { std::cerr << error.what(); std::exit(PIPE_ERROR); } get_fonts(); get_window_icon(); if (!prog_config.GPL_flag) { GplDialog gpl_dialog(24); int result = gpl_dialog.exec(); if (result == GplDialog::accepted) { std::string file_name(prog_config.working_dir + "/" MAINWIN_SAVE_FILE); std::ofstream file(file_name.c_str(), std::ios::out); prog_config.GPL_flag = true; } else beep(); } if (prog_config.GPL_flag) { bool start_in_standby = false; bool start_hidden = false; int opt_result; while ((opt_result = getopt(argc, argv, "rs-:")) != -1) { switch(opt_result) { case 'r': start_in_standby = true; break; case 's': start_hidden = true; break; case '-': std::string message(argv[0]); message += ": "; message += gettext("Invalid option. Options are:\n"); message += " -r\n" " -s\n" " --help\n" " --version\n"; write(2, message.data(), message.size()); break; } } const char* filename = 0; if (optind < argc) filename = argv[optind]; // this program cleans up for closure by ordinary user action, and // atexit_cleanup() in main.cpp caters for cases where the X session // has brought about the closure of this program. It is also possible // that no clean-up at all will occur if the program is terminated on, // say, a power failure. So call the clean_up_receive_dir() function // now to deal with that case. clean_up_receive_dir(); try { MainWindow mainwindow(messages, start_hidden, start_in_standby, filename); main_win_p = &mainwindow; // everything is set up // now enter the main program loop gtk_main(); } catch (PipeError& error) { std::cerr << error.what(); std::exit(PIPE_ERROR); } } main_win_p = 0; delete prog_config.mutex_p; } else { // for debugging //const char* args[2] = {"Instance already exists - invoking via dbus\n", 0}; // normal use const char** args = 0; int ret = present_instance(args); if (!ret) gdk_notify_startup_complete(); else display_dbus_error_dialog(); return ret; } return 0; } std::string configure_prog(bool reread) { // lock the Prog_config object while we modify it Thread::Mutex::Lock lock(*prog_config.mutex_p); if (!reread) { char* home = std::getenv("HOME"); if (!home) write_error("Your HOME environmental variable is not defined!\n"); else { prog_config.homedir = home; prog_config.working_dir = home; } } // now find rc file prog_config.found_rcfile = false; std::ifstream filein; std::string rcfile; std::string return_val; if (!prog_config.homedir.empty()) { rcfile = prog_config.homedir; rcfile += "/." RC_FILE; #ifdef HAVE_IOS_NOCREATE filein.open(rcfile.c_str(), std::ios::in | std::ios::nocreate); #else // we must have Std C++ so we probably don't need a ios::nocreate // flag on a read open to ensure uniqueness filein.open(rcfile.c_str(), std::ios::in); #endif if (filein) prog_config.found_rcfile = true; else filein.clear(); } if (!prog_config.found_rcfile) { rcfile = RC_DIR "/" RC_FILE; #ifdef HAVE_IOS_NOCREATE filein.open(rcfile.c_str(), std::ios::in | std::ios::nocreate); #else // we must have Std C++ so we probably don't need a ios::nocreate // flag on a read open to ensure uniqueness filein.open(rcfile.c_str(), std::ios::in); #endif if (filein) prog_config.found_rcfile = true; else filein.clear(); } if (!prog_config.found_rcfile && std::strcmp(RC_DIR, "/etc")) { rcfile = "/etc/" RC_FILE; #ifdef HAVE_IOS_NOCREATE filein.open(rcfile.c_str(), std::ios::in | std::ios::nocreate); #else // we must have Std C++ so we probably don't need a ios::nocreate // flag on a read open to ensure uniqueness filein.open(rcfile.c_str(), std::ios::in); #endif if (filein) prog_config.found_rcfile = true; else filein.clear(); } if (!prog_config.found_rcfile) { return_val = "Can't find or open file " RC_DIR "/" RC_FILE ",\n"; if (std::strcmp(RC_DIR, "/etc")) { return_val += "/etc/" RC_FILE ", "; } if (!prog_config.homedir.empty()) { try { std::string temp(Utf8::filename_to_utf8(prog_config.homedir)); return_val += "or "; return_val += temp; return_val += "/." RC_FILE; } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in configure_prog()\n"); } } return_val += "\n"; } else { // if we are re-reading efax-gtkrc, we need to clear the old settings if (reread) { prog_config.lock_file = ""; prog_config.my_name = ""; prog_config.my_number = ""; prog_config.parms.clear(); prog_config.page_size = ""; prog_config.page_dim = ""; prog_config.resolution = ""; prog_config.dial_prefix = ""; prog_config.print_cmd = ""; prog_config.print_shrink = ""; prog_config.ps_view_cmd = ""; prog_config.sock_server_port = ""; prog_config.fax_received_prog = ""; prog_config.redial_interval = ""; prog_config.logfile_name = ""; prog_config.permitted_clients_list.clear(); } // if we are setting up for first time, initialise prog_config.efax_controller_child_pid // (we don't need a mutex here as no thread to send/receive a fax has yet been launched) else prog_config.efax_controller_child_pid = 0; // now extract settings from file std::string file_read; std::string device; std::string lock_file; std::string modem_class; std::string rings; std::string dialmode; std::string init; std::string reset; std::string capabilities; std::string extra_parms; std::string gtkprint; std::string print_popup; std::string sock_server; std::string sock_popup; std::string sock_client_address; std::string sock_other_addresses; std::string fax_received_popup; std::string fax_received_exec; std::string addr_in_header; std::string redial; std::string ip_family; std::string work_subdir; while (std::getline(filein, file_read)) { if (!file_read.empty() && file_read[0] != '#') { // valid line to check // now check for other comment markers std::string::size_type pos = file_read.find_first_of('#'); if (pos != std::string::npos) file_read.resize(pos); // truncate // look for "NAME:" if (get_prog_parm("NAME:", file_read, prog_config.my_name)); // look for "NUMBER:" else if (get_prog_parm("NUMBER:", file_read, prog_config.my_number)); // look for "DEVICE:" else if (get_prog_parm("DEVICE:", file_read, device)); // look for "LOCK:" else if (get_prog_parm("LOCK:", file_read, lock_file, Utf8::filename_to_utf8)); // look for "CLASS:" else if (get_prog_parm("CLASS:", file_read, modem_class)); // look for "PAGE:" else if (get_prog_parm("PAGE:", file_read, prog_config.page_size)); // look for "RES:" else if (get_prog_parm("RES:", file_read, prog_config.resolution)); // look for "DIAL_PREFIX:" else if (get_prog_parm("DIAL_PREFIX:", file_read, prog_config.dial_prefix)); // look for "RINGS:" else if (get_prog_parm("RINGS:", file_read, rings)); // look for "DIALMODE:" else if (get_prog_parm("DIALMODE:", file_read, dialmode)); // look for "INIT:" else if (get_prog_parm("INIT:", file_read, init)); // look for "RESET:" else if (get_prog_parm("RESET:", file_read, reset)); // look for "CAPABILITIES:" else if (get_prog_parm("CAPABILITIES:", file_read, capabilities)); // look for "PARMS:" else if (get_prog_parm("PARMS:", file_read, extra_parms)); // look for "PRINT_CMD:" else if (get_prog_parm("PRINT_CMD:", file_read, prog_config.print_cmd)); // look for "USE_GTKPRINT:" else if (get_prog_parm("USE_GTKPRINT:", file_read, gtkprint)); // look for "PRINT_SHRINK:" else if (get_prog_parm("PRINT_SHRINK:", file_read, prog_config.print_shrink)); // look for "PRINT_POPUP:" else if (get_prog_parm("PRINT_POPUP:", file_read, print_popup)); // look for "PS_VIEWER:" else if (get_prog_parm("PS_VIEWER:", file_read, prog_config.ps_view_cmd)); // look for "SOCK_SERVER:" else if (get_prog_parm("SOCK_SERVER:", file_read, sock_server)); // look for "SOCK_POPUP:" else if (get_prog_parm("SOCK_POPUP:", file_read, sock_popup)); // look for "SOCK_SERVER_PORT:" else if (get_prog_parm("SOCK_SERVER_PORT:", file_read, prog_config.sock_server_port)); // look for "SOCK_CLIENT_ADDRESS:" else if (get_prog_parm("SOCK_CLIENT_ADDRESS:", file_read, sock_client_address)); // look for "SOCK_OTHER_ADDRESSES:" else if (get_prog_parm("SOCK_OTHER_ADDRESSES:", file_read, sock_other_addresses)); // look for "IP_FAMILY:" else if (get_prog_parm("IP_FAMILY:", file_read, ip_family)); // look for "FAX_RECEIVED_POPUP:" else if (get_prog_parm("FAX_RECEIVED_POPUP:", file_read, fax_received_popup)); // look for "FAX_RECEIVED_EXEC:" else if (get_prog_parm("FAX_RECEIVED_EXEC:", file_read, fax_received_exec)); // look for "FAX_RECEIVED_PROG:" else if (get_prog_parm("FAX_RECEIVED_PROG:", file_read, prog_config.fax_received_prog, Utf8::filename_to_utf8)); // look for "LOG_FILE:" else if (get_prog_parm("LOG_FILE:", file_read, prog_config.logfile_name, Utf8::filename_to_utf8)); // look for "ADDR_IN_HEADER:" else if (get_prog_parm("ADDR_IN_HEADER:", file_read, addr_in_header)); // look for "REDIAL:" else if (get_prog_parm("REDIAL:", file_read, redial)); // look for "REDIAL_INTERVAL:" else if (get_prog_parm("REDIAL_INTERVAL:", file_read, prog_config.redial_interval)); // look for "WORK_SUBDIR:" else if (get_prog_parm("WORK_SUBDIR:", file_read, work_subdir, Utf8::filename_to_utf8)); } } // we have finished reading the configuration file // now enter parameters common to send and receive of faxes prog_config.parms.push_back("efax-0.9a"); prog_config.parms.push_back("-vew"); // stderr -- errors and warnings prog_config.parms.push_back("-vin"); // stdin -- information and negotiations //prog_config.parms.push_back("-vina"); // this will also report the parameters passed to efax // uncomment it and comment out preceding line for debugging prog_config.parms.push_back("-u"); // force use of UTF-8 to send messages to efax-gtk std::string temp; if (!is_ascii(prog_config.my_name)) { prog_config.my_name = ""; return_val += gettext("Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n"); } if (!prog_config.my_number.empty()) { temp = "-l"; temp += prog_config.my_number; prog_config.parms.push_back(temp); } if (!init.empty()) { std::string::size_type start = 0; std::string::size_type end; while (start != std::string::npos) { temp = "-i"; end = init.find_first_of(" \t", start); if (end != std::string::npos) { temp.append(init, start, end - start); start = init.find_first_not_of(" \t", end); // prepare for the next iteration } else { temp.append(init, start, init.size() - start); start = end; } prog_config.parms.push_back(temp); } } else { prog_config.parms.push_back("-iZ"); prog_config.parms.push_back("-i&FE&D2S7=120"); prog_config.parms.push_back("-i&C0"); prog_config.parms.push_back("-iM1L0"); } if (!reset.empty()) { std::string::size_type start = 0; std::string::size_type end; while (start != std::string::npos) { temp = "-k"; end = reset.find_first_of(" \t", start); if (end != std::string::npos) { temp.append(reset, start, end - start); start = reset.find_first_not_of(" \t", end); // prepare for the next iteration } else { temp.append(reset, start, reset.size() - start); start = end; } prog_config.parms.push_back(temp); } } else prog_config.parms.push_back("-kZ"); if (!modem_class.empty()) { temp = "-o"; if (!modem_class.compare("2.0")) temp += '0'; else if (!modem_class.compare("1")) temp += '1'; else if (!modem_class.compare("2")) temp += '2'; else { return_val += gettext("Invalid modem class specified\n" "Adopting default of Class 2\n"); temp += '2'; } prog_config.parms.push_back(temp); } if (device.empty()) { if (access("/dev/modem", F_OK) == -1) { return_val += gettext("No serial port device specified in " RC_FILE " configuration file\n" "and /dev/modem does not exist\n"); } else { return_val += gettext("No serial port device specified in " RC_FILE " configuration file\n" "Using default of /dev/modem\n"); device = "modem"; } } if (!device.empty()) { std::string locale_device; try { locale_device = Utf8::locale_from_utf8(device); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in configure_prog() - device\n"); } if (!locale_device.empty()) { if (lock_file.empty()) { prog_config.lock_file = "/var/lock"; } else { try { prog_config.lock_file = Utf8::filename_from_utf8(lock_file); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in configure_prog() - lock file\n"); write_error("Defaulting to /var/lock\n"); prog_config.lock_file = "/var/lock"; } } prog_config.lock_file += "/LCK.."; temp = device; // replace any '/' characters with '_' character std::replace(temp.begin(), temp.end(), '/', '_'); prog_config.lock_file += temp; temp = "-d/dev/"; temp += locale_device; prog_config.parms.push_back(temp); temp = "-x"; temp += prog_config.lock_file; prog_config.parms.push_back(temp); } } if (!capabilities.empty()) { temp = "-c"; temp += capabilities; prog_config.parms.push_back(temp); } if (prog_config.resolution.empty()) { return_val += gettext("Adopting default fax resolution of 204x196\n"); prog_config.resolution = "204x196"; } else { temp = utf8_to_lower(prog_config.resolution); if (!temp.compare("fine")) prog_config.resolution = "204x196"; else if (!temp.compare("standard")) prog_config.resolution = "204x98"; else { return_val += gettext("Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n"); prog_config.resolution = "204x196"; } } if (rings.empty()) prog_config.rings = '1'; else if (rings.size() > 1 || rings[0] < '1' || rings[0] > '9') { return_val += gettext("Invalid ring number specified\n" "Will answer after one ring\n"); prog_config.rings = '1'; } else prog_config.rings = rings[0]; if (prog_config.page_size.empty()) { return_val += gettext("Adopting default page size of a4\n"); prog_config.page_size = "a4"; prog_config.page_dim = "210x297mm"; } else { prog_config.page_size = utf8_to_lower(prog_config.page_size); if (!prog_config.page_size.compare("a4")) prog_config.page_dim = "210x297mm"; else if (!prog_config.page_size.compare("letter")) prog_config.page_dim = "216x279mm"; else if (!prog_config.page_size.compare("legal")) prog_config.page_dim = "216x356mm"; else { return_val += gettext("Invalid page size specified\n" "Adopting default page size of a4\n"); prog_config.page_size = "a4"; prog_config.page_dim = "210x297mm"; } } if (dialmode.empty()) prog_config.tone_dial = true; else { temp = utf8_to_lower(dialmode); if (!temp.compare("tone")) prog_config.tone_dial = true; else if (!temp.compare("pulse")) prog_config.tone_dial = false; else { return_val += gettext("Invalid dialmode specified\n" "Adopting default of tone dialling\n"); prog_config.tone_dial = true; } } if (!extra_parms.empty()) { std::string::size_type start = 0; std::string::size_type end; while (start != std::string::npos) { end = extra_parms.find_first_of(" \t", start); if (end != std::string::npos) { temp.assign(extra_parms, start, end - start); start = extra_parms.find_first_not_of(" \t", end); // prepare for the next iteration } else { temp.assign(extra_parms, start, extra_parms.size() - start); start = end; } prog_config.parms.push_back(temp); } } if (prog_config.print_cmd.empty()) { prog_config.print_cmd = "lpr"; } temp = utf8_to_lower(gtkprint); if (!temp.compare("no")) prog_config.gtkprint = false; else prog_config.gtkprint = true; if (prog_config.print_shrink.empty()) { prog_config.print_shrink = "100"; } else if (std::atoi(prog_config.print_shrink.c_str()) < 50 || std::atoi(prog_config.print_shrink.c_str()) > 100) { return_val += gettext("Invalid print shrink specified: adopting default value of 100\n"); prog_config.print_shrink = "100"; } temp = utf8_to_lower(print_popup); if (!temp.compare("no")) prog_config.print_popup = false; else prog_config.print_popup = true; if (prog_config.ps_view_cmd.empty()) { return_val += gettext("Adopting default postscript view command of 'gv'\n"); prog_config.ps_view_cmd = "gv"; } temp = utf8_to_lower(sock_server); if (!temp.compare("yes")) prog_config.sock_server = true; else prog_config.sock_server = false; temp = utf8_to_lower(sock_popup); if (!temp.compare("yes")) prog_config.sock_popup = true; else prog_config.sock_popup = false; if (prog_config.sock_server_port.empty()) { if (prog_config.sock_server) return_val += gettext("No port for the socket server has been specified, " "so the server will not be started\n"); } else if (std::atoi(prog_config.sock_server_port.c_str()) < 1024 || std::atoi(prog_config.sock_server_port.c_str()) > 65535) { return_val += gettext("Invalid port for the socket server has been specified, " "so the server will not be started. It needs to be between " "1024 and 65535\n"); prog_config.sock_server_port = ""; } temp = utf8_to_lower(sock_client_address); if (!temp.compare("other")) prog_config.other_sock_client_address = true; else prog_config.other_sock_client_address = false; if (!sock_other_addresses.empty()) { std::string::size_type start = 0; std::string::size_type end; while (start != std::string::npos) { end = sock_other_addresses.find_first_of(" \t", start); if (end != std::string::npos) { temp.assign(sock_other_addresses, start, end - start); start = sock_other_addresses.find_first_not_of(" \t", end); // prepare for the next iteration } else { temp.assign(sock_other_addresses, start, sock_other_addresses.size() - start); start = end; } prog_config.permitted_clients_list.push_back(temp); } } temp = utf8_to_lower(ip_family); if (temp.empty() || !temp.compare("ipv4")) prog_config.ipv6 = false; else if (!temp.compare("ipv6")) prog_config.ipv6 = true; else { return_val += gettext("Invalid ip family for socket server specified: adopting default of ipv4\n"); prog_config.ipv6 = false; } temp = utf8_to_lower(fax_received_popup); if (!temp.compare("yes")) prog_config.fax_received_popup = true; else prog_config.fax_received_popup = false; temp = utf8_to_lower(fax_received_exec); if (!temp.compare("yes")) prog_config.fax_received_exec = true; else prog_config.fax_received_exec = false; temp = utf8_to_lower(addr_in_header); if (!temp.compare("no")) prog_config.addr_in_header = false; else prog_config.addr_in_header = true; temp = utf8_to_lower(redial); if (!temp.compare("yes")) prog_config.redial = true; else prog_config.redial = false; if (prog_config.redial_interval.empty()) { prog_config.redial_interval = "15"; } else if (std::atoi(prog_config.redial_interval.c_str()) < 5 || std::atoi(prog_config.redial_interval.c_str()) > 1440) { return_val += gettext("Invalid redial interval has been specified. " "It needs to be between 5 and 1440 minutes\n"); prog_config.redial_interval = "15"; } if (!reread) { // prog_config.working_dir and prog_config.GPL_flag are not // affected by the settings dialog and so not re-configurable // after the program has initialised itself for the first time // CMV 24-07-04 if (!work_subdir.empty()) { prog_config.working_dir += '/'; prog_config.working_dir += Utf8::filename_from_utf8(work_subdir); if (mkdir_with_parent(prog_config.working_dir) && errno != EEXIST) { return_val += gettext("Invalid WORK_SUBDIR: directory specified. " "WORK_SUBDIR: will be ignored\n"); prog_config.working_dir = prog_config.homedir; } } std::string file_name(prog_config.working_dir + "/" MAINWIN_SAVE_FILE); int result = access(file_name.c_str(), F_OK); if (!result) prog_config.GPL_flag = true; else prog_config.GPL_flag = false; } } return return_val; } void get_fonts(void) { #ifdef HAVE_X11_XLIB_H // this will get a suitable fixed font for GplDialog and HelpDialog to use with Pango const int MAX_FONTS = 10000; int num_fonts; char** fonts = XListFonts(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), "-*", MAX_FONTS, &num_fonts); if (fonts) { int count; std::string inspect_name; prog_config.fixed_font = ""; //try for courier font for (count = 0; count < num_fonts; count++) { inspect_name = fonts[count]; std::string::size_type pos = inspect_name.find("courier-medium-r-normal-"); if (pos != std::string::npos) { prog_config.fixed_font = "courier"; break; } } // unsuccessful -- go for the generic "fixed" font if (prog_config.fixed_font.empty()) prog_config.fixed_font = "fixed"; XFreeFontNames(fonts); } else prog_config.fixed_font = "fixed"; #else prog_config.fixed_font = "fixed"; #endif } bool get_prog_parm(const char* name, std::string& line, std::string& result, std::string(*convert_func)(const std::string&)) { // This function looks for a setting named `name' in the string `line' // and returns the values stated after it in string `result'. It returns // `true' if the setting was found. If there are trailing spaces or tabs, // string `line' will be modified. string `result' is only modified if // the `name' setting is found. Anything extracted from `line' will be // converted (when placed into `result') to UTF-8, using the function // assigned to function pointer convert_func (you would normally use // Utf8::locale_to_utf8() or Utf8::filename_to_utf8(), and there is a // default inline function using Utf8::locale_to_utf8()) const std::string::size_type length = std::strlen(name); // we have to use std::string::substr() because libstdc++-2 // doesn't support the Std-C++ std::string::compare() functions if (!line.substr(0, length).compare(name)) { // erase any trailing space or tab while (line.find_last_of(" \t") == line.size() - 1) line.resize(line.size() - 1); if (line.size() > length) { // ignore any preceding space or tab from the setting value given std::string::size_type pos = line.find_first_not_of(" \t", length); // pos now is set to beginning of setting value if (pos != std::string::npos) { try { result.assign(convert_func(line.substr(pos))); } catch (Utf8::ConversionError&) { result = ""; write_error("UTF-8 conversion error in get_prog_parm()\n"); } } } return true; } return false; } void beep(void) { #if defined(HAVE_X11_XKBLIB_H) && defined(HAVE_X11_XLIB_H) XkbBell(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), None, 0, None); #elif defined(HAVE_X11_XLIB_H) XBell(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), 0); #else gdk_beep(); #endif } void get_window_icon(void) { bool have_icon = false; GtkIconTheme* icon_theme_p = gtk_icon_theme_get_default(); IconInfoScopedHandle icon_info_h(gtk_icon_theme_lookup_icon(icon_theme_p, "efax-gtk", 24, GtkIconLookupFlags(0))); if (icon_info_h.get()) { const gchar* icon_path_p = gtk_icon_info_get_filename(icon_info_h.get()); if (icon_path_p) { // for debugging //std::cout << "Got efax-gtk icon" << std::endl; GError* error_p = 0; prog_config.window_icon_h = GobjHandle(gdk_pixbuf_new_from_file(icon_path_p, &error_p)); if (prog_config.window_icon_h.get()) have_icon = true; else { write_error("Pixbuf error in get_window_icon()\n"); if (error_p) { GerrorScopedHandle handle_h(error_p); write_error(error_p->message); write_error("\n"); } } } } if (!have_icon) { prog_config.window_icon_h = GobjHandle(gdk_pixbuf_new_from_xpm_data(window_icon_xpm)); } } void display_dbus_error_dialog(void) { InfoDialog dialog(gettext("DBUS error: Cannot start efax-gtk.\n\n" "Make sure the DBUS session message bus is running"), gettext("efax-gtk: DBUS error"), GTK_MESSAGE_ERROR, 0, false); dialog.exec(); } int mkdir_with_parent(const std::string& dir) { // this function must be passed an absolute path name // on success it returns 0, and on failure it returns -1. If -1 is returned // for any reason other than that an absolute pathname was not passed // then errno will be set by Unix mkdir() // function provided by CMV 24-07-04 int return_val = 0; if (dir[0] != '/') return_val = -1; else { std::string::size_type pos = 0; while (pos != std::string::npos && (!return_val || errno == EEXIST)) { pos = dir.find('/', ++pos); if (pos != std::string::npos) { return_val = mkdir(dir.substr(0, pos).c_str(), S_IRUSR | S_IWUSR | S_IXUSR); } else { return_val = mkdir(dir.c_str(), S_IRUSR | S_IWUSR | S_IXUSR); } } } return return_val; } bool is_arg(const char* arg, int argc, char* argv[]) { bool return_val; int count; for (return_val = false, count = 1; !return_val && count < argc; count++) { if (!std::strcmp(argv[count], arg)) return_val = true; } return return_val; } bool is_ascii(const std::string& text) { std::string::const_iterator end_iter = text.end(); if (std::find_if(text.begin(), end_iter, not_ascii_char) == end_iter) { return true; } return false; } void atexit_cleanup(void) { // this does any essential clean up, which is always required to make the program // restart correctly. It is mainly relevant to a case where the program has closed // down because X server connection has closed - where the program is closed by direct // user input to the program, then the program generally cleans up elsewhere // check we are the process group leader (we should be as setpgid() was // called in main()) and if so kill any stray children, such as an efax // instance or a fax viewing instance if (getpgid(0) == getpid()) { // block the signal to us struct sigaction sig_act; sig_act.sa_handler = SIG_IGN; sigemptyset(&sig_act.sa_mask); sig_act.sa_flags = 0; sigaction(SIGTERM, &sig_act, 0); // kill kill(0, SIGTERM); } else std::cerr << "Error: we are not a process group leader!" << std::endl; // clean up the receive_directory if necessary clean_up_receive_dir(); // call up a shell to dispense with any stray viewing or printing files // (these may exist if the program crashes, or is exited when a fax is still // being viewed) whether this executes or not is pretty optional so whilst // I would normally avoid calling system(), it is acceptable in this limited // context (IMO) std::string command_line("rm -f "); command_line += prog_config.working_dir; command_line += "/efax-gtk-view-* "; command_line += prog_config.working_dir; command_line += "/efax-gtk-print-*"; std::system(command_line.c_str()); } void clean_up_receive_dir(void) { if (!prog_config.working_dir.empty()) { std::string full_dirname(prog_config.working_dir); full_dirname += "/faxin/current"; int result = rmdir(full_dirname.c_str()); if (result == -1 && errno == ENOTEMPTY) { // we must be in the middle of receiving a fax // when the program ended - save what we can std::cerr << "The program closed when receiving a fax\n" "Attempting to save what we can" << std::endl; char faxname[18]; *faxname = 0; // get a time value to create the directory name into which the fax is to be saved struct std::tm* time_p; std::time_t time_count; std::time(&time_count); time_p = std::localtime(&time_count); std::string new_dirname(prog_config.working_dir); new_dirname += "/faxin/"; const char format[] = "%Y%m%d%H%M%S"; std::strftime(faxname, sizeof(faxname), format, time_p); std::string temp(new_dirname); temp += faxname; // check whether directory already exists or can't be created int count; for (count = 0; count < 4 && mkdir(temp.c_str(), S_IRUSR | S_IWUSR | S_IXUSR); count++) { // it is not worth checking for a short sleep because of a signal as we will // repeat the attempt four times anyway sleep(1); // wait a second to get a different time std::time(&time_count); time_p = std::localtime(&time_count); std::strftime(faxname, sizeof(faxname), format, time_p); temp = new_dirname + faxname; } if (count == 4) { std::cerr << "Can't create directory to save received fax on clean up.\n" "This fax will not be saved!" << std::endl; *faxname = 0; } else { // move the faxes into the new directory // make new_dirname the same as the directory name for the saved faxes // that we have just created new_dirname += faxname; std::string old_dirname(prog_config.working_dir); old_dirname += "/faxin/current"; std::vector filelist; struct dirent* direntry; struct stat statinfo; DIR* dir_p; if ((dir_p = opendir(old_dirname.c_str())) == 0) { std::cerr << "Can't open received fax directory.\n" "This fax will not be saved!" << std::endl; } else { chdir(old_dirname.c_str()); while ((direntry = readdir(dir_p)) != 0) { stat(direntry->d_name, &statinfo); if (S_ISREG(statinfo.st_mode)) { filelist.push_back(direntry->d_name); } } closedir(dir_p); bool failure = false; std::vector::const_iterator iter; std::string old_filename; std::string new_filename; for (iter = filelist.begin(); iter != filelist.end(); ++iter) { old_filename = old_dirname; old_filename += '/'; old_filename += *iter; if (!iter->substr(0, std::strlen("current.")).compare("current.")) { new_filename = new_dirname; new_filename += '/'; new_filename += faxname; new_filename += iter->substr(std::strlen("current")); // add the suffix (".001" etc.) if (link(old_filename.c_str(), new_filename.c_str())) { failure = true; break; } } } if (failure) { std::cerr << "Cannot save all of the received fax.\n" "All or part of the fax will be missing!" << std::endl; } else { for (iter = filelist.begin(); iter != filelist.end(); ++iter) { old_filename = old_dirname; old_filename += '/'; old_filename += *iter; unlink(old_filename.c_str()); } if (rmdir(old_dirname.c_str())) { std::cerr << "Can't delete directory " << old_dirname << "\nThe contents should have been moved to " << new_dirname << "\nand it should now be empty" << std::endl; } } } // reset current directory std::string temp(prog_config.working_dir + "/faxin"); chdir(temp.c_str()); } } } } gboolean present_prog(void*, const char** args) { if (main_win_p) main_win_p->present_window(); // just use args for debugging here if (args) std::cout << args[0]; return TRUE; } efax-gtk-3.2.8/src/window_icon.h0000644000175000001440000001141311466007653013436 00000000000000/* XPM */ /* This icon is taken from those supplied with GNOME 2.6 and is copyrighted accordingly */ static const char* window_icon_xpm[]={ "24 24 217 2", "Qt c None", ".q c #000000", ".L c #000000", ".A c #000000", ".M c #000000", ".K c #000000", "#g c #000000", ".V c #000000", ".Z c #000000", "bq c #000000", ".7 c #000000", ".X c #000000", "#f c #000000", "#7 c #000000", "bd c #000000", "aj c #000000", "br c #000000", "bp c #000000", "bw c #000000", "bs c #000000", "bv c #000000", "bt c #000000", ".0 c #000000", ".# c #000000", ".W c #000000", "bu c #000000", "a9 c #000000", "#t c #000000", "#K c #000000", "bc c #000000", ".a c #000000", "ax c #1b0803", "aY c #333230", "aM c #343433", "aw c #383837", "bj c #393937", "aE c #3a3835", "#G c #3b3b36", "a3 c #41403c", "aF c #42403c", "aP c #464340", "aG c #464440", "#F c #484642", "bi c #504f4c", "aH c #514f4b", "aI c #53514e", "aQ c #54524d", "au c #565655", "aR c #5b5855", "aS c #5b5956", "a4 c #5b5a55", ".v c #606060", "aT c #61615e", "bk c #62605d", ".s c #676767", "aU c #696861", "#m c #696969", "a8 c #6a6963", ".O c #6a6a6a", "ag c #6b6b6a", ".r c #6b6b6b", "a5 c #6d6c66", "#p c #6e6e6e", "a6 c #72716b", "a7 c #76746f", "#l c #767676", "aV c #77756f", "aW c #797672", "aK c #797771", "#q c #797979", "aJ c #7b7a77", "#H c #807d74", "#x c #808080", ".t c #818181", "aL c #82817f", "aX c #82827c", "bb c #852712", "bl c #85847e", "av c #858482", "#B c #87847c", "#n c #888888", "ao c #898989", "be c #8a877f", ".N c #8a8a8a", "#L c #8b3f2d", "bh c #8f8d88", "bm c #908d86", ".R c #909090", "ai c #918f87", "#y c #919191", "ah c #999896", "bn c #9a978f", "bo c #9c9991", ".P c #9e9e9e", "#5 c #9f9f9f", "aC c #a05241", "bg c #a09d98", ".w c #a0a0a0", "#r c #a1a1a1", "an c #a22f14", ".S c #a2a2a2", "#A c #a3a3a3", "#z c #a4a4a4", "#k c #a5a5a5", ".5 c #a6a6a6", "a. c #aa2f14", "#I c #aaa9a5", ".T c #aaaaaa", "bf c #aba8a2", ".3 c #aeaeae", ".g c #afafaf", "a2 c #b33518", "#s c #b3b3b3", "ae c #b5b5b4", "ab c #b5b5b5", "#V c #b6b6b5", ".p c #b6b6b6", "b. c #b73115", "aZ c #b75944", ".z c #b7b7b7", "#J c #bab5ab", ".4 c #bebebe", ".J c #bfbfbf", "aB c #c3391a", "#8 c #c36c58", "a# c #c4c4c4", ".8 c #c56c59", "#a c #c5c5c5", "a1 c #c73819", ".b c #c7c7c7", "#C c #c98475", "#e c #c9c9c9", "#U c #cb3a1a", ".1 c #cb7b6a", "ad c #cdcdcb", ".6 c #cdcdcd", ".Y c #cecece", "b# c #d03c1b", "#o c #d0d0d0", "#b c #d1d1d1", "ac c #d2d2d2", "aa c #d3d3d2", "aO c #d53e1c", "ak c #d66d55", "ba c #da401d", "ay c #da725b", "aq c #dadad9", ".x c #dadada", ".o c #dbdbdb", "af c #dcdad3", ".n c #dcdcdc", "#c c #dddddd", "#S c #de806b", "#d c #dedede", "## c #df421e", "aD c #df6549", "aN c #df7d67", ".2 c #df8470", "#6 c #dfded9", ".m c #dfdfdf", ".l c #e0e0e0", ".y c #e1e1e1", "aA c #e25636", "al c #e26c50", "a0 c #e27156", "#h c #e2907e", ".k c #e2e2e2", "#. c #e38d7a", "ap c #e3e2e2", "#W c #e3e3e2", ".j c #e3e3e3", "az c #e47860", "#T c #e47a63", "#D c #e48772", "#M c #e48a75", "am c #e5674b", "#4 c #e5e5e4", ".i c #e5e5e5", "#E c #e66d52", "#9 c #e77359", "#N c #e7775d", ".9 c #e79381", ".u c #e7e7e7", "#i c #e88d79", ".I c #e8e8e8", "#w c #e97f67", "#u c #e99684", "#v c #e99d8c", ".H c #e9e9e9", "#R c #eae8e3", "ar c #eaeae9", "#j c #eb8f7a", ".G c #ebebeb", ".F c #ececec", ".E c #ededed", ".D c #eeeeee", ".C c #efefef", "#3 c #f0efec", "#O c #f1f1f1", "#2 c #f2f1ee", "as c #f2f1ef", "at c #f4f3f1", ".U c #f4f4f4", "#X c #f5f5f3", "#1 c #f6f5f4", ".Q c #f6f6f6", "#Y c #f7f6f5", "#Z c #f7f7f4", ".f c #f8f8f8", ".h c #f9f9f9", "#0 c #fafaf9", ".c c #fafafa", ".e c #fbfbfb", ".d c #fcfcfc", ".B c #fdfdfd", "#P c #fefefe", "#Q c #ffffff", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQt.#.a.a.a.a.a.a.a.a.a.a.a.a.#QtQtQtQtQt", "QtQtQtQtQt.a.b.c.d.d.d.d.d.d.d.e.f.g.aQtQtQtQtQt", "QtQtQtQtQt.a.h.i.j.j.j.k.l.m.m.n.o.p.a.qQtQtQtQt", "QtQtQtQtQt.a.d.r.s.t.u.v.w.x.y.l.l.z.a.AQtQtQtQt", "QtQtQtQtQt.a.B.C.D.E.E.D.F.F.G.H.I.J.a.KQtQtQtQt", "Qt.q.L.M.M.a.B.N.O.P.Q.R.S.H.T.R.U.b.a.V.qQtQtQt", "Qt.W.a.a.X.a.e.d.d.d.d.e.e.d.d.e.e.Y.a.Z.LQtQtQt", ".0.a.1.2.a.a.E.T.3.i.4.f.4.5.6.G.d.6.a.7.MQtQtQt", ".a.8.9#.##.a#a#b#c#d#c#d#d.m#d.I.y#e.a#f#gQtQtQt", ".a#h#i#j##.a#k#l#m#n#o#p#q#b#n#r#o#s.a.a#t.qQtQt", ".a#u#v#w.a.a#x#y.S#z#k#k.5#A.S#r#r.P.a#B.a#t.LQt", ".a#C#D#E.a#F#G.a.a.a.a.a.a.a.a.a.a#H#B#I#J.a#K.L", ".a#L#M#N.a.s.b#O#P#Q#Q#Q#Q#Q#Q#Q#Q#Q#Q#Q#Q#R.a.Z", ".0.a#S#T#U.a#V#W#X#Y#Z#0#0#1#2#2#3#4#R#5#6#J.a#7", "Qt.a#8#M#9a..a.Ra##saaab#o.5acabadaeafagahai.aaj", "Qt.a.aakalaman.aaoap#z.a.aaqarasatatasauavai.aaj", "Qt.aawaxayazaAaB.a.a.aaCaD.aaEaF#FaGaHaIaJaK.aaj", "Qt.aaLaM.aak#SaAaAaDaNaD##aO.aaPaQaRaSaTaUaV.aaj", "Qt.aaWaXaY.aaZaDa0a0a0##a1a2.aa3a4a5a5a6a7a8.aaj", "Qta9.a.a.a.a.a.ab.b#baa2bb.a.a.a.a.a.a.a.a.abcbd", "Qt.L.abebfbgbhbi.a.a.a.a.abjbkblbmbnbo#H#H.abpbq", "QtQta9.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.abcbd.V", "QtQt.L.Z#7brbpbsbt.#.Wbu.W.#bvbwbrajajajaj#7.Z.L"}; efax-gtk-3.2.8/src/redial_queue.h0000644000175000001440000000417011466007653013565 00000000000000/* Copyright (C) 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef REDIAL_QUEUE_H #define REDIAL_QUEUE_H #include "prog_defs.h" #include #include #include #include #include #include #include #include // first is a pointer to the source id of the timeout, second is the number typedef std::pair QueueItem; class RedialQueueDialog; class RedialQueue { const int standard_size; std::list item_list; RedialQueueDialog* dialog_p; public: friend class RedialQueueDialog; Emitter changed; // this method takes ownership of QueueItem::first and will // delete it when remove() or remove_all() is called void add(const QueueItem& item); bool remove(guint* id); void remove_all(void); void show_dialog(void); RedialQueue(const int size): standard_size(size) {} ~RedialQueue(void) {remove_all();} }; namespace RedialQueueDialogCB { extern "C" { void redial_queue_dialog_button_clicked(GtkWidget*, void*); void redial_queue_dialog_set_button(GtkTreeSelection*, void*); } } class RedialQueueDialog: public WinBase { static int is_redial_queue_dialog; const int standard_size; GtkWidget* remove_button_p; GtkWidget* close_button_p; GobjHandle list_store_h; GtkTreeView* tree_view_p; RedialQueue* redial_queue_p; void populate_item(const QueueItem& item); void remove(void); void remove_prompt(void); public: friend void RedialQueueDialogCB::redial_queue_dialog_button_clicked(GtkWidget*, void*); friend void RedialQueueDialogCB::redial_queue_dialog_set_button(GtkTreeSelection*, void*); Releaser releaser; void populate(void); void refresh(void); static int get_is_redial_queue_dialog(void) {return is_redial_queue_dialog;} RedialQueueDialog(const int standard_size, RedialQueue* redial_queue); ~RedialQueueDialog(void) {--is_redial_queue_dialog;} }; #endif efax-gtk-3.2.8/src/socket_list.cpp0000644000175000001440000004731111524106064013772 00000000000000/* Copyright (C) 2001 to 2006, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include #include #include #include #include #include "socket_list.h" #include "dialogs.h" #include "socket_list_icons.h" #include "utils/toolbar_append_widget.h" #include #include #ifdef ENABLE_NLS #include #endif int SocketListDialog::is_socket_list = 0; namespace { namespace ModelColumns { enum {fax_label, fax_filename, cols_num}; } // namespace ModelColumns } // anonymous namespace class SocketListDialog::CB { public: static void button_clicked(GtkWidget* widget_p, void* data) { SocketListDialog* instance_p = static_cast(data); if (widget_p == instance_p->send_button_p) { instance_p->send_fax_impl(); } else if (widget_p == instance_p->view_button_p) { instance_p->view_file(); } else if (widget_p == instance_p->remove_button_p) { instance_p->remove_file_prompt(); } else if (widget_p == instance_p->close_button_p) { instance_p->close(); } else { write_error("Callback error in SocketListDialog::CB::button_clicked()\n"); instance_p->close(); } } static void set_buttons(void* data) { SocketListDialog* instance_p = static_cast(data); // see if anything is selected GtkTreeSelection* selection_p = gtk_tree_view_get_selection(instance_p->tree_view_p); if (gtk_tree_selection_get_selected(selection_p, 0, 0)) { gtk_widget_set_sensitive(instance_p->view_button_p, true); gtk_widget_set_sensitive(instance_p->remove_button_p, true); gtk_widget_set_sensitive(instance_p->send_button_p, true); gtk_button_set_relief(GTK_BUTTON(instance_p->view_button_p), GTK_RELIEF_NORMAL); gtk_button_set_relief(GTK_BUTTON(instance_p->remove_button_p), GTK_RELIEF_NORMAL); gtk_button_set_relief(GTK_BUTTON(instance_p->send_button_p), GTK_RELIEF_NORMAL); } else { gtk_widget_set_sensitive(instance_p->view_button_p, false); gtk_widget_set_sensitive(instance_p->remove_button_p, false); gtk_widget_set_sensitive(instance_p->send_button_p, false); gtk_button_set_relief(GTK_BUTTON(instance_p->view_button_p), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(instance_p->remove_button_p), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(instance_p->send_button_p), GTK_RELIEF_NONE); } } static gboolean tree_view_mouse_click(GdkEventButton* event_p, void* data) { if (event_p->type == GDK_2BUTTON_PRESS) { SocketListDialog* instance_p = static_cast(data); int x, y; gtk_widget_get_pointer(GTK_WIDGET(instance_p->tree_view_p), &x, &y); if (x >= 0 && y >= 0 && gtk_tree_view_get_dest_row_at_pos(instance_p->tree_view_p, x, y, 0, 0)) { instance_p->view_file(); } } return false; } }; extern "C" { static void button_clicked_cb(GtkWidget* widget_p, void* data) { SocketListDialog::CB::button_clicked(widget_p, data); } static void set_buttons_cb(GtkTreeSelection*, void* data) { SocketListDialog::CB::set_buttons(data); } static gboolean tree_view_mouse_click_cb(GtkWidget*, GdkEventButton* event_p, void* data) { return SocketListDialog::CB::tree_view_mouse_click(event_p, data); } } // extern "C" SocketListDialog::SocketListDialog(std::pair, SharedPtr > filenames_pair, const int standard_size_): WinBase(gettext("efax-gtk: Queued faxes from socket"), prog_config.window_icon_h), standard_size(standard_size_) { // notify the existence of this object is_socket_list++; send_button_p = gtk_button_new(); view_button_p = gtk_button_new(); remove_button_p = gtk_button_new(); close_button_p = gtk_button_new_from_stock(GTK_STOCK_CLOSE); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkWidget* socket_list_box_p = gtk_vbox_new(false, 0); GtkTable* table_p = GTK_TABLE(gtk_table_new(2, 1, false)); GtkScrolledWindow* socket_list_scrolled_window_p = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(0, 0)); GtkToolbar* toolbar_p = (GTK_TOOLBAR(gtk_toolbar_new())); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_SPREAD); gtk_container_add(GTK_CONTAINER(button_box_p), close_button_p); gtk_scrolled_window_set_shadow_type(socket_list_scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(socket_list_scrolled_window_p, GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS); // create the tree model and put it in a GobjHandle to handle its // lifetime, because it is not owned by a GTK+ container list_store_h = GobjHandle(GTK_TREE_MODEL(gtk_list_store_new(ModelColumns::cols_num, G_TYPE_STRING, G_TYPE_STRING))); // populate the tree model set_socket_list_rows(filenames_pair); // create the tree view tree_view_p = GTK_TREE_VIEW(gtk_tree_view_new_with_model(list_store_h)); gtk_container_add(GTK_CONTAINER(socket_list_scrolled_window_p), GTK_WIDGET(tree_view_p)); // provide renderer for tree view, pack the fax_label tree view column // and connect to the tree model column (the fax_filename model column // is hidden and just contains data (a file name) to which the first // column relates GtkCellRenderer* renderer_p = gtk_cell_renderer_text_new(); GtkTreeViewColumn* column_p = gtk_tree_view_column_new_with_attributes(gettext("Queued print jobs"), renderer_p, "text", ModelColumns::fax_label, static_cast(0)); gtk_tree_view_append_column(tree_view_p, column_p); // single line selection GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); gtk_tree_selection_set_mode(selection_p, GTK_SELECTION_SINGLE); // set up the tool bar #if GTK_CHECK_VERSION(2,16,0) gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar_p), GTK_ORIENTATION_HORIZONTAL); #else gtk_toolbar_set_orientation(toolbar_p, GTK_ORIENTATION_HORIZONTAL); #endif gtk_toolbar_set_style(toolbar_p, GTK_TOOLBAR_ICONS); GtkWidget* image_p; { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(view_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(view_button_p), image_p); } toolbar_append_widget(toolbar_p, view_button_p, gettext("View selected file")); gtk_widget_set_sensitive(view_button_p, false); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(remove_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(remove_button_p), image_p); } toolbar_append_widget(toolbar_p, remove_button_p, gettext("Remove selected file from list")); gtk_widget_set_sensitive(remove_button_p, false); GtkWidget* send_hbox_p = gtk_hbox_new(false, 0); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(send_fax_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); GtkWidget* label_p = gtk_label_new(gettext("Enter selected fax to send")); gtk_box_pack_start(GTK_BOX(send_hbox_p), image_p, false, false, 4); gtk_box_pack_start(GTK_BOX(send_hbox_p), label_p, false, false, 4); gtk_container_add(GTK_CONTAINER(send_button_p), send_hbox_p); } toolbar_append_widget(toolbar_p, send_button_p, gettext("Choose the selected fax for sending")); gtk_widget_set_sensitive(send_button_p, false); gtk_table_attach(table_p, GTK_WIDGET(socket_list_scrolled_window_p), 0, 1, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/3, standard_size/3); gtk_table_attach(table_p, button_box_p, 0, 1, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); gtk_box_pack_start(GTK_BOX(socket_list_box_p), GTK_WIDGET(toolbar_p), false, false, 0); gtk_box_pack_start(GTK_BOX(socket_list_box_p), GTK_WIDGET(table_p), true, true, 0); g_signal_connect(G_OBJECT(send_button_p), "clicked", G_CALLBACK(button_clicked_cb), this); g_signal_connect(G_OBJECT(view_button_p), "clicked", G_CALLBACK(button_clicked_cb), this); g_signal_connect(G_OBJECT(remove_button_p), "clicked", G_CALLBACK(button_clicked_cb), this); g_signal_connect(G_OBJECT(close_button_p), "clicked", G_CALLBACK(button_clicked_cb), this); // now connect up the signal which indicates a selection has been made selection_p = gtk_tree_view_get_selection(tree_view_p); g_signal_connect(G_OBJECT(selection_p), "changed", G_CALLBACK(set_buttons_cb), this); // capture a double click on the tree view for viewing a fax for sending gtk_widget_add_events(GTK_WIDGET(tree_view_p), GDK_BUTTON_PRESS_MASK); g_signal_connect(G_OBJECT(tree_view_p), "button_press_event", G_CALLBACK(tree_view_mouse_click_cb), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(close_button_p, true); #else GTK_WIDGET_SET_FLAGS(close_button_p, GTK_CAN_DEFAULT); #endif gtk_container_set_border_width(GTK_CONTAINER(table_p), standard_size/3); gtk_container_add(GTK_CONTAINER(get_win()), socket_list_box_p); //gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER); gtk_window_set_default_size(get_win(), standard_size * 15, standard_size * 12); gtk_toolbar_set_show_arrow(GTK_TOOLBAR(toolbar_p), false); gtk_widget_show_all(GTK_WIDGET(get_win())); // not needed if gtk_toolbar_set_show_arrow() has been set false /* gtk_widget_set_size_request(GTK_WIDGET(toolbar_p), send_button_p->allocation.width + view_button_p->allocation.width + remove_button_p->allocation.width + 12, send_button_p->allocation.height); */ } SocketListDialog::~SocketListDialog(void) { // notify the destruction of this object is_socket_list--; } void SocketListDialog::send_fax_impl(void) { std::pair fax_to_send; GtkTreeIter selected_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &selected_iter)) { gchar* fax_label_p = 0; gchar* fax_filename_p = 0; gtk_tree_model_get(model_p, &selected_iter, ModelColumns::fax_label, &fax_label_p, ModelColumns::fax_filename, &fax_filename_p, -1); if (fax_label_p) fax_to_send.first = fax_label_p; if (fax_filename_p) fax_to_send.second = fax_filename_p; // we have not placed the gchar* strings given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free them by hand g_free(fax_label_p); g_free(fax_filename_p); selected_fax(fax_to_send); } } void SocketListDialog::close_cb(void) { close(); } void SocketListDialog::set_socket_list_rows(std::pair, SharedPtr > filenames_pair) { gtk_list_store_clear(GTK_LIST_STORE(list_store_h.get())); // filenames_pair.first references a std::list object containing // another pair as value type, the first member of which is a // temporary file name created by mkstemp() in // SocketServer::accept_client(), and the second member of which // contains the print job number assigned by // SocketServer::add_file() // filenames_pair.second is just a tunnelling lock, which gives us // exclusive access to the FilenamesList object maintained by the // SocketServer object while we are iterating through it in this // function std::for_each(filenames_pair.first->begin(), filenames_pair.first->end(), MemFun::make(*this, &SocketListDialog::set_socket_list_item)); } void SocketListDialog::set_socket_list_item(const std::pair& item) { // get a row to insert the file name in GtkTreeIter row_iter; gtk_list_store_append(GTK_LIST_STORE(list_store_h.get()), &row_iter); // insert fax label and fax filename std::ostringstream strm; strm << gettext("PRINT JOB: ") << item.second; gtk_list_store_set(GTK_LIST_STORE(list_store_h.get()), &row_iter, ModelColumns::fax_label, strm.str().c_str(), ModelColumns::fax_filename, item.first.c_str(), -1); } std::pair SocketListDialog::get_view_file_parms(const std::string& file_name) { std::vector view_parms; std::string view_cmd; std::string view_name; std::string::size_type end_pos; try { // lock the Prog_config object to stop it being accessed in // FaxListDialog::get_ps_viewer_parms() while we are accessing it here // (this is ultra cautious as it is only copied/checked for emptiness // there) Thread::Mutex::Lock lock(*prog_config.mutex_p); view_cmd = Utf8::filename_from_utf8(prog_config.ps_view_cmd); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in SocketListDialog::get_view_file_parms()\n"); return std::pair(static_cast(0), static_cast(0)); } if ((end_pos = view_cmd.find_first_of(' ')) != std::string::npos) { // we have parms view_name.assign(view_cmd, 0, end_pos); view_parms.push_back(view_name); // find start of next parm std::string::size_type start_pos = view_cmd.find_first_not_of(' ', end_pos); while (start_pos != std::string::npos) { end_pos = view_cmd.find_first_of(' ', start_pos); if (end_pos != std::string::npos) { view_parms.push_back(view_cmd.substr(start_pos, end_pos - start_pos)); start_pos = view_cmd.find_first_not_of(' ', end_pos); // prepare for next interation } else { view_parms.push_back(view_cmd.substr(start_pos, view_cmd.size() - start_pos)); start_pos = end_pos; } } } else { // just a view command without parameters to be passed view_name = view_cmd; view_parms.push_back(view_name); } view_parms.push_back(file_name); char** exec_parms = new char*[view_parms.size() + 1]; char** temp_pp = exec_parms; std::vector::const_iterator iter; for (iter = view_parms.begin(); iter != view_parms.end(); ++iter, ++temp_pp) { *temp_pp = new char[iter->size() + 1]; std::strcpy(*temp_pp, iter->c_str()); } *temp_pp = 0; char* prog_name = new char[view_name.size() + 1]; std::strcpy(prog_name, view_name.c_str()); return std::pair(prog_name, exec_parms); } void SocketListDialog::view_file(void) { bool is_ps_view_cmd_empty; { // lock the Prog_config object to stop it being accessed in // FaxListDialog::get_ps_viewer_parms() while we are accessing it here // (this is ultra cautious as it is only copied/checked for emptiness // there) Thread::Mutex::Lock lock(*prog_config.mutex_p); is_ps_view_cmd_empty = prog_config.ps_view_cmd.empty(); } GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p(gtk_tree_view_get_selection(tree_view_p)); if (!is_ps_view_cmd_empty && gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { gchar* file_name_p = 0; gtk_tree_model_get(model_p, &row_iter, ModelColumns::fax_filename, &file_name_p, -1); std::string file_name; if (file_name_p) file_name = file_name_p; // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(file_name_p); // get the arguments for the exec() call below (because this is a // multi-threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) std::pair view_file_parms(get_view_file_parms(file_name)); if (view_file_parms.first) { // this will be 0 if get_view_file_parms() // threw a Utf8::ConversionError) pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); std::exit(FORK_ERROR); } if (!pid) { // child process - as soon as everything is set up we are going to do an exec() connect_to_stderr(); execvp(view_file_parms.first, view_file_parms.second); // if we reached this point, then the execvp() call must have failed // report error and end process - use _exit() and not exit() write_error("Can't find the postscript viewer program - please check your installation\n" "and the PATH environmental variable\n"); _exit(0); } // end of view program process // release the memory allocated on the heap for // the redundant view_file_parms // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(view_file_parms); } } } void SocketListDialog::delete_parms(std::pair parms_pair) { delete[] parms_pair.first; char* const* temp_pp = parms_pair.second; for(; *temp_pp != 0; ++temp_pp) { delete[] *temp_pp; } delete[] parms_pair.second; } void SocketListDialog::remove_file_prompt(void) { GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { gchar* fax_label_p = 0; gtk_tree_model_get(model_p, &row_iter, ModelColumns::fax_label, &fax_label_p, -1); if (fax_label_p) { std::string msg(gettext("Remove ")); msg += fax_label_p; msg += gettext(" from the list?"); // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(fax_label_p); PromptDialog* dialog_p = new PromptDialog(msg.c_str(), gettext("efax-gtk: Remove queued fax"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &SocketListDialog::remove_file)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } } } void SocketListDialog::remove_file(void) { GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { gchar* file_name_p = 0; gtk_tree_model_get(model_p, &row_iter, ModelColumns::fax_filename, &file_name_p, -1); if (file_name_p) remove_from_socket_server_filelist(file_name_p); // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(file_name_p); // the emission of the remove_from_socket_server_filelist signal // will invoke MainWindow::remove_from_socket_server_filelist() // which will call SocketServer::remove_file() which will then // invoke the SocketServer::filelist_changed_notify Notifier // object which will in turn invoke the // MainWindow::socket_filelist_changed_notify_cb() which will // then call SocketListDialog::set_socket_list_rows() and so // refresh the socket file list. The server object will also // clean up by deleting the temporary file it created. We do not // therefore need to do anything else here. } } efax-gtk-3.2.8/src/dialogs.h0000644000175000001440000000721611512720045012534 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef DIALOGS_H #define DIALOGS_H #include "prog_defs.h" #include #include #include #include #include #include #include namespace FileReadSelectDialogCB { extern "C" { void frs_dialog_selected(GtkWidget*, void*); void frs_dialog_view_file(GtkWidget*, void*); } } class FileReadSelectDialog: public WinBase { int standard_size; GtkWidget* ok_button_p; GtkWidget* cancel_button_p; std::vector result; std::pair get_view_file_parms(void); void delete_parms(std::pair); std::string get_filename_string(void); void set_result(void); void view_file_impl(void); protected: virtual void on_delete_event(void); public: friend void FileReadSelectDialogCB::frs_dialog_selected(GtkWidget*, void*); friend void FileReadSelectDialogCB::frs_dialog_view_file(GtkWidget*, void*); // get_result() returns the filenames in UTF-8 (not filesystem) encoding std::vector get_result(void) const {return result;} FileReadSelectDialog(int standard_size, bool multi_files, GtkWindow* parent_p); }; namespace GplDialogCB { extern "C" { void gpl_dialog_selected(GtkWidget*, void*); gboolean gpl_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); } } class GplDialog: public WinBase { public: enum Result {rejected, accepted}; private: int standard_size; Result result; GtkWidget* accept_button_p; GtkWidget* reject_button_p; GtkTextView* text_view_p; protected: virtual int get_exec_val(void) const; virtual void on_delete_event(void); public: friend void GplDialogCB::gpl_dialog_selected(GtkWidget*, void*); friend gboolean GplDialogCB::gpl_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); GplDialog(int standard_size); }; namespace InfoDialogCB { extern "C" void info_dialog_selected(GtkDialog*, int, void*); } class InfoDialog: public WinBase { protected: virtual void on_delete_event(void); public: friend void InfoDialogCB::info_dialog_selected(GtkDialog*, int, void*); InfoDialog(const char* text, const char* caption, GtkMessageType message_type, GtkWindow* parent_p, bool modal = true); }; namespace PromptDialogCB { extern "C" void prompt_dialog_selected(GtkDialog*, int, void*); } class PromptDialog: public WinBase { bool result; protected: virtual int get_exec_val(void) const; virtual void on_delete_event(void); public: friend void PromptDialogCB::prompt_dialog_selected(GtkDialog*, int, void*); Emitter accepted; Emitter rejected; PromptDialog(const char* text, const char* caption, int standard_size, GtkWindow* parent_p, bool modal = true); }; namespace AboutEfaxGtkDialogCB { extern "C" void about_efax_gtk_dialog_selected(GtkDialog*, int, void*); } class AboutEfaxGtkDialog: public WinBase { protected: virtual void on_delete_event(void); public: friend void AboutEfaxGtkDialogCB::about_efax_gtk_dialog_selected(GtkDialog*, int, void*); AboutEfaxGtkDialog(GtkWindow* parent_p = 0, bool modal = false); }; namespace AboutEfaxDialogCB { extern "C" void about_efax_dialog_selected(GtkDialog*, int, void*); } class AboutEfaxDialog: public WinBase { protected: virtual void on_delete_event(void); public: friend void AboutEfaxDialogCB::about_efax_dialog_selected(GtkDialog*, int, void*); AboutEfaxDialog(GtkWindow* parent_p = 0, bool modal = false); }; #endif efax-gtk-3.2.8/src/prog_defs.h0000644000175000001440000002512211534240055013060 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef PROG_DEFS_H #define PROG_DEFS_H #include #include // deal with any configuration issues arising from config.h #ifndef ENABLE_NLS inline const char* gettext(const char* text) { return text; } #endif #ifndef HAVE_SOCKLEN_T typedef unsigned int socklen_t; #endif #ifndef HAVE_IN_ADDR_T typedef unsigned long in_addr_t; #endif // define some common exit codes #define MEM_ERROR 10 #define CONFIG_ERROR 11 #define COM_ERROR 12 #define FILEOPEN_ERROR 13 #define PIPE_ERROR 14 #define TERM_ERROR 15 #define ARG_ERROR 16 #define EXEC_ERROR 17 #define FORK_ERROR 18 #define RC_FILE "efax-gtkrc" #include #include #include #include #include #include namespace Cgu {} using namespace Cgu; /************************* threading issues ************************* 1. This program uses certain functions which are not guaranteed by IEEE Std 1003.1 to be thread safe, and which are not protected by mutexes because this program only uses them in one thread. These functions are: localtime() - used in the main (GUI) thread (efax_controller.cpp) readdir() - used in the main (GUI) thread (fax_list.cpp) gethostbyaddr() ) gethostbyname() ) used in the socket server thread (socket_server.cpp) inet_ntoa() ) If the program is modified to use any of these in a different thread, mutexes will need to be applied. 2. The program operates the following threads: - the initial GUI thread (the main program thread) (runs throughout program execution). - a thread to read the fifo which is used to tell the program (when it has been started) that the user has tried to start it again, so that it can present itself instead of starting up again. This involves the following method of class MainWindow: pipe_thread() - if the socket server is running, a socket server thread (runs whenever the socket server has been selected to run). This involves the following methods of the SocketServer class: socket_thread(), accept_on_client(), is_valid_peer(), read_socket(), add_file(), write_stdout_from_thread() and save_queued_faxes(). (save_queued_faxes is called by both the main GUI thread and by the socket_server_thread - see the comments in that method about mutexes) - a temporary thread created to send a fax, involving the following methods of the EfaxController class: sendfax_thread(), ps_file_to_tiff_files(), get_gs_parms(), get_efax_parms(), delete_parms() and join_child() - a temporary thread created to receive a fax, involving the following methods of the EfaxController class: receive_thread(), get_efax_parms(), delete_parms() and join_child() - a temporary thread to prepare a fax for printing, involving the following methods of the FaxListDialog class: print_fax_thread(), get_print_from_stdin_parms(), get_fax_to_ps_parms() and delete_parms() (get_fax_to_ps_parms() is also called by the temporary thread invoked with view_fax_thread() and delete_parms() is also called by that thread and by the main (GUI) thread) together with the following methods of the MonoTiffPrintManager class: set_filenames() and print() - a temporary thread to view a fax, involving the following methods of the FaxListDialog class: view_fax_thread(), write_pipe_to_file(), get_ps_viewer_parms(), get_fax_to_ps_parms() and delete_parms() (get_fax_to_ps_parms() is also called by the temporary thread invoked with print_fax_thread() and delete_parms() is also called by that thread and by the main (GUI) thread) 3. The last member of the Prog_config class below is a pointer to a mutex object allocated in int main() in main.cpp. The mutex should be locked whenever: (a) the main (GUI) thread is modifying a member of the Prog_config class, or (b) any worker thread is reading the Prog_config object. No worker thread should modify a Prog_config class member, to save excessive locking in this program 4. In addition, members of the Prog_config class which are not built-in types, and for which concurrent reads in different threads are not guaranteed, are read outside the main (GUI) thread as follows - - Prog_config::resolution is read by EfaxController::get_gs_parms() (in efax_controller.cpp) - Prog_config::page_size is read by EfaxController::get_gs_parms() (in efax_controller.cpp) and by FaxListDialog::get_fax_to_ps_parms() (in fax_list.cpp) - Prog_config::page_dim is read by FaxListDialog::get_fax_to_ps_parms() (in fax_list.cpp) - Prog_config::print_shrink is read by FaxListDialog::get_fax_to_ps_parms() (in fax_list.cpp) - Prog_config::print_cmd is read by FaxListDialog::get_print_from_stdin_parms() (in fax_list.cpp) - Prog_config::ps_view_cmd is read by FaxListDialog::get_ps_viewer_parms() (in fax_list.cpp) - Prog_config::permitted_clients_list is read by SocketServer::is_valid_peer() (in socket_server.cpp) These are protected by the mutex where read by these non-GUI threads and written to by the main (GUI) thread, but they should also be protected by the mutex wherever read by the main (GUI) thread unless it is known that there can be no concurrency with the execution of these other threads so far as concerns the reading of these members. (In fact, as this program is written concurrent reads are only an issue with Prog_config::ps_view_cmd, and locking of it takes place in FileReadSelectDialog::get_view_file_parms() (in dialogs.cpp), FileListDialog::view_file() and FileListDialog::get_view_file_parms() (in filelist.cpp) and SocketListDialog::view_file() and SocketListDialog::get_view_file_parms() (in socket_list.cpp).) The global lock Prog_config::mutex_p is provided for the purpose. Global locks are quite dangerous - they can easily lead to deadlocks from out-of-order locking of other mutexes. Accordingly, only lock Prog_config::mutex_p if no other mutex locks are being held. 5. See also the comments about thread sefety in the function write_error() in mainwindow.cpp. 6. This program used libsigc++ prior to version 3.2.0. sigc::trackable in libsigc++ is not thread safe - amongst other things, a class inheriting from sigc::trackable will, via that inheritance, have a std::list object keeping track of slots connected to any of its non-static methods. Each sigc::slot object also, via sigc::slot_rep, keeps its own sigc::trackable object to track any sigc::connection objects which it needs to inform about its demise. sigc::signal objects also keep lists of slots, which will be updated with a call to its connect() and disconnect() methods. This required a few rules to be observed in multi-threaded applications: - Unless special additional synchronisation is employed, regard any particular sigc::signal object as "owned" by the thread which created it. Only that thread should connect or disconnect slots with respect to the signal object, and only that thread should emit() or call operator()() on it. - Unless special additional synchronisation is employed, regard any sigc::connection object as owned by the thread which created the slot and called the method which provided the sigc::connection object. Only that thread should call sigc::connection methods on the object. - Unless you really know what you are doing, do not copy slots between threads. In addition never ever copy to another thread a slot which references a non-static method of a class derived from sigc::trackable. - If a particular class object derives from sigc::trackable, only one thread should create slots representing any of its non-static methods (ie create slots with sigc::mem_fun()). Regard the first thread to create such a slot as owning the relevant object for the purpose of creating further slots referencing any of its methods. From version 3.2.0, this program now uses the thread-safe Releaser and EmitterArg<> classes in the c++-gtk-utils library. *********************************************************************/ struct Prog_config { std::string lock_file; std::string fixed_font; std::string homedir; std::string working_dir; char rings; bool tone_dial; bool found_rcfile; bool GPL_flag; bool gtkprint; bool print_popup; bool sock_server; bool sock_popup; bool other_sock_client_address; bool ipv6; bool fax_received_popup; bool fax_received_exec; bool addr_in_header; bool redial; std::string my_name; std::string my_number; std::string page_size; // either 'a4' 'letter' or 'legal' std::string page_dim; std::string resolution; std::string dial_prefix; std::string print_cmd; std::string print_shrink; std::string ps_view_cmd; std::string logfile_name; std::string sock_server_port; std::string fax_received_prog; std::string redial_interval; std::vector parms; std::vector permitted_clients_list; pid_t efax_controller_child_pid; GobjHandle window_icon_h; Thread::Mutex* mutex_p; }; extern Prog_config prog_config; // defined in main.cpp std::string configure_prog(bool reread);// also defined in main.cpp (pass reread as true if // the program parameters are being reread) // generic beep() function defined in main.cpp void beep(void); // general function for writing an error defined in mainwindow.cpp // the message must not be larger than PIPE_BUF in size. The function // handles EINTR - you do not need to check this yourself. The error // messages are put in a pipe which is non-blocking - it will be // emptied fairly promptly but messages should be less than PIPE_BUF // in length or any excess may be lost (it returns the number of // bytes written, so the return value can be used to achieve long // writes, if really wanted). ssize_t write_error(const char*); // this function is defined in mainwindow.cpp, and will cause any // message written to stderr to be taken by the in built error pipe // in MainWindow. Only call this in a child process after fork()ing. int connect_to_stderr(void); #endif efax-gtk-3.2.8/src/socket_notify.h0000644000175000001440000000237511466007653014006 00000000000000/* Copyright (C) 2004, 2005, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef SOCKET_NOTIFY_H #define SOCKET_NOTIFY_H #include "prog_defs.h" #include #include #include #include #include namespace SocketNotifyDialogCB { extern "C" void socket_notify_dialog_button_clicked(GtkWidget*, void*); } class SocketNotifyDialog: public WinBase { const int standard_size; std::pair fax_name; GtkWidget* number_button_p; GtkWidget* send_button_p; GtkWidget* queue_button_p; GtkWidget* number_entry_p; void set_number_cb(const std::string&); void send_signals(void); protected: virtual void on_delete_event(void); public: friend void SocketNotifyDialogCB::socket_notify_dialog_button_clicked(GtkWidget*, void*); EmitterArg&> fax_name_sig; EmitterArg fax_number_sig; Emitter sendfax_sig; Emitter queue_sig; SocketNotifyDialog(const int standard_size, const std::pair&); }; #endif efax-gtk-3.2.8/src/helpfile.h0000644000175000001440000000233211466007653012707 00000000000000/* Copyright (C) 2001 to 2005 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef HELPFILE_H #define HELPFILE_H #include "prog_defs.h" #include #include namespace HelpDialogCB { extern "C" { void help_dialog_button_clicked(GtkWidget*, void*); gboolean help_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); } } class HelpDialog: public WinBase { static int is_helpfile; GtkNotebook* notebook_p; const char* get_sending_help(void); const char* get_redial_help(void); const char* get_receiving_help(void); const char* get_addressbook_help(void); const char* get_fax_list_help(void); const char* get_settings_help(void); GtkWidget* make_text_view(const char* text); GtkWidget* make_scrolled_window(void); public: friend void HelpDialogCB::help_dialog_button_clicked(GtkWidget*, void*); friend gboolean HelpDialogCB::help_dialog_key_press_event(GtkWidget*, GdkEventKey*, void*); static int get_is_helpfile(void) {return is_helpfile;} HelpDialog(const int size); ~HelpDialog(void); }; #endif efax-gtk-3.2.8/src/mainwindow.cpp0000644000175000001440000025123211544200716013623 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // the key codes are here #include #include #include #include "mainwindow.h" #include "dialogs.h" #include "addressbook.h" #include "file_list.h" #include "settings.h" #include "socket_notify.h" #include "menu_icons.h" #include "utils/icon_info_handle.h" #if !(GTK_CHECK_VERSION(2,99,0)) #include "utils/cairo_handle.h" #endif #include #include #include #include #include #include #ifdef HAVE_X11_XLIB_H #include #endif #ifdef HAVE_STREAM_IMBUE #include #endif #ifdef ENABLE_NLS #include #endif // there can be certain circumstances where PIPE_BUF is not // defined in . If so, just define the minimum // required by POSIX #ifndef PIPE_BUF #define PIPE_BUF 512 #endif // and make sure M_PI is defined #ifndef M_PI #define M_PI 3.14159265358979323846 #endif extern "C" void close_signalhandler(int); PipeFifo sig_pipe(PipeFifo::non_block); static Thread::Mutex* write_error_mutex_p = 0; bool MainWindow::connected_to_stderr = false; PipeFifo MainWindow::error_pipe(PipeFifo::non_block); void MainWindowCB::mainwin_button_clicked(GtkWidget* widget_p, void* data) { MainWindow* instance_p = static_cast(data); if (widget_p == instance_p->file_button_p) { instance_p->set_file_items_sensitive_impl(); } else if (widget_p == instance_p->socket_button_p) { instance_p->set_socket_items_sensitive_impl(); } else if (widget_p == instance_p->single_file_button_p) { instance_p->get_file_impl(); } else if (widget_p == instance_p->multiple_file_button_p) { instance_p->file_list_impl(); } else if (widget_p == instance_p->socket_list_button_p) { instance_p->socket_list_impl(); } else if (widget_p == instance_p->number_button_p) { instance_p->addressbook_impl(); } else if (widget_p == instance_p->send_button_p) { instance_p->sendfax_cb(); } else if (widget_p == instance_p->receive_answer_button_p) { instance_p->receive_impl(EfaxController::receive_answer); } else if (widget_p == instance_p->receive_takeover_button_p) { instance_p->receive_impl(EfaxController::receive_takeover); } else if (widget_p == instance_p->receive_standby_button_p) { instance_p->receive_impl(EfaxController::receive_standby); } else if (widget_p == instance_p->stop_button_p) { instance_p->efax_controller.stop(); } else { write_error("Callback error in MainWindowCB::mainwin_button_clicked()\n"); return; } } void MainWindowCB::mainwin_menuitem_activated(GtkMenuItem* item_p, void* data) { MainWindow* instance_p = static_cast(data); if (item_p == instance_p->list_received_faxes_item_p) { instance_p->fax_list_impl(FaxListEnum::received); } else if (item_p == instance_p->list_sent_faxes_item_p) { instance_p->fax_list_impl(FaxListEnum::sent); } else if (item_p == instance_p->socket_list_item_p) { instance_p->socket_list_impl(); } else if (item_p == instance_p->single_file_item_p) { instance_p->get_file_impl(); } else if (item_p == instance_p->multiple_file_item_p) { instance_p->file_list_impl(); } else if (item_p == instance_p->address_book_item_p) { instance_p->addressbook_impl(); } else if (item_p == instance_p->redial_queue_item_p) { instance_p->redial_queue_impl(); } else if (item_p == instance_p->settings_item_p) { instance_p->settings_impl(); } else if (item_p == instance_p->quit_item_p) { instance_p->close_impl(); } else if (instance_p->print_log_item_p && item_p == instance_p->print_log_item_p) { instance_p->text_window.print_log(); } else if (instance_p->page_setup_log_item_p && item_p == instance_p->page_setup_log_item_p) { MessageText::print_page_setup(instance_p->get_win()); } else if (item_p == instance_p->view_log_item_p) { instance_p->text_window.view_log(instance_p->standard_size); } else if (item_p == instance_p->about_efax_gtk_item_p) { instance_p->about_impl(true); } else if (item_p == instance_p->about_efax_item_p) { instance_p->about_impl(false); } else if (item_p == instance_p->translations_item_p) { instance_p->translations_impl(); } else if (item_p == instance_p->help_item_p) { instance_p->helpfile_impl(); } else { write_error("Callback error in MainWindowCB::mainwin_menuitem_activated()\n"); return; } } gboolean MainWindowCB::mainwin_key_press_event(GtkWidget*, GdkEventKey* event_p, void* data) { MainWindow* instance_p = static_cast(data); #if GTK_CHECK_VERSION(2,99,0) if (event_p->keyval == GDK_KEY_F1) { instance_p->helpfile_impl(); return true; // processing stops here } #else if (event_p->keyval == GDK_F1) { instance_p->helpfile_impl(); return true; // processing stops here } #endif return false; // carry on processing the key event } gboolean MainWindowCB::mainwin_visibility_notify_event(GtkWidget*, GdkEventVisibility* event_p, void* data) { MainWindow* instance_p = static_cast(data); if(event_p->state == GDK_VISIBILITY_FULLY_OBSCURED) instance_p->obscured = true; else instance_p->obscured = false; return false; // carry on processing the visibility notify event } gboolean MainWindowCB::mainwin_window_state_event(GtkWidget*, GdkEventWindowState* event_p, void* data) { MainWindow* instance_p = static_cast(data); if(event_p->changed_mask & GDK_WINDOW_STATE_ICONIFIED) { if(event_p->new_window_state & GDK_WINDOW_STATE_ICONIFIED) instance_p->minimised = true; else instance_p->minimised = false; } return false; // carry on processing the window state event } #if GTK_CHECK_VERSION(2,99,0) void MainWindowCB::mainwin_button_style_updated(GtkWidget*, void* data) { static_cast(data)->button_style_updated_impl(); } gboolean MainWindowCB::mainwin_drawing_area_draw(GtkWidget*, cairo_t* cairo_p, void* data) { return static_cast(data)->draw_fax_from_socket_notifier(cairo_p); } #else void MainWindowCB::mainwin_button_style_set(GtkWidget*, GtkStyle* prev_style_p, void* data) { static_cast(data)->button_style_set_impl(prev_style_p); } gboolean MainWindowCB::mainwin_drawing_area_expose_event(GtkWidget*, GdkEventExpose* event_p, void* data) { return static_cast(data)->draw_fax_from_socket_notifier(event_p); } #endif /* GTK_CHECK_VERSION(2,99,0) */ MainWindow::MainWindow(const std::string& messages,bool start_hidden, bool start_in_standby, const char* filename): // start_hidden and start_in_standby have a default value of // false and filename has a default value of 0 WinBase(0, prog_config.window_icon_h, false), standard_size(24), obscured(false), minimised(false), text_window(WinBase::get_win()), status_line(standard_size), efax_controller(standard_size) { write_error_mutex_p = new Thread::Mutex; // catch any relevant Unix signals for an orderly closedown // catch SIGQUIT, SIGTERM SIGINT SIGHUP // it is safe to use signal() for these sig_pipe.make_write_non_block(); start_iowatch(sig_pipe.get_read_fd(), Callback::make(*this, &MainWindow::sig_event_cb), G_IO_IN); signal(SIGQUIT, close_signalhandler); signal(SIGTERM, close_signalhandler); signal(SIGINT, close_signalhandler); signal(SIGHUP, close_signalhandler); // ignore SIGPIPE struct sigaction sig_act_pipe; sig_act_pipe.sa_handler = SIG_IGN; // we don't need to mask off any signals sigemptyset(&sig_act_pipe.sa_mask); sig_act_pipe.sa_flags = 0; sigaction(SIGPIPE, &sig_act_pipe, 0); // we don't need to set a child signal handler - the default // (SIG_DFL) is fine - we want to ignore it as we will reap // exit status in EfaxController::sendfax_thread() or // EfaxController::receive_thread, which call waitpid() GtkWidget* drawing_area_alignment_p = gtk_alignment_new(1, 0.5, 0, 1); drawing_area_p = gtk_drawing_area_new(); gtk_widget_set_size_request(drawing_area_p, standard_size, standard_size); gtk_container_add(GTK_CONTAINER(drawing_area_alignment_p), drawing_area_p); GtkTable* file_entry_table_p = GTK_TABLE(gtk_table_new(3, 3, false)); GtkTable* win_table_p = GTK_TABLE(gtk_table_new(5, 3, false)); file_button_p = gtk_radio_button_new_with_label(0, gettext("File ")); socket_button_p = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(file_button_p), gettext("Socket ")); GtkWidget* fax_method_label_p = gtk_label_new(gettext("Fax entry method: ")); single_file_button_p = gtk_button_new_with_label(gettext("Single file")); multiple_file_button_p = gtk_button_new_with_label(gettext("Multiple files")); socket_list_button_p = gtk_button_new_with_label(gettext("Socket list")); number_button_p = gtk_button_new_with_label(gettext("Tel number: ")); send_button_p = gtk_button_new_with_label(gettext("Send fax")); receive_answer_button_p = gtk_button_new_with_label(gettext("Answer call")); receive_takeover_button_p = gtk_button_new_with_label(gettext("Take over call")); receive_standby_button_p = gtk_button_new_with_label(gettext("Standby")); stop_button_p = gtk_button_new_with_label(gettext("Stop")); file_entry_p = gtk_entry_new(); number_entry_p = gtk_entry_new(); GtkBox* fax_method_radio_box_p = GTK_BOX(gtk_hbox_new(false, 0)); gtk_box_pack_start(fax_method_radio_box_p, file_button_p, false, false, 0); gtk_box_pack_start(fax_method_radio_box_p, socket_button_p, false, false, 0); GtkWidget* fax_method_radio_frame_p = gtk_frame_new(0); gtk_container_add(GTK_CONTAINER(fax_method_radio_frame_p), GTK_WIDGET(fax_method_radio_box_p)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(file_button_p), true); GtkBox* fax_method_box_p = GTK_BOX(gtk_hbox_new(false, 0)); gtk_box_pack_start(fax_method_box_p, fax_method_label_p, false, false, 0); gtk_box_pack_start(fax_method_box_p, fax_method_radio_frame_p, false, false, 0); gtk_box_pack_start(fax_method_box_p, drawing_area_alignment_p, true, true, 0); gtk_table_attach(file_entry_table_p, file_entry_p, 0, 3, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(file_entry_table_p, GTK_WIDGET(fax_method_box_p), 0, 3, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(file_entry_table_p, single_file_button_p, 0, 1, 2, 3, GTK_EXPAND, GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(file_entry_table_p, multiple_file_button_p, 1, 2, 2, 3, GTK_EXPAND, GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(file_entry_table_p, socket_list_button_p, 2, 3, 2, 3, GTK_EXPAND, GTK_SHRINK, standard_size/3, standard_size/3); GtkWidget* file_entry_frame_p = gtk_frame_new(gettext("Fax to send")); gtk_container_add(GTK_CONTAINER(file_entry_frame_p), GTK_WIDGET(file_entry_table_p)); GtkBox* number_box_p = GTK_BOX(gtk_hbox_new(false, 0)); gtk_box_pack_start(number_box_p, number_button_p, false, false, standard_size/2); gtk_box_pack_start(number_box_p, number_entry_p, true, true, 0); gtk_table_attach(win_table_p, file_entry_frame_p, 0, 3, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(win_table_p, GTK_WIDGET(number_box_p), 0, 3, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(win_table_p, text_window.get_main_widget(), 0, 3, 2, 3, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/3, standard_size/3); gtk_table_attach(win_table_p, send_button_p, 0, 1, 3, 4, GTK_EXPAND, GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(win_table_p, receive_answer_button_p, 1, 2, 3, 4, GTK_EXPAND, GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(win_table_p, receive_takeover_button_p, 2, 3, 3, 4, GTK_EXPAND, GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(win_table_p, receive_standby_button_p, 0, 1, 4, 5, GTK_EXPAND, GTK_SHRINK, standard_size/3, standard_size/3); gtk_table_attach(win_table_p, stop_button_p, 2, 3, 4, 5, GTK_EXPAND, GTK_SHRINK, standard_size/3, standard_size/3); g_signal_connect(G_OBJECT(file_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(socket_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(single_file_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(multiple_file_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(socket_list_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(number_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(send_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(receive_answer_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(receive_takeover_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(receive_standby_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); g_signal_connect(G_OBJECT(stop_button_p), "clicked", G_CALLBACK(MainWindowCB::mainwin_button_clicked), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(single_file_button_p, true); gtk_widget_set_can_default(multiple_file_button_p, true); gtk_widget_set_can_default(socket_list_button_p, true); gtk_widget_set_can_default(number_button_p, true); gtk_widget_set_can_default(send_button_p, true); gtk_widget_set_can_default(receive_answer_button_p, true); gtk_widget_set_can_default(receive_takeover_button_p, true); gtk_widget_set_can_default(receive_standby_button_p, true); gtk_widget_set_can_default(stop_button_p, true); #else GTK_WIDGET_SET_FLAGS(single_file_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(multiple_file_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(socket_list_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(number_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(send_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(receive_answer_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(receive_takeover_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(receive_standby_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(stop_button_p, GTK_CAN_DEFAULT); #endif // set up the menu bar // first get the about icon bool have_about_icon = false; GobjHandle about_pixbuf_h; GtkIconTheme* icon_theme_p = gtk_icon_theme_get_default(); IconInfoScopedHandle about_icon_info_h(gtk_icon_theme_lookup_icon(icon_theme_p, "stock_about", 16, GtkIconLookupFlags(0))); if (about_icon_info_h.get()) { const gchar* icon_path_p = gtk_icon_info_get_filename(about_icon_info_h.get()); if (icon_path_p) { GError* error_p = 0; about_pixbuf_h = GobjHandle(gdk_pixbuf_new_from_file(icon_path_p, &error_p)); if (about_pixbuf_h.get()) have_about_icon = true; else { write_error("Pixbuf error in MainWindow::MainWindow()\n"); if (error_p) { GerrorScopedHandle handle_h(error_p); write_error(error_p->message); write_error("\n"); } } } } if (!have_about_icon) { about_pixbuf_h = GobjHandle(gdk_pixbuf_new_from_xpm_data(about_xpm)); } // create the file menu GtkWidget* file_menu_p = gtk_menu_new(); GtkWidget* image_p; image_p = gtk_image_new_from_stock(GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); list_received_faxes_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("List _received faxes"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(list_received_faxes_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(list_received_faxes_item_p)); gtk_widget_show(GTK_WIDGET(list_received_faxes_item_p)); image_p = gtk_image_new_from_stock(GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); list_sent_faxes_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("_List sent faxes"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(list_sent_faxes_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(list_sent_faxes_item_p)); gtk_widget_show(GTK_WIDGET(list_sent_faxes_item_p)); // insert separator GtkWidget* separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), separator_item_p); gtk_widget_show(separator_item_p); socket_list_item_p = GTK_MENU_ITEM(gtk_menu_item_new_with_mnemonic(gettext("Queued _faxes from socket"))); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(socket_list_item_p)); gtk_widget_show(GTK_WIDGET(socket_list_item_p)); image_p = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU); single_file_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("_Enter single file"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(single_file_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(single_file_item_p)); gtk_widget_show(GTK_WIDGET(single_file_item_p)); image_p = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU); multiple_file_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("Enter _multiple files"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(multiple_file_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(multiple_file_item_p)); gtk_widget_show(GTK_WIDGET(multiple_file_item_p)); // insert separator separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), separator_item_p); gtk_widget_show(separator_item_p); address_book_item_p = GTK_MENU_ITEM(gtk_menu_item_new_with_mnemonic(gettext("_Address book"))); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(address_book_item_p)); gtk_widget_show(GTK_WIDGET(address_book_item_p)); // insert separator separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), separator_item_p); gtk_widget_show(separator_item_p); image_p = gtk_image_new_from_stock(GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); redial_queue_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("Re_dial queue"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(redial_queue_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(redial_queue_item_p)); gtk_widget_show(GTK_WIDGET(redial_queue_item_p)); // insert separator separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), separator_item_p); gtk_widget_show(separator_item_p); image_p = gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU); settings_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("_Settings"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(settings_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(settings_item_p)); gtk_widget_show(GTK_WIDGET(settings_item_p)); // insert separator separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), separator_item_p); gtk_widget_show(separator_item_p); image_p = gtk_image_new_from_stock(GTK_STOCK_QUIT, GTK_ICON_SIZE_MENU); quit_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("_Quit"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(quit_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(file_menu_p), GTK_WIDGET(quit_item_p)); gtk_widget_show(GTK_WIDGET(quit_item_p)); // create the log menu GtkWidget* log_menu_p = gtk_menu_new(); image_p = gtk_image_new_from_stock(GTK_STOCK_PRINT, GTK_ICON_SIZE_MENU); print_log_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("_Print logfile"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(print_log_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(log_menu_p), GTK_WIDGET(print_log_item_p)); gtk_widget_show(GTK_WIDGET(print_log_item_p)); // get page setup icon (if any) image_p = 0; IconInfoScopedHandle page_setup_icon_info_h(gtk_icon_theme_lookup_icon(icon_theme_p, "document-page-setup", 16, GtkIconLookupFlags(0))); if (page_setup_icon_info_h.get()) { const gchar* icon_path_p = gtk_icon_info_get_filename(page_setup_icon_info_h.get()); if (icon_path_p) { GError* error_p = 0; GobjHandle pixbuf_h(gdk_pixbuf_new_from_file(icon_path_p, &error_p)); if (pixbuf_h.get()) { image_p = gtk_image_new_from_pixbuf(pixbuf_h); } else { write_error("Pixbuf error in MainWindow::MainWindow()\n"); if (error_p) { GerrorScopedHandle handle_h(error_p); write_error(error_p->message); write_error("\n"); } } } } if (!image_p) { image_p = gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU); } page_setup_log_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("Print logfile page _setup"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(page_setup_log_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(log_menu_p), GTK_WIDGET(page_setup_log_item_p)); gtk_widget_show(GTK_WIDGET(page_setup_log_item_p)); { // scope block for the GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(view_xpm)); pixbuf_h = GobjHandle(gdk_pixbuf_scale_simple(pixbuf_h, 16, 16, GDK_INTERP_BILINEAR)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); view_log_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("_View logfile"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(view_log_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(log_menu_p), GTK_WIDGET(view_log_item_p)); gtk_widget_show(GTK_WIDGET(view_log_item_p)); } if (prog_config.logfile_name.empty()) { gtk_widget_set_sensitive(GTK_WIDGET(view_log_item_p), false); gtk_widget_set_sensitive(GTK_WIDGET(print_log_item_p), false); gtk_widget_set_sensitive(GTK_WIDGET(page_setup_log_item_p), false); } // create the help menu GtkWidget* help_menu_p = gtk_menu_new(); image_p = gtk_image_new_from_pixbuf(about_pixbuf_h); about_efax_gtk_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("About efax-_gtk"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(about_efax_gtk_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(help_menu_p), GTK_WIDGET(about_efax_gtk_item_p)); gtk_widget_show(GTK_WIDGET(about_efax_gtk_item_p)); image_p = gtk_image_new_from_pixbuf(about_pixbuf_h); about_efax_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("About _efax"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(about_efax_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(help_menu_p), GTK_WIDGET(about_efax_item_p)); gtk_widget_show(GTK_WIDGET(about_efax_item_p)); translations_item_p = GTK_MENU_ITEM(gtk_menu_item_new_with_mnemonic(gettext("_Translations"))); gtk_menu_shell_append(GTK_MENU_SHELL(help_menu_p), GTK_WIDGET(translations_item_p)); gtk_widget_show(GTK_WIDGET(translations_item_p)); // insert separator separator_item_p = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(help_menu_p), separator_item_p); gtk_widget_show(separator_item_p); image_p = gtk_image_new_from_stock(GTK_STOCK_HELP, GTK_ICON_SIZE_MENU); help_item_p = GTK_MENU_ITEM(gtk_image_menu_item_new_with_mnemonic(gettext("_Help"))); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(help_item_p), image_p); gtk_menu_shell_append(GTK_MENU_SHELL(help_menu_p), GTK_WIDGET(help_item_p)); gtk_widget_show(GTK_WIDGET(help_item_p)); // now put the menus into a menubar GtkWidget* root_file_item_p = gtk_menu_item_new_with_mnemonic(gettext("_File")); GtkWidget* root_log_item_p = gtk_menu_item_new_with_mnemonic(gettext("_Log")); GtkWidget* root_help_item_p = gtk_menu_item_new_with_mnemonic(gettext("_Help")); gtk_menu_item_set_submenu(GTK_MENU_ITEM(root_file_item_p), file_menu_p); gtk_menu_item_set_submenu(GTK_MENU_ITEM(root_log_item_p), log_menu_p); gtk_menu_item_set_submenu(GTK_MENU_ITEM(root_help_item_p), help_menu_p); GtkMenuShell* menu_bar_p = GTK_MENU_SHELL(gtk_menu_bar_new()); gtk_menu_shell_append(menu_bar_p, root_file_item_p); gtk_menu_shell_append(menu_bar_p, root_log_item_p); gtk_menu_shell_append(menu_bar_p, root_help_item_p); // connect the activate signals g_signal_connect(G_OBJECT(list_received_faxes_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(list_sent_faxes_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(socket_list_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(single_file_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(multiple_file_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(address_book_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(redial_queue_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(settings_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(quit_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(print_log_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(page_setup_log_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(view_log_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(about_efax_gtk_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(about_efax_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(translations_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); g_signal_connect(G_OBJECT(help_item_p), "activate", G_CALLBACK(MainWindowCB::mainwin_menuitem_activated), this); // collect up everything into the main window vbox GtkBox* window_box_p = GTK_BOX(gtk_vbox_new(false, 0)); gtk_box_pack_start(window_box_p, GTK_WIDGET(menu_bar_p), false, false, 0); gtk_box_pack_start(window_box_p, GTK_WIDGET(win_table_p), true, true, 0); gtk_box_pack_start(window_box_p, status_line.get_main_widget(), false, false, 0); gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(window_box_p)); // connect up miscellaneous signals for the GTK+ main window object g_signal_connect(G_OBJECT(get_win()), "key_press_event", G_CALLBACK(MainWindowCB::mainwin_key_press_event), this); g_signal_connect(G_OBJECT(get_win()), "visibility_notify_event", G_CALLBACK(MainWindowCB::mainwin_visibility_notify_event), this); g_signal_connect(G_OBJECT(get_win()), "window_state_event", G_CALLBACK(MainWindowCB::mainwin_window_state_event), this); // any button will do respond to a button style change (we use the 'Stop' button) #if GTK_CHECK_VERSION(2,99,0) g_signal_connect(G_OBJECT(stop_button_p), "style_updated", G_CALLBACK(MainWindowCB::mainwin_button_style_updated), this); #else g_signal_connect(G_OBJECT(stop_button_p), "style_set", G_CALLBACK(MainWindowCB::mainwin_button_style_set), this); #endif gtk_container_set_border_width(GTK_CONTAINER(win_table_p), standard_size/3); GList* focus_chain_p = 0; // prepend in reverse order focus_chain_p = g_list_prepend(focus_chain_p, stop_button_p); focus_chain_p = g_list_prepend(focus_chain_p, receive_standby_button_p); focus_chain_p = g_list_prepend(focus_chain_p, receive_takeover_button_p); focus_chain_p = g_list_prepend(focus_chain_p, receive_answer_button_p); focus_chain_p = g_list_prepend(focus_chain_p, send_button_p); focus_chain_p = g_list_prepend(focus_chain_p, number_box_p); focus_chain_p = g_list_prepend(focus_chain_p, file_entry_frame_p); gtk_container_set_focus_chain(GTK_CONTAINER(win_table_p), focus_chain_p); g_list_free(focus_chain_p); #if GTK_CHECK_VERSION(2,99,0) g_signal_connect(G_OBJECT(drawing_area_p), "draw", G_CALLBACK(MainWindowCB::mainwin_drawing_area_draw), this); #else g_signal_connect(G_OBJECT(drawing_area_p), "expose_event", G_CALLBACK(MainWindowCB::mainwin_drawing_area_expose_event), this); #endif efax_controller.ready_to_quit_notify.connect(Callback::make(*this, &MainWindow::quit_cb)); efax_controller.stdout_message.connect(Callback::make(text_window, &MessageText::write_black_cb)); efax_controller.write_state.connect(Callback::make(status_line, &StatusLine::write_status_cb)); efax_controller.remove_from_socket_server_filelist.connect(Callback::make(*this, &MainWindow::remove_from_socket_server_filelist)); // connect up our end of the error pipe error_pipe_tag = start_iowatch(error_pipe.get_read_fd(), Callback::make(*this, &MainWindow::read_error_pipe_cb), G_IO_IN); // we want to minimise the effect on efax, so make writing to the error pipe non-blocking error_pipe.make_write_non_block(); set_file_items_sensitive_impl(); get_window_settings(); // don't have entry widgets selecting on focus GtkSettings* settings_p = gtk_settings_get_default(); if (settings_p) { g_object_set(settings_p, "gtk-entry-select-on-focus", false, static_cast(0)); } else write_error("Can't obtain default GtkSettings object\n"); if (filename) { // this will also call set_file_items_sensitive_impl() if the call to // get_window_settings() has set socket_button active gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(file_button_p), true); gtk_entry_set_text(GTK_ENTRY(file_entry_p), filename); gtk_window_set_focus(get_win(), number_entry_p); } else gtk_window_set_focus(get_win(), single_file_button_p); // enable visibility events, so that the action when left clicking on the // tray icon is correct GtkWidget* mainwin_p = GTK_WIDGET(get_win()); gtk_widget_add_events(mainwin_p, GDK_VISIBILITY_NOTIFY_MASK); // now we will either show everything, or realise the window // and its children and keep it hidden in the system tray if (start_hidden) { gtk_widget_realize(mainwin_p); gtk_widget_show_all(gtk_bin_get_child(GTK_BIN(get_win()))); gtk_widget_hide(mainwin_p); #if GLIB_CHECK_VERSION(2,14,0) start_timeout_seconds(5, Callback::make(*this, &MainWindow::start_hidden_check_cb)); #else start_timeout(5000, Callback::make(*this, &MainWindow::start_hidden_check_cb)); #endif } else gtk_widget_show_all(mainwin_p); // now we have shown ourselves (if we are going to show ourselves!) if (!messages.empty()) { text_window.write_red_cb(messages.c_str()); text_window.write_red_cb("\n\n"); } // make sure that we have the faxin, faxout, and faxsent chdir(prog_config.working_dir.c_str()); mkdir("faxin", S_IRUSR | S_IWUSR | S_IXUSR); mkdir("faxout", S_IRUSR | S_IWUSR | S_IXUSR); mkdir("faxsent", S_IRUSR | S_IWUSR | S_IXUSR); // set the working directory for the parent process chdir("faxin"); // if there is no config file installed, then bring up the settings dialog if (!prog_config.found_rcfile) { // we don't want to use MainWindow::settings_impl(), or the absence of // a configuration file will be reported twice -- not a big deal, but ... // so pass true as the last parameter to skip detection of settings file SettingsDialog dialog(standard_size, get_win(), true); dialog.accepted.connect(Callback::make(*this, &MainWindow::settings_changed_cb)); dialog.exec(); } // this connects the stdout facilities of SocketServer to MessageText socket_server.stdout_message.connect(Callback::make(text_window, &MessageText::write_black_cb)); // this connects the Emitter object in SocketServer to a method in this class // which will update the SocketList object (if such a dialog is displayed) socket_server.filelist_changed_notify.connect(Callback::make(*this, &MainWindow::socket_filelist_changed_notify_cb)); // and this connects the Emitter object which indicates a fax has been received // from the socket for sending to the method which will pop up a "fax to send" // notify dialog socket_server.fax_to_send_notify.connect(Callback::make(*this, &MainWindow::fax_to_send_notify_cb)); // this connects the Emitter object which indicates that a fax has been received // from the modem by the EfaxController object efax_controller.fax_received_notify.connect(Callback::make(*this, &MainWindow::fax_received_notify_cb)); // start the socket server if (prog_config.sock_server && !prog_config.sock_server_port.empty()) { socket_server.start(std::string(prog_config.sock_server_port), prog_config.other_sock_client_address, prog_config.ipv6); } tray_icon.activated.connect(Callback::make(*this, &MainWindow::tray_icon_activated_cb)); tray_icon.menu_item_chosen.connect(Callback::make(*this, &MainWindow::tray_icon_menu_cb)); tray_icon.get_state.connect(Callback::make(efax_controller, &EfaxController::get_state)); tray_icon.get_new_fax_count.connect(Callback::make(efax_controller, &EfaxController::get_count)); efax_controller.write_state.connect(Callback::make(tray_icon, &TrayIcon::set_tooltip_cb)); // register our own button icon size for stock icons to match size of externally // defined icons used in this program gtk_icon_size_register("EFAX_GTK_BUTTON_SIZE", 22, 22); // the notified_fax pair is used by sendfax_cb() if no number is shown // to dial, for use if the option to send on an open connection without // dialling is refused and sendfax_cb() was called by a // SocketNotifyDialog::sendfax_sig signal, so that a SocketNotifyDialog // dialog can be brought up again for the user to have another chance to // choose what he/she wants to do. When the second member of the // notified_fax pair is not 0, then that indicates that sendfax_cb() // was called by a SocketNotifyDialog object (it is normally set to 0 and // only holds another value when set in MainWindow::fax_to_send_dialog()) notified_fax.second = 0; // if the -r option has been chosen, start the program in Receive Standby mode if (start_in_standby) receive_impl(EfaxController::receive_standby); } MainWindow::~MainWindow(void) { save_window_settings(); g_source_remove(error_pipe_tag); delete write_error_mutex_p; } void MainWindow::sig_event_cb(bool&) { if (sig_pipe.read() == 'x') { close_impl(); // we must have picked up an external kill signal // so we need an orderly close down } else write_error("Unknown value read from sig_pipe in MainWindow::sig_event_cb()\n"); } void MainWindow::start_hidden_check_cb(bool& keep_timeout) { if (!tray_icon.is_embedded()) { // the user has goofed - he has set the program to start hidden in the system tray // but has no system tray running! write_error(gettext("The program has been started with the -s option but there is no system tray!\n")); gtk_window_present(get_win()); } keep_timeout = false; // this only fires once } void MainWindow::get_window_settings(void) { int width = 0; int height = 0; int socket_val = 0; int received_list_sort_type = -1; int sent_list_sort_type = -1; std::string file_name(prog_config.working_dir + "/" MAINWIN_SAVE_FILE); std::ifstream file(file_name.c_str(), std::ios::in); if (!file) write_error("Can't get mainwindow settings from file\n"); else { #ifdef HAVE_STREAM_IMBUE file.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE file >> width >> height >> socket_val >> received_list_sort_type >> sent_list_sort_type; if (width > 0 && height > 0) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(socket_button_p), socket_val); gtk_window_set_default_size(get_win(), width, height); if ((received_list_sort_type == GTK_SORT_ASCENDING || received_list_sort_type == GTK_SORT_DESCENDING) && (sent_list_sort_type == GTK_SORT_ASCENDING || sent_list_sort_type == GTK_SORT_DESCENDING)) { FaxListManager::set_received_list_sort_type(GtkSortType(received_list_sort_type)); FaxListManager::set_sent_list_sort_type(GtkSortType(sent_list_sort_type)); } } } } void MainWindow::save_window_settings(void) { std::string file_name(prog_config.working_dir + "/" MAINWIN_SAVE_FILE); std::ofstream file(file_name.c_str(), std::ios::out); if (!file) write_error("Can't save mainwindow settings to file\n"); else { #ifdef HAVE_STREAM_IMBUE file.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE int width = 0; int height = 0; gtk_window_get_size(get_win(), &width, &height); int socket_val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(socket_button_p)); file << width << ' ' << height << ' ' << socket_val << ' ' << (int)FaxListManager::get_received_list_sort_type() << ' ' << (int)FaxListManager::get_sent_list_sort_type() << ' ' << std::endl; } } void MainWindow::on_delete_event(void) { if (tray_icon.is_embedded()) gtk_widget_hide(GTK_WIDGET(get_win())); else close_impl(); } void MainWindow::close_impl(void) { // close down socket server socket_server.stop(); // make sure we close down efax() if it is active // (the EfaxController::ready_to_quit_notify signal is connected to // quit_cb() below and will end the main program loop once any efax // session running has been dealt with) efax_controller.efax_closedown(); } void MainWindow::quit_cb(void) { gtk_main_quit(); } void MainWindow::sendfax_cb(void) { std::string number_entry(gtk_entry_get_text(GTK_ENTRY(number_entry_p))); // eliminate leading or trailing spaces so that we can check for an empty string strip(number_entry); if (number_entry.empty()) { PromptDialog dialog(gettext("No fax number specified. Do you want to send the fax " "on an open connection?"), gettext("Telephone number"), standard_size, get_win()); if (!dialog.exec()) { if (notified_fax.second) { // we must have got here by a SocketNotifyDialog::sendfax_sig signal set_files_cb(""); selected_socket_list_file = ""; fax_to_send_dialog(notified_fax); } return; } } // Fax_item is defined in efax_controller.h Fax_item fax_item; try { fax_item.number = Utf8::locale_from_utf8(prog_config.dial_prefix); fax_item.number += Utf8::locale_from_utf8(number_entry); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in sendfax_cb()\n"); beep(); return; } notified_fax.second = 0; gtk_window_present(get_win()); std::string files(gtk_entry_get_text(GTK_ENTRY(file_entry_p))); // if this is a fax received from the socket and entered via the socket faxes // list, then "*** " will form the first part of the "file" displayed in the file // entry box - so test for it to see if we are sending a file received via the // socket rather than a regular file if (!files.empty() && files.substr(0,4) == std::string("*** ")) { fax_item.is_socket_file = true; fax_item.file_list.push_back(selected_socket_list_file); } else { fax_item.is_socket_file = false; // convert the contents of files to locale filename codeset if necessary try { files = Utf8::filename_from_utf8(files); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in sendfax_cb()\n"); beep(); return; } const char* separators = ",;"; // split the files string into separate file names std::string::size_type pos1, pos2; pos1 = files.find_first_not_of(separators); while (pos1 != std::string::npos) { pos2 = files.find_first_of(separators, pos1); if (pos2 != std::string::npos) { std::string file_item(files.substr(pos1, pos2 - pos1)); strip(file_item); fax_item.file_list.push_back(file_item); pos1 = files.find_first_not_of(separators, pos2); } else { std::string file_item(files.substr(pos1)); strip(file_item); fax_item.file_list.push_back(file_item); pos1 = std::string::npos; } } } if (!prog_config.found_rcfile) { text_window.write_red_cb("Can't send fax -- no efax-gtkrc configuration file found\n\n"); beep(); } else if (prog_config.lock_file.empty()) { // if there is no lock file, then it means no // serial device has been specified (the lock // file dir defaults to /var/lock) text_window.write_red_cb("Can't send fax -- no valid serial device specified\n\n"); beep(); } else if (fax_item.file_list.empty()) beep(); else efax_controller.sendfax(fax_item); } void MainWindow::receive_impl(EfaxController::State mode) { if (!prog_config.found_rcfile) { text_window.write_red_cb("Can't receive fax -- no efax-gtkrc configuration file found\n\n"); beep(); } else if (prog_config.lock_file.empty()) { // if there is no lock file, then it means no // serial device has been specified (the lock // file dir defaults to /var/lock) text_window.write_red_cb("Can't receive fax -- no valid serial device specified\n\n"); beep(); } else efax_controller.receive(mode); } void MainWindow::get_file_impl(void) { FileReadSelectDialog file_dialog(standard_size, false, get_win()); file_dialog.exec(); std::vector file_result = file_dialog.get_result(); if (!file_result.empty()) { set_files_cb(file_result[0]); gtk_widget_grab_focus(number_entry_p); } } void MainWindow::set_files_cb(const std::string& files) { gtk_entry_set_text(GTK_ENTRY(file_entry_p), files.c_str()); } void MainWindow::fax_list_impl(FaxListEnum::Mode mode) { if (mode == FaxListEnum::received) { // because FaxListManager::populate_fax_list() calls gtk_main_iteration() // we could get back here again before the constructor of FaxListDialog // has been entered, so check the guard in FaxListManager if (!FaxListManager::is_fax_received_list_main_iteration()) { if (!FaxListDialog::get_is_fax_received_list()) { received_fax_list_p = new FaxListDialog(mode, standard_size); efax_controller.fax_received_notify.connect(Callback::make(*received_fax_list_p, &FaxListDialog::insert_new_fax_cb), received_fax_list_p->releaser); received_fax_list_p->get_new_fax_count_sig.connect(Callback::make(efax_controller, &EfaxController::get_count)); received_fax_list_p->reset_sig.connect(Callback::make(efax_controller, &EfaxController::reset_count)); // now display the correct number of new received faxes received_fax_list_p->display_new_fax_count(); } else gtk_window_present(received_fax_list_p->get_win()); } } else if (mode == FaxListEnum::sent) { // because FaxListManager::populate_fax_list() calls gtk_main_iteration() // we could get back here again before the constructor of FaxListDialog // has been entered, so check the guard in FaxListManager if (!FaxListManager::is_fax_sent_list_main_iteration()) { if (!FaxListDialog::get_is_fax_sent_list()) { sent_fax_list_p = new FaxListDialog(mode, standard_size); efax_controller.fax_sent_notify.connect(Callback::make(*sent_fax_list_p, &FaxListDialog::insert_new_fax_cb), sent_fax_list_p->releaser); } else gtk_window_present(sent_fax_list_p->get_win()); } } // there is no memory leak -- FaxListDialog is modeless and will delete its own memory // when it is closed } void MainWindow::socket_list_impl(void) { // this method will launch the dialog listing queued faxes received from // the socket_server (a SocketListDialog object) if (!SocketListDialog::get_is_socket_list()) { // get the filenames pair - the mutex lock will automatically release when filenames_pair (and // so the shared pointer holding the lock) goes out of scope at the end of the if block (we want to keep // the shared_ptr alive until after we have set up the connection to update the socket list std::pair, SharedPtr > filenames_pair(socket_server.get_filenames()); socket_list_p = new SocketListDialog(filenames_pair, standard_size); // now connect up the dialog to relevant slots and signals update_socket_list.connect(Callback::make(*socket_list_p, &SocketListDialog::set_socket_list_rows), socket_list_p->releaser); close_socket_list_dialog.connect(Callback::make(*socket_list_p, &SocketListDialog::close_cb), socket_list_p->releaser); socket_list_p->selected_fax.connect(Callback::make(*this, &MainWindow::enter_socket_file_cb)); socket_list_p->remove_from_socket_server_filelist.connect(Callback::make(*this, &MainWindow::remove_from_socket_server_filelist)); // there is no memory leak -- SocketListDialog is modeless and will delete its own memory // when it is closed } else gtk_window_present(socket_list_p->get_win()); } void MainWindow::socket_filelist_changed_notify_cb(void) { /* This function calls SocketListDialog::set_socket_list_rows() via the MainWindow::update_socket_list emitter so updating the socket list dialog if that dialog happens to be displayed, and also calls gtk_widget_queue_draw() on the drawing_area_p object maintained by the MainWindow object to force it to redraw This slot is connected to the SocketServer::filelist_changed_notify Notifier object The SocketServer::filelist_changed_notify signal is emitted by SocketServer:read_socket() when a new fax file to be sent is received via the socket and also by SocketServer::remove_file(). SocketServer::remove_file() is called by MainWindow::remove_from_socket_server_filelist() MainWindow::remove_from_socket_server_filelist() is connected to the EfaxController::remove_from_socket_server_filelist signal and to the SocketListDialog::remove_from_socket_server_filelist signal The EfaxController::remove_from_socket_server_filelist signal is emitted by EfaxController::child_ended_cb() when a fax derived from the socket list is successfully sent The SocketListDialog::remove_from_socket_server_filelist signal is emitted by SocketListDialog::remove_file() SocketListDialog::remove_file() is connected to the PromptDialog::accepted signal (emitted when a user elects to delete a queued fax from the list of files received for faxing from the socket) */ // If a SocketListDialog object exists, cause it to update its display update_socket_list(socket_server.get_filenames()); // trigger an expose event for the drawing area gtk_widget_queue_draw(drawing_area_p); } void MainWindow::fax_to_send_notify_cb() { fax_to_send_dialog(socket_server.get_fax_to_send()); } void MainWindow::nullify_notified_fax_cb(void) { notified_fax.second = 0; } void MainWindow::fax_to_send_dialog(const std::pair& fax_pair) { if (prog_config.sock_popup) { int state = 0; efax_controller.get_state(state); #if GTK_CHECK_VERSION(2,20,0) if (gtk_widget_get_sensitive(GTK_WIDGET(get_win())) && (state == EfaxController::inactive || (state == EfaxController::receive_standby && !efax_controller.is_receiving_fax()))) { notified_fax = fax_pair; SocketNotifyDialog* dialog_p = new SocketNotifyDialog(standard_size, fax_pair); dialog_p->fax_name_sig.connect(Callback::make(*this, &MainWindow::enter_socket_file_cb)); dialog_p->fax_number_sig.connect(Callback::make(*this, &MainWindow::set_number_cb)); dialog_p->sendfax_sig.connect(Callback::make(*this, &MainWindow::sendfax_cb)); dialog_p->queue_sig.connect(Callback::make(*this, &MainWindow::nullify_notified_fax_cb)); gtk_window_present(dialog_p->get_win()); } #else if (GTK_WIDGET_SENSITIVE(GTK_WIDGET(get_win())) && (state == EfaxController::inactive || (state == EfaxController::receive_standby && !efax_controller.is_receiving_fax()))) { notified_fax = fax_pair; SocketNotifyDialog* dialog_p = new SocketNotifyDialog(standard_size, fax_pair); dialog_p->fax_name_sig.connect(Callback::make(*this, &MainWindow::enter_socket_file_cb)); dialog_p->fax_number_sig.connect(Callback::make(*this, &MainWindow::set_number_cb)); dialog_p->sendfax_sig.connect(Callback::make(*this, &MainWindow::sendfax_cb)); dialog_p->queue_sig.connect(Callback::make(*this, &MainWindow::nullify_notified_fax_cb)); gtk_window_present(dialog_p->get_win()); } #endif else { #if GTK_CHECK_VERSION(2,20,0) InfoDialog* dialog_p = new InfoDialog(gettext("A print job has been received on socket"), gettext("efax-gtk socket"), GTK_MESSAGE_INFO, get_win(), !(gtk_widget_get_sensitive(GTK_WIDGET(get_win())))); #else InfoDialog* dialog_p = new InfoDialog(gettext("A print job has been received on socket"), gettext("efax-gtk socket"), GTK_MESSAGE_INFO, get_win(), !(GTK_WIDGET_SENSITIVE(GTK_WIDGET(get_win())))); #endif gtk_window_present(dialog_p->get_win()); } } // there is no memory leak - the exec() method has not been called so the dialog // is self-owning and will delete itself when it is closed } void MainWindow::fax_received_notify_cb(const std::pair& fax_info) { if (prog_config.fax_received_exec && !prog_config.fax_received_prog.empty()) { // get the program name for the exec() call below (because this is a // multi-threaded program, we must do this before fork()ing because // we use functions to get the argument which is not async-signal-safe) std::string cmd; try { cmd.assign(Utf8::filename_from_utf8(prog_config.fax_received_prog)); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in MainWindow::fax_received_notify_cb()\n"); cmd.assign(prog_config.fax_received_prog); } // we can use the raw output of cmd.c_str() and fax_info.first.c_str() here // - they will remain valid at the execlp() call const char* prog_name = cmd.c_str(); const char* fax_name = fax_info.first.c_str(); pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); std::exit(FORK_ERROR); } if (!pid) { // child process - as soon as everything is set up we are going to do an exec() // now we have forked, we can connect MainWindow::error_pipe to stderr connect_to_stderr(); // this function requires a null pointer as its last argument but as its // latter arguments are passed as an elipsis we need to do an explicit cast // for 64 bit systems execlp(prog_name, prog_name, fax_name, static_cast(0)); // if we reached this point, then the execlp() call must have failed // report error and end process - use _exit() and not exit() write_error("Can't find the program to execute when a fax is received.\n" "Please check your installation and the PATH environmental variable\n"); _exit(EXEC_ERROR); } // end of child process } if (prog_config.fax_received_popup) { #if GTK_CHECK_VERSION(2,20,0) InfoDialog* dialog_p = new InfoDialog(gettext("A fax has been received by efax-gtk"), gettext("efax-gtk: fax received"), GTK_MESSAGE_INFO, get_win(), !(gtk_widget_get_sensitive(GTK_WIDGET(get_win())))); #else InfoDialog* dialog_p = new InfoDialog(gettext("A fax has been received by efax-gtk"), gettext("efax-gtk: fax received"), GTK_MESSAGE_INFO, get_win(), !(GTK_WIDGET_SENSITIVE(GTK_WIDGET(get_win())))); #endif gtk_window_present(dialog_p->get_win()); // there is no memory leak - the exec() method has not been called so the dialog // is self-owning and will delete itself when it is closed } } void MainWindow::enter_socket_file_cb(const std::pair& fax_to_insert) { // this slot is connected to the SocketListDialog::selected_fax signal and is // called (that is, whenever the send fax button is pressed in a dialog object of // that class) // it is also connected to the SocketNotifyDialog::fax_name_sig signal, and is called // when the send fax button is pressed in a dialog object of that class // fax_to_insert.first is the fax label for the fax selected in the SocketListDialog object // and fax_to_insert.second is the real (temporary) file name obtained from mkstemp() // now show the fax label in the "Files to fax" box // in case we are called from SocketNotifyDialog::fax_name_sig (when it // is possible that the file selection buttons will be active) make // sure that the socket button is active // (we do not have to close either file selection dialogs, because if // they were open when fax_to_send_notify_cb() was called then // it would not bring up a SocketNotifyDialog object, and if a file selection // dialog was opened up after a SocketNotifyDialog object was brought up, // it would render the SocketNotifyDialog inoperative by making its parent // (this object) insensitive, so we could not reach here until it is closed) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(socket_button_p), true); // now enter the particulars of the selected file in MainWindow::selected_socket_list_file // (we will use this later to send the fax in MainWindow::sendfax_cb()) selected_socket_list_file = fax_to_insert.second; std::string socket_file_label("*** "); socket_file_label += fax_to_insert.first; socket_file_label += " ***"; set_files_cb(socket_file_label); } void MainWindow::remove_from_socket_server_filelist(const std::string& file) { socket_server.remove_file(file); // if we have stored the file name for sending, delete it // and remove from the "Fax to send" box if (file == selected_socket_list_file) { selected_socket_list_file = ""; set_files_cb(""); } } void MainWindow::set_file_items_sensitive_impl(void) { gtk_widget_set_sensitive(GTK_WIDGET(single_file_item_p), true); gtk_widget_set_sensitive(GTK_WIDGET(multiple_file_item_p), true); gtk_widget_set_sensitive(single_file_button_p, true); gtk_widget_set_sensitive(multiple_file_button_p, true); gtk_editable_set_editable(GTK_EDITABLE(file_entry_p), true); gtk_widget_set_sensitive(GTK_WIDGET(socket_list_item_p), false); gtk_widget_set_sensitive(socket_list_button_p, false); gtk_window_set_focus(get_win(), single_file_button_p); // we now need to close the socket list dialog (if it is open), empty // the std::string object holding particulars of the currently selected // print job received from the socket server and any print job in the // Gtk::Entry object for that print job close_socket_list_dialog(); selected_socket_list_file = ""; set_files_cb(""); } void MainWindow::set_socket_items_sensitive_impl(void) { gtk_widget_set_sensitive(GTK_WIDGET(single_file_item_p), false); gtk_widget_set_sensitive(GTK_WIDGET(multiple_file_item_p), false); gtk_widget_set_sensitive(single_file_button_p, false); gtk_widget_set_sensitive(multiple_file_button_p, false); gtk_editable_set_editable(GTK_EDITABLE(file_entry_p), false); gtk_widget_set_sensitive(GTK_WIDGET(socket_list_item_p), true); gtk_widget_set_sensitive(socket_list_button_p, true); gtk_window_set_focus(get_win(), socket_list_button_p); } void MainWindow::addressbook_impl(void) { if (!AddressBook::get_is_address_list()) { AddressBook* dialog_p = new AddressBook(standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &MainWindow::set_number_cb)); // there is no memory leak -- AddressBook will delete its own memory // when it is closed } } void MainWindow::redial_queue_impl(void) { efax_controller.show_redial_queue(); } void MainWindow::file_list_impl(void) { FileListDialog* dialog_p = new FileListDialog(standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &MainWindow::set_files_cb)); // there is no memory leak -- FileListDialog is modeless and will delete its own memory // when it is closed } void MainWindow::settings_impl(void) { int state; efax_controller.get_state(state); if (state != EfaxController::inactive) { std::string message(gettext("Can't change settings unless " "the program is inactive\n" "Press the Stop button to make it inactive")); new InfoDialog(message.c_str(), "Change settings", GTK_MESSAGE_WARNING, get_win()); // there is no memory leak -- exec() was not called so InfoDialog // will delete its own memory when it is closed } else { SettingsDialog* dialog_p = new SettingsDialog(standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &MainWindow::settings_changed_cb)); // there is no memory leak -- SettingsDialog will delete its own memory // when it is closed } } void MainWindow::settings_changed_cb(const std::string& messages) { text_window.reset_logfile(); if (!messages.empty()) { try { text_window.write_red_cb(Utf8::locale_from_utf8(messages).c_str()); text_window.write_red_cb("\n"); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in MainWindow::settings_changed_cb()\n"); } } if ((!prog_config.sock_server || prog_config.sock_server_port.empty()) && socket_server.is_server_running()) { socket_server.stop(); } else if (prog_config.sock_server && !prog_config.sock_server_port.empty() && !socket_server.is_server_running()) { socket_server.start(std::string(prog_config.sock_server_port), prog_config.other_sock_client_address, prog_config.ipv6); } else if (socket_server.get_port() != std::string(prog_config.sock_server_port) || socket_server.get_other_sock_client_address() != prog_config.other_sock_client_address || socket_server.is_ipv6() != prog_config.ipv6) { socket_server.stop(); socket_server.start(std::string(prog_config.sock_server_port), prog_config.other_sock_client_address, prog_config.ipv6); } if (prog_config.logfile_name.empty()) { gtk_widget_set_sensitive(GTK_WIDGET(view_log_item_p), false); gtk_widget_set_sensitive(GTK_WIDGET(print_log_item_p), false); gtk_widget_set_sensitive(GTK_WIDGET(page_setup_log_item_p), false); } else { gtk_widget_set_sensitive(GTK_WIDGET(view_log_item_p), true); gtk_widget_set_sensitive(GTK_WIDGET(print_log_item_p), true); gtk_widget_set_sensitive(GTK_WIDGET(page_setup_log_item_p), true); } if (FaxListDialog::get_is_fax_received_list()) { received_fax_list_p->set_page_setup_button(); } if (FaxListDialog::get_is_fax_sent_list()) { sent_fax_list_p->set_page_setup_button(); } } void MainWindow::helpfile_impl(void) { if (!HelpDialog::get_is_helpfile()) { helpfile_p = new HelpDialog(standard_size); } else gtk_window_present(helpfile_p->get_win()); // there is no memory leak -- HelpDialog is modeless and will delete its own memory // when it is closed } void MainWindow::set_number_cb(const std::string& number) { gtk_entry_set_text(GTK_ENTRY(number_entry_p), number.c_str()); if (std::strlen(gtk_entry_get_text(GTK_ENTRY(file_entry_p)))) { // reset this window as sensitive to make gtk_widget_grab_focus() work gtk_widget_set_sensitive(GTK_WIDGET(get_win()), true); gtk_widget_grab_focus(send_button_p); } } void MainWindow::about_impl(bool efax_gtk) { if (efax_gtk) new AboutEfaxGtkDialog; // non-modal else new AboutEfaxDialog; // non-modal // there is no memory leak -- exec() was not called so the dialogs // will delete their own memory when closed } void MainWindow::translations_impl(void) { std::string message = gettext("Italian - Luca De Rugeriis\n"); message += gettext("Polish - Pawel Suwinski\n"); message += gettext("Bulgarian - Zdravko Nikolov\n"); message += gettext("Russian - Pavel Vainerman\n"); message += gettext("Hebrew - Assaf Gillat\n"); message += gettext("Greek - Hellenic Linux Users Group\n"); message += gettext("Albanian - Besnik Bleta\n"); message += gettext("Hungarian - Gergely Szakats, Laszlo Csordas\n"); message += gettext("Simplified Chinese - Kite Lau\n"); message += gettext("German - Steffen Wagner\n"); message += gettext("Swedish - Daniel Nylander\n"); message += gettext("Catalan - Jordi Sayol Salomo\n"); message += gettext("Traditional Chinese - Wei-Lun Chao\n"); new InfoDialog(message.c_str(), gettext("efax-gtk: Translations"), GTK_MESSAGE_INFO, 0, false); // there is no memory leak -- exec() was not called so the dialog // will delete its own memory when closed } std::pair MainWindow::get_max_button_text_extents(void) { std::vector text_vec; text_vec.push_back(gettext("Single file")); text_vec.push_back(gettext("Multiple files")); text_vec.push_back(gettext("Socket list")); text_vec.push_back(gettext("Tel number: ")); text_vec.push_back(gettext("Send fax")); text_vec.push_back(gettext("Answer call")); text_vec.push_back(gettext("Take over call")); text_vec.push_back(gettext("Standby")); text_vec.push_back(gettext("Stop")); std::vector::const_iterator iter; int width; int height; int max_width; int max_height; for (iter = text_vec.begin(), width = 0, height = 0, max_width = 0, max_height = 0; iter != text_vec.end(); ++iter) { // any button will do to get a pango layout (we have connected // the relevant style signal to the 'Stop' button) GobjHandle layout_h(gtk_widget_create_pango_layout(stop_button_p, iter->c_str())); pango_layout_get_pixel_size(layout_h, &width, &height); if (width > max_width) { max_width = width; } if (height > max_height) { max_height = height; } } return std::pair(max_width, max_height); } void MainWindow::tray_icon_activated_cb(void) { GtkWidget* mainwin_p = GTK_WIDGET(get_win()); // test gtk_widget_get_visible() as well as the 'obscured' variable - if we // call hide() on the window it does not count as a visibility notify event! #if GTK_CHECK_VERSION(2,20,0) if (gtk_widget_get_visible(mainwin_p) && !obscured && !minimised && gtk_widget_get_sensitive(mainwin_p)) { gtk_widget_hide(mainwin_p); } #else if (GTK_WIDGET_VISIBLE(mainwin_p) && !obscured && !minimised && GTK_WIDGET_SENSITIVE(mainwin_p)) { gtk_widget_hide(mainwin_p); } #endif //else gtk_window_present(get_win()); else present_window(); } void MainWindow::tray_icon_menu_cb(int item) { switch(item) { case TrayIcon::list_received_faxes: fax_list_impl(FaxListEnum::received); break; case TrayIcon::list_sent_faxes: fax_list_impl(FaxListEnum::sent); break; case TrayIcon::redial_queue: redial_queue_impl(); break; case TrayIcon::receive_answer: receive_impl(EfaxController::receive_answer); break; case TrayIcon::receive_takeover: receive_impl(EfaxController::receive_takeover); break; case TrayIcon::receive_standby: receive_impl(EfaxController::receive_standby); break; case TrayIcon::stop: efax_controller.stop(); break; case TrayIcon::quit: close_impl(); break; default: break; } } void MainWindow::button_style_updated_impl(void) { std::pair extents = get_max_button_text_extents(); // add padding extents.first += 18; // width extents.second += 12; // height // have some sensible minimum width and height if a very small font chosen const int button_min_width = standard_size * 4; const int button_min_height = 30; if (extents.first < button_min_width) extents.first = button_min_width; if (extents.second < button_min_height) extents.second = button_min_height; gtk_widget_set_size_request(single_file_button_p, extents.first, extents.second); gtk_widget_set_size_request(multiple_file_button_p, extents.first, extents.second); gtk_widget_set_size_request(socket_list_button_p, extents.first, extents.second); gtk_widget_set_size_request(number_button_p, extents.first, extents.second); gtk_widget_set_size_request(send_button_p, extents.first, extents.second); gtk_widget_set_size_request(receive_answer_button_p, extents.first, extents.second); gtk_widget_set_size_request(receive_takeover_button_p, extents.first, extents.second); gtk_widget_set_size_request(receive_standby_button_p, extents.first, extents.second); gtk_widget_set_size_request(stop_button_p, extents.first, extents.second); SharedPtr > text_vec(new std::vector(efax_controller.get_state_messages())); text_vec->push_back(gettext("Press F1 for help")); #if GTK_CHECK_VERSION(2,20,0) if (!gtk_widget_get_realized(status_line.get_main_widget())) { status_line.set_status_line(text_vec); } #else if (!GTK_WIDGET_REALIZED(status_line.get_main_widget())) { status_line.set_status_line(text_vec); } #endif else { // invoke StatusLine::set_status_line() through a Callback object executed // via the main loop with G_PRIORITY_DEFAULT_IDLE if we are not in program // start-up, so that we know the status line has received its new style when // the function is executed Callback::post(Callback::make_val(status_line, &StatusLine::set_status_line, text_vec)); } } #if !(GTK_CHECK_VERSION(2,99,0)) void MainWindow::button_style_set_impl(GtkStyle* prev_style_p) { GtkStyle* new_style_p = gtk_widget_get_style(GTK_WIDGET(get_win())); // we only need to proceed further if the font has changed if (!prev_style_p || !pango_font_description_equal(prev_style_p->font_desc, new_style_p->font_desc)) { button_style_updated_impl(); } } #endif // !(GTK_CHECK_VERSION(2,99,0)) #if GTK_CHECK_VERSION(2,99,0) bool MainWindow::draw_fax_from_socket_notifier(cairo_t* cairo_p) #else bool MainWindow::draw_fax_from_socket_notifier(GdkEventExpose* event_p) #endif { /* This method displays the "red circle" indicator which shows a fax file received from the socket is awaiting sending. It is is called in the following circumstances: - it is called in MainWindowCB::mainwin_drawing_area_expose_event(), handling the signal_expose_event signal of the MainWindow::drawing_area_p object - MainWindowCB::mainwin_drawing_area_expose_event() will in turn be called either because of a normal expose event on the desktop, or because MainWindow::socket_filelist_changed_notify_cb() has been invoked which calls gtk_widget_queue_draw() on the drawing_area_p object to force it to redraw (MainWindow::socket_filelist_changed_notify_cb() also calls SocketListDialog::set_socket_list_rows() via the MainWindow::update_socket_list emitter so updating the socket list dialog if that dialog happens to be displayed) - MainWindow::socket_filelist_changed_notify_cb() is connected to the SocketServer::filelist_changed_notify Notifier object - the SocketServer::filelist_changed_notify signal is emitted by SocketServer:read_socket() when a new fax file to be sent is received via the socket and also by SocketServer::remove_file(). - SocketServer::remove_file() is called by MainWindow::remove_from_socket_server_filelist() - MainWindow::remove_from_socket_server_filelist() is connected to the EfaxController::remove_from_socket_server_filelist signal and to the SocketListDialog::remove_from_socket_server_filelist signal - the EfaxController::remove_from_socket_server_filelist signal is emitted by EfaxController::child_ended_cb() when a fax derived from the socket list is successfully sent - the SocketListDialog::remove_from_socket_server_filelist signal is emitted by SocketListDialog::remove_file() - SocketListDialog::remove_file() is connected to the PromptDialog::accepted signal (emitted when a user elects to delete a queued fax from the list of files received for faxing from the socket) */ #if GTK_CHECK_VERSION(2,99,0) if (gtk_widget_get_realized(drawing_area_p)) { // if we started hidden in the system tray // the drawing area may not yet be realised if (!socket_server.get_filenames().first->empty()) { cairo_arc(cairo_p, gtk_widget_get_allocated_width(drawing_area_p)/2, gtk_widget_get_allocated_height(drawing_area_p)/2, 5, 0, 2 * M_PI); cairo_set_source_rgb(cairo_p, 0.7, 0.0, 0.0); cairo_fill_preserve(cairo_p); cairo_set_source_rgb(cairo_p, 1.0, 1.0, 1.0); cairo_set_line_width(cairo_p, 2); cairo_stroke(cairo_p); } else { GdkRGBA colour; gtk_style_context_get_background_color(gtk_widget_get_style_context(drawing_area_p), gtk_widget_get_state_flags(drawing_area_p), &colour); gdk_cairo_set_source_rgba(cairo_p, &colour); cairo_paint(cairo_p); } } #else if (GTK_WIDGET_REALIZED(drawing_area_p)) { // if we started hidden in the system tray // the drawing area may not yet be realised // provide the cairo context incorporating the destination surface CairoContextScopedHandle cairo_h(gdk_cairo_create(GDK_DRAWABLE(drawing_area_p->window))); // clip any redrawing to the area of the expose event cairo_rectangle(cairo_h, event_p->area.x, event_p->area.y, event_p->area.width, event_p->area.height); cairo_clip(cairo_h); if (!socket_server.get_filenames().first->empty()) { cairo_arc(cairo_h, (drawing_area_p->allocation.width)/2, (drawing_area_p->allocation.height)/2, 5, 0, 2 * M_PI); cairo_set_source_rgb(cairo_h, 0.7, 0.0, 0.0); cairo_fill_preserve(cairo_h); cairo_set_source_rgb(cairo_h, 1.0, 1.0, 1.0); cairo_set_line_width(cairo_h, 2); cairo_stroke(cairo_h); } else { gdk_cairo_set_source_color(cairo_h, >k_widget_get_style(drawing_area_p)->bg[GTK_WIDGET_STATE(drawing_area_p)]); cairo_paint(cairo_h); } } #endif // processing stops here return true; } void MainWindow::strip(std::string& text) { // erase any trailing space or tab while (!text.empty() && text.find_last_of(" \t") == text.size() - 1) { text.resize(text.size() - 1); } // erase any leading space or tab while (!text.empty() && (text[0] == ' ' || text[0] == '\t')) { text.erase(0, 1); } } void MainWindow::present_window(void) { GtkWidget* main_widget_p = GTK_WIDGET(get_win()); // make sure the window is on the current workspace // (gtk_window_present() should but won't do this) #ifdef HAVE_X11_XLIB_H # if GTK_CHECK_VERSION(2,14,0) gdk_x11_window_move_to_current_desktop(gtk_widget_get_window(main_widget_p)); # else gdk_x11_window_move_to_current_desktop(main_widget_p->window); # endif #endif // a call to gtk_window_present() now should be enough, but the calls to // gtk_widget_hide() and gtk_window_deiconify() will get metacity to // behave reasonably (shifting workspaces seems to confuse it) gtk_widget_hide(main_widget_p); gtk_window_present(get_win()); gtk_window_deiconify(get_win()); } void MainWindow::read_error_pipe_cb(bool&) { char pipe_buffer[PIPE_BUF + 1]; ssize_t result; while ((result = MainWindow::error_pipe.read(pipe_buffer, PIPE_BUF)) > 0) { SharedHandle output_h(error_pipe_reassembler(pipe_buffer, result)); if (output_h.get()) text_window.write_red_cb(output_h.get()); else write_error(gettext("Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n")); } } MessageText::MessageText(GtkWindow* win_p): MainWidgetBase(gtk_scrolled_window_new(0, 0)), logger(prog_config.working_dir.c_str(), win_p) { text_view_p = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(get_main_widget()), text_view_p); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view_p), GTK_WRAP_WORD); gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view_p), false); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_focus(text_view_p, false); #else GTK_WIDGET_UNSET_FLAGS(text_view_p, GTK_CAN_FOCUS); #endif GtkScrolledWindow* scrolled_window_p = GTK_SCROLLED_WINDOW(get_main_widget()); gtk_scrolled_window_set_shadow_type(scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(scrolled_window_p, GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); GdkColor red; red.red = static_cast(0.8 * 65535.0); red.green = 0; red.blue = 0; // GtkTextTags are not owned by a GTK+ container when passed to it so use a GobjHandle red_tag_h = GobjHandle(gtk_text_tag_new(0)); #if GTK_CHECK_VERSION(2,99,0) g_object_set(red_tag_h.get(), "foreground-gdk", &red, static_cast(0)); #else GdkColormap* colormap_p = gtk_widget_get_default_colormap(); if (!gdk_colormap_alloc_color(colormap_p, &red, false, true)) { write_error("Error allocating colour in colourmap in " "MessageText::MessageText()\n"); } else { g_object_set(red_tag_h.get(), "foreground-gdk", &red, static_cast(0)); } #endif GtkTextBuffer* buffer_p = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view_p)); gtk_text_tag_table_add(gtk_text_buffer_get_tag_table(buffer_p), red_tag_h); // keep an end mark to assist scrolling to the end of buffer GtkTextIter end_iter; gtk_text_buffer_get_end_iter(buffer_p, &end_iter); // despite the name, the caller of gtk_text_buffer_create_mark() does not own // a reference count to the mark - the mark is owned by the text buffer, so // we do not need to put it in a GobjHandle handle end_mark_p = gtk_text_buffer_create_mark(buffer_p, 0, &end_iter, false); } void MessageText::cleanify(std::string& message) { std::string::size_type chunk_start = 0; std::string::size_type chunk_end; while (chunk_start != std::string::npos) { std::string::size_type chunk_size; chunk_end = message.find('\n', chunk_start); // include in the search chunk any '\n' found if (chunk_end + 1 >= message.size()) chunk_end = std::string::npos; else if (chunk_end != std::string::npos) chunk_end++; // now search the relevant string/substring and erase from message if (chunk_end == std::string::npos) chunk_size = message.size() - chunk_start; else chunk_size = chunk_end - chunk_start; if (message.substr(chunk_start, chunk_size).find(" Copyright ") != std::string::npos || message.substr(chunk_start, chunk_size).find(" compiled ") != std::string::npos || message.substr(chunk_start, chunk_size).find("terminating on signal 15") != std::string::npos || message.substr(chunk_start, chunk_size).find(gettext("terminated by signal")) != std::string::npos) { message.erase(chunk_start, chunk_size); // if we have erased this chunk then we don't want to reset chunk_start // unless we have finished examining message if (chunk_end == std::string::npos) chunk_start = std::string::npos; } // if we didn't erase the last chunk, then we need to reset // chunk_start to beginning of next substring (or to string::npos) else chunk_start = chunk_end; } } void MessageText::write_black_cb(const char* message) { std::string temp(message); cleanify(temp); bool scrolling = false; GtkAdjustment* adj_p = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(get_main_widget())); #if GTK_CHECK_VERSION(2,14,0) if (gtk_adjustment_get_value(adj_p) >= (gtk_adjustment_get_upper(adj_p) - gtk_adjustment_get_page_size(adj_p) - 1e-12)) { scrolling = true; } #else if (gtk_adjustment_get_value(adj_p) >= (adj_p->upper - adj_p->page_size - 1e-12)) { scrolling = true; } #endif GtkTextBuffer* buffer_p = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view_p)); GtkTextIter end_iter; gtk_text_buffer_get_end_iter(buffer_p, &end_iter); gtk_text_buffer_insert(buffer_p, &end_iter, temp.data(), temp.size()); if (scrolling) { gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(text_view_p), end_mark_p, 0.0, false, 0.0, 0.0); } // now relay to standard output ssize_t result; ssize_t written = 0; ssize_t to_write_count = temp.size(); const char* write_text = temp.c_str(); do { result = ::write(1, write_text + written, to_write_count); if (result > 0) { written += result; to_write_count -= result; } } while (to_write_count && (result != -1 || errno == EINTR)); // now log to file if required logger.write_to_log(write_text); } void MessageText::write_red_cb(const char* message) { std::string temp(message); cleanify(temp); bool scrolling = false; GtkAdjustment* adj_p = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(get_main_widget())); #if GTK_CHECK_VERSION(2,14,0) if (gtk_adjustment_get_value(adj_p) >= (gtk_adjustment_get_upper(adj_p) - gtk_adjustment_get_page_size(adj_p) - 1e-12)) { scrolling = true; } #else if (gtk_adjustment_get_value(adj_p) >= (adj_p->upper - adj_p->page_size - 1e-12)) { scrolling = true; } #endif GtkTextBuffer* buffer_p = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view_p)); GtkTextIter end_iter; gtk_text_buffer_get_end_iter(buffer_p, &end_iter); gtk_text_buffer_insert_with_tags(buffer_p, &end_iter, temp.data(), temp.size(), red_tag_h, static_cast(0)); if (scrolling) { gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(text_view_p), end_mark_p, 0.0, false, 0.0, 0.0); } // now relay to standard error ssize_t result; ssize_t written = 0; ssize_t to_write_count = temp.size(); const char* write_text = temp.c_str(); do { result = ::write(2, write_text + written, to_write_count); if (result > 0) { written += result; to_write_count -= result; } } while (to_write_count && (result != -1 || errno == EINTR)); // now log to file if required logger.write_to_log(write_text); } StatusLine::StatusLine(const int size): MainWidgetBase(gtk_hbox_new(false, 0)), standard_size(size) { status_label_p = gtk_label_new(gettext("Inactive")); GtkWidget* help_label_p = gtk_label_new(gettext("Press F1 for help")); GtkWidget* status_frame_p = gtk_frame_new(0); GtkWidget* help_frame_p = gtk_frame_new(0); gtk_frame_set_shadow_type(GTK_FRAME(status_frame_p), GTK_SHADOW_IN); gtk_frame_set_shadow_type(GTK_FRAME(help_frame_p), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(status_frame_p), status_label_p); gtk_container_add(GTK_CONTAINER(help_frame_p), help_label_p); gtk_box_pack_start(GTK_BOX(get_main_widget()), status_frame_p, true, true, 0); gtk_box_pack_end(GTK_BOX(get_main_widget()), help_frame_p, true, true, 0); gtk_widget_set_size_request(status_label_p, standard_size * 7, -1); gtk_widget_set_size_request(help_label_p, standard_size * 6, -1); gtk_container_set_border_width(GTK_CONTAINER(get_main_widget()), 2); gtk_widget_show_all(get_main_widget()); } int StatusLine::get_max_status_text_height(const std::vector& text_vec) { std::vector::const_iterator iter; int width; int height; int max_height; for (iter = text_vec.begin(), width = 0, height = 0, max_height = 0; iter != text_vec.end(); ++iter) { GobjHandle layout_h(gtk_widget_create_pango_layout(status_label_p, iter->c_str())); pango_layout_get_pixel_size(layout_h, &width, &height); if (height > max_height) { max_height = height; } } return max_height; } void StatusLine::set_status_line(SharedPtr > text_vec) { int new_height = get_max_status_text_height(*text_vec); // add padding new_height += 2; // set the height if (new_height < standard_size) new_height = standard_size; gtk_widget_set_size_request(status_label_p, -1, new_height); #if GTK_CHECK_VERSION(2,99,0) // make the status label display in red GdkRGBA red; red.red = 0.9; red.green = 0.0; red.blue = 0.0; red.alpha = 1.0; gtk_widget_override_color(status_label_p, GTK_STATE_FLAG_NORMAL, &red); #else // make the status label display in red GdkColor red; red.red = static_cast(0.9 * 65535.0); red.green = 0; red.blue = 0; // we don't need to allocate the GdkColor red object before it is // used by gtk_widget_modify_fg() - that function will do it itself gtk_widget_modify_fg(status_label_p, GTK_STATE_NORMAL, &red); #endif } void StatusLine::write_status_cb(const char* text) { gtk_label_set_text(GTK_LABEL(status_label_p), text); } int connect_to_stderr(void) { int result = MainWindow::error_pipe.connect_to_stderr(); if (!result) MainWindow::connected_to_stderr = true; return result; } ssize_t write_error(const char* message) { // this writes to a pipe (which will provide asynchronous to // synchronous conversion) so it can be used by different threads // without upsetting GTK+. It also only uses async-signal-safe // system functions if connect_to_stderr() has been called (which // is only in a child process), and in the main process (where // connect_to_stderr() is not called) is thread safe with only a // mutex in this function because (a) although PipeFifo::read() // and PipeFifo::write() check the value of PipeFifo::read_fd and // PipeFifo::write_fd respectively, and PipeFifo::open(), // PipeFifo::make_writeonly(), PipeFifo::make_readonly(), // PipeFifo::close(), PipeFifo::connect_to_stdin(), // PipeFifo::connect_to_stdout() and PipeFifo::connect_to_stderr() // change those values, all but the last one are never called on // MainWindow::error_pipe until (if at all) error_pipe goes out of // scope when global objects are destroyed as the program exits, and // (b) PipeFifo::connect_to_stderr() is only ever called after // fork()ing into a new single-threaded process // The pipe is non-blocking - it will be emptied fairly promptly // but messages should be less than PIPE_BUF in length or any excess // will be lost unless the caller checks the return value and acts // accordingly ssize_t result = 0; ssize_t written = 0; ssize_t to_write_count = std::strlen(message); // if write_error_mutex_p is NULL then this must be the static // pipe being written to before the MainWindow constructor is // entered - we might was well check this condition in this // function although it should not happen if (!MainWindow::connected_to_stderr && write_error_mutex_p) { Thread::Mutex::Lock lock(*write_error_mutex_p); do { result = MainWindow::error_pipe.write(message + written, to_write_count); if (result > 0) { written += result; to_write_count -= result; } } while (to_write_count && result != -1); // the pipe checks for EINTR itself } else { // no mutex is required in this case: connect_to_stderr() is only // called after fork()ing and it is for the new process to synchronise // its writes to standard error (in efax-gtk child processes are all // single-threaded anyway) and as between different processes, POSIX // guarantees that writes not larger than PIPE_BUF in size will not be // interleaved. Since no mutex is used in this case, this function is // async-signal-safe for child processes. It can therefore be used // after fork()ing before exec()ing even though this is a multi-threaded // program do { result = ::write(2, message + written, to_write_count); if (result > 0) { written += result; to_write_count -= result; } } while (to_write_count && (result != -1 || errno == EINTR)); } return written; } void close_signalhandler(int) { sig_pipe.write('x'); } efax-gtk-3.2.8/src/settings_help.cpp0000644000175000001440000003564011535255056014331 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include "settings_help.h" #ifdef ENABLE_NLS #include #endif std::string SettingsMessagesBase::get_caption(std::vector::size_type index) { if (index > captions.size()) { write_error("Yikes, the message index is too large in SettingsMessagesBase::get_caption.\n" "Please report the bug to the author.\n"); return std::string(); // return empty string } else return captions[index]; } std::string SettingsMessagesBase::get_message(std::vector::size_type index) { if (index > messages.size()) { write_error("Yikes, the message index is too large in SettingsMessagesBase::get_message.\n" "Please report the bug to the author.\n"); return std::string(); // return empty string } else return messages[index]; } IdentityMessages::IdentityMessages(void): SettingsMessagesBase(number + 1) { messages[name] = gettext("Put the name to appear on the fax top header on sent faxes " "here. It must be in plain ASCII characters. If this is a " "problem, leave it blank as the fax station number will always " "be given on the top header"); captions[name] = gettext("efax-gtk help: Name"); messages[number] = gettext("Put the number to appear on the fax top header on sent faxes here. " "This will also comprise the fax station ID reported to the sending " "fax machine when receiving faxes"); captions[number] = gettext("efax-gtk help: Number"); } ModemMessages::ModemMessages(void): SettingsMessagesBase(rings + 1) { messages[device] = gettext("Put the serial device to which the modem is connected " "here (if none is given, the program defaults to " "/dev/modem). Do not include the `/dev/' part of " "the device name -- ie state it as `ttyS1' or `cua2', etc. " "With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so on"); captions[device] = gettext("efax-gtk help: Device"); messages[lock] = gettext("Put the lock file directory here. If none is specified, the program " "defaults to /var/lock"); captions[lock] = gettext("efax-gtk help: Lock File"); messages[modem_class] = gettext("With efax-0.9 or higher you should usually pick \"Auto\", as then " "efax will work out the class of the modem by itself, but you can " "also force a class by picking one of the specified ones if you " "want. However, with efax-0.8 the program defaults to Class 2, " "so if you are using a Class 1 modem with old versions of efax " "specify the Class here"); captions[modem_class] = gettext("efax-gtk help: Modem Class"); messages[dialmode] = gettext("This specifies whether tone or pulse dialling will be used " "when sending faxes"); captions[dialmode] = gettext("efax-gtk help: Dial Mode"); messages[capabilities] = gettext("This specifies the capabilities of the modem. To see what " "these mean do `man efax', and look at the operation of the " "`-c' flag. With efax-0.9 and a Class 2 modem, you usually " "won't need to specify this and should leave it blank, as the " "program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or " "1,3,0,2,0,0,0,0 for slower ones"); captions[capabilities] = gettext("efax-gtk help: Capabilities"); messages[rings] = gettext("This defines the number of rings the modem allows to pass before " "answering the telephone when in Standby mode. Acceptable values " "are 1 to 9. If none is specified, the program defaults to 1"); captions[rings] = gettext("efax-gtk help: Rings"); } ParmsMessages::ParmsMessages(void): SettingsMessagesBase(extra_parms + 1) { messages[init] = gettext("This specifies the initializing `AT' commands for the modem when " "in fax mode. Specify as many of these as are needed, separated by " "spaces for commands which need to be separated, but without a prepended " "`AT'. If none is specified, the program will default to " "`Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all " "modems"); captions[init] = gettext("efax-gtk help: Initialization Parameters"); messages[reset] = gettext("This specifies the `AT' commands that will reset the modem. Specify " "as many commands as are needed, separated by spaces for commands " "which need to be separated, but without a prepended `AT'. If none is " "specified, the program will default to `Z', which will be correct " "for practically all modems"); captions[reset] = gettext("efax-gtk help: Reset Parameters"); messages[extra_parms] = gettext("This can be used to pass any other parameter to efax (do " "`man efax' to see what is available). Specify as many of these as " "are needed, separated by spaces for different parameters -- eg " "include `-or' to do a bit reversal during receive for Multitech " "modems which require it. Unless you have an unusual modem, leave " "this blank"); captions[extra_parms] = gettext("efax-gtk help: Other Parameters"); } PrintMessages::PrintMessages(void): SettingsMessagesBase(popup + 1) { messages[gtkprint] = gettext("If this is checked, the program will use the GTK+ print system " "rather than the command line argument specified below to print " "faxes"); captions[gtkprint] = gettext("efax-gtk help: Use GTK+ print system"); messages[command] = gettext("This is the command which prints and takes postscript input " "on standard input. If none is specified, the program will default " "to `lpr'. This has no effect if the \"Use GTK+ Print System\" button " "is checked"); captions[command] = gettext("efax-gtk help: Print Program"); messages[shrink] = gettext("This will determine the extent to which a printed page will " "be reduced to fit within a printer's print area. It is a percentage -- " "eg 98 will shrink the page to 98 per cent of its size. If none is " "specified no shrink will take place (ie you can, but there is no need " "to, specify 100). This has no effect if the \"Use GTK+ Print System\" " "button is checked"); captions[shrink] = gettext("efax-gtk help: Print Shrink"); messages[popup] = gettext("This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't " "want a dialog (if you have specified an external print manager such as " "'kprinter' in the Print Program box, then you will not want this checked). " "This has no effect if the \"Use GTK+ Print System\" button is checked"); captions[popup] = gettext("efax-gtk help: Popup"); } ViewMessages::ViewMessages(void): SettingsMessagesBase(ps_view_command + 1) { messages[ps_view_command] = gettext("A postscript viewer is used to view sent and received faxes via " "the fax lists, and also to view faxes to be sent identified via " "the \"Files to fax\" file selector dialog. Specify here the " "command to be used to view postscript files. If none is specified, " "the program will default to 'gv'. Other possibilities you may want " "to specify are 'evince' (the Gnome image viewer) or 'kghostview' " "(the KDE postscript viewer). If using gv, you may need to use the " "'-media A4' or '-media Letter' option to select correct paper size. " "evince and kghostview do this automatically"); captions[ps_view_command] = gettext("efax-gtk help: Postscript Viewer Program"); } SockMessages::SockMessages(void): SettingsMessagesBase(ip_family + 1) { messages[run_server] = gettext("This specifies whether a socket server is to be run for CUPS or " "some other print system. Check the box if it is to run"); captions[run_server] = gettext("efax-gtk help: Run socket server"); messages[popup] = gettext("This specifies whether a pop-up dialog is to appear whenever a fax " "is received by the socket server from the print system. Check the box " "if you want a dialog (this has no effect unless you have also checked " "the box for the socket server to run). If the program is inactive or " "is standing by to receive faxes, the fax can be sent directly from " "this dialog"); captions[popup] = gettext("efax-gtk help: Popup"); messages[port] = gettext("This specifies the port number on which the socket server is to " "listen. It should be between 1024 and 65535."); captions[port] = gettext("efax-gtk help: Port"); messages[client_address] = gettext("This determines whether addresses other than localhost and your machine's own " "host name will be allowed to make a connection to the socket. Unless you have " "unusual requirements (that is, unless the CUPS or lpd daemons are running on " "another machine), you should choose localhost. If you want other machines to " "be able to connect, pick \"other\" and specify the hostnames of the computers " "which may connect (separating different hostnames by spaces, but you do not " "need to specify localhost and your machine's hostname, as those are always " "permitted). Such hostnames may be specified as an ordinary host name or in " "numeric notation. Numeric notation may have * as a trailing wildcard, so " "for example 10.1.* will permit access for addresses 10.1.0.0 to 10.1.255.255. " "IPv6 numeric addresses may also have a trailing wildcard, but if so '::' may " "not be used in the address (but other forms of 0 suppression are acceptable). " "You should run efax-gtk behind a firewall if you choose \"other\"."); captions[client_address] = gettext("efax-gtk help: Socket connections allowed"); messages[ip_family] = gettext("This specifies the IP family to be used by the socket server."); captions[ip_family] = gettext("efax-gtk help: IP family"); } ReceiveMessages::ReceiveMessages(void): SettingsMessagesBase(exec + 1) { messages[popup] = gettext("This parameter specifies whether a pop-up dialog will appear when " "a fax is received from a modem. Check the box if you want a pop-up."); captions[popup] = gettext("efax-gtk help: Receive pop-up"); messages[exec] = gettext("This specifies whether a program or script is to be executed when a " "fax is received from a modem. Check the box if you want to execute a " "program, and enter the program name. efax-gtk comes with two scripts, " "print_fax and mail_fax, which can be used automatically to print a " "received fax or to mail it to a user (so to mail a fax you can enter " "`mail_fax' here). See the README file for further details."); captions[exec] = gettext("efax-gtk help: Execute program when fax received"); } SendMessages::SendMessages(void): SettingsMessagesBase(dial_prefix + 1) { messages[res] = gettext("This specifies the resolution to which faxes are sent. \"Standard\" " "gives 204x98 and \"Fine\" gives 204x196"); captions[res] = gettext("efax-gtk help: Sent Fax Resolution"); messages[header] = gettext("This specifies whether the destination fax number is included in the " "top fax header line for sent faxes. Uncheck the box if you do not " "want this to be shown (say because it includes a pay card access " "number)"); captions[header] = gettext("efax-gtk help: Fax top header line"); messages[redial] = gettext("This specifies whether the program is to redial automatically when " "sending a fax if the modem is in use or the recipient is busy. " "Check the box if you want want automatic redial"); captions[redial] = gettext("efax-gtk help: Redial"); messages[dial_prefix] = gettext("This specifies a prefix to be prepended to any dialed number - for " "example you can specify '9,' here to dial through a switchboard which " "needs 9 to obtain an outside line followed by a delay."); captions[dial_prefix] = gettext("efax-gtk help: Dial Prefix"); } LoggingMessages::LoggingMessages(void): SettingsMessagesBase(logfile + 1) { messages[logfile] = gettext("This parameter specifies a log file to which progress on negotiations " "and fax status, and errors and warnings, are logged. If none is specified, " "then no log file will be maintained. (A log file can also be kept by " "redirecting stdout and stderr -- see the README file for further details)"); captions[logfile] = gettext("efax-gtk help: Log File"); } PageMessages::PageMessages(void): SettingsMessagesBase(page + 1) { messages[page] = gettext("Specify the page size for faxes here"); captions[page] = gettext("efax-gtk help: Page Size"); } void SettingsHelpDialogCB::settings_help_dialog_button_clicked(GtkWidget*, void* data) { static_cast(data)->close(); } SettingsHelpDialog::SettingsHelpDialog(const int standard_size, const std::string& text, const std::string& caption, GtkWindow* parent_p): WinBase(caption.c_str(), prog_config.window_icon_h, true, parent_p) { close_button_p = gtk_button_new_from_stock(GTK_STOCK_CLOSE); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkWidget* label_p = gtk_label_new(text.c_str()); GtkTable* table_p = GTK_TABLE(gtk_table_new(2, 1, false)); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_SPREAD); gtk_container_add(GTK_CONTAINER(button_box_p), close_button_p); gtk_label_set_line_wrap(GTK_LABEL(label_p), true); gtk_table_attach(table_p, label_p, 0, 1, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/2, standard_size/4); gtk_table_attach(table_p, button_box_p, 0, 1, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/2, standard_size/4); g_signal_connect(G_OBJECT(close_button_p), "clicked", G_CALLBACK(SettingsHelpDialogCB::settings_help_dialog_button_clicked), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(close_button_p, true); #else GTK_WIDGET_SET_FLAGS(close_button_p, GTK_CAN_DEFAULT); #endif gtk_container_set_border_width(GTK_CONTAINER(get_win()), standard_size/4); gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(table_p)); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_resizable(get_win(), false); gtk_widget_show_all(GTK_WIDGET(get_win())); } efax-gtk-3.2.8/src/file_list.h0000644000175000001440000000334711466007653013100 00000000000000/* Copyright (C) 2001 to 2005, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef FILE_LIST_H #define FILE_LIST_H #include "prog_defs.h" #include #include #include #include #include #include namespace FileListDialogCB { extern "C" { void file_list_dialog_button_clicked(GtkWidget*, void*); void file_list_dialog_set_buttons(GtkTreeSelection*, void* data); } } class FileListDialog: public WinBase { static int is_file_list; const int standard_size; GtkWidget* ok_button_p; GtkWidget* cancel_button_p; GtkWidget* up_button_p; GtkWidget* down_button_p; GtkWidget* add_button_p; GtkWidget* view_button_p; GtkWidget* remove_button_p; GobjHandle list_store_h; GtkTreeView* tree_view_p; std::string get_files(void); void add_files(void); void add_file_item(const std::string&); void view_file(void); void remove_file_prompt(void); void remove_file(void); void move_up(void); void move_down(void); std::pair get_view_file_parms(const std::string&); void delete_parms(std::pair); public: friend void FileListDialogCB::file_list_dialog_button_clicked(GtkWidget*, void*); friend void FileListDialogCB::file_list_dialog_set_buttons(GtkTreeSelection*, void*); EmitterArg accepted; static int get_is_file_list(void) {return is_file_list;} FileListDialog(const int standard_size, GtkWindow* parent_p); ~FileListDialog(void); }; #endif efax-gtk-3.2.8/src/internal/0000755000175000001440000000000011544574523012644 500000000000000efax-gtk-3.2.8/src/internal/Makefile.in0000644000175000001440000004244611544566736014652 00000000000000# 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@ subdir = src/internal DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/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 ETAGS = etags CTAGS = ctags 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@ AC_HAVE_RECURSIVE_MUTEX_RUNTIME = @AC_HAVE_RECURSIVE_MUTEX_RUNTIME@ AC_USE_GLIB_MEMORY_SLICES_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_COMPAT@ AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT@ AC_USE_SCHED_YIELD = @AC_USE_SCHED_YIELD@ AC_USE_SMART_PTR_COMPARISON = @AC_USE_SMART_PTR_COMPARISON@ AC_USE_TYPE_TUPLE_ARGS = @AC_USE_TYPE_TUPLE_ARGS@ AC_USING_NAMESPACE = @AC_USING_NAMESPACE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COND_CXXFLAG = @COND_CXXFLAG@ COND_INTERNAL = @COND_INTERNAL@ COND_INTERNAL_LIB = @COND_INTERNAL_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_GTK_UTILS_CFLAGS = @CXX_GTK_UTILS_CFLAGS@ CXX_GTK_UTILS_LIBS = @CXX_GTK_UTILS_LIBS@ CYGPATH_W = @CYGPATH_W@ DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ 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@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPOOLDIR = @SPOOLDIR@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = @COND_INTERNAL@ DIST_SUBDIRS = c++-gtk-utils 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 src/internal/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/internal/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): # 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 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 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-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 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 ctags \ ctags-recursive distclean distclean-generic 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-generic 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: efax-gtk-3.2.8/src/internal/c++-gtk-utils/0000755000175000001440000000000011544574524015136 500000000000000efax-gtk-3.2.8/src/internal/c++-gtk-utils/reassembler.h0000644000175000001440000001264711524110041017517 00000000000000/* Copyright (C) 2005 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_REASSEMBLER_H #define CGU_REASSEMBLER_H #include #include namespace Cgu { namespace Utf8 { /** * @class Reassembler reassembler.h c++-gtk-utils/reassembler.h * @brief A class for reassembling UTF-8 strings sent over pipes and * sockets so they form complete valid UTF-8 characters. * * Utf8::Reassembler is a functor class which takes in a partially * formed UTF-8 string and returns a null terminated string comprising * such of the input string (after inserting, at the beginning, any * partially formed UTF-8 character which was at the end of the input * string passed in previous calls to the functor) as forms complete * UTF-8 characters (storing any partial character at the end for the * next call to the functor). If the input string contains invalid * UTF-8 after adding any stored previous part character (apart from * any partially formed character at the end of the input string) then * operator() will return a null Cgu::SharedHandle object (that * is, Cgu::SharedHandle::get() will return 0). Such input * will not be treated as invalid if it consists only of a single * partly formed UTF-8 character which could be valid if further bytes * were received and added to it. In that case the returned * SharedHandle object will contain an allocated string of zero * length (apart from the terminating 0 character), rather than a NULL * pointer. * * This enables UTF-8 strings to be sent over pipes, sockets, etc and * displayed in a GTK+ object at the receiving end * * Note that for efficiency reasons the memory held in the returned * Cgu::SharedHandle object may be greater than the length of * the null-terminated string that is contained in that memory: just * let the Cgu::SharedHandle object manage the memory, and use * the contents like any other null-terminated string. * * This class is not needed if std::getline(), with its default '\\n' * delimiter, is used to read UTF-8 characters using, say, * Cgu::fdistream, because a whole '\\n' delimited line of UTF-8 * characters will always be complete. */ class Reassembler { size_t stored; const static size_t buff_size = 6; char buffer[buff_size]; char* join_buffer(const char*, size_t); public: /** * Takes a byte array of wholly or partly formed UTF-8 characters to * be converted (after taking account of previous calls to the method) * to a valid string of wholly formed characters. * @param input The input array. * @param size The number of bytes in the input (not the number of * UTF-8 characters). * @return A Cgu::SharedHandle object holding a null terminated * string comprising such of the input (after inserting, at the * beginning, any partially formed UTF-8 character which was at the * end of the input passed in previous calls to the functor) as forms * complete UTF-8 characters (storing any partial character at the end * for the next call to the functor). If the input is invalid after * such recombination, then a null Cgu::SharedHandle object is * returned (that is, Cgu::SharedHandle::get() will return 0). * Such input will not be treated as invalid if it consists only of a * single partly formed UTF-8 character which could be valid if * further bytes were received and added to it. In that case the * returned Cgu::SharedHandle object will contain an allocated * string of zero length (apart from the terminating 0 character), * rather than a NULL pointer. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. It will * not throw any other exception. */ Cgu::SharedHandle operator()(const char* input, size_t size); /** * Gets the number of bytes of a partially formed UTF-8 character * stored for the next call to operator()(). It will not throw. * @return The number of bytes. */ size_t get_stored() const {return stored;} /** * Resets the Reassembler, by discarding any partially formed UTF-8 * character from previous calls to operator()(). It will not throw. */ void reset() {stored = 0;} /** * The constructor will not throw. */ Reassembler(): stored(0) {} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; } // namespace Utf8 } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/io_watch.h0000644000175000001440000004047511544200716017023 00000000000000/* Copyright (C) 2005 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_IO_WATCH_H #define CGU_IO_WATCH_H /** */ /** * @defgroup io_watch io_watch * * \#include * * The start_iowatch() function connects a Unix file descriptor to an * event loop owned by a GMainContext object (normally the main * program loop). It both saves the overhead of having to construct a * GIOChannel object where the only thing wanted is to execute a * callback when there is something to be read from a pipe, fifo or * socket or a pipe or fifo can be written to, and it also provides * for automatic disconnection when an object whose function the * callback represents is destroyed. * * For the GIOCondition argument of start_iowatch(), G_IO_IN can be * bitwise-ORed with G_IO_HUP, and should be if the callback has the * task of cleaning up if EOF is reached (see * http://www.greenend.org.uk/rjk/2001/06/poll.html ), which is * detected by read() returning 0. A cast will be required to do this * for the third argument of start_iowatch() (that is, pass * GIOCondition(G_IO_IN | G_IO_HUP)). In addition, G_IO_IN and * G_IO_OUT can be bitwise-ORed with G_IO_ERR (and passed as * GIOCondition(G_IO_IN | G_IO_HUP | G_IO_ERR) or * GIOCondition(G_IO_OUT | G_IO_ERR)), which would be detected in the * callback by read() or write() returning -1. * * Two of the four overloaded start_iowatch() functions also take a * Callback object having a GIOCondition type and bool& type as their * unbound arguments (the other two overloads only have callbacks * taking a single bool& unbound argument). The overloads taking a * Callback object with an unbound GIOCondition argument type are, * when the callback function is executed, passed a GIOCondition value * to that argument, representing the bitwise-ORed events which caused * the call: this enables a single watch to be provided for both * reading and writing (if the file descriptor has been opened for * reading and writing), by testing for G_IO_IN and G_IO_OUT on that * argument in the callback function. It also enables, by testing for * G_IO_HUP and G_IO_ERR, a hang-up or error condition to be detected * without having to inspect the return value of read() or write() * (but note the test results referred to in * http://www.greenend.org.uk/rjk/2001/06/poll.html , which show that * the ending of a connection can only reliably be determined by * testing whether read() returns 0, or whether the iostream wrapper * on top of it reports end of file after attempting a read.) * * start_iowatch() is thread-safe (it may be called in any thread) * provided that the glib main loop has been made thread-safe by a * call to g_thread_init(). * * start_iowatch() takes ownership of the passed Callback object. Two * of the four start_iowatch() overloads take a Callback::Releaser * object as their third argument, which provides for automatic * ceasing of the watch if the target object which has the Releaser as * a member is destroyed. (Note that for this to be race free, the * lifetime of the remote target object whose method is to be invoked * must be determined by the thread to whose main loop the watch has * been attached. When the main loop begins invoking the execution of * the watch callback, the remote object must either wholly exist, in * which case the callback will be invoked, or have been destroyed, in * which case the callback will be ignored, and not be in some * transient half-state governed by another thread.) * * As mentioned above, the connected function encapsulated by the * callback passed to start_iowatch() must have a final unbound bool& * argument. If that bool& argument is set by the connected function * to false, say because end-of-file has been reached, then the watch * will be ended and all resources connected with it deleted without * further user action being required (there is no need for the * connected function to set it to true if the watch is to continue, * as that is the default). In addition, the watch will be ended * automatically and resources deleted if (i) as mentioned above, the * callback passed to start_iowatch() is protected by a Releaser * object and the target object whose method is encapsulated by the * callback is destroyed, or (ii) g_source_remove() is called on the * source id returned by start_iowatch() (where the watch is attached * to the default main context) or g_source_destroy() is called on the * GSource object obtained from that id with * g_main_context_find_source_by_id() (where the watch has been * attached to a non-default main context). If the source has been * removed automatically by virtue of the bool& argument being set to * false or by virtue of a Releaser object releasing, * g_source_remove() or g_source_destroy() should not afterwards be * called in respect of the id value returned by start_iowatch() in * case it has been reused by the main context concerned in the * meantime. */ #include #include #include #include namespace Cgu { class Releaser; /** * Starts an io watch in the glib main loop on a file descriptor, and * executes the callback if the condition in io_condition is met. It * is thread-safe (it may be called in any thread) provided that the * glib main loop has been made thread-safe by a call to * g_thread_init(). * @param fd The file descriptor. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with * @param io_condition The condition to be watched for (G_IO_IN may be * bitwise-ored with G_IO_HUP, and G_IO_IN and G_IO_OUT may be * bitwise-ored with G_IO_ERR). * @param priority The priority to be given to the watch in the main * loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main context to which the watch is to be * attached (the default of NULL will cause the watch to be attached * to the main program loop, and this is almost always what is * wanted). * @return The glib source id of the watch. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. If it does * so, the CallbackArg object will be disposed of. * @note Cancellation of the thread to which the watch is attached is * blocked during execution of the callback. * @ingroup io_watch * * Since 0.9.2 choice of priority available. */ guint start_iowatch(int fd, const Callback::CallbackArg* cb, GIOCondition io_condition, gint priority = G_PRIORITY_DEFAULT, GMainContext* context = 0); /** * Starts an io watch in the glib main loop on a file descriptor, and * executes the callback if the condition in io_condition is met. * This version provides for automatic watch disconnection when the * object whose function the callback represents is destroyed, via the * Releaser object. It is thread-safe (it may be called in any * thread) provided that the glib main loop has been made thread-safe * by a call to g_thread_init(). * @param fd The file descriptor. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param r A Releaser object which the protected object has as a * public member. * @param io_condition The condition to be watched for (G_IO_IN may be * bitwise-ored with G_IO_HUP, and G_IO_IN and G_IO_OUT may be * bitwise-ored with G_IO_ERR). * @param priority The priority to be given to the watch in the main * loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main context to which the watch is to be * attached (the default of NULL will cause the watch to be attached * to the main program loop, and this is almost always what is * wanted). * @return The glib source id of the watch. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. If it does * so, the CallbackArg object will be disposed of. * @note Cancellation of the thread to which the watch is attached is * blocked during execution of the callback. * @ingroup io_watch * * Since 0.9.2 choice of priority available. */ guint start_iowatch(int fd, const Callback::CallbackArg* cb, Releaser& r, GIOCondition io_condition, gint priority = G_PRIORITY_DEFAULT, GMainContext* context = 0); /** * Starts an io watch in the glib main loop on a file descriptor, and * executes the callback if the condition in io_condition is met. * This version provides the GIOCondition status which caused the * callback to be invoked as the first unbound argument of the * callback object. It is thread-safe (it may be called in any * thread) provided that the glib main loop has been made thread-safe * by a call to g_thread_init(). * @param fd The file descriptor. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param io_condition The condition(s) to be watched for (G_IO_IN, * G_IO_OUT, G_IO_HUP and G_IO_ERR may all be bitwise-ored). * @param priority The priority to be given to the watch in the main * loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main context to which the watch is to be * attached (the default of NULL will cause the watch to be attached * to the main program loop, and this is almost always what is * wanted). * @return The glib source id of the watch. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. If it does * so, the CallbackArg object will be disposed of. * @note 1. Cancellation of the thread to which the watch is attached * is blocked during execution of the callback. * @note 2. This version, whereby the callback function takes an * unbound GIOCondition argument, is not available if the library was * configured with the --without-type-tuple-args option. * @ingroup io_watch * * Since 1.2.12 */ guint start_iowatch(int fd, const Callback::CallbackArg >* cb, GIOCondition io_condition, gint priority = G_PRIORITY_DEFAULT, GMainContext* context = 0); /** * Starts an io watch in the glib main loop on a file descriptor, and * executes the callback if the condition in io_condition is met. * This version provides both automatic watch disconnection when the * object whose function the callback represents is destroyed, via the * Releaser object, and provides the GIOCondition status which caused * the callback to be invoked as the first unbound argument of the * callback object. It is thread-safe (it may be called in any * thread) provided that the glib main loop has been made thread-safe * by a call to g_thread_init(). * @param fd The file descriptor. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param r A Releaser object which the protected object has as a * public member. * @param io_condition The condition(s) to be watched for (G_IO_IN, * G_IO_OUT, G_IO_HUP and G_IO_ERR may all be bitwise-ored). * @param priority The priority to be given to the watch in the main * loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main context to which the watch is to be * attached (the default of NULL will cause the watch to be attached * to the main program loop, and this is almost always what is * wanted). * @return The glib source id of the watch. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. If it does * so, the CallbackArg object will be disposed of. * @note 1. Cancellation of the thread to which the watch is attached * is blocked during execution of the callback. * @note 2. This version, whereby the callback function takes an * unbound GIOCondition argument, is not available if the library was * configured with the --without-type-tuple-args option. * @ingroup io_watch * * Since 1.2.12 */ guint start_iowatch(int fd, const Callback::CallbackArg >* cb, Releaser& r, GIOCondition io_condition, gint priority = G_PRIORITY_DEFAULT, GMainContext* context = 0); /** * @b DEPRECATED: Don't use this function, it is just provided to * maintain API compatibility with version 0.9.0 and 0.9.1 of * c++-gtk-utils and will be dropped at some stage. The signature of * start_iowatch() was changed in version 0.9.2 to permit a priority * to be specified. * @ingroup io_watch */ // we have been lucky with this - in the very unlikely event of a user // having previously passed an explicit context argument of 0 (the // previous default) to this deprecated version of start_iowatch() // which will now be interpreted by the compiler on overload // resolution as a call to the undeprecated version with a priority // of 0 and a default GMainContext of NULL, the effect will be // identical since G_PRIORITY_DEFAULT is defined as 0 (phew!) inline guint start_iowatch(int fd, const Callback::CallbackArg* cb, GIOCondition io_condition, GMainContext* context) { return start_iowatch(fd, cb, io_condition, G_PRIORITY_DEFAULT, context); } /** * @b DEPRECATED: Don't use this function, it is just provided to * maintain API compatibility with version 0.9.0 and 0.9.1 of * c++-gtk-utils and will be dropped at some stage. The signature of * start_iowatch() was changed in version 0.9.2 to permit a priority * to be specified. * @ingroup io_watch */ // we have been lucky with this - in the very unlikely event of a user // having previously passed an explicit context argument of 0 (the // previous default) to this deprecated version of start_iowatch() // which will now be interpreted by the compiler on overload // resolution as a call to the undeprecated version with a priority // of 0 and a default GMainContext of NULL, the effect will be // identical since G_PRIORITY_DEFAULT is defined as 0 (phew!) inline guint start_iowatch(int fd, const Callback::CallbackArg* cb, Releaser& r, GIOCondition io_condition, GMainContext* context) { return start_iowatch(fd, cb, r, io_condition, G_PRIORITY_DEFAULT, context); } } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/lib_defs.h0000644000175000001440000000300111524110041016742 00000000000000/* Copyright (C) 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_LIB_DEFS_H #define CGU_LIB_DEFS_H #include #include /* * This file deals with matters only relevant to the compilation phase * of the library. For matters relevant also to the header files, * cgu_config.h is used (which is installed by 'make install' - this * file is not). */ // deal with any configuration issues arising from config.h #ifndef ENABLE_NLS inline const char* gettext(const char* text) { return text; } #endif #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/intrusive_ptr.h0000644000175000001440000003564511536141256020152 00000000000000/* Copyright (C) 2006 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_INTRUSIVE_PTR_H #define CGU_INTRUSIVE_PTR_H // define this if, instead of GLIB atomic funcions/memory barriers, // you want to use a (slower) mutex to lock the reference count in the // IntrusiveLockCounter class (however, if wanted, this is best left for // definition in the user code) /* #define CGU_INTRUSIVE_LOCK_COUNTER_USE_MUTEX 1 */ #include // for std::less #ifdef CGU_INTRUSIVE_LOCK_COUNTER_USE_MUTEX #include #else #include #endif #include /** * @addtogroup handles handles and smart pointers */ namespace Cgu { /** * @class IntrusivePtr intrusive_ptr.h c++-gtk-utils/intrusive_ptr.h * @brief This is a smart pointer for managing objects allocated on * freestore which maintain their own reference count. * @ingroup handles * * @details This is a class which manages objects which maintain their * own reference count. It requires that the referenced object has * two functions called ref() and unref(), which increment and * decrement the reference count respectively. The IntrusiveCounter * or IntrusiveLockCounter class can be inherited from to do this, but * they do not have to be used. The IntrusiveLockCounter class is the * same as the IntrusiveCounter class, except that it locks the * reference count when it is incremented or decremented in order that * IntrusivePtr objects in different threads can access the same * object. (But only the reference count is locked, not the methods * of the referenced object.) * * All the constructors (including the constructor which takes a raw * pointer) increment the reference count, and the destructor * decrements it and expects the referenced object to be deleted when * the last IntrusivePtr referencing a particular object is destroyed. * The IntrusiveCounter and IntrusiveLockCounter classes behave in * this way. (This is different from the behaviour of GobjHandle * smart pointers, which are constrained by the GObject reference * counting system which begins with a reference count of 1 rather * than 0, and of course different from normal shared pointer * implementations for the same reason. The advantage of the approach * with IntrusivePtr is that an already-managed object may safely be * passed to the constructor taking a raw pointer without any * additional steps being necessary.) * * From version 1.2.12, the library provides ==, != and < comparison * operators for IntrusivePtr, but only if the library is compiled * with the --with-smart-ptr-comp option, or if the user code defines * the symbol CGU_USE_SMART_PTR_COMPARISON before intrusive_ptr.h is * first parsed. This is because, if user code has provided such * operators for these smart pointers itself, a duplicated function * definition would arise. */ template class IntrusivePtr { T* obj_p; void unreference() { if (obj_p) obj_p->unref(); } void reference() { if (obj_p) obj_p->ref(); } public: /** * This constructor does not throw. * @param ptr The object which the IntrusivePtr is to manage (if * any). */ explicit IntrusivePtr(T* ptr = 0) { obj_p = ptr; reference(); } /** * This copy constructor does not throw. * @param intr_ptr The intrusive pointer to be copied. */ IntrusivePtr(const IntrusivePtr& intr_ptr) { obj_p = intr_ptr.obj_p; reference(); } template friend class IntrusivePtr; /** * A version of the copy constructor which enables pointer type * conversion (assuming the type passed is implicitly type * convertible to the managed type, such as a derived type). This * copy constructor does not throw. * @param intr_ptr The intrusive pointer to be copied. */ template IntrusivePtr(const IntrusivePtr& intr_ptr) { obj_p = intr_ptr.obj_p; reference(); } /** * This method does not throw unless the destructor of a managed * object throws - that should never happen. * @param intr_ptr The assignee. * @return The IntrusivePtr object after assignment. */ IntrusivePtr& operator=(const IntrusivePtr& intr_ptr) { // check whether we are already referencing this object - // if so make this a null op. This will also deal with // self-assignment if (obj_p != intr_ptr.obj_p) { // first unreference any object referenced by this shared pointer unreference(); // now inherit the referenced object from the assigning // instrusive pointer and reference the object it references obj_p = intr_ptr.obj_p; reference(); } return *this; } /** * A version of the assignment operator which enables pointer type * conversion (assuming the type passed is implicitly type * convertible to the managed type, such as a derived type). This * method does not throw unless the destructor of a managed object * throws - that should never happen. * @param intr_ptr The assignee. * @return The IntrusivePtr object after assignment. */ template IntrusivePtr& operator=(const IntrusivePtr& intr_ptr) { return operator=(IntrusivePtr(intr_ptr)); } /** * This method does not throw. * @return A pointer to the managed object (or NULL if none is * managed). */ T* get() const {return obj_p;} /** * This method does not throw. * @return A reference to the managed object. */ T& operator*() const {return *obj_p;} /** * This method does not throw. * @return A pointer to the managed object (or NULL if none is * managed). */ T* operator->() const {return obj_p;} /** * Causes the intrusive pointer to cease to manage its managed * object, deleting it if this is the last intrusive pointer managing * it. If the argument passed is not NULL, the instrusive pointer * will manage the new object passed. This method does not throw * unless the destructor of a managed object throws - that should * never happen. * @param ptr NULL (the default), or a new object to manage. * * Since 0.9.1 */ void reset(T* ptr = 0) { unreference(); obj_p = ptr; reference(); } /** * The destructor does not throw unless the destructor of a managed * object throws - that should never happen. */ ~IntrusivePtr() {unreference();} }; /** * @class IntrusiveCounter intrusive_ptr.h c++-gtk-utils/intrusive_ptr.h * @brief This is a counter class providing the ref() and unref() * functions required by IntrusivePtr. * @ingroup handles * @sa IntrusiveLockCounter. * * This is a counter class providing the ref() and unref() functions * required by IntrusivePtr. It is intended to be inherited from by * classes which are to be managed by such a smart pointer. */ class IntrusiveCounter { unsigned int count; // we should not be able to copy objects of this class // - objects, if constructed on the heap, should be passed // via an IntrusivePtr object. An object of a derived class // might still copy itself via its copy constructor and take // along a new base IntrusiveCounter object constructed via // the default constructor, and thus have a correct reference // count of 0, but derived classes should not try to provide // their own assignment operators. IntrusiveCounter(const IntrusiveCounter&); IntrusiveCounter& operator=(const IntrusiveCounter&); public: /** * Increments the reference count. This method does not throw. */ void ref() {++count;} /** * Decrements the reference count, and if the count reaches 0 deletes * itself (ie the managed object). This method does not throw unless * the destructor of a derived class throws - that should never * happen. */ void unref() { --count; if (count == 0) delete this; } IntrusiveCounter(): count(0) {} virtual ~IntrusiveCounter() {} }; /** * @class IntrusiveLockCounter intrusive_ptr.h c++-gtk-utils/intrusive_ptr.h * @brief This is a counter class providing the ref() and unref() * functions required by IntrusivePtr, with a thread safe reference * count.. * @ingroup handles * @sa IntrusiveCounter. * * This is a counter class providing the ref() and unref() functions * required by IntrusivePtr. It is intended to be inherited from by * classes which are to be managed by such a smart pointer, and * includes locking so that such an inheriting class object can be * accessed by different IntrusivePtr objects in different threads * (although the word Lock is in the title, by default it uses glib * atomic functions to access the reference count rather than a mutex, * so the overhead should be very small). Note that only the * reference count is protected, so this is thread safe in the sense * in which a raw pointer is thread safe. * * As mentioned, by default glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_INTRUSIVE_LOCK_COUNTER_USE_MUTEX before this file is parsed so * as to use mutexes instead, which might be useful for some debugging * purposes. */ class IntrusiveLockCounter { #ifdef CGU_INTRUSIVE_LOCK_COUNTER_USE_MUTEX unsigned int count; Thread::Mutex mutex; #else gint count; #endif // we should not be able to copy objects of this class // - objects, if constructed on the heap, should be passed // via an IntrusivePtr object. An object of a derived class // might still copy itself via its copy constructor and take // along a new base IntrusiveLockCounter object constructed via // the default constructor, and thus have a correct reference // count of 0, but derived classes should not try to provide // their own assignment operators. IntrusiveLockCounter(const IntrusiveLockCounter&); IntrusiveLockCounter& operator=(const IntrusiveLockCounter&); public: /** * Increments the reference count. This method does not throw. */ void ref() { #ifdef CGU_INTRUSIVE_LOCK_COUNTER_USE_MUTEX Thread::Mutex::Lock lock(mutex); ++count; #else g_atomic_int_inc(&count); #endif } /** * Decrements the reference count, and if the count reaches 0 deletes * itself (ie the managed object). This method does not throw unless * the destructor of a derived class throws - that should never * happen. */ void unref() { #ifdef CGU_INTRUSIVE_LOCK_COUNTER_USE_MUTEX mutex.lock(); --count; if (count == 0) { mutex.unlock(); delete this; } else mutex.unlock(); #else if (g_atomic_int_dec_and_test(&count)) { delete this; } #endif } /** * By default, glib atomic functions are used to provide thread-safe * manipulation of the reference count. However, from version 1.2.0 a * library user can define the symbol * CGU_INTRUSIVE_LOCK_COUNTER_USE_MUTEX before this file is parsed so * as to use mutexes instead, which might be useful for some debugging * purposes. Were she to do so, Cgu::Thread::MutexError might be * thrown by this constructor if initialization of the mutex fails, * but it is usually not worth checking for this. * * Otherwise, this constructor does not throw. */ IntrusiveLockCounter(): count(0) {} /** * This destructor does not throw, unless the destructor of a derived * class throws. */ virtual ~IntrusiveLockCounter() {} }; #if defined(CGU_USE_SMART_PTR_COMPARISON) || defined(DOXYGEN_PARSING) // we can use built-in operator == when comparing pointers referencing // different objects of the same type /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before intrusive_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator==(const IntrusivePtr& s1, const IntrusivePtr& s2) { return (s1.get() == s2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before intrusive_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator!=(const IntrusivePtr& s1, const IntrusivePtr& s2) { return !(s1 == s2); } // we must use std::less rather than the < built-in operator for // pointers to objects not within the same array or object: "For // templates greater, less, greater_equal, and less_equal, the // specializations for any pointer type yield a total order, even if // the built-in operators <, >, <=, >= do not." (para 20.3.3/8). /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before intrusive_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator<(const IntrusivePtr& s1, const IntrusivePtr& s2) { return std::less()(s1.get(), s2.get()); } #endif // CGU_USE_SMART_PTR_COMPARISON } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/text_print_manager.h0000644000175000001440000003510511524110041021077 00000000000000/* Copyright (C) 2007 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_TEXT_PRINTMANAGER_H #define CGU_TEXT_PRINTMANAGER_H #include #include #include #include #include #include #include #include #include #include #include #include namespace Cgu { #ifndef DOXYGEN_PARSING // deleter functor for SharedHandle class TPMPangoLayoutIterFree { public: void operator()(PangoLayoutIter* obj_p) { if (obj_p) { pango_layout_iter_free(obj_p); } } }; typedef SharedHandle TPMPangoLayoutIterSharedHandle; #endif // DOXYGEN_PARSING /** * @class TextPrintManager text_print_manager.h c++-gtk-utils/text_print_manager.h * @brief A class to print plain text using the GTK+ print system. * * The TextPrintManager class prints text (say, from a GtkTextBuffer * object or from a plain text file) using the GTK+ printer interface. * To obtain a TextPrintManager object, call * TextPrintManager::create_manager(). TextPrintManager::set_text() * passes the text to be printed. The text passed with * TextPrintManager::set_text() must form valid UTF-8 (all ASCII * characters form valid UTF-8). To print the text entered, call * TextPrintManager::print(). The TextPrintManager::view() and * TextPrintManager::print_to_file() methods are also available. * * The TextPrintManager::page_setup() method can be used as a callback * to display a document page setup dialog prior to printing, and this * method should only be called in the thread in which the main GTK+ * event loop runs. It is a static method (a TextPrintManager object * does not need to have been created before it is called). * * Once TextPrintManager::print(), TextPrintManager::view() or * TextPrintManager::print_to_file() has been called, the * TextPrintManager class owns a reference to itself and so manages * its own lifetime - so once one of the methods has been called it * doesn't matter if the IntrusivePtr object returned by * TextPrintManager::create_manager() goes out of scope (however, once * TextPrintManager::print(), TextPrintManager::view() or * TextPrintManager::print_to_file() has been called, the object will * not be deleted until both printing has completed or failed AND the * IntrusivePtr object returned by TextPrintManager::create_manager() * has gone out of scope or has been reset()). * * Normally, a user would probably only want to use any one * TextPrintManager object to print a single print job (it has been * designed with that in mind). Nevertheless, if a reference to the * object is kept alive via an active IntrusivePtr object, it can be * used to print more than one print job. However, if that is done it * is not possible to called TextPrintManager::print() * TextPrintManager::view(), TextPrintManager::print_to_file() or * TextPrintManager::set_text() until the previous print job (if any) * has been dispatched to the GTK+ print system (or cancelled). If * the TextPrintManager object is not ready because it is in the * middle of handling an earlier print job, then the call to * TextPrintManager::print(), TextPrintManager::view(), * TextPrintManager::print_to_file() or TextPrintManager::set_text() * will return false; if however the new print job was successfully * started or text successfully set, they will return true. It is not * necessary to check the return value of these methods for the first * print job despatched by any one TextPrintManager object. * * TextPrintManager::print_to_file() will also return false if no file * name to which to print was specified. */ class TextPrintManager: public IntrusiveLockCounter { enum Mode {print_mode, view_mode, file_mode} mode; Thread::Mutex mutex; GtkWindow* parent_p; GobjHandle text_layout_h; int current_line; TPMPangoLayoutIterSharedHandle current_line_iter_h; std::auto_ptr text_a; std::string file_name; std::vector pages; Notifier print_notifier; std::string font_family; int font_size; bool ready; bool cancelled_when_drawing; GobjHandle font_entry_h; GobjHandle font_size_spin_button_h; static GobjHandle print_settings_h; static GobjHandle page_setup_h; static std::string default_font_family; static int default_font_size; void paginate(GtkPrintContext*); void print_text(); void begin_print_impl(GtkPrintOperation*, GtkPrintContext*); void draw_page_impl(GtkPrintOperation*, GtkPrintContext*, int); GObject* create_custom_widget_impl(GtkPrintOperation*); static void strip(std::string&); // private constructor TextPrintManager() {} // and this class may not be copied TextPrintManager(const TextPrintManager&); TextPrintManager& operator=(const TextPrintManager&); public: #ifndef DOXYGEN_PARSING // this helper class avoids exposing GObject callbacks with C // linkage to the global namespace class CB; friend class CB; #endif /** * Creates a new TextPrintManager object. No GTK+/GDK functions are * called by this method, and it is thread safe provided that, if it * is called in a thread other than the one in which the GTK+ event * loop runs, Cgu::Notifier::init() has previously been called in the * GTK+ event loop thread. * @param parent The parent of the print dialog which will be created * by the TextPrintManager object (optional, NULL may be passed). * @param font_family If a particular font is wanted, then this can be * entered as the font_family and font_size arguments to this method.. * If the default of an empty string for font_family is used, then * printing will use the previous font family setting (if any), or if * not a font of "Mono". The font passed in this method can in any * event be overridden from the "Print font" page in the print dialog. * @param font_size If a particular font is wanted, then this can be * entered as the font_family and font_size arguments to this method.. * If the default of 0 for font_size is used, then printing will use * the previous font size setting (if any), or if not a size of * 10. The font passed in this method can in any event be overridden * from the "Print font" page in the print dialog. If a font size is * passed as an argument, then the value must be 0 (default) or * between 8 and 24 (actual). * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * @exception Cgu::Thread::MutexError This method might throw * Cgu::Thread::MutexError if initialisation of the contained mutex * fails. (It is often not worth checking for this, as it means * either memory is exhausted or pthread has run out of other * resources to create new mutexes.) * @exception Cgu::PipeError This method might throw Cgu::PipeError if * the contained Notifier object is the first Notifier object in the * program to be constructed and Cgu::Notifier::init() has not * previously been called. */ static Cgu::IntrusivePtr create_manager(GtkWindow* parent = 0, const std::string& font_family = "", int font_size = 0); /** * Runs a page set-up dialog. (If no settings are set using this * dialog, then page defaults will be used with a page margin of 15 * millimetres.) In a multi-threaded program, this must be called in * the thread in which the main GTK+ event loop runs. If the program * by which it is called calls GTK+ directly in more than one thread * and thus employs gdk_threads_enter()/gdk_threads_leave() (rather * than, say, Cgu::Notifier or Cgu::Callback::post()), it must also be * surrounded by gdk_threads_enter()/gdk_threads_leave() if called * otherwise than in a GTK+ signal handler. (The best approach * however is for a program only to address GTK+/GDK in the main * program thread, for which purpose this library provides various * functions and classes for inter-thread communication, such as * Cgu::Notifier and Cgu::Callback::post().) It will not throw. * @param parent The parent of the page set-up dialog which will be * created by the TextPrintManager object (optional, NULL may be * passed). */ static void page_setup(GtkWindow* parent = 0); /** * Sets the text to be printed. This method is thread-safe and may be * called in any thread. No GTK+/GDK functions are called. It will * not throw. * @param text The text to be printed. It must be in valid UTF-8 * format. Ownership is taken of the text string (a move operation is * carried out) unless false is returned. * @return Returns true, unless the same TextPrintManager object is * being used to print more than one print job and when this method is * called it is already printing another print job (in which case it * returns false). If it returns false, ownership is not taken of the * text string (it can be reused). */ // for efficiency reasons (the string could hold a lot of text and we do not // want more copies than necessary hanging around) the text is passed by // reference (by std::auto_ptr<>). We pass by std::auto_ptr so that the // string cannot be modified after it has been passed to the TextPrintManager // object - we take ownership of it bool set_text(std::auto_ptr& text); /** * Prints the text set with set_text(). This method is thread-safe * and may be called in any thread (it hands off its work to the main * program thread via a Cgu::Notifier object), unless the program by * which it is called calls GTK+ directly in more than one thread and * thus employs gdk_threads_enter()/gdk_threads_leave() (rather than, * say, Cgu::Notifier or Cgu::Callback::post()), in which case it must * be called in the main GUI thread only and surrounded by * gdk_threads_enter()/gdk_threads_leave() if called otherwise than in * a GTK+ signal handler. (The best approach however is for a program * only to address GTK+/GDK in the main program thread, for which * purpose this library provides various functions and classes for * inter-thread communication, such as Cgu::Notifier and * Cgu::Callback::post().) * @return Returns true, unless the same TextPrintManager object is * being used to print more than one print job and when this method is * called it is already printing another print job (in which case it * returns false). * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case, but only if * it is called in the main program thread. Otherwise it will not * throw. */ bool print(); /** * Provides a print pre-view of the text set with set_text(). This * method is thread-safe and may be called in any thread (it hands off * its work to the main program thread via a Cgu::Notifier object), * unless the program by which it is called calls GTK+ directly in * more than one thread and thus employs * gdk_threads_enter()/gdk_threads_leave() (rather than, say, * Cgu::Notifier or Cgu::Callback::post()), in which case it must be * called in the main GUI thread only and surrounded by * gdk_threads_enter()/gdk_threads_leave() if called otherwise than in * a GTK+ signal handler. (The best approach however is for a program * only to address GTK+/GDK in the main program thread, for which * purpose this library provides various functions and classes for * inter-thread communication, such as Cgu::Notifier and * Cgu::Callback::post().) * @return Returns true, unless the same TextPrintManager object is * being used to print more than one print job and when this method is * called it is already printing another print job (in which case it * returns false). * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case, but only if * it is called in the main program thread. Otherwise it will not * throw. */ bool view(); /** * Prints the text set with set_text() to file. This method is * thread-safe and may be called in any thread (it hands off its work * to the main program thread via a Cgu::Notifier object), unless the * program by which it is called calls GTK+ directly in more than one * thread and thus employs gdk_threads_enter()/gdk_threads_leave() * (rather than, say, Cgu::Notifier or Cgu::Callback::post()), in * which case it must be called in the main GUI thread only and * surrounded by gdk_threads_enter()/gdk_threads_leave() if called * otherwise than in a GTK+ signal handler. (The best approach * however is for a program only to address GTK+/GDK in the main * program thread, for which purpose this library provides various * functions and classes for inter-thread communication, such as * Cgu::Notifier and Cgu::Callback::post().) * @param filename The filename of the file to which the text is to be * printed. * @return Returns true, unless the same TextPrintManager object is * being used to print more than one print job and when this method is * called it is already printing another print job, or no filename to * print was specified (in either of which case it returns false). * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. */ bool print_to_file(const char* filename); /** * The destructor will not throw. It is thread safe (the * TextPrintManager object may be destroyed in any thread), and does * not call any GTK+/GDK functions. */ ~TextPrintManager(); #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT CGU_GLIB_MEMORY_SLICES_FUNCS #endif }; } // namespace Cgu #endif // TEXT_PRINTMANAGER_H efax-gtk-3.2.8/src/internal/c++-gtk-utils/prog_present.h0000644000175000001440000001736311524110041017722 00000000000000/* Copyright (C) 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_PROG_PRESENT_H #define CGU_PROG_PRESENT_H #include #include namespace Cgu { /** * @defgroup prog_present prog_present * @anchor prog_presenterAnchor * * \#include * * The c++-gtk-utils library provides functions to make a single * instance program. The functionality for a single instance is * provided by gio (if glib >= 2.26 is installed) or dbus-glib, but * the interface in this file comprises only two functions, * register_prog() and present_instance(). register_prog() returns * TRUE if it is the first program instance to run in a particular * user session, otherwise FALSE. If FALSE is returned, * present_instance() is then called to bring up the program instance * already running. register_prog() is passed a function to carry out * the program presentation. * * Typical usage would be, for example: * * @code * GtkWidget* window; * gboolean present_func(void* data, const char** args) { * gdk_x11_window_move_to_current_desktop(gtk_widget_get_window(window)); * gtk_window_present(GTK_WINDOW(window)); * return TRUE; * } * * using namespace Cgu; * * int main(int argc, char* argv[]) { * gtk_init(&argc, &argv); * if (register_prog("my_prog", present_func)) { * window = gtk_window_new(GTK_WINDOW_TOPLEVEL); * ... go through normal business of creating GTK+ program interface ... * gtk_main(); * } * else { * if (!present_instance()) gdk_notify_startup_complete(); * else { * ... carry out a dbus failure strategy, which may mean starting * ... the program anyway with appropriate warnings to the user * ... that there may be multiple instances running, or may mean * ... displaying a GtkMessageDialog object to the user suggesting * ... that the user should check that the session message bus * ... daemon is running, and then terminating * } * } * return 0; * } * @endcode * * @b NOTE * * These functions are only compiled into the library if either * dbus-glib >= 0.70 is installed or, from version 1.2.7, glib >= 2.26 * (for gio's dbus implementation) is installed. If both are * installed, from version 1.2.7 gio's dbus implementation is used. */ /** * Function pointer type that present_instance() will execute via dbus * and intended to cause eg the program window to show itself. It must * return TRUE if successful, FALSE if not. From version 1.2.2, * returning FALSE will be cause present_instance() to return 2 (prior * to that it would return 1, the same as a dbus error). However, * generally any GDK/GTK+ errors encountered by the function * represented by this function pointer are best reported by that * function bringing up a dialog diagnostic rather than by returning * FALSE (in other words, in most cases you will want to return TRUE, * even if there has been a problem). It should not throw, as the * dbus and dbus-glib implementation has C linkage and cannot handle * exceptions. * @param object_data NULL or persistent data, as determined by the * call to register_prog(). By default it is NULL. * @param instance_args NULL or a NULL terminated array of strings to * be passed to the PresentFunc function on a particular invocation, * as determined by present_instance(). By default it is NULL. * @return TRUE if successful, FALSE if not and it is important to * notify the caller of the problem. * @ingroup prog_present */ typedef gboolean(*PresentFunc)(void* object_data, const char** instance_args); /** * register_prog() returns TRUE if this is the first instance of the * program to register itself, otherwise FALSE. FALSE will also be * returned, and an error logged, if a dbus connection cannot be * obtained in order to carry out program registration (in which case * the subsequent call to present_instance() will return 1, * representing failure). The first argument (prog_name) can be * anything that contains valid xml name characters (provided that for * any one program it is always the same for that program), but it is * best to pass the name of the program to be invoked. The object * data argument is persistent data passed to each invocation of * PresentFunc for that program while it is running, so the data * passed needs to exist throughout program execution (eg, allocate it * on the heap or have it in the same scope as that in which main() * returns). By default a NULL value is passed. It does not throw. * @param prog_name An identifier name comprising valid xml * characters. * @param func A function pointer representing the function to be * executed by present_instance() if the program is already running. * @param object_data NULL or persistent data to be passed to each * invocation of func. By default it is NULL. * @return TRUE if this is the first instance of the program to * register itself, otherwise FALSE. FALSE will also be returned, and * an error logged, if a dbus connection cannot be obtained in order * to carry out program registration (in which case the subsequent * call to present_instance() will return 1, representing failure). * @ingroup prog_present */ gboolean register_prog(const char* prog_name, PresentFunc func, void* object_data = 0); /** * present_instance() is to be called if register_prog() returns * FALSE. Returns 0 on success and 1 if there has been a dbus error. * Prior to version 1.2.2, the value 1 would also be returned if the * PresentFunc callback registered by register_prog() has returned * FALSE: however, from version 1.2.2 this causes 2 to be returned. * The instance_args argument is passed to PresentFunc on this * invocation, and is either NULL (the default argument), or a NULL * terminated array of strings, and in most cases you won't need it so * NULL is appropriate. It is a blocking call (it will wait for the * PresentFunc function to complete). It does not throw. * @param instance_args NULL or a NULL terminated array of strings to * be passed to the PresentFunc function on this invocation. By * default it is NULL. * @return 0 on success, 1 on failure (say, because a dbus connection * could not be obtained in order to carry out program registration). * Prior to version 1.2.2, the value 1 would also be returned if the * PresentFunc callback registered by register_prog() returns FALSE: * however, from version 1.2.2 this causes 2 to be returned. * @ingroup prog_present */ int present_instance(const char** instance_args = 0); /* * TODO: At a suitable API/ABI break, have register_prog() and * PresentFunc return bool. Note: prog_presenter_present() must * return a gboolean type with value either TRUE or FALSE, because it * is required by dbus-glib to return such a value/type. */ } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/Makefile.in0000644000175000001440000004113511544566737017136 00000000000000# 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@ subdir = src/internal/c++-gtk-utils DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/cgu_config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = cgu_config.h CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libcxx_gtk_utils_a_AR = $(AR) $(ARFLAGS) libcxx_gtk_utils_a_LIBADD = am_libcxx_gtk_utils_a_OBJECTS = io_watch.$(OBJEXT) notifier.$(OBJEXT) \ thread.$(OBJEXT) reassembler.$(OBJEXT) widget.$(OBJEXT) \ window.$(OBJEXT) callback.$(OBJEXT) \ text_print_manager.$(OBJEXT) pipes.$(OBJEXT) timeout.$(OBJEXT) \ emitter.$(OBJEXT) convert.$(OBJEXT) mutex.$(OBJEXT) \ prog_present.$(OBJEXT) application.$(OBJEXT) libcxx_gtk_utils_a_OBJECTS = $(am_libcxx_gtk_utils_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(libcxx_gtk_utils_a_SOURCES) DIST_SOURCES = $(libcxx_gtk_utils_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AC_HAVE_RECURSIVE_MUTEX_RUNTIME = @AC_HAVE_RECURSIVE_MUTEX_RUNTIME@ AC_USE_GLIB_MEMORY_SLICES_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_COMPAT@ AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT@ AC_USE_SCHED_YIELD = @AC_USE_SCHED_YIELD@ AC_USE_SMART_PTR_COMPARISON = @AC_USE_SMART_PTR_COMPARISON@ AC_USE_TYPE_TUPLE_ARGS = @AC_USE_TYPE_TUPLE_ARGS@ AC_USING_NAMESPACE = @AC_USING_NAMESPACE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COND_CXXFLAG = @COND_CXXFLAG@ COND_INTERNAL = @COND_INTERNAL@ COND_INTERNAL_LIB = @COND_INTERNAL_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_GTK_UTILS_CFLAGS = @CXX_GTK_UTILS_CFLAGS@ CXX_GTK_UTILS_LIBS = @CXX_GTK_UTILS_LIBS@ CYGPATH_W = @CYGPATH_W@ DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ 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@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPOOLDIR = @SPOOLDIR@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libcxx-gtk-utils.a libcxx_gtk_utils_a_SOURCES = io_watch.cpp notifier.cpp \ thread.cpp reassembler.cpp \ widget.cpp window.cpp callback.cpp \ text_print_manager.cpp pipes.cpp \ timeout.cpp emitter.cpp convert.cpp \ mutex.cpp prog_present.cpp \ application.cpp noinst_HEADERS = fdstream.h fdstream.tpp gobj_handle.h \ shared_handle.h shared_ptr.h param.h \ intrusive_ptr.h async_queue.h \ gerror_handle.h mem_fun.h emitter.h \ io_watch.h notifier.h thread.h \ reassembler.h widget.h window.h \ callback.h text_print_manager.h \ pipes.h mutex.h timeout.h convert.h \ prog_present.h gvar_handle.h \ application.h lib_defs.h \ prog-presenter/prog-presenter-bindings.h \ prog-presenter/prog-presenter-glue.h AM_CXXFLAGS = -D_XOPEN_SOURCE=600 @GTK_CFLAGS@ @GTHREAD_CFLAGS@ @DBUS_GLIB_CFLAGS@ @GIO_CFLAGS@ -I.. EXTRA_DIST = LGPL.TXT cgu_config.h.in prog-presenter/make_bindings.sh prog-presenter/prog-presenter.xml all: all-am .SUFFIXES: .SUFFIXES: .cpp .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 src/internal/c++-gtk-utils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/internal/c++-gtk-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): cgu_config.h: $(top_builddir)/config.status $(srcdir)/cgu_config.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libcxx-gtk-utils.a: $(libcxx_gtk_utils_a_OBJECTS) $(libcxx_gtk_utils_a_DEPENDENCIES) -rm -f libcxx-gtk-utils.a $(libcxx_gtk_utils_a_AR) libcxx-gtk-utils.a $(libcxx_gtk_utils_a_OBJECTS) $(libcxx_gtk_utils_a_LIBADD) $(RANLIB) libcxx-gtk-utils.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callback.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emitter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io_watch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notifier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prog_present.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reassembler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_print_manager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 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) $(HEADERS) 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-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 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-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic 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 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: efax-gtk-3.2.8/src/internal/c++-gtk-utils/thread.cpp0000644000175000001440000001175111524110041017010 00000000000000/* Copyright (C) 2005 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include extern "C" { static void cgu_thread_cleanup_handler(void* arg) { delete static_cast(arg); } static void* cgu_thread_func(void* arg) { const Cgu::Callback::Callback* callback_p = static_cast(arg); // we don't need to worry about the thread being cancelled between it starting // and pthread_cleanup_push() executing, because a new thread always starts // in deferred cancellation state and pthread_cleanup_push() is not a cancellation // point - this new thread must therefore run as a minimum until the call to // Callback::dispatch() is made pthread_cleanup_push(cgu_thread_cleanup_handler, const_cast(callback_p)); try { callback_p->dispatch(); } // don't bother to deal with uncaught exceptions, except Thread::Exit. If we have // reached here with an uncaught exception we are in trouble anyway, and catching // general exceptions could have unintended consequences (eg with NPTL a catch with // an elipsis (...) argument without rethrowing will terminate the whole application // on thread cancellation). So it is best to do nothing here and rely on the user // to stop uncaught exceptions reaching this far. catch (Cgu::Thread::Exit&) {;} // just continue to thread termination pthread_cleanup_pop(true); return 0; } } // extern "C" namespace Cgu { namespace Thread { std::auto_ptr Thread::start(const Cgu::Callback::Callback* cb, bool joinable) { // take ownership of the first argument std::auto_ptr cb_a(const_cast(cb)); std::auto_ptr return_val; // set joinable attribute int detach_state; if (joinable) detach_state = PTHREAD_CREATE_JOINABLE; else detach_state = PTHREAD_CREATE_DETACHED; pthread_attr_t attr; if (pthread_attr_init(&attr)) return return_val; pthread_attr_setdetachstate(&attr, detach_state); // always returns 0 if attr and detach_state // are valid, which we now know they are try { return_val.reset(new Thread); } catch (...) { pthread_attr_destroy(&attr); throw; } pthread_t thread; // start the new thread and release ownership of the callback // to the cgu_thread_func() function in the new thread if (!pthread_create(&thread, &attr, cgu_thread_func, cb_a.release())) { return_val->thread = thread; } else { return_val.reset(); // we have released in initialising thread_args delete cb; } pthread_attr_destroy(&attr); return return_val; } void JoinableHandle::cancel() { Mutex::Lock lock(mutex); if (thread_a.get()) thread_a->cancel(); } bool JoinableHandle::join() { mutex.lock(); if (thread_a.get() && !detached) { detached = true; mutex.unlock(); // Thread::Thread::join() might block thread_a->join(); return true; } mutex.unlock(); return false; } void JoinableHandle::detach() { Mutex::Lock lock(mutex); if (thread_a.get() && !detached) { thread_a->detach(); detached = true; } } bool JoinableHandle::is_caller() { Mutex::Lock lock(mutex); return thread_a.get() ? thread_a->is_caller() : false; } bool JoinableHandle::is_managing() { Mutex::Lock lock(mutex); return (thread_a.get() && !detached); } JoinableHandle& JoinableHandle::operator=(JoinableHandle& h) { Mutex::Lock lock(mutex); if (thread_a.get() && !detached) thread_a->detach(); action = h.action; detached = h.detached; thread_a = h.thread_a; return *this; } JoinableHandle::~JoinableHandle() { Mutex::Lock lock(mutex); if (thread_a.get() && !detached) { if (action == detach_on_exit) thread_a->detach(); else thread_a->join(); } } CancelBlock::CancelBlock(bool blocking) { // the default value of blocking is true if (blocking) block(starting_state); else unblock(starting_state); } } // namespace Thread } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/fdstream.tpp0000644000175000001440000005570511524110041017376 00000000000000/* Copyright (C) 2001, 2004, 2009 and 2010 Chris Vine The following code declares classes to read from and write to Unix file descriptors. The whole work comprised in files fdstream.h and fdstream.tpp is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_FDSTREAM_TPP #define CGU_FDSTREAM_TPP namespace Cgu { // provide the fdstream class methods template basic_fdoutbuf::basic_fdoutbuf(int fd_, bool manage_) : fd(fd_), manage(manage_) { if (fd_ >= 0) { #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT) buffer.reset(static_cast(g_slice_alloc(buf_size * sizeof(char_type)))); #else buffer.reset(new char_type[buf_size]); #endif this->setp(buffer.get(), buffer.get() + buf_size); } } template basic_fdoutbuf::~basic_fdoutbuf() { if (fd >= 0) { basic_fdoutbuf::sync(); if (manage) { while (::close(fd) == -1 && errno == EINTR); } } } template void basic_fdoutbuf::set_buffered(bool buffered) { if (fd < 0) return; if (buffered && !buffer.get()) { #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT) buffer.reset(static_cast(g_slice_alloc(buf_size * sizeof(char_type)))); #else buffer.reset(new char_type[buf_size]); #endif this->setp(buffer.get(), buffer.get() + buf_size); } else if (!buffered && buffer.get()) { basic_fdoutbuf::sync(); buffer.reset(); this->setp(0, 0); } } // sync returns 0 for success and -1 for error template int basic_fdoutbuf::sync() { if (fd < 0) return -1; int ret_val = flush_buffer(); // if the file descriptor is bound to a pipe the fsync() operation // is meaningless and we will probably get EINVAL, but we can // ignore that. We will also ignore EIO - the error will be picked // up and reported on the next write if there really is a problem while (fsync(fd) == -1 && errno == EINTR); return ret_val; } template void basic_fdoutbuf::attach_fd(int fd_, bool manage_) { if (fd >= 0) { // old descriptor basic_fdoutbuf::sync(); if (manage) { while (::close(fd) == -1 && errno == EINTR); } } if (fd_ >= 0) { // new descriptor if (!buffer.get()) { #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT) buffer.reset(static_cast(g_slice_alloc(buf_size * sizeof(char_type)))); #else buffer.reset(new char_type[buf_size]); #endif } this->setp(buffer.get(), buffer.get() + buf_size); } else { buffer.reset(); this->setp(0, 0); } fd = fd_; manage = manage_; } template bool basic_fdoutbuf::close_fd() { bool ret; if (fd >= 0) { ret = true; if (basic_fdoutbuf::sync() == -1) ret = false; int result; while ((result = ::close(fd)) == -1 && errno == EINTR); if (result == -1) ret = false; fd = -1; } else ret = false; return ret; } // flush_buffer() returns 0 for success and -1 for error template int basic_fdoutbuf::flush_buffer() { std::size_t count = this->pptr() - this->pbase(); if (count) { std::size_t remaining = count * sizeof(char_type); ssize_t result; const char* temp_p = reinterpret_cast(buffer.get()); do { result = write(fd, temp_p, remaining); if (result > 0) { temp_p += result; remaining -= result; } } while (remaining && (result != -1 || errno == EINTR)); if (remaining) return -1; this->pbump(-count); } return 0; } template typename basic_fdoutbuf::int_type basic_fdoutbuf::overflow(int_type c) { if (!buffer.get()) { // we are not buffered if (!traits_type::eq_int_type(c, traits_type::eof())) { std::size_t remaining = sizeof(char_type); ssize_t result; const char_type letter = c; const char* temp_p = reinterpret_cast(&letter); do { result = write(fd, temp_p, remaining); if (result > 0) { temp_p += result; remaining -= result; } } while (remaining && (result != -1 || errno == EINTR)); if (!remaining) return c; return traits_type::eof(); } return traits_type::not_eof(c); } // we are buffered // the stream must be full: empty buffer and then put c in buffer if (flush_buffer() == -1) return traits_type::eof(); if (traits_type::eq_int_type(traits_type::eof(), c)) return traits_type::not_eof(c); return sputc(c); } #ifndef FDSTREAM_USE_STD_N_READ_WRITE template std::streamsize basic_fdoutbuf::xsputn(const char_type* source_p, std::streamsize num) { // if num is less than or equal to the space in the buffer, put it in the buffer if (buffer.get() && num <= this->epptr() - this->pptr()) { traits_type::copy(this->pptr(), source_p, num); this->pbump(num); } else { // make a block write to the target, so first flush anything // in the buffer and then use Unix ::write() if (flush_buffer() == -1) num = 0; // flush_buffer() returns 0 if buffer.get() == 0 else { std::size_t remaining = num * sizeof(char_type); ssize_t result; const char* temp_p = reinterpret_cast(source_p); do { result = write(fd, temp_p, remaining); if (result > 0) { temp_p += result; remaining -= result; } } while (remaining && (result != -1 || errno == EINTR)); if (remaining) num -= remaining/sizeof(char_type); } } return num; } #endif /*FDSTREAM_USE_STD_N_READ_WRITE*/ // static function to pass to std::for_each() to carry out // the wchar_t byte swapping template void basic_fdinbuf::swap_element(char_type& c) { // this is by no means the most efficient implementation (a bit // shifting implementation is likely to be more efficient) but // it is the most portable. The underlying type of wchar_t can be // signed (and is in libc++-3), and the problem we have is that until // swapped, the sign bit is in fact just bit 1 in the incoming text // and is entirely random. So to avoid left shifting a negative number // (which is undefined behaviour) we would have to cast to uint32, but // that cast is bit altering on non-2s complement systems if the sign // bit is set. So avoid a bit shifting implementation. unsigned char* p = reinterpret_cast(&c); unsigned char tmp; if (sizeof(char_type) == 4) { // let the optimiser elide whichever block // cannot be reached tmp = p[0]; // swap bytes 1 and 4 p[0] = p[3]; p[3] = tmp; tmp = p[1]; // swap bytes 2 and 3 p[1] = p[2]; p[2] = tmp; } else if (sizeof(char_type) == 2) { tmp = p[0]; p[0] = p[1]; p[1] = tmp; } } template basic_fdinbuf::basic_fdinbuf(int fd_, bool manage_): fd(fd_), manage(manage_), byteswap(false) { reset(); } template basic_fdinbuf::~basic_fdinbuf() { if (fd >= 0) { if (manage) while (::close(fd) == -1 && errno == EINTR); else { // since we are not closing the file descriptor, wind basic_fdinbuf::seekpos( // back the file pointer to the logical position basic_fdinbuf::seekoff(0, std::ios_base::cur) ); } } } template void basic_fdinbuf::reset() { this->setg(buffer + putback_size, // beginning of putback area buffer + putback_size, // read position buffer + putback_size); // end position } template void basic_fdinbuf::attach_fd(int fd_, bool manage_) { if (fd >= 0) { if (manage) while (::close(fd) == -1 && errno == EINTR); else { // since we are not closing the file descriptor, wind basic_fdinbuf::seekpos( // back the file pointer to the logical position basic_fdinbuf::seekoff(0, std::ios_base::cur) ); } } reset(); fd = fd_; manage = manage_; byteswap = false; } template bool basic_fdinbuf::close_fd() { bool ret; if (fd >= 0) { ret = true; reset(); int result; while ((result = ::close(fd)) == -1 && errno == EINTR); if (result == -1) ret = false; fd = -1; } else ret = false; return ret; } template void basic_fdinbuf::set_byteswap(bool swap) { if (swap != byteswap) { byteswap = swap; std::for_each(this->eback(), this->egptr(), swap_element); } } template typename basic_fdinbuf::int_type basic_fdinbuf::underflow() { // insert new characters into the buffer when it is empty // is read position before end of buffer? if (this->gptr() < this->egptr()) return traits_type::to_int_type(*this->gptr()); int putback_count = this->gptr() - this->eback(); if (putback_count > putback_size) putback_count = putback_size; /* copy up to putback_size characters previously read into the putback * area -- use traits_type::move() because if the size of file modulus buf_size * is less than putback_size, the source and destination ranges can * overlap on the last call to underflow() (ie the one which leads * to traits_type::eof() being returned) */ traits_type::move(buffer + (putback_size - putback_count), this->gptr() - putback_count, putback_count); // read at most buf_size new characters ssize_t result; do { result = read(fd, buffer + putback_size, buf_size * sizeof(char_type)); } while (result == -1 && errno == EINTR); if (sizeof(char_type) > 1 && result > 0) { // check for part character fetch - this block will be // optimised out where char_type is a plain one byte char std::size_t part_char = result % sizeof(char_type); if (part_char) { ssize_t result2; std::streamsize remaining = sizeof(char_type) - part_char; char* temp_p = reinterpret_cast(buffer); temp_p += putback_size * sizeof(char_type) + result; do { result2 = read(fd, temp_p, remaining); if (result2 > 0) { temp_p += result2; remaining -= result2; result += result2; } } while (remaining // we haven't met the request && result2 // not end of file && (result2 != -1 || errno == EINTR)); // no error other than syscall interrupt } } if (result <= 0) { // error (result == -1) or end-of-file (result == 0) // we might as well make the put back area readable so reset // the buffer pointers to enable this this->setg(buffer + (putback_size - putback_count), // beginning of putback area buffer + putback_size, // start of read area of buffer buffer + putback_size); // end of buffer - it's now empty return traits_type::eof(); } // reset buffer pointers this->setg(buffer + (putback_size - putback_count), // beginning of putback area buffer + putback_size, // read position buffer + (putback_size + result/sizeof(char_type))); // end of buffer // do any necessary byteswapping on newly fetched characters if (sizeof(char_type) > 1 && byteswap) { std::for_each(this->gptr(), this->egptr(), swap_element); } // return next character return traits_type::to_int_type(*this->gptr()); } #ifndef FDSTREAM_USE_STD_N_READ_WRITE template std::streamsize basic_fdinbuf::xsgetn(char_type* dest_p, std::streamsize num) { std::streamsize copied_to_target = 0; const std::streamsize available = this->egptr() - this->gptr(); // if num is less than or equal to the characters already in the buffer, // extract from buffer if (num <= available) { traits_type::copy(dest_p, this->gptr(), num); this->gbump(num); copied_to_target = num; } else { // first copy out the buffer if (available) { traits_type::copy(dest_p, this->gptr(), available); copied_to_target = available; } // we now know from the first 'if' block that there is at least one more character required ssize_t remaining = (num - copied_to_target) * sizeof(char_type); // this is in bytes std::size_t bytes_fetched = 0; ssize_t result = 1; // a dummy value so that the second if block // is always entered if next one isn't if (num - copied_to_target > buf_size) { // this is a big read, and we are going to read up to everything we need // except one character with a single block system read() (leave one character // still to get on a buffer refill read in order (a) so that the final read() // will not unnecessarily block after the xsgetn() request size has been met and // (b) so that we have an opportunity to fill the buffer for any further reads) remaining -= sizeof(char_type); // leave one remaining character to fetch char* temp_p = reinterpret_cast(dest_p); temp_p += copied_to_target * sizeof(char_type); do { result = read(fd, temp_p, remaining); if (result > 0) { temp_p += result; remaining -= result; bytes_fetched += result; } } while (remaining // more to come && result // not end of file && (result != -1 || errno == EINTR)); // no error other than syscall interrupt copied_to_target += bytes_fetched/sizeof(char_type); // if the stream hasn't failed this must // be a whole number of characters if (!copied_to_target) return 0; // nothing available - bail out // do any necessary byteswapping on the newly fetched characters // which have been put directly in the target if (sizeof(char_type) > 1 && byteswap) { std::for_each(dest_p + available, dest_p + copied_to_target, swap_element); } remaining += sizeof(char_type); // reset the requested characters to add back the last one bytes_fetched = 0; // reset bytes_fetched } char* buffer_pos_p = reinterpret_cast(buffer); buffer_pos_p += putback_size * sizeof(char_type); // at this point bytes_fetched will have been set or reset to 0 if (result > 0) { // no stream failure // now fill up the buffer as far as we can to extract sufficient // bytes for the one or more remaining characters requested do { result = read(fd, buffer_pos_p, buf_size * sizeof(char_type) - bytes_fetched); if (result > 0) { buffer_pos_p += result; remaining -= result; bytes_fetched += result; } } while (remaining > 0 // we haven't met the request && result // not end of file && (result != -1 || errno == EINTR)); // no error other than syscall interrupt if (!copied_to_target && !bytes_fetched) return 0; // nothing available - bail out } if (sizeof(char_type) > 1 && result > 0) { // check for part character fetch - this block will be // optimised out where char_type is a plain one byte char std::size_t part_char = bytes_fetched % sizeof(char_type); if (part_char) { remaining = sizeof(char_type) - part_char; do { result = read(fd, buffer_pos_p, remaining); if (result > 0) { buffer_pos_p += result; remaining -= result; bytes_fetched += result; } } while (remaining // we haven't met the request && result // not end of file && (result != -1 || errno == EINTR)); // no error other than syscall interrupt } } std::streamsize chars_fetched = bytes_fetched/sizeof(char_type);// if the stream hasn't failed this // must now be a whole number of // characters we have put directly // in the buffer // do any necessary byteswapping on newly fetched characters now in the buffer if (sizeof(char_type) > 1 && byteswap) { std::for_each(buffer + putback_size, buffer + (putback_size + chars_fetched), swap_element); } // now put the final instalment of requested characters into the target from the buffer std::streamsize copy_num = chars_fetched; std::streamsize putback_count = 0; if (copy_num) { if (copy_num > num - copied_to_target) copy_num = num - copied_to_target; traits_type::copy(dest_p + copied_to_target, buffer + putback_size, copy_num); copied_to_target += copy_num; } if (copy_num < putback_size) { // provide some more putback characters: these // will by now have been byte swapped if relevant std::streamsize start_diff = copied_to_target; if (start_diff > putback_size) start_diff = putback_size; putback_count = start_diff - copy_num; traits_type::copy(buffer + (putback_size - putback_count), dest_p + (copied_to_target - start_diff), putback_count); } // reset buffer pointers this->setg(buffer + (putback_size - putback_count), // beginning of putback area buffer + (putback_size + copy_num), // read position buffer + (putback_size + chars_fetched)); // end of buffer } return copied_to_target; } #endif /*FDSTREAM_USE_STD_N_READ_WRITE*/ /** functions wtih implementation common to both streambuffer classes **/ template bool basic_fdoutbuf::can_seek() const { return (lseek(fd, 0, SEEK_CUR) != off_t(-1)); } template bool basic_fdinbuf::can_seek() const { return (lseek(fd, 0, SEEK_CUR) != off_t(-1)); } template typename basic_fdoutbuf::pos_type basic_fdoutbuf::seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode m) { pos_type ret = pos_type(off_type(-1)); off *= sizeof(char_type); // number of bytes if (fd == -1) return ret; if (flush_buffer() == -1) return ret; int seek_type; if (way == std::ios_base::cur) { seek_type = SEEK_CUR; } else if (way == std::ios_base::end) seek_type = SEEK_END; else seek_type = SEEK_SET; // start of file if ((m & std::ios_base::out) // eg seekp() && can_seek()) { off_t temp = lseek(fd, off_t(off), seek_type); if (temp != -1) { ret = pos_type(off_type(temp/sizeof(char_type))); } } return ret; } template typename basic_fdoutbuf::pos_type basic_fdoutbuf::seekpos(pos_type p, std::ios_base::openmode m) { if (p == pos_type(off_type(-1))) return p; return seekoff(off_type(p), std::ios_base::beg, m); } template typename basic_fdinbuf::pos_type basic_fdinbuf::seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode m) { pos_type ret = pos_type(off_type(-1)); off *= sizeof(char_type); // number of bytes if (fd == -1) return ret; // recipient of any overfetch offset on read for use if way == std::ios_base::cur off_t overfetch_adj = 0; int seek_type; if (way == std::ios_base::cur) { seek_type = SEEK_CUR; overfetch_adj = this->egptr() - this->gptr(); } else if (way == std::ios_base::end) seek_type = SEEK_END; else seek_type = SEEK_SET; // start of file if ((m & std::ios_base::in) // eg seekg() && can_seek()) { // specialisation for tellg() if (seek_type == SEEK_CUR && !off) { off_t temp = lseek(fd, 0, SEEK_CUR)/sizeof(char_type) - overfetch_adj; if (temp >= 0) ret = pos_type(off_type(temp)); } else { off_t temp = lseek(fd, off_t(off) - overfetch_adj * sizeof(char_type), seek_type); if (temp != -1) { ret = pos_type(off_type(temp/sizeof(char_type))); reset(); } } } return ret; } template typename basic_fdinbuf::pos_type basic_fdinbuf::seekpos(pos_type p, std::ios_base::openmode m) { if (p == pos_type(off_type(-1))) return p; return seekoff(off_type(p), std::ios_base::beg, m); } } // namespace Cgu #endif /*CGU_FDSTREAM_TPP*/ efax-gtk-3.2.8/src/internal/c++-gtk-utils/widget.h0000644000175000001440000000754411524110041016476 00000000000000/* Copyright (C) 2005 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_WIDGET_H #define CGU_WIDGET_H #include #include namespace Cgu { /** * @class MainWidgetBase widget.h c++-gtk-utils/widget.h * @brief This is a class to manage the lifetime of widgets which are * not top-level widgets (ie which are not derived from GtkWindow). * @sa WinBase GobjHandle * * Normally you will not need this class, because the GObject * reference counting system coupled with the WinBase class will * provide for lifetime management and exception safety, provided that * widgets are placed in their containers on a "top-down" basis and * the top-level window is managed by a WinBase object. * However, sometimes it is convenient for a class to encapsulate only * part of the implementation of a top level widget, and for there to * be automatic lifetime management of a widget before it is placed in * a GTK+ container. * The MainWidgetBase class is intended to achieve this, by managing * references with g_object_ref_sink() such that the widget managed by * the class and its children are correctly destroyed when the * MainWidgetBase class goes out of scope or is deleted even if they * are not subsequently placed in another GTK+ container object which * calls g_object_ref_sink() on the widget. * This class therefore represents a safety feature which can be used * simply by inheriting from it. It also enables a widget to be * placed in and removed from a GTK+ container without it being * destroyed by the removal, since it is owned by the MainWidgetBase * class object. * * A similar effect could be achieved by managing a widget with * GobjHandle, but MainWidgetBase enables, by inheritance, * encapsulation of supplementary operations on the contained widget. * * See @ref Threading for particulars about GTK+ thread safety (and so * MainWidgetBase thread safety). */ class MainWidgetBase { // main widget object GtkWidget* g_widget_p; // MainWidgetBase cannot be copied MainWidgetBase(const MainWidgetBase&); MainWidgetBase& operator=(const MainWidgetBase&); public: /** * Returns the GtkWidget object managed by this class. This method * will not throw. * @return The managed GtkWidget object. */ GtkWidget* get_main_widget() const {return g_widget_p;} /** * The constructor will not throw. It calls g_object_ref_sink() to * take ownership of the object to be managed. * @param widget The GtkWidget object to be managed by this class. */ MainWidgetBase(GtkWidget* widget); /** * The destructor will not throw. It calls g_object_unref() to * relinquish ownership of the managed object. */ virtual ~MainWidgetBase(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/text_print_manager.cpp0000644000175000001440000005475311544200716021457 00000000000000/* Copyright (C) 2007 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include #include #include #include #include // for ENABLE_NLS #include #include #ifdef ENABLE_NLS #include #endif // define this if asynchronous printing is permitted - this only works // with GTK+2.10.13 or greater (printing to file doesn't work before // GTK+2.10.14, whether synchronously or asynchronously) #define TEXT_PRINT_MANAGER_ALLOW_ASYNC 1 #if !(GTK_CHECK_VERSION(2,10,13)) #undef TEXT_PRINT_MANAGER_ALLOW_ASYNC #endif namespace Cgu { const gdouble STANDARD_MARGINS = 15.0; const double PANGO_SCALE_DBL = PANGO_SCALE; } Cgu::GobjHandle Cgu::TextPrintManager::print_settings_h; Cgu::GobjHandle Cgu::TextPrintManager::page_setup_h; std::string Cgu::TextPrintManager::default_font_family("Mono"); int Cgu::TextPrintManager::default_font_size = 10; #ifndef DOXYGEN_PARSING namespace Cgu { class TextPrintManager::CB { public: static void begin_print(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, void* data) { static_cast(data)->begin_print_impl(print_operation_p, context_p); } static void draw_page(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, gint page_nr, void* data) { static_cast(data)->draw_page_impl(print_operation_p, context_p, page_nr); } static void done(GtkPrintOperation* print_operation_p, GtkPrintOperationResult result, void* data) { Cgu::TextPrintManager* instance_p = static_cast(data); if (result == GTK_PRINT_OPERATION_RESULT_ERROR) { GError* error_p = 0; gtk_print_operation_get_error(print_operation_p, &error_p); if (error_p) { Cgu::GerrorScopedHandle handle_h(error_p); g_warning("CguTextPrintManagerCB::text_print_done(): %s\n", error_p->message); } } else if (result == GTK_PRINT_OPERATION_RESULT_APPLY) { // save the print settings Cgu::TextPrintManager::print_settings_h = Cgu::GobjHandle(gtk_print_operation_get_print_settings(print_operation_p)); // and take ownership of the GtkPrintSettings object g_object_ref(G_OBJECT(Cgu::TextPrintManager::print_settings_h.get())); } else if (result == GTK_PRINT_OPERATION_RESULT_CANCEL && instance_p->parent_p && !instance_p->cancelled_when_drawing) { // the parent will not be set sensitive if TextPrintManager::begin_print_impl() // has not been entered because the print job was cancelled from the print dialog gtk_widget_set_sensitive(GTK_WIDGET(instance_p->parent_p), true); } { // scope block for mutex lock Cgu::Thread::Mutex::Lock lock(instance_p->mutex); instance_p->ready = true; } instance_p->unref(); } static void page_setup_done(GtkPageSetup* page_setup_p, void* data) { // set some sane margins if we are not using a custom paper/margin size if (page_setup_p) { if (!gtk_paper_size_is_custom (gtk_page_setup_get_paper_size (page_setup_p))) { gtk_page_setup_set_top_margin(page_setup_p, Cgu::STANDARD_MARGINS, GTK_UNIT_MM); gtk_page_setup_set_bottom_margin(page_setup_p, Cgu::STANDARD_MARGINS, GTK_UNIT_MM); gtk_page_setup_set_left_margin(page_setup_p, Cgu::STANDARD_MARGINS, GTK_UNIT_MM); gtk_page_setup_set_right_margin(page_setup_p, Cgu::STANDARD_MARGINS, GTK_UNIT_MM); } // The documentation is unclear whether we get a new GtkPageSetup // object back if an existing GtkPageSetup object was passed to // gtk_print_run_page_setup_dialog_async(). However this is safe // even if we get the same object back again - see GobjHandle // implementation Cgu::TextPrintManager::page_setup_h = Cgu::GobjHandle(page_setup_p); } if (data) gtk_widget_set_sensitive(GTK_WIDGET(data), true); } static GObject* create_custom_widget(GtkPrintOperation* print_operation_p, void* data) { return static_cast(data)->create_custom_widget_impl(print_operation_p); } static void custom_widget_apply(void* data) { Cgu::TextPrintManager* instance_p = static_cast(data); instance_p->font_size = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(instance_p->font_size_spin_button_h.get())); instance_p->font_family = gtk_entry_get_text(GTK_ENTRY(instance_p->font_entry_h.get())); Cgu::TextPrintManager::strip(instance_p->font_family); Cgu::TextPrintManager::default_font_size = instance_p->font_size; Cgu::TextPrintManager::default_font_family = instance_p->font_family; } }; } // namespace Cgu // the GObject callback functions with both C linkage // specification and internal linkage extern "C" { static void cgu_tpm_begin_print(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, void* data) { Cgu::TextPrintManager::CB::begin_print(print_operation_p, context_p, data); } static void cgu_tpm_draw_page(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, gint page_nr, void* data) { Cgu::TextPrintManager::CB::draw_page(print_operation_p, context_p, page_nr, data); } static void cgu_tpm_done(GtkPrintOperation* print_operation_p, GtkPrintOperationResult result, void* data) { Cgu::TextPrintManager::CB::done(print_operation_p, result, data); } static void cgu_tpm_page_setup_done(GtkPageSetup* page_setup_p, void* data) { Cgu::TextPrintManager::CB::page_setup_done(page_setup_p, data); } static GObject* cgu_tpm_create_custom_widget(GtkPrintOperation* print_operation_p, void* data) { return Cgu::TextPrintManager::CB::create_custom_widget(print_operation_p, data); } static void cgu_tpm_custom_widget_apply(GtkPrintOperation*, GtkWidget*, void* data) { Cgu::TextPrintManager::CB::custom_widget_apply(data); } } // extern "C" #endif // DOXYGEN_PARSING namespace Cgu { TextPrintManager::~TextPrintManager() { // destroy the text string through a mutex to synchronise memory Thread::Mutex::Lock lock(mutex); text_a.reset(); // and empty the filename string file_name = ""; } IntrusivePtr TextPrintManager::create_manager(GtkWindow* parent, const std::string& font_family_, int font_size_) { IntrusivePtr instance_i(new TextPrintManager); instance_i->print_notifier.connect(Callback::make(*instance_i, &TextPrintManager::print_text)); Thread::Mutex::Lock lock(instance_i->mutex); instance_i->parent_p = parent; instance_i->font_family = font_family_; instance_i->font_size = font_size_; instance_i->cancelled_when_drawing = false; instance_i->ready = true; return instance_i; } void TextPrintManager::page_setup(GtkWindow* parent) { if (!print_settings_h.get()) { print_settings_h.reset(gtk_print_settings_new()); } if (parent) gtk_widget_set_sensitive(GTK_WIDGET(parent), false); gtk_print_run_page_setup_dialog_async(parent, page_setup_h, print_settings_h, cgu_tpm_page_setup_done, parent); } bool TextPrintManager::set_text(std::auto_ptr& text_) { Thread::Mutex::Lock lock(mutex); if (!ready) return false; text_a = text_; return true; } bool TextPrintManager::print() { { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); if (!ready) return false; mode = print_mode; // protect our innards ready = false; } // take ownership of ourselves ref(); print_notifier(); return true; } bool TextPrintManager::view() { { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); if (!ready) return false; mode = view_mode; // protect our innards ready = false; } // take ownership of ourselves ref(); print_notifier(); return true; } bool TextPrintManager::print_to_file(const char* filename) { { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); if (!ready) return false; file_name = filename; if (file_name.empty()) { g_warning("TextPrintManager::print_to_file(): %s\n", gettext("No file to print specified")); return false; } mode = file_mode; // protect our innards ready = false; } // take ownership of ourselves ref(); print_notifier(); return true; } void TextPrintManager::print_text() { // hand back ownership to local scope so that if there is a problem // this method cleans itself up, and it also automatically cleans up // if we do not do an asynchronous print (we will ref() again later // in this method if we are going to do an asynchronous print and // everything is set up) IntrusivePtr temp(this); unref(); GobjHandle print_operation_h(gtk_print_operation_new()); if (print_settings_h.get()) { gtk_print_operation_set_print_settings(print_operation_h, print_settings_h); } // set some sane margins the first time we print in this program if (!page_setup_h.get()) { // a call to gtk_page_setup_new() will create a GtkPageSetup object // with the default page setup including default margins page_setup_h.reset(gtk_page_setup_new()); gtk_page_setup_set_top_margin(page_setup_h, STANDARD_MARGINS, GTK_UNIT_MM); gtk_page_setup_set_bottom_margin(page_setup_h, STANDARD_MARGINS, GTK_UNIT_MM); gtk_page_setup_set_left_margin(page_setup_h, STANDARD_MARGINS, GTK_UNIT_MM); gtk_page_setup_set_right_margin(page_setup_h, STANDARD_MARGINS, GTK_UNIT_MM); } gtk_print_operation_set_default_page_setup(print_operation_h, page_setup_h); g_signal_connect(G_OBJECT(print_operation_h.get()), "begin_print", G_CALLBACK(cgu_tpm_begin_print), this); g_signal_connect(G_OBJECT(print_operation_h.get()), "draw_page", G_CALLBACK(cgu_tpm_draw_page), this); #ifdef TEXT_PRINT_MANAGER_ALLOW_ASYNC g_signal_connect(G_OBJECT(print_operation_h.get()), "done", G_CALLBACK(cgu_tpm_done), this); gtk_print_operation_set_allow_async(print_operation_h, true); // regain ownership of ourselves (the print system will do the final // unreference in the TextPrintManagerCB::done() callback) ref(); #endif GError* error_p = 0; GtkPrintOperationResult result; Mode mode_chosen; { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); mode_chosen = mode; } if (parent_p) gtk_widget_set_sensitive(GTK_WIDGET(parent_p), false); if (mode_chosen == file_mode) { { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); gtk_print_operation_set_export_filename(print_operation_h, file_name.c_str()); } result = gtk_print_operation_run(print_operation_h, GTK_PRINT_OPERATION_ACTION_EXPORT, parent_p, &error_p); } else if (mode_chosen == view_mode) { result = gtk_print_operation_run(print_operation_h, GTK_PRINT_OPERATION_ACTION_PREVIEW, parent_p, &error_p); } else { g_signal_connect(G_OBJECT(print_operation_h.get()), "create_custom_widget", G_CALLBACK(cgu_tpm_create_custom_widget), this); g_signal_connect(G_OBJECT(print_operation_h.get()), "custom_widget_apply", G_CALLBACK(cgu_tpm_custom_widget_apply), this); result = gtk_print_operation_run(print_operation_h, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent_p, &error_p); } if (result == GTK_PRINT_OPERATION_RESULT_ERROR) { if (error_p) { GerrorScopedHandle handle_h(error_p); g_warning("TextPrintManager::print_text(): %s\n", error_p->message); } } #ifndef TEXT_PRINT_MANAGER_ALLOW_ASYNC else if (result == GTK_PRINT_OPERATION_RESULT_APPLY) { print_settings_h = GobjHandle(gtk_print_operation_get_print_settings(print_operation_h.get())); // take ownership of the GtkPrintSettings object g_object_ref(G_OBJECT(print_settings_h.get())); } else if (result == GTK_PRINT_OPERATION_RESULT_CANCEL && parent_p && !cancelled_when_drawing) { // the parent will not be set sensitive if TextPrintManager::begin_print_impl() // has not been entered because the print job was cancelled from the print dialog gtk_widget_set_sensitive(GTK_WIDGET(parent_p), true); } { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); ready = true; } #endif } void TextPrintManager::begin_print_impl(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p) { // create a PangoLayout object to write text on text_layout_h.reset(gtk_print_context_create_pango_layout(context_p)); // apply a font to the pango layout PangoFontDescription* font_description_p = pango_font_description_new(); // we need to test for an absence of font_family and font_size settings // because if we printed to file we will never have set them from the dialog if (!font_family.empty()) pango_font_description_set_family(font_description_p, font_family.c_str()); else pango_font_description_set_family(font_description_p, default_font_family.c_str()); if (font_size >= 8 && font_size <= 24) pango_font_description_set_size(font_description_p, font_size * PANGO_SCALE); else pango_font_description_set_size(font_description_p, default_font_size * PANGO_SCALE); pango_font_description_set_style(font_description_p, PANGO_STYLE_NORMAL); pango_layout_set_font_description(text_layout_h, font_description_p); pango_font_description_free(font_description_p); // set the text width for the layout from the print context (ie the page setup settings) pango_layout_set_width(text_layout_h, static_cast(gtk_print_context_get_width(context_p) * PANGO_SCALE_DBL)); // insert the text { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); pango_layout_set_text(text_layout_h, text_a->data(), text_a->size()); } // now paginate the inserted text - the paginate() function puts // the first line of each new page in the pages object. try { paginate(context_p); } catch (...) { // paginate() must have thrown a std::bad_alloc exception when calling // push_back() on the pages object - we have to catch here as we have // a C linkage specification and cannot propagate exceptions. // We can safely do a catch-all/no-rethrow here without a cancel // block to cater for NPTL because we are in the main program loop // thread and that will not be cancelled. g_critical("Exception thrown in TextPrintManager::paginate()\n"); } gtk_print_operation_set_n_pages(print_operation_p, pages.size()); current_line_iter_h.reset(pango_layout_get_iter(text_layout_h)); current_line = 0; if (parent_p) gtk_widget_set_sensitive(GTK_WIDGET(parent_p), true); } void TextPrintManager::draw_page_impl(GtkPrintOperation* print_operation_p, GtkPrintContext* context_p, int page_nr) { // check initial conditions if (page_nr >= static_cast(pages.size()) || page_nr < 0) { g_warning("Yikes, invalid page number passed to TextPrintManager::draw_page_impl()\n"); cancelled_when_drawing = true; gtk_print_operation_cancel(print_operation_p); return; } int start_line = pages[page_nr]; int end_line; if (page_nr == static_cast(pages.size() - 1)) { // last page end_line = pango_layout_get_line_count(text_layout_h); // one past the last line } else end_line = pages[page_nr + 1]; // at this point, current_line and current_line_iter_h will be // referencing the same line if (start_line < current_line) { // we should never be in this block unless for some reason the pages are // being printed out of order (can that happen?) // reset current_line_iter_h with a fresh iterator pointing // to beginning of text layout, and reset current_line current_line_iter_h.reset(pango_layout_get_iter(text_layout_h)); current_line = 0; } // set the cairo surface of the print context to black and white // print. Is the cairo surface the same for all pages? If so we // could do this in TextPrintManager::begin_print_impl() cairo_t* cairo_p = gtk_print_context_get_cairo_context(context_p); cairo_set_source_rgb(cairo_p, 0.0, 0.0, 0.0); double top_of_page = 0; // now write out the page, line by line for (; current_line < end_line; ++current_line, pango_layout_iter_next_line(current_line_iter_h)) { // if we are printing the whole document then this 'if' test should always // succeed, but it will not do so if we are printing selected pages with // gaps in the page sequence - in that case we may need to iterate from a // previous page to a later one until we are at the start of the page to // be printed if (current_line >= start_line) { // get the current line in layout co-ordinates PangoRectangle logical_rect; pango_layout_iter_get_line_extents(current_line_iter_h, 0, &logical_rect); // save the start line of this page in layout co-ordinates (y co-ordinate as pixels) if (current_line == start_line) top_of_page = logical_rect.y/PANGO_SCALE_DBL; // get the baseline of current line of this page in layout co-ordinates // (y co-ordinate as pixels) double baseline = pango_layout_iter_get_baseline(current_line_iter_h)/PANGO_SCALE_DBL; // get x co-ordinate of the current line (as pixels) double x_pos = logical_rect.x/PANGO_SCALE_DBL; // get the layout line PangoLayoutLine* line_p = pango_layout_iter_get_line(current_line_iter_h); // got to the same line on the cairo surface for this page by // beginning a cairo sub-path cairo_move_to(cairo_p, x_pos, baseline - top_of_page); // print to the cairo surface pango_cairo_show_layout_line(cairo_p, line_p); } } } void TextPrintManager::paginate(GtkPrintContext* context_p) { const int total_lines = pango_layout_get_line_count(text_layout_h); int line; // line_height_sum is the accumulated height of lines on any page, // as we have iterated through it double line_height_sum; // page_height is the (fixed) page height for the current // print context (derived from the page setup) const double page_height = gtk_print_context_get_height(context_p); // the beginning of the first page is always at line 0 pages.push_back(0); // now put the first line of all the remaining pages in the pages object // we do this by adding up the line heights in the pango layout object until // they reach consecutive new pages for (line = 0, line_height_sum = 0; line < total_lines; ++line) { PangoRectangle logical_rect; pango_layout_line_get_extents(pango_layout_get_line(text_layout_h, line), 0, &logical_rect); // convert to pixels double line_height = logical_rect.height/PANGO_SCALE_DBL; // let's add 'em up, an' ride 'em out - Rolling, rolling, rolling, Rawhide! if (line_height_sum + line_height > page_height) { pages.push_back(line); line_height_sum = 0; } line_height_sum += line_height; } } GObject* TextPrintManager::create_custom_widget_impl(GtkPrintOperation* print_operation_p) { GtkWidget* alignment_p = gtk_alignment_new(0.5, 0.5, 1, 0); GtkTable* table_p = GTK_TABLE(gtk_table_new(2, 2, false)); gtk_container_add(GTK_CONTAINER(alignment_p), GTK_WIDGET(table_p)); gtk_container_set_border_width(GTK_CONTAINER(alignment_p), 12); GtkWidget* font_label_p = gtk_label_new(gettext("Font: ")); GtkWidget* font_size_label_p = gtk_label_new(gettext("Font size: ")); gtk_label_set_justify(GTK_LABEL(font_label_p), GTK_JUSTIFY_LEFT); gtk_label_set_justify(GTK_LABEL(font_size_label_p), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment(GTK_MISC(font_label_p), 0, 0.5); gtk_misc_set_alignment(GTK_MISC(font_size_label_p), 0, 0.5); font_entry_h = GobjHandle(gtk_entry_new()); if (!font_family.empty()) gtk_entry_set_text(GTK_ENTRY(font_entry_h.get()), font_family.c_str()); else gtk_entry_set_text(GTK_ENTRY(font_entry_h.get()), default_font_family.c_str()); font_size_spin_button_h = GobjHandle(gtk_spin_button_new_with_range(8, 24, 1)); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(font_size_spin_button_h.get()), true); if (font_size) gtk_spin_button_set_value(GTK_SPIN_BUTTON(font_size_spin_button_h.get()), font_size); else gtk_spin_button_set_value(GTK_SPIN_BUTTON(font_size_spin_button_h.get()), default_font_size); GtkWidget* font_size_spin_button_alignment_p = gtk_alignment_new(0, 0.5, 0, 1); gtk_container_add(GTK_CONTAINER(font_size_spin_button_alignment_p), font_size_spin_button_h); gtk_table_attach(table_p, font_label_p, 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, 3, 12); gtk_table_attach(table_p, font_entry_h, 1, 2, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, 3, 12); gtk_table_attach(table_p, font_size_label_p, 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, 3, 12); gtk_table_attach(table_p, font_size_spin_button_alignment_p, 1, 2, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, 3, 12); gtk_print_operation_set_custom_tab_label(print_operation_p, gettext("Print font")); gtk_widget_show_all(alignment_p); return G_OBJECT(alignment_p); } void TextPrintManager::strip(std::string& text) { // erase any trailing space or tab while (!text.empty() && text.find_last_of(" \t") == text.size() - 1) { text.resize(text.size() - 1); } // erase any leading space or tab while (!text.empty() && (text[0] == ' ' || text[0] == '\t')) { text.erase(0, 1); } } } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/fdstream.h0000644000175000001440000015602111524110041017013 00000000000000/* Copyright (C) 2001, 2004, 2009 and 2010 Chris Vine The following code declares classes to read from and write to Unix file descriptors. The whole work comprised in files fdstream.h and fdstream.tpp is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). The attach(), close() and xsputn() methods added by Chris Vine, 2001. All the classes were rewritten, and also provided in template form for wide characters, by Chris Vine 2004. */ /** * @defgroup fdstreams fdstreams * * \#include * * The c++-gtk-utils library contains classes providing streambuffers * and stream objects for unix file descriptors. * * By default, like the fstream::fstream(int fd) and * fstream::attach(int fd) extensions in libstdc++-v2, the destructors * of these classes close the file descriptors concerned, which helps * exception safety (the attach() method will also close any previous * file descriptor). If this behaviour is not wanted, pass 'false' as * the second argument of fdostream/fdistream constructor or of the * attach() method. This will enable the same file descriptor to be * used successively for, say, reading and writing, or to be shared * between fdistream and fdostream objects (but if the file descriptor * represents a device providing random access, such as a local file * on the filesystem, which has been opened for both reading and * writing, the special precautions described under @ref * FdRandomAccessAnchor "fdstreams and random access" are required). * * Here are some examples of use: * * @code * // the safe creation of a temporary file with standard iostreams * char filename[] = "/tmp/myprog-XXXXXX"; * Cgu::fdostream ostrm; * int fd = mkstemp(filename); * if (fd != -1) { * ostrm.attach(fd); // take ownership of the file descriptor * ostrm << "Temporary file text" << std::endl; * } * else { * std::cerr << "Can't open temporary file " << filename * << ", please check permissions" << std::endl; * } * * -------------------------------------------------------------------- * * // mimic std::cout but explicitly use UNIX stdout * Cgu::fdostream out(1, false); // don't take ownership of the file descriptor * out << "Hello" << std::endl; * * -------------------------------------------------------------------- * * // read line delimited text from a pipe until it is closed by the * // writer: assume 'fd' is the read file descriptor of the pipe * Cgu::fdistream istrm(fd); // take ownership of the read file descriptor * std::string line; * while (std::getline(istrm, line)) { * [ ... do something with the read text ... ] * } * @endcode * * * @note 1. Users cannot (except by derivation) use the virtual * protected methods of the streambuffer classes, including xsgetn() * and xsputn(). Instead, if they want direct access to the * streambuffer other than through the * fdostream/wfdostream/fdistream/wfdistream methods, they should use * the public forwarding functions provided by std::streambuf base * class. * @note 2. These streambuffers and stream objects are not copiable. * * @b Buffering * * The streambuffer classes provide buffering for both input and * output, although from version 1.2.6 output buffering can be * switched off using the set_buffered() method. * * The streambuf classes provide a block read and write in xsgetn() * and xsputn(), which will be called by the read() and write() * methods (and some other output operators) inherited by (w)fdistream * and (w)fdostream from std::basic_istream and std::basic_ostream. * They operate (after appropriately vacating and resetting the * buffers) by doing a block read and write by calling Unix read() and * write() and are very efficient for large block reads (those * significantly exceeding the buffer size). If users want all reads * and writes to go through the buffers, by using * std::basic_streambuf<>::xsputn() and * std::basic_streambuf<>::xsgetn() then the symbol * FDSTREAM_USE_STD_N_READ_WRITE can be defined for the purpose before * fdstream.h is \#include'd. (libstdc++-3 provides efficient inbuilt * versions of these std::basic_streambuf functions for block reads * not significantly larger than the buffer size, provided output * buffering has not been turned off by the set_buffered() method of * the output streambuffer or stream object.) * * One possible case for defining that symbol is where the user wants * to use the tie() method of (w)fdistream (inherited from * std::basic_ios) to procure flushing of an output stream before * extraction from an input stream is made by (w)fdistream::read(). * Such flushing might not occur where a call to (w)fdistream::read() * is made unless FDSTREAM_USE_STD_N_READ_WRITE is defined, because an * implementation is permitted to defer such flushing until * underflow() occurs, and the block read by (w)fdistream::read(), as * forwarded to xsgetn(), will never invoke underflow() if that symbol * is not defined. (Having said that, any basic_istream * implementation which does defer output flushing until underflow() * is called makes tie() unusable anyway for a number of purposes, * because the time of flushing would become dependent on whether a * read request can be satisfied by what is already in the buffers.) * * 4 characters are stored and available for putback. However, if the * symbol FDSTREAM_USE_STD_N_READ_WRITE is not defined, then a call to * fdinbuf::xsgetn() via (w)fdistream::read() with a request for less * than 4 characters will result in less than 4 characters available * for putback (if these block read methods obtain some characters but * less than 4, only the number of characters obtained by them is * guaranteed to be available for putback). * * @anchor FdRandomAccessAnchor * @b fdstreams @b and @b random @b access * * For file descriptors representing files which offer random access, * from version 1.2.6 the classes in this c++-gtk-utils library * implement the tellg(), tellp(), seekg() and seekp() random access * methods. * * This presents complications if a fdistream/wfdistream object and a * fdostream/wfdostream object reference the same file descriptor on a * file which offers random access and which is opened for both * reading and writing. To prevent the file pointer getting out of * sync with the buffers maintained by the (w)fdistream and * (w)fdostream objects, if the last operation carried out on the * (w)fdostream/(w)fdistream pair was a write then, if the output * stream is set as buffered (the default), before the first read * operation thereafter is made on the pair or a call to seekg() is * made, the (w)fdostream object must be flushed by calling * std::(w)ostream::flush() or by using the std::flush manipulator (or * setting the std::ios_base::unitbuf flag). If the last operation on * the pair (having, say, the names 'ostr' and 'istr') was a read, * then before the first write operation thereafter is made on the * pair, or a call to seekp() is made, the user must call * istr.seekg(istr.tellg()) in order to synchronise the logical and * actual file positions, or if the user does not want to maintain the * current logical file position, make some other call to seekg() on * 'istr' which does not comprise only seekg(0, std::ios_base::cur). * This requirement to call seekg() when moving from reading to * writing applies whether or not the output stream is buffered. * * Note that the tie() method of (w)fdistream (inherited from * std::basic_ios) cannot reliably to used to procure output flushing * of a (w)fdostream object before a read is made, unless * FDSTREAM_USE_STD_N_READ_WRITE is defined before fdstream.h is * \#include'd, for the reason mentioned under "Buffering" above. * * Where a file is to be opened for both reading and writing and more * automatic tying of input and output is wanted, the Cgu::giostream * and Cgu::wgiostream classes can be used in conjunction with GIO * streams. * * None of these restrictions applies to file descriptors opened for * reading and writing which represent devices for which the operating * system does not maintain file pointers, such as sockets. They can * be attached to a fdostream and fdistream object without any special * precautions being taken, other than the normal step of calling * fdostream::flush() (or using the std::flush manipulator) to flush * the output buffer to the socket if the user needs to know that that * has happened (or setting output buffering off with the * set_buffered() method). In summary, on a socket, a read does not * automatically flush the output buffer: it is for the user to do * that. Note also that only one of the stream objects should manage * the file descriptor, and this should normally be the output stream * as it may have characters to flush when closing. * * A (w)fdostream and (w)fdistream object should not reference the * same file descriptor on any file on a file system which permits * read-write opening of files and reports itself as not supporting * random access, but which in fact maintains a file position pointer * which is shared for reading and writing. This might apply to some * network file systems. The best rule to apply is not to reference * the same file descriptor on a (w)fdostream and (w)fdistream object * if the device is not a socket, unless can_seek() returns true. * * @b Wide @b streams @b and @b endianness * * With the wide character ostream class and wide character output * streambuffer class, wide characters are written out in the native * endian format of the writing machine. Special steps need to be * taken if the text which is sent for output might be read by * machines with a different endianness. * * No such special steps are required where the wfdostream and * wfdistream classes are used with temporary files, pipes, fifos, * unix domain sockets and network sockets on localhost, because in * those cases they will be read by the same machine that writes; but * they are required where sockets communicate with other computers * over a network or when writing to files which may be distributed to * and read by other computers with different endianness. * * Where wide characters are to be exported to other machines, one * useful approach is to convert to and from UTF-8 with * Utf8::uniwide_from_utf8(), Utf8::uniwide_to_utf8(), * Utf8::wide_from_utf8() or Utf8::wide_to_utf8(), and to use * fdostream/fdistream with the converted text. Alternatively, from * version 1.2.6, the wgostream, wgistream and wgiostream classes can * be used for the purposes of attaching a UTF-8 converter directly to * a GIO stream. (Those classes also enable a UTF-32LE to UTF-32BE * converter, and vice versa, to be attached to an output stream for * the purpose of writing out UTF-32 in other than native endianness, * and similarly as regards UTF-16.) * * Instead of converting exported text to UTF-8, another approach is * to use a byte order marker (BOM) as the first character of the wide * stream output. UCS permits a BOM character to be inserted, * comprising static_cast(0xfeff), at the beginning of the * output to the wide character stream. At the receiving end, this * will appear as 0xfffe (UTF-16) or 0xfffe0000 (UTF-32) to a big * endian machine with 8 bit char type if the text is little endian, * or to a little endian machine with big endian text, so signaling a * need to undertake byte swapping of text read from the stream. * Another alternative is to label the physical medium conveying the * file as UTF-16LE, UTF-16BE, UTF-32LE or UTF-32BE, as the case may * be, in which case a BOM character should not be prepended. * * Where it is established by either means that the input stream * requires byte swapping, from version 1.2.5 the wfdistream and * wfdinbuf classes have a set_byteswap() member function which should * be called on opening the input stream as soon as it has been * established that byte swapping is required. Once this function has * been called with an argument of 'true', all further calls to stream * functions which provide characters will provide those characters * with the correct native endianness. Calling set_byteswap() on the * narrow stream fdistream or fdinbuf objects has no effect (byte * order is irrelevant to narrow streams). * * Here is an example of such use in a case where sizeof(wchar_t) is * 4: * * @code * int fd = open("filename", O_RDONLY); * Cgu::wfdistream input; * if (fd != -1) * input.attach(fd); // take ownership of the file descriptor * else { * std::cerr << "Can't open file 'filename', " * << "please check permissions" << std::endl; * return; * } * wchar_t item; * input.get(item); * if (!input) { * std::cerr << "File 'filename' is empty" << std::endl; * return; * } * if (item == static_cast(0xfffe0000)) * input.set_byteswap(true); * else if (item != static_cast(0xfeff)) { * // calling set_byteswap() will manipulate the buffers, so * // either call putback() before we call set_byteswap(), or * // call unget() instead * input.putback(item); * // the first character is not a BOM character so assume big endian * // format, and byte swap if the local machine is little endian * #if G_BYTE_ORDER == G_LITTLE_ENDIAN * input.set_byteswap(true); * #endif * } * [ ... do something with the input file ... ] * @endcode * * @b Other @b wide @b stream @b issues * * basic_fdostream, basic_fdoutbuf, basic_fdistream and basic_fdinbuf * objects can be instantiated for any integer type which has an * appropriate traits class provided for it which has the copy(), * eof(), eq_int_type(), move(), not_eof() and to_int_type() static * member functions. Thus, with compilers supporting the C++-0x * char16_t and char32_t types, streams and streambuffers of type * basic_fdostream, basic_fdoutbuf, * basic_fdistream, basic_fdinbut, * basic_fdostream, basic_fdoutbuf, * basic_fdistream and basic_fdinbut can be * instantiated (typdef'ed to, say, u16fdostream, u16fdoutbuf, * u16fdistream, u16fdinbuf and so forth) to provide UTF-16 support on * platforms where sizeof(wchar_t) is 4, and UTF-32 on platforms where * sizeof(wchar_t) is 2. The integer type could in fact have any * size, but the set_byteswap() methods for basic_fdistream and * basic_fdinbuf will only have an effect if its size is either 2 or * 4. */ #ifndef CGU_FDSTREAM_H #define CGU_FDSTREAM_H // see above for what this does //#define FDSTREAM_USE_STD_N_READ_WRITE 1 #include #include #include #include #include #include #include #include #include #include #include namespace Cgu { /* The following convenience typedefs appear at the end of this file: typedef basic_fdinbuf fdinbuf; typedef basic_fdoutbuf fdoutbuf; typedef basic_fdistream fdistream; typedef basic_fdostream fdostream; typedef basic_fdinbuf wfdinbuf; typedef basic_fdoutbuf wfdoutbuf; typedef basic_fdistream wfdistream; typedef basic_fdostream wfdostream; */ /** * @headerfile fdstream.h c++-gtk-utils/fdstream.h * @brief Output stream buffer for unix file descriptors * @sa fdstreams * @ingroup fdstreams * * This class provides an output stream buffer for unix file * descriptors. It does the buffering for the basic_fdostream stream * class. */ template > class basic_fdoutbuf: public std::basic_streambuf { public: typedef charT char_type; typedef Traits traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; private: int fd; // file descriptor bool manage; static const int buf_size = 1024; // size of the data write buffer #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT) ScopedHandle > buffer; #else ScopedHandle buffer; #endif int flush_buffer(); basic_fdoutbuf(const basic_fdoutbuf&); basic_fdoutbuf& operator=(const basic_fdoutbuf&); protected: /** * This method will not throw. fdstreams do not offer concurrent * access from multiple threads to the same stream object, and if that * is required users should provide their own synchronisation. */ virtual int sync(); /** * This method will not throw unless std::basic_streambuf<>::sputc() * throws, which it would not do on any sane implementation. This * means that the output functions of stream objects which have this * streambuffer as a member will not throw unless the underlying * functions of the std::basic_ostream class throw, which they would * not normally do unless they have been required to do so on failbit, * badbit or eofbit being set by an explicit call to the exceptions() * method of that class. fdstreams do not offer concurrent access * from multiple threads to the same stream object, and if that is * required users should provide their own synchronisation. */ virtual int_type overflow(int_type); #ifndef FDSTREAM_USE_STD_N_READ_WRITE /** * This method will not throw. This means that the output functions * of stream objects which have this streambuffer as a member will not * throw unless the underlying functions of the std::basic_ostream * class throw, which they would not normally do unless they have been * required to do so on failbit, badbit or eofbit being set by an * explicit call to the exceptions() method of that class. fdstreams * do not offer concurrent access from multiple threads to the same * stream object, and if that is required users should provide their * own synchronisation. */ virtual std::streamsize xsputn(const char_type*, std::streamsize); #endif /** * This method provides random access on output devices that support * it, so supporting the tellp() and seekp() methods of the * basic_fdostream class. Any output buffer will be flushed. This * method does not throw, but if it returns pos_type(off_type(-1)) to * indicate failure, it will cause the seekp() or tellp() methods of * the relevant stream class to throw std::ios_base::failure if such * an exception has been required by an explicit call to the * exceptions() method of that class (but not otherwise). fdstreams * do not offer concurrent access from multiple threads to the same * stream object, and if that is required users should provide their * own synchronisation. * * @param off The offset to be applied to the 'way' argument when * seeking. It is a signed integer type, and on wide character * streams is dimensioned as the number of wchar_t units not the * number of bytes (that is, it is bytes/sizeof(char_type)). * * @param way The file position to which the 'off' argument is to be * applied (either std::ios_base::beg, std::ios_base::cur or * std::ios_base::end). * * @param m The required read/write status of the file descriptor * attached to this streambuffer for this method to attempt a seek. * As this is an output streambuffer, the argument should have the * std::ios_base::out bit set. Provided that bit is set, it doesn't * matter if others are also set. * * @return If the seek succeeds, a std::char_traits::pos_type * object representing the new stream position of the streambuffer * after the seek. (This type is std::streampos for narrow character * (char) streams, std::wstreampos for wide character (wchar_t) * streams, std::u16streampos for the C++0x char16_t type and * std::u32streampos for the C++0x char32_t type.) If the seek * failed, pos_type(off_type(-1)) is returned. * * Since 1.2.6 */ virtual pos_type seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode m = std::ios_base::in | std::ios_base::out); /** * This method provides random access on output devices that support * it, so supporting the seekp() method of the basic_fdostream class. * It is equivalent to seekoff(off_type(p), std::ios_base::beg, m). * Any output buffer will be flushed. This method does not throw, but * if it returns pos_type(off_type(-1)) to indicate failure, it will * cause the seekp() method of the relevant stream class to throw * std::ios_base::failure if such an exception has been required by an * explicit call to the exceptions() method of that class (but not * otherwise). fdstreams do not offer concurrent access from multiple * threads to the same stream object, and if that is required users * should provide their own synchronisation. * * @param p The absolute position to which the seek is to be made, * obtained by a previous call to seekoff() or to this method. * * @param m The required read/write status of the file descriptor * attached to this streambuffer for this method to attempt a seek. * As this is an output stream buffer, the argument should have the * std::ios_base::out bit set. Provided that bit is set, it doesn't * matter if others are also set. * * @return If the seek succeeds, a std::char_traits::pos_type * object representing the new stream position of the streambuffer * after the seek. (This type is std::streampos for narrow character * (char) streams, std::wstreampos for wide character (wchar_t) * streams, std::u16streampos for the C++0x char16_t type and * std::u32streampos for the C++0x char32_t type.) If the seek * failed, pos_type(off_type(-1)) is returned. * * Since 1.2.6 */ virtual pos_type seekpos(pos_type p, std::ios_base::openmode m = std::ios_base::in | std::ios_base::out); public: /** * As this constructor has default argument values, it is also a * default constructor. fdstreams do not offer concurrent access * from multiple threads to the same stream object, and if that is * required users should provide their own synchronisation. * * @param fd_ The file descriptor to be attached to the streambuffer, * or -1 to attach it latter with the attach_fd() method. * * @param manage_ Whether the streambuffer should manage the file * descriptor (that is, close it in its destructor or when a new file * descriptor is attached). * * @exception std::bad_alloc This constructor will throw * std::bad_alloc if fd_ >= 0, memory is exhausted and the system * throws on such exhaustion (unless the library has been installed * using the --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option, in which * case glib will terminate the program if it is unable to obtain * memory from the operating system). No other exception will be * thrown unless the constructor of std::basic_streambuf throws. */ basic_fdoutbuf(int fd_ = -1, bool manage_ = true); /** * The destructor does not throw. */ virtual ~basic_fdoutbuf(); /** * Attach a new file descriptor to the streambuffer (and close any * file descriptor at present managed by it). If output buffering * was previously switched off, it is switched back on again. * fdstreams do not offer concurrent access from multiple threads to * the same stream object, and if that is required users should * provide their own synchronisation. * * @param fd_ The new file descriptor to be attached to the * streambuffer. * * @param manage_ Whether the streambuffer should manage the new file * descriptor (that is, close it in its destructor or when a further * file descriptor is attached). * * @exception std::bad_alloc This method will throw std::bad_alloc if * fd_ >= 0, output buffering had previously been switched off, * memory is exhausted and the system throws on such exhaustion * (unless the library has been installed using the * --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option, in which * case glib will terminate the program if it is unable to obtain * memory from the operating system). */ void attach_fd(int fd_, bool manage_ = true); /** * Close the file descriptor at present attached to the streambuffer * (if any). This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @return From version 1.2.6, 'true' if the close succeeded, 'false' * if an error arose (including in a case where no descriptor has * been attached or it has already been closed). Prior to version * 1.2.6, this method had void return type. */ bool close_fd(); /** * Get the file descriptor at present attached to the streambuffer * (if any). This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @return The file descriptor at present attached to the * streambuffer, or -1 if none has been attached */ int get_fd() const {return fd;} /** * Stops output buffering if 'buffered' is false, or reverts to * buffering if buffering has previously been switched off and * 'buffered' is true. Buffering is on by default for any newly * created fdoutbuf object and any newly attached file descriptor. If * buffering is turned off, all characters at present in the buffers * which are stored for output are flushed. This method has no effect * if no file descriptor has yet been attached to this streambuffer. * Switching output buffering off is similar in effect to setting the * std::ios_base::unitbuf flag in the relevant fdostream object, but * is slightly more efficient. fdstreams do not offer concurrent * access from multiple threads to the same stream object, and if that * is required users should provide their own synchronisation. * * @param buffered 'false' if buffering is to be turned off, 'true' if * it is to be turned back on. * * @exception std::bad_alloc This method will throw std::bad_alloc if * 'buffered' is true, output buffering had previously been switched * off, memory is exhausted and the system throws on such exhaustion * (unless the library has been installed using the * --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option, in which * case glib will terminate the program if it is unable to obtain * memory from the operating system). * * Since 1.2.6 */ void set_buffered(bool buffered); /** * This method indicates whether the output device concerned supports * random access, so that a call to seekoff() or seekpos() can * succeed. This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @return true if random access is supported, otherwise false. The * result is only meaningful if a file descriptor has been attached to * this streambuffer. * * Since 1.2.6 */ bool can_seek() const; /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @headerfile fdstream.h c++-gtk-utils/fdstream.h * @brief Output stream for unix file descriptors * @sa fdstreams * @ingroup fdstreams * * This class provides standard ostream services for unix file * descriptors. */ template > class basic_fdostream: public std::basic_ostream { basic_fdoutbuf buf; basic_fdostream(const basic_fdostream&); basic_fdostream& operator=(const basic_fdostream&); public: /** * This is the constructor which passes a file descriptor. fdstreams * do not offer concurrent access from multiple threads to the same * stream object, and if that is required users should provide their * own synchronisation. * * @param fd The file descriptor to be attached to the stream object. * * @param manage Whether the stream should manage the file descriptor * (that is, close it in its destructor or when a new file descriptor * is attached). * * @exception std::bad_alloc This constructor will throw * std::bad_alloc if fd >= 0, memory is exhausted and the system * throws on such exhaustion (unless the library has been installed * using the --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option, in which * case glib will terminate the program if it is unable to obtain * memory from the operating system). No other exception will be * thrown unless the constructor of std::basic_streambuf or * std::basic_ostream throws. */ basic_fdostream(int fd, bool manage = true): std::basic_ostream(0), buf(fd, manage) { // pass the descriptor at construction rdbuf(&buf); } /** * With this constructor, the file descriptor must be attached later * with the attach() method. It will not throw unless the * constructor of std::basic_streambuf or std::basic_ostream throws. * fdstreams do not offer concurrent access from multiple threads to * the same stream object, and if that is required users should * provide their own synchronisation. */ basic_fdostream(): std::basic_ostream(0) { // attach the descriptor later rdbuf(&buf); } /** * Attach a new file descriptor to the stream object (and close any * file descriptor at present managed by it). From version 1.2.6, if * output buffering was previously switched off, it is switched back * on again. Also from version 1.2.6, if any stream state flags were * set (eofbit, failbit or badbit), they will be cleared by a call to * clear() (prior to that version, the user had to call clear() * explicitly to do so). If this method closes a file descriptor at * present managed by it and the close fails, failbit is not set and * no exception will be thrown. Accordingly, if the user needs to * know whether there was an error in this method closing any * descriptor, she should call close() explicitly before calling this * method. fdstreams do not offer concurrent access from multiple * threads to the same stream object, and if that is required users * should provide their own synchronisation. * * @param fd The new file descriptor to be attached to the stream * object. * * @param manage Whether the stream object should manage the new file * descriptor (that is, close it in its destructor or when a further * file descriptor is attached). * * @exception std::bad_alloc This method will throw std::bad_alloc if * fd >= 0, output buffering had previously been switched off, memory * is exhausted and the system throws on such exhaustion (unless the * library has been installed using the * --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option, in which * case glib will terminate the program if it is unable to obtain * memory from the operating system). */ void attach(int fd, bool manage = true) {buf.attach_fd(fd, manage); this->clear();} /** * Close the file descriptor at present attached to the stream object * (if any). From version 1.2.6, if the close fails, the failbit * will be set with setstate(std::ios_base::failbit). fdstreams do * not offer concurrent access from multiple threads to the same * stream object, and if that is required users should provide their * own synchronisation. * * @exception std::ios_base::failure From version 1.2.6, this * exception will be thrown if an error arises on closing the * descriptor and such an exception has been required by a call to * the exceptions() method of this class (inherited from * std::basic_ios<>). No exception will be thrown if exceptions() * has not been called. */ void close() {if (!buf.close_fd()) this->setstate(std::ios_base::failbit);} /** * Get the file descriptor at present attached to the stream object * (if any). This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @return The file descriptor at present attached to the * stream object, or -1 if none has been attached */ int filedesc() const {return buf.get_fd();} /** * Stops output buffering if 'buffered' is false, or reverts to * buffering if buffering has previously been switched off and * 'buffered' is true. Buffering is on by default for any newly * created fdostream object and any newly attached file descriptor. * If buffering is turned off, all characters at present in the * buffers which are stored for output are flushed. This method has * no effect if no file descriptor has yet been attached. Switching * output buffering off is similar in effect to setting the * std::ios_base::unitbuf flag, but is slightly more efficient. * fdstreams do not offer concurrent access from multiple threads to * the same stream object, and if that is required users should * provide their own synchronisation. * * @param buffered 'false' if buffering is to be turned off, 'true' if * it is to be turned back on. * * @exception std::bad_alloc This method will throw std::bad_alloc if * 'buffered' is true, output buffering had previously been switched * off, memory is exhausted and the system throws on such exhaustion * (unless the library has been installed using the * --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option, in which * case glib will terminate the program if it is unable to obtain * memory from the operating system). * * Since 1.2.6 */ void set_buffered(bool buffered) {buf.set_buffered(buffered);} /** * This method indicates whether the output device concerned supports * random access, so that a call to tellp() or seekp() can succeed. * Note that in the seekp(off_type off, ios_base::seekdir dir) * variant, on wide character streams the 'off' argument is * dimensioned as the number of wchar_t units not the number of bytes * (that is, it is bytes/sizeof(char_type)). This method does not * throw. fdstreams do not offer concurrent access from multiple * threads to the same stream object, and if that is required users * should provide their own synchronisation. * * @return true if random access is supported, otherwise false. The * result is only meaningful if a file descriptor has been attached to * this stream. * * Since 1.2.6 */ bool can_seek() const {return buf.can_seek();} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @headerfile fdstream.h c++-gtk-utils/fdstream.h * @brief Input stream buffer for unix file descriptors * @sa fdstreams * @ingroup fdstreams * * This class provides an input stream buffer for unix file * descriptors. It does the buffering for the basic_fdistream stream * class. */ template > class basic_fdinbuf : public std::basic_streambuf { public: typedef charT char_type; typedef Traits traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; private: int fd; // file descriptor bool manage; bool byteswap; static const int putback_size = 4; // size of putback area static const int buf_size = 1024; // size of the data buffer char_type buffer[buf_size + putback_size]; // data buffer void reset(); static void swap_element(char_type&); basic_fdinbuf(const basic_fdinbuf&); basic_fdinbuf& operator=(const basic_fdinbuf&); protected: /** * This method will not throw. This means that the input functions of * stream objects which have this streambuffer as a member will not * throw unless the underlying functions of the std::basic_istream * class throw, which they would not normally do unless they have been * required to do so on failbit, badbit or eofbit being set by an * explicit call to the exceptions() method of that class. fdstreams * do not offer concurrent access from multiple threads to the same * stream object, and if that is required users should provide their * own synchronisation. */ virtual int_type underflow(); #ifndef FDSTREAM_USE_STD_N_READ_WRITE /** * This method will not throw. This means that the input functions of * stream objects which have this streambuffer as a member will not * throw unless the underlying functions of the std::basic_istream * class throw, which they would not normally do unless they have been * required to do so on failbit, badbit or eofbit being set by an * explicit call to the exceptions() method of that class. fdstreams * do not offer concurrent access from multiple threads to the same * stream object, and if that is required users should provide their * own synchronisation. */ virtual std::streamsize xsgetn(char_type*, std::streamsize); #endif /** * This method provides random access on input devices that support * it, so supporting the tellg() and seekg() methods of the * basic_fdistream class. This method does not throw, but if it * returns pos_type(off_type(-1)) to indicate failure, it will cause * the seekg() or tellg() methods of the relevant stream class to * throw std::ios_base::failure if such an exception has been required * by an explicit call to the exceptions() method of that class (but * not otherwise). fdstreams do not offer concurrent access from * multiple threads to the same stream object, and if that is required * users should provide their own synchronisation. * * @param off The offset to be applied to the 'way' argument when * seeking. It is a signed integer type, and on wide character * streams is dimensioned as the number of wchar_t units not the * number of bytes (that is, it is bytes/sizeof(char_type)). * * @param way The file position to which the 'off' argument is to be * applied (either std::ios_base::beg, std::ios_base::cur or * std::ios_base::end). * * @param m The required read/write status of the file descriptor * attached to this streambuffer for this method to attempt a seek. * As this is an input streambuffer, the argument should have the * std::ios_base::in bit set. Provided that bit is set, it doesn't * matter if others are also set. * * @return If the seek succeeds, a std::char_traits::pos_type * object representing the new stream position of the streambuffer * after the seek. (This type is std::streampos for narrow character * (char) streams, std::wstreampos for wide character (wchar_t) * streams, std::u16streampos for the C++0x char16_t type and * std::u32streampos for the C++0x char32_t type.) If the seek * failed, pos_type(off_type(-1)) is returned. * * Since 1.2.6 */ virtual pos_type seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode m = std::ios_base::in | std::ios_base::out); /** * This method provides random access on input devices that support * it, so supporting the seekg() method of the basic_fdistream class. * It is equivalent to seekoff(off_type(p), std::ios_base::beg, m). * This method does not throw, but if it returns * pos_type(off_type(-1)) to indicate failure, it will cause the * seekg() method of the relevant stream class to throw * std::ios_base::failure if such an exception has been required by an * explicit call to the exceptions() method of that class (but not * otherwise). fdstreams do not offer concurrent access from multiple * threads to the same stream object, and if that is required users * should provide their own synchronisation. * * @param p The absolute position to which the seek is to be made, * obtained by a previous call to seekoff() or to this method. * * @param m The required read/write status of the file descriptor * attached to this streambuffer for this method to attempt a seek. * As this is an input streambuffer, the argument should have the * std::ios_base::in bit set. Provided that bit is set, it doesn't * matter if others are also set. * * @return If the seek succeeds, a std::char_traits::pos_type * object representing the new stream position of the streambuffer * after the seek. (This type is std::streampos for narrow character * (char) streams, std::wstreampos for wide character (wchar_t) * streams, std::u16streampos for the C++0x char16_t type and * std::u32streampos for the C++0x char32_t type.) If the seek * failed, pos_type(off_type(-1)) is returned. * * Since 1.2.6 */ virtual pos_type seekpos(pos_type p, std::ios_base::openmode m = std::ios_base::in | std::ios_base::out); public: /** * As this constructor has default argument values, it is also a * default constructor. It does not throw unless the constructor of * std::basic_streambuf throws. fdstreams do not offer concurrent * access from multiple threads to the same stream object, and if * that is required users should provide their own synchronisation. * * @param fd_ The file descriptor to be attached to the streambuffer, * or -1 to attach it latter with the attach() method. * * @param manage_ Whether the streambuffer should manage the file * descriptor (that is, close it in its destructor or when a new file * descriptor is attached). */ basic_fdinbuf(int fd_ = -1, bool manage_ = true); /** * The destructor does not throw. */ virtual ~basic_fdinbuf(); /** * Attach a new file descriptor to the streambuffer (and close any * file descriptor at present managed by it). In the case of a wide * character streambuffer, it also switches off byte swapping, if it * was previously on. This method does not throw. fdstreams do not * offer concurrent access from multiple threads to the same stream * object, and if that is required users should provide their own * synchronisation. * * @param fd_ The new file descriptor to be attached to the * streambuffer. * * @param manage_ Whether the streambuffer should manage the new file * descriptor (that is, close it in its destructor or when a further * file descriptor is attached). */ void attach_fd(int fd_, bool manage_ = true); /** * Close the file descriptor at present attached to the streambuffer * (if any). This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @return From version 1.2.6, 'true' if the close succeeded, 'false' * if an error arose (including in a case where no descriptor has * been attached or it has already been closed). Prior to version * 1.2.6, this method had void return type. */ bool close_fd(); /** * Get the file descriptor at present attached to the streambuffer * (if any). This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @return The file descriptor at present attached to the * streambuffer, or -1 if none has been attached */ int get_fd() const {return fd;} /** * Causes the streambuffer to swap bytes in the incoming text, so as * to convert big endian text to little endian text, or little endian * text to big endian text. It is called by the user in response to * finding a byte order marker (BOM) 0xfffe (UTF-16) or 0xfffe0000 * (UTF-32) as the first character of a newly opened file/stream, or * if the user knows by some other means that the native endianness * of the machine doing the reading differs from the endianness of * the file/stream being read. This only has effect on wide * character input streambuffers (for example, wfdinbuf), and not the * fdinbuf narrow character stream buffer. This method does not * throw. fdstreams do not offer concurrent access from multiple * threads to the same stream object, and if that is required users * should provide their own synchronisation. * * @param swap 'true' if byte swapping is to be turned on, 'false' if * it is to be turned off. This will affect all characters extracted * from the streambuffer after this call is made. If any previously * extracted character is to be putback(), it must be put back before * this function is called (or unget() should be called instead) to * avoid a putback mismatch, because this call will byte-swap * anything already in the buffers. (Characters extracted after the * call to this method may be putback normally.) * * Since 1.2.5 */ void set_byteswap(bool swap); /** * This method indicates whether the input device concerned supports * random access, so that a call to seekoff() or seekpos() can * succeed. This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @return true if random access is supported, otherwise false. The * result is only meaningful if a file descriptor has been attached to * this streambuffer. * * Since 1.2.6 */ bool can_seek() const; /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @headerfile fdstream.h c++-gtk-utils/fdstream.h * @brief Input stream for unix file descriptors * @sa fdstreams * @ingroup fdstreams * * This class provides standard istream services for unix file * descriptors. */ template > class basic_fdistream : public std::basic_istream { basic_fdinbuf buf; basic_fdistream(const basic_fdistream&); basic_fdistream& operator=(const basic_fdistream&); public: /** * This is the constructor which passes a file descriptor. It will * not throw unless the constructor of std::basic_streambuf or * std::basic_istream throws. fdstreams do not offer concurrent * access from multiple threads to the same stream object, and if * that is required users should provide their own synchronisation. * * @param fd The file descriptor to be attached to the stream object. * * @param manage Whether the stream should manage the file descriptor * (that is, close it in its destructor or when a new file descriptor * is attached). */ basic_fdistream (int fd, bool manage = true) : std::basic_istream(0), buf(fd, manage) { // pass the descriptor at construction rdbuf(&buf); } /** * With this constructor, the file descriptor must be attached later * with the attach() method. It will not throw unless the * constructor of std::basic_streambuf or std::basic_istream throws. * fdstreams do not offer concurrent access from multiple threads to * the same stream object, and if that is required users should * provide their own synchronisation. */ basic_fdistream () : std::basic_istream(0) { // attach the descriptor later rdbuf(&buf); } /** * Attach a new file descriptor to the stream object (and close any * file descriptor at present managed by it). In the case of wide * character streams, it also switches off byte swapping, if it was * previously on. From version 1.2.6, if any stream state flags were * set (eofbit, failbit or badbit), they will be cleared by a call to * clear() (prior to that version, the user had to call clear() * explicitly to do so). If this method closes a file descriptor at * present managed by it and the close fails, failbit is not set and * no exception will be thrown. Accordingly, if the user needs to * know whether there was an error in this method closing any * descriptor, she should call close() explicitly before calling this * method. This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @param fd The new file descriptor to be attached to the stream * object. * * @param manage Whether the stream object should manage the new file * descriptor (that is, close it in its destructor or when a further * file descriptor is attached). */ void attach(int fd, bool manage = true) {buf.attach_fd(fd, manage); this->clear();} /** * Close the file descriptor at present attached to the stream object * (if any). From version 1.2.6, if the close fails, the failbit * will be set with setstate(std::ios_base::failbit). fdstreams do * not offer concurrent access from multiple threads to the same * stream object, and if that is required users should provide their * own synchronisation. * * @exception std::ios_base::failure From version 1.2.6, this * exception will be thrown if an error arises on closing the * descriptor and such an exception has been required by a call to * the exceptions() method of this class (inherited from * std::basic_ios<>). No exception will be thrown if exceptions() * has not been called. */ void close() {if (!buf.close_fd()) this->setstate(std::ios_base::failbit);} /** * Get the file descriptor at present attached to the stream object * (if any). This method does not throw. fdstreams do not offer * concurrent access from multiple threads to the same stream object, * and if that is required users should provide their own * synchronisation. * * @return The file descriptor at present attached to the * stream object, or -1 if none has been attached */ int filedesc() const {return buf.get_fd();} /** * Causes the underlying stream buffer to swap bytes in the incoming * text, so as to convert big endian text to little endian text, or * little endian text to big endian text. It is called in response * to finding a byte order marker (BOM) 0xfffe (UTF-16) or 0xfffe0000 * (UTF-32) as the first character of a newly opened file/stream, or * if the user knows by some other means that the native endianness * of the machine doing the reading differs from the endianness of * the file/stream being read. This only has effect on wide * character istreams (for example, wfdistream), and not the * fdistream narrow character stream. This method does not throw. * fdstreams do not offer concurrent access from multiple threads to * the same stream object, and if that is required users should * provide their own synchronisation. * * @param swap 'true' if byte swapping is to be turned on, 'false' if * it is to be turned off. This will affect all characters extracted * from the underlying streambuffer after this call is made. If any * previously extracted character is to be putback(), it must be put * back before this function is called (or unget() should be called * instead) to avoid a putback mismatch, because this call will * byte-swap anything already in the buffers. (Characters extracted * after the call to this method may be putback normally.) * * Since 1.2.5 */ void set_byteswap(bool swap) {buf.set_byteswap(swap);} /** * This method indicates whether the input device concerned supports * random access, so that a call to tellg() or seekg() can succeed. * Note that in the seekg(off_type off, ios_base::seekdir dir) * variant, on wide character streams the 'off' argument is * dimensioned as the number of wchar_t units not the number of bytes * (that is, it is bytes/sizeof(char_type)). This method does not * throw. fdstreams do not offer concurrent access from multiple * threads to the same stream object, and if that is required users * should provide their own synchronisation. * * @return true if random access is supported, otherwise false. The * result is only meaningful if a file descriptor has been attached to * this stream. * * Since 1.2.6 */ bool can_seek() const {return buf.can_seek();} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @defgroup fdstreams fdstreams */ /** * @typedef fdinbuf. * @brief Input stream buffer for file descriptors for char type * @ingroup fdstreams */ typedef basic_fdinbuf fdinbuf; /** * @typedef fdoutbuf. * @brief Output stream buffer for file descriptors for char type * @ingroup fdstreams */ typedef basic_fdoutbuf fdoutbuf; /** * @typedef fdistream. * @brief Input stream for file descriptors for char type * @anchor fdistreamAnchor * @ingroup fdstreams */ typedef basic_fdistream fdistream; /** * @typedef fdostream. * @brief Output stream for file descriptors for char type * @anchor fdostreamAnchor * @ingroup fdstreams */ typedef basic_fdostream fdostream; /** * @typedef wfdinbuf. * @brief Input stream buffer for file descriptors for wchar_t type * @ingroup fdstreams */ typedef basic_fdinbuf wfdinbuf; /** * @typedef wfdoutbuf. * @brief Output stream buffer for file descriptors for wchar_t type * @ingroup fdstreams */ typedef basic_fdoutbuf wfdoutbuf; /** * @typedef wfdistream. * @brief Input stream for file descriptors for wchar_t type * @anchor wfdistreamAnchor * @ingroup fdstreams */ typedef basic_fdistream wfdistream; /** * @typedef wfdostream. * @brief Output stream for file descriptors for wchar_t type * @anchor wfdostreamAnchor * @ingroup fdstreams */ typedef basic_fdostream wfdostream; } // namespace Cgu #include #endif /*CGU_FDSTREAM_H*/ efax-gtk-3.2.8/src/internal/c++-gtk-utils/gerror_handle.h0000644000175000001440000000512611524110041020020 00000000000000/* Copyright (C) 2007 and 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_GERROR_HANDLE_H #define CGU_GERROR_HANDLE_H #include #include #include /** * @addtogroup handles handles and smart pointers */ namespace Cgu { /** * @class GerrorFree gerror_handle.h c++-gtk-utils/gerror_handle.h * @brief A deleter functor for use as the second (Dealloc) template * parameter of the SharedHandle, SharedLockHandle or ScopedHandle * template classes, which calls glib's g_error_free(). * @ingroup handles * @details This functor enables those classes to manage GError * objects in memory which require to be freed with g_error_free(). * It is used in the typedefs @ref GerrorSharedHandleAnchor * "GerrorSharedHandle" and @ref GerrorScopedHandleAnchor * "GcharScopedHandle". */ class GerrorFree { public: void operator()(const GError* obj_p) { if (obj_p) { g_error_free(const_cast(obj_p)); } } }; /** * @typedef GerrorScopedHandle. * @brief A handle comprising a typed instance of the ScopedHandle class for managing GError objects. * @anchor GerrorScopedHandleAnchor * @ingroup handles * \#include */ typedef ScopedHandle GerrorScopedHandle; /** * @typedef GerrorSharedHandle. * @brief A handle comprising a typed instance of the SharedHandle class for managing GError objects. * @anchor GerrorSharedHandleAnchor * @ingroup handles * \#include */ typedef SharedHandle GerrorSharedHandle; } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/callback.cpp0000644000175000001440000000652411524110041017277 00000000000000/* Copyright (C) 2008 and 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include extern "C" { static gboolean cgu_callback_wrapper(void*); static gboolean cgu_tracked_callback_wrapper(void*); } gboolean cgu_callback_wrapper(void* data) { const Cgu::Callback::Callback* cb = static_cast(data); // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { cb->dispatch(); } catch (...) { g_critical("Exception thrown in callback_wrapper() for Callback::post() function\n"); } delete cb; return false; } gboolean cgu_tracked_callback_wrapper(void* data) { const Cgu::SafeEmitter* e = static_cast(data); // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { e->emit(); } catch (...) { g_critical("Exception thrown in tracked_callback_wrapper() for Callback::post() function\n"); } delete e; return false; } namespace Cgu { namespace Callback { void post(const Callback* cb, gint priority, GMainContext* context) { // context has a default value of NULL which will attach the idle source // to the default program main context GSource* source_p = g_idle_source_new(); if (priority != G_PRIORITY_DEFAULT_IDLE) g_source_set_priority(source_p, priority); g_source_set_callback(source_p, cgu_callback_wrapper, const_cast(cb), 0); g_source_attach(source_p, context); g_source_unref(source_p); } void post(const Callback* cb, Releaser& r, gint priority, GMainContext* context) { // context has a default value of NULL which will attach the idle source // to the default program main context SafeFunctor f(cb); // take ownership SafeEmitter* e = new SafeEmitter; try { e->connect(f, r); } catch (...) { delete e; throw; } GSource* source_p = g_idle_source_new(); if (priority != G_PRIORITY_DEFAULT_IDLE) g_source_set_priority(source_p, priority); g_source_set_callback(source_p, cgu_tracked_callback_wrapper, e, 0); g_source_attach(source_p, context); g_source_unref(source_p); } } // namespace Callback } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/pipes.cpp0000644000175000001440000001405611524110041016662 00000000000000/* Copyright (C) 1999 - 2004 and 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include #include #include #include namespace Cgu { PipeFifo::PipeFifo(Fifo_mode mode): write_blocking_mode(block) { int file_pipes[2]; if (pipe(file_pipes) == -1) throw PipeError(); read_fd = file_pipes[0]; write_fd = file_pipes[1]; if (mode == non_block) { int fdflags = fcntl(read_fd, F_GETFL); fdflags |= O_NONBLOCK; fcntl(read_fd, F_SETFL, fdflags); read_blocking_mode = non_block; } else read_blocking_mode = block; } PipeFifo::PipeFifo(): read_fd(-1), write_fd(-1), read_blocking_mode(block), write_blocking_mode(block) {} void PipeFifo::open(Fifo_mode mode) { // close any existing open file descriptors close(); // now open new descriptors int file_pipes[2]; if (pipe(file_pipes) == -1) throw PipeError(); read_fd = file_pipes[0]; write_fd = file_pipes[1]; if (mode == non_block) { int fdflags = fcntl(read_fd, F_GETFL); fdflags |= O_NONBLOCK; fcntl(read_fd, F_SETFL, fdflags); read_blocking_mode = non_block; } } void PipeFifo::close() { make_writeonly(); make_readonly(); read_blocking_mode = block; write_blocking_mode = block; } ssize_t PipeFifo::read(char* buffer, size_t max_num) { if (read_fd == -1) return -2; ssize_t result; do { result = ::read(read_fd, buffer, max_num); // call unix read() in file scope } while (result == -1 && errno == EINTR); return result; } int PipeFifo::read() { if (read_fd == -1) return -2; unsigned char item; ssize_t result; do { result = ::read(read_fd, &item, 1); // call unix read() in file scope } while (result == -1 && errno == EINTR); if (result > 0) return (int)item; return result; } ssize_t PipeFifo::write(const char* buffer) { if (write_fd == -1) return -2; return write(buffer, std::strlen(buffer)); } ssize_t PipeFifo::write(const char* buffer, size_t length) { if (write_fd == -1) return -2; ssize_t written = 0; if (write_blocking_mode == block) { // if in blocking mode, make sure everything to be written is written ssize_t result; do { result = ::write(write_fd, buffer + written, length);// call unix write() in file scope if (result > 0) { written += result; length -= result; } } while (length && (result != -1 || errno == EINTR)); if (result == -1) written = -1; } else { // if in non-blocking mode just return the value of unix write() do { written = ::write(write_fd, buffer, length); // call unix write() in file scope } while (written == -1 && errno == EINTR); } return written; } void PipeFifo::make_writeonly() { if (read_fd != -1) { while (::close(read_fd) == -1 && errno == EINTR); // call unix close() in file scope read_fd = -1; } } void PipeFifo::make_readonly() { if (write_fd != -1) { while (::close(write_fd) == -1 && errno == EINTR);// call unix close() in file scope write_fd = -1; } } int PipeFifo::make_write_non_block() { if (write_fd >= 0) { int fdflags = fcntl(write_fd, F_GETFL); fdflags |= O_NONBLOCK; fcntl(write_fd, F_SETFL, fdflags); write_blocking_mode = non_block; return 0; } return -1; } int PipeFifo::connect_to_stdin() { // check preconditions if (read_fd == -1) return -2; int result; // first we need to duplicate the read file descriptor onto stdin while ((result = dup2(read_fd, 0)) == -1 && errno == EINTR); if (!result) { make_writeonly(); // this will close the original read file descriptor // but leave stdin unaffected make_readonly(); // since the pipe is unidirectional, we can also close the write fd } return result; } int PipeFifo::connect_to_stdout() { // check preconditions if (write_fd == -1) return -2; int result; // first we need to duplicate the write file descriptor onto stdout while ((result = dup2(write_fd, 1)) == -1 && errno == EINTR); // stdout will now write to the pipe if (!result) { make_readonly(); // this will close the original write file descriptor // but leave stdout unaffected make_writeonly(); // since the pipe is unidirectional, we can also close the read fd } return result; } int PipeFifo::connect_to_stderr() { // check preconditions if (write_fd == -1) return -2; int result; // first we need to duplicate the write file descriptor onto stderr while ((result = dup2(write_fd, 2)) == -1 && errno == EINTR); // stderr will now write to the pipe if (!result) { make_readonly(); // this will close the original write file descriptor // but leave stderr unaffected make_writeonly(); // since the pipe is unidirectional, we can also close the read fd } return result; } void SyncPipe::wait() { pipe_fifo.make_readonly(); char letter; while (::read(pipe_fifo.get_read_fd(), &letter, 1) == -1 && errno == EINTR); pipe_fifo.make_writeonly(); } } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/application.h0000644000175000001440000006327511544200716017534 00000000000000/* Copyright (C) 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_APPLICATION_H #define CGU_APPLICATION_H #include #include #include #include #include #include #include #include #include #include namespace Cgu { #if defined(DOXYGEN_PARSING) || GTK_CHECK_VERSION(2,99,0) /** * @class Cgu::ApplicationNameError application.h c++-gtk-utils/application.h * @brief This class is thrown when the program id name passed to the * constructor of Cgu::Application is invalid. */ struct ApplicationNameError: public std::exception { virtual const char* what() const throw() {return "ApplicationNameError\n";} }; /** * @class Cgu::Application application.h c++-gtk-utils/application.h * @brief This is a class for constructing and managing GtkApplication * objects. * * @details This is a class for constructing and managing * GtkApplication objects, available since version 1.2.12. It is only * compiled in with a GTK+3 installation. * * In typical usage, a Cgu::Application object is created in main(), * and then a callback is attached to the 'activate', 'command_line' * or 'open' emitter, depending on the flag passed to the Application * object's constructor. The run() method of the Application object * is then called, and a window deriving from Cgu::WinBase is * constructed in the callback and added to the Application object or, * if the program is a single instance program with only one main * window and an instance is already running, a function is called to * present that window. * * The gio/gtk+ documentation at the time of writing does not explain * key concepts, and in particular how the GtkApplication sub-class * interacts with GApplication's g_application_run(). Here is an * explanation: * * (a) If a Cgu::Application object is constructed with the * G_APPLICATION_FLAGS_NONE flag set, then calling the * Cgu::Application::run() method (which hands off to * g_application_run()) will cause the 'activate' emitter to emit. No * command line parameter should be passed to the run method (argc * should be 0 or 1), otherwise GtkApplication will cause the start-up * to abort. Unlike with gtk_main(), g_application_run() (and so * Cgu::Application::run()) does not consume any recognised glib/gtk+ * options, such as --display, but regards these as application * parameters. Such stripping out can be achieved by calling * gtk_init() before constructing the Cgu::Application object (but * gtk_main() does not need to be called for any other purpose), or by * using the GOptionGroup/GOptionEntry interface. Although the * documentation does not say so, g_application_run(), and so * Cgu::Application::run(), can be called with argc and argv set to 0, * and that is generally the best approach if the * G_APPLICATION_FLAGS_NONE flag is set. * * (b) If a Cgu::Application object is constructed with the * G_APPLICATION_HANDLES_OPEN flag set, then calling the * Cgu::Application::run() method will cause the 'activate' emitter to * emit if no command line parameters were provided when the program * was started (that is, if argc is 0 or 1), or cause the 'open' * emitter to emit if parameters are passed (arc > 1). Such * parameters will be construed as files/uris, and will be passed to * the 'open' emitter by array of GFile*'s. Unlike with gtk_main(), * g_application_run() (and so Cgu::Application::run()) does not * consume any recognised glib/gtk+ options, such as --display, but * regards these as application parameters and so as file/uri names. * Such stripping out can be achieved by calling gtk_init() before * constructing the Cgu::Application object (but gtk_main() does not * need to be called for any other purpose), or by using the * GOptionGroup/GOptionEntry interface. * * (c) If a Cgu::Application object is constructed with the * G_APPLICATION_HANDLES_COMMAND_LINE flag set, then calling the * Cgu::Application::run() method will cause the 'command_line' * emitter to emit. All the command line parameters will be passed * on, and they can be obtained via the GApplicationCommandLine * argument of the 'command_line' emitter. Unlike with gtk_main(), * g_application_run() (and so Cgu::Application::run()) does not * consume any recognised glib/gtk+ options, such as --display, but * regards these as command line parameters. Such stripping out can * be achieved by calling gtk_init() before constructing the * Cgu::Application object (but gtk_main() does not need to be called * for any other purpose), or by using the GOptionGroup/GOptionEntry * interface. * * There is little in this class that cannot also be done using the * @ref prog_presenterAnchor "Cgu::prog_present" interface, which has * the advantage of being more portable (@ref prog_presenterAnchor * "Cgu::prog_present" does not depend on GTK+3), but this class is * more convenient to use where a program requires multiple main * application windows which can be independently opened and any of * which are to keep the program alive until the last one is closed. * * Cgu::Application objects are not singletons. It is possible to * drop an Application object out of scope or destroy it in some other * way after closing or removing all its windows, then construct * another with a different flag and then call run() on the second one * (although it would be a curious application that wanted to do so). * It is also possible, but even more off-the-wall, to have two * Application objects in existence in the same process at the same * time provided different dbus identifiers are supplied to the * constructor for each, although run() may only be called on one of * them at any one time. However, this is something of a curiosity: * in nearly all cases an application will only have one * Cgu::Application object, since the main purpose of Cgu::Application * is to facilitate single instance programs. * * Here is a compilable example, demonstrating the use of the * GApplicationFlags options: * * @code * #include * #include * #include * * #include * * #include * #include * #include * #include * * // SETUP HERE: uncomment the flag to be tested: * * //const GApplicationFlags app_flag = G_APPLICATION_FLAGS_NONE; * const GApplicationFlags app_flag = G_APPLICATION_HANDLES_OPEN; * //const GApplicationFlags app_flag = G_APPLICATION_HANDLES_COMMAND_LINE; * * using namespace Cgu; * * // *** Demonstration message class *** * * extern "C" void message_button_clicked(GtkWidget*, void*); * * class Message: public Cgu::WinBase { * public: * friend void message_button_clicked(GtkWidget*, void*); * Message(const char* text); * }; * * void message_button_clicked(GtkWidget* w, void*) { * std::cout << "Clicked" << std::endl; * } * * Message::Message(const char* text): WinBase("Message", 0, false) { * GtkWidget* box = gtk_vbox_new(false, 2); * gtk_container_add(GTK_CONTAINER(get_win()), box); * GtkWidget* label = gtk_label_new(text); * gtk_box_pack_start(GTK_BOX(box), label, * true, false, 0); * GtkWidget* button_box = gtk_hbutton_box_new(); * gtk_box_pack_start(GTK_BOX(box), button_box, * false, false, 0); * GtkWidget* button = gtk_button_new_from_stock(GTK_STOCK_OK); * gtk_container_add(GTK_CONTAINER(button_box), button); * g_signal_connect(G_OBJECT(button), "clicked", * G_CALLBACK(message_button_clicked), 0); * gtk_widget_set_can_default(button, true); * } * * // *** callbacks *** * * void activate(Cgu::Application* app) { * std::cout << "activate() called" << std::endl; * * // probably if no arguments are passed, only one window is wanted, * // which is now to present itself if it already exists: comment this * // 'if' block out if a new window is to be added on each occasion * // the program is started * if (app->get_win_count() > 0) { * gtk_window_present(app->get_windows().front()->get_win()); * return; * } * WinBase* dialog = new Message("This is a message"); * app->add(dialog); * dialog->show_all(); * } * * void startup(Cgu::Application*) { * std::cout << "startup() called" << std::endl; * } * * void command_line(Cgu::Application* app, GApplicationCommandLine* cl, gint&) { * std::cout << "command_line() called" << std::endl; * * // probably if the G_APPLICATION_HANDLES_COMMAND_LINE flag is set, * // only one window is wanted, which is now to present itself if it * // already exists: comment this 'if' block out if a new window is to * // be added on each occasion the program is started * if (app->get_win_count() > 0) { * gtk_window_present(app->get_windows().front()->get_win()); * return; * } * std::string text("Command line options are:\n"); * int argc = 0; * gchar** argv = g_application_command_line_get_arguments(cl, &argc); * for (int count = 0; count < argc; ++count) { * try { * text += argv[count]; * text += '\n'; * } * catch (...) { * g_strfreev(argv); * throw; // exceptions will be consumed by the callback handler and * // a g_critical warning issued, but let's not leak memory * } * } * g_strfreev(argv); * WinBase* dialog = new Message(text.c_str()); * app->add(dialog); * dialog->show_all(); * } * * void open(Cgu::Application* app, std::pair files, gchar*) { * std::cout << "open() called" << std::endl; * * // probably if the G_APPLICATION_HANDLES_OPEN flag is set and an * // argument is passed, the adding of a new window is wanted on each * // occasion the program is started * std::string text("Files are:\n"); * for (int count = 0; count < files.second; ++count) { * GcharScopedHandle uri(g_file_get_uri(files.first[count])); * text += uri; * text += '\n'; * } * WinBase* dialog = new Message(text.c_str()); * app->add(dialog); * dialog->show_all(); * } * * // *** main() *** * * int main(int argc, char* argv[]) { * * // gtk_init() is only relevant for the purposes of stripping out * // glib/gtk+ recognised options - gtk_application_new() (and so the * // Cgu::Application constructor) will call g_type_init() if the type * // system needs initialization * gtk_init(&argc, &argv); * * Application app("my_prog", app_flag); * app.activate.connect(Callback::make(activate)); * app.startup.connect(Callback::make(startup)); * app.command_line.connect(Callback::make(command_line)); * app.open.connect(Callback::make(open)); * if (app_flag == G_APPLICATION_FLAGS_NONE) * app.run(0, 0); * else * app.run(argc, argv); * * return 0; * } * @endcode */ class Application { std::list win_list; GobjHandle app; void* reserved; // for future use // Application objects cannot be copied Application(const Application&); Application& operator=(const Application&); public: typedef std::list::size_type size_type; /** * This SafeEmitterArg object emits (and so executes any connected * callback) when the underlying GApplication object emits its * @a activate signal. The argument passed to the emitter's * callback(s) is a pointer to the Cgu::Application object. * @note When the callback executes, thread cancellation is blocked, * and any exceptions are consumed with a g_critical message issued. * The callback will always execute in the main GUI thread when * executed in response to the run() method. Because a SafeEmitterArg * object is used, the emitter object itself is thread safe. * * Since 1.2.12 */ Cgu::SafeEmitterArg activate; /** * This SafeEmitterArg object emits (and so executes any connected * callback) when the underlying GApplication object emits its * @a startup signal. The argument passed to the emitter's callback(s) * is a pointer to the Cgu::Application object. However, you usually * won't need to do anything in response to the @a startup signal. * @note When the callback executes, thread cancellation is blocked, * and any exceptions are consumed with a g_critical message issued. * The callback will always execute in the main GUI thread when * executed in response to the run() method. Because a SafeEmitterArg * object is used, the emitter object itself is thread safe. * * Since 1.2.12 */ Cgu::SafeEmitterArg startup; /** * This SafeEmitterArg object emits (and so executes any connected * callback) when the underlying GApplication object emits its * @a command-line signal. The second argument passed to the * emitter's callback(s) is the one passed by that signal, that is to * say the arguments are: * * first: a pointer to the Cgu::Application object. * * second: a pointer to a GApplicationCommandLine object representing * the passed command line (this is owned by gio and should not be * unref'ed). * * third: a gint& reference to which the value to be returned to the * GApplication's command-line signal can be passed: if no value is * assigned to it or no callback has been attached to the signal, 0 * will be returned, except that if an exception from a callback is * consumed, -1 will be returned. If more than one callback is * attached to the signal and no exception is consumed, the last one * to assign a value will be have its value returned. * * @note 1. When the callback executes, thread cancellation is * blocked, and any exceptions are consumed with a g_critical message * issued and a return value of -1 set. The callback will always * execute in the main GUI thread when executed in response to the * run() method. Because a SafeEmitterArg object is used, the emitter * object itself is thread safe. * * @note 2. Callbacks for this emitter, which would take more than one * unbound argument, are not available if the library was configured * with the --without-type-tuple-args option. * * Since 1.2.12 */ Cgu::SafeEmitterArg > command_line; /** * This SafeEmitterArg object emits (and so executes any connected * callback) when the underlying GApplication object emits its @a open * signal. The second and third arguments passed to the emitter's * callback(s) are those passed by that signal, that is to say the * arguments are: * * first: a pointer to the Cgu::Application object. * * second: a std::pair object where the first member is an array of * GFile*'s representing the files/uris passed as arguments, and the * second member is the length of that array (the array is owned by * gio and should not be freed). * * third: a gchar* argument comprising the text of the "hint" (this is * owned by gio and should not be freed). * * @note 1. When the callback executes, thread cancellation is * blocked, and any exceptions are consumed with a g_critical message * issued. The callback will always execute in the main GUI thread * when executed in response to the run() method. Because a * SafeEmitterArg object is used, the emitter object itself is thread * safe. * * @note 2. Callbacks for this emitter, which would take more than one * unbound argument, are not available if the library was configured * with the --without-type-tuple-args option. * * Since 1.2.12 */ Cgu::SafeEmitterArg, gchar*> > open; /** * Add a Cgu::WinBase object to the Cgu::Application object, and so * also add its managed GtkWindow object to the GtkApplication object. * Any Cgu::WinBase object passed to this method should not normally * be modal and must have been constructed on free store with the new * expression, and will be self owning, although if it is removed from * this Cgu::Application object with remove(), the delete expression * can (and normally should) be called on it. If a delete event * occurs on the WinBase object so that the WinBase object destroys * itself (say, by clicking on the window's close/delete button), or * it destroys itself in some other way (say, by calling the * WinBase::close() method), it will automatically be removed from * this Application object without further action being necessary. * The WinBase::exec() method should never be called on a WinBase * object which has been added to an Application object. The * Cgu::Application class, and thus this method, does not employ * mutexes to make it thread safe, as there should never be a reason * to call Cgu::Application methods in other than the main GUI thread. * @param win The Cgu::WinBase object to be added. * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * @note As well as this method only being called in the main GUI * thread, if the program by which it is called calls GTK+ directly in * more than one thread and thus employs * gdk_threads_enter()/gdk_threads_leave() (rather than, say, * Cgu::Notifier or Cgu::Callback::post()), it must be surrounded by * gdk_threads_enter()/gdk_threads_leave() if called otherwise than in * a GTK+ signal handler. (The best approach however is for a program * only to address GTK+/GDK in the main program thread, for which * purpose this library provides various functions and classes for * inter-thread communication, such as Cgu::Notifier and * Cgu::Callback::post(): see @ref Threading for particulars about * GTK+ thread safety.) * * Since 1.2.12 */ void add(Cgu::WinBase* win); /** * Remove a Cgu::WinBase object from the Cgu::Application object, and * so also remove its managed GtkWindow object from the GtkApplication * object. This method will not throw assuming that merely iterating * through a list does not throw (as it would not on any sane * implementation). The Cgu::Application class, and thus this method, * does not employ mutexes to make it thread safe, as there should * never be a reason to call Cgu::Application methods in other than * the main GUI thread. Calling this method does not destroy the * WinBase object. * @param win The Cgu::WinBase object to be removed. * @return true if the Cgu::WinBase object was found in the * Cgu::Application object and so removed, otherwise false. * @note As well as this method only being called in the main GUI * thread, if the program by which it is called calls GTK+ directly in * more than one thread and thus employs * gdk_threads_enter()/gdk_threads_leave() (rather than, say, * Cgu::Notifier or Cgu::Callback::post()), it must be surrounded by * gdk_threads_enter()/gdk_threads_leave() if called otherwise than in * a GTK+ signal handler. (The best approach however is for a program * only to address GTK+/GDK in the main program thread, for which * purpose this library provides various functions and classes for * inter-thread communication, such as Cgu::Notifier and * Cgu::Callback::post(): see @ref Threading for particulars about * GTK+ thread safety.) * * Since 1.2.12 */ bool remove(Cgu::WinBase* win); /** * Calls g_application_run() in respect of the underlying * GtkApplication object, so invoking one of this Cgu::Application * class's emitters (the exact behaviour depends on the GApplication * flags passed to the constructor and is explained in the * introductory remarks above). This method is thread safe (although * that is irrelevant to its purpose) and will not throw. In * addition, if a callback connected to an emitter throws, the * exception is consumed and a g_critical warning issued. This * function blocks until the last WinBase object associated with this * Application object is destroyed or removed. * @param argc The argc from main() or 0. * @param argv The argv from main() or 0. * @return The exit status from g_application_run(). * * Since 1.2.12 */ int run(int argc, char** argv) { return g_application_run(G_APPLICATION(app.get()), argc, argv); } /** * Get the underlying GApplication object (note, not the * GtkApplication object, although the GApplication object can be cast * to GtkAppliction), so allowing any of gio's g_application_*() * functions to be applied to it. In normal usage it will not be * necessary to call this method. This method is thread safe and will * not throw. * @return The underlying GApplication object. * * Since 1.2.12 */ GApplication* get_g_app() const {return (GApplication*)app.get();} /** * Get the list of Cgu::WinBase objects associated with the * application. The Cgu::Application class, and thus this method, * does not employ mutexes to make it thread safe, as there should * never be a reason to call Cgu::Application methods in other than * the main GUI thread. * @return A list of the top level Cgu::WinBase objects associated * with the application, which will appear in order in which they were * added. If you need to access these, you will probably want to do a * dynamic_cast or static_cast up to the child type. * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * * Since 1.2.12 */ std::list get_windows() const {return win_list;} /** * Gets the current count of Cgu::WinBase objects associated with this * Cgu::Application object. When it reaches 0, the application will * normally end (but this can be prevented by calling * g_application_hold()/g_application_release() on the GApplication * object returned by get_g_app()). This method can be used in the * callback of one of this class's emitters to determine whether this * is the first instance of a program to be started (assuming the * first instance calls add() to bring up a window), because in that * case it will return 0 until add() is called. Calling * get_windows().size() will give the same result, but using this * method is more efficient as it will avoid a copy of the list of * windows. This method will not throw assuming that calling * std::list::size() does not throw (as it would not on any sane * implementation). The Cgu::Application class, and thus this method, * does not employ mutexes to make it thread safe, as there should * never be a reason to call Cgu::Application methods in other than * the main GUI thread. * @return The number of Cgu::WinBase objects currently associated * with this Cgu::Application object. * * Since 1.2.12 */ size_type get_win_count() const {return win_list.size();} /** * This constructor will, via gtk_application_new(), cause * g_type_init() to be called. If any GTK+ functions are to be called * before an Application object is constructed, g_type_init() (or * gtk_init()) must be called explicitly. * @param prog_name An identifier name. This can comprise any valid * ASCII characters "[A-Z][a-z][0-9]_-", although it is usually best * to pass the program name. Unlike with gtk_application_new(), it * does not need to comprise a full dbus bus name: this method will * construct its own valid dbus bus name from prog_name in the org.cgu * domain. * @param flags The GApplicationFlags to be passed to the * Cgu::Application object. This class does not contain its own * sub-class of GApplication to customize this, but adopts the * behaviour of GtkApplication. That behaviour is explained in the * introductory remarks. * @exception Cgu::ApplicationNameError This exception will be thrown * if the prog_name parameter does not meet the requirements referred * to above. * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * * Since 1.2.12 */ Application(const char* prog_name, GApplicationFlags flags); /** * From version 1.2.13, as a safety feature the destructor removes any * remaining WinBase objects associated with this Application object * (this would only be relevant if the user constructs the Application * object on free store, and then deletes it while the run() method is * still blocking for the purpose of constructing a different * Application object, but does not call the remove() method on all * associated WinBase objects before doing so: constructing an * Application object on free store in this way would be highly * unusual however). * * Since 1.2.13 */ ~Application() {while (!win_list.empty()) remove(win_list.front());} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; #endif // GTK_CHECK_VERSION(2,99,0) } // namespace Cgu #endif // CGU_APPLICATION_H efax-gtk-3.2.8/src/internal/c++-gtk-utils/mutex.cpp0000644000175000001440000000665711524110041016714 00000000000000/* Copyright (C) 2006 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include namespace Cgu { namespace Thread { /* since we have to compile some RecMutex methods into the library for the reasons mentioned below, we might as well compile in Cond::get_abs_time() and Cond::Cond as well, which also depend on configuration tests. */ void Cond::get_abs_time(timespec& ts, unsigned int millisec) { #ifdef HAVE_MONOTONIC_CLOCK clock_gettime(CLOCK_MONOTONIC, &ts); #else clock_gettime(CLOCK_REALTIME, &ts); #endif unsigned long nanosec = ts.tv_nsec + ((millisec % 1000) * 1000000); ts.tv_sec += millisec/1000 + nanosec/1000000000; ts.tv_nsec = nanosec % 1000000000; } bool Cond::have_monotonic_clock() { #ifdef HAVE_MONOTONIC_CLOCK return true; #else return false; #endif } Cond::Cond() { #ifdef HAVE_MONOTONIC_CLOCK pthread_condattr_t attr; if (pthread_condattr_init(&attr)) throw CondError(); if (pthread_condattr_setclock(&attr, CLOCK_MONOTONIC) || pthread_cond_init(&cond, &attr)) { pthread_condattr_destroy(&attr); throw CondError(); } pthread_condattr_destroy(&attr); #else if (pthread_cond_init(&cond, 0)) throw CondError(); #endif } /* we compile these RecMutex methods into the library because they depend on _XOPEN_SOURCE being defined as 600 and it is easier to ensure this is done on compiling the library rather than when the user compiles individual programs. HAVE_RECURSIVE_MUTEX_HEADERS is defined in config.h and so included via lib_defs.h, and is tested for in the ./configure script. */ int RecMutex::test_support() { #ifdef HAVE_RECURSIVE_MUTEX_HEADERS pthread_mutexattr_t attr; if (pthread_mutexattr_init(&attr)) return 1; if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) { pthread_mutexattr_destroy(&attr); return -1; } pthread_mutexattr_destroy(&attr); return 0; #else return -1; #endif } RecMutex::RecMutex() { #ifdef HAVE_RECURSIVE_MUTEX_HEADERS pthread_mutexattr_t attr; if (pthread_mutexattr_init(&attr)) throw MutexError(); if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) { pthread_mutexattr_destroy(&attr); throw RecMutexError(); } if (pthread_mutex_init(&pthr_mutex, &attr)) { pthread_mutexattr_destroy(&attr); throw MutexError(); } pthread_mutexattr_destroy(&attr); #else throw RecMutexError(); #endif } } // namespace Thread } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/timeout.h0000644000175000001440000002774211524110041016703 00000000000000/* Copyright (C) 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_TIMEOUT_H #define CGU_TIMEOUT_H /** * @defgroup timeout timeout * * \#include * * The start_timeout() function connects a timeout to an event loop * owned by a GMainContext object (normally the main program loop). * By so doing, it provides a convenient way of attaching the callback * for the timeout, and also provides for automatic disconnection when * an object whose function the callback represents is destroyed. The * timeout will keep executing the callback at the intervals set in * start_timeout() until it is terminated in one of the ways mentioned * below. * * start_timeout() is thread-safe (it may be called in any thread) * provided that the glib main loop has been made thread-safe by a * call to g_thread_init(). * * start_timeout() takes ownership of the passed Callback object. The * function comes in two versions. The one which takes a * Callback::Releaser object as its third argument provides for * automatic termination of the execution of the callback at the * specified interval if the target object which has the Releaser as a * member is destroyed. (Note that for this to be race free, the * lifetime of the remote target object whose method is to be invoked * must be determined by the thread to whose main loop the timeout has * been attached. When the main loop begins invoking the execution of * the timeout callback, the remote object must either wholly exist, * in which case the callback will be invoked, or have been destroyed, * in which case the callback will be ignored, and not be in some * transient half-state governed by another thread.) * * The connected function encapsulated by the callback passed to * start_timeout() and executed by the main loop should take a single * bool& argument, or have its last argument as a bool& unbound * argument (with all other arguments bound in the callback). If that * bool& argument is set by the connected function to false, then the * timeout calls will be ended and all resources connected with it * deleted without further user action being required (there is no * need for the connected function to set it to true if timeout * execution is to continue, as that is the default). In addition, * the timeout will be ended automatically and resources deleted if * (i) as mentioned above, the callback passed to start_timeout() is * protected by a Releaser object and the target object whose method * is encapsulated by the callback is destroyed, or (ii) * g_source_remove() is called on the source id returned by * start_timeout() (where the timeout is attached to the default main * context) or g_source_destroy() is called on the GSource object * obtained from that id with g_main_context_find_source_by_id() * (where the timeout has been attached to a non-default main * context). If the source has been removed automatically by virtue * of the bool& argument being set to false or by virtue of a Releaser * object releasing, g_source_remove() or g_source_destroy() should * not afterwards be called in respect of the id value returned by * start_timeout() in case it has been reused by the main context * concerned in the meantime. * * The start_timeout_seconds() functions do the same as their * start_timeout() counterparts, except that they use the larger * granularity glib timeout-seconds main loop event sources (and take * seconds and not milliseconds as their timeout argument). The idea * behind the glib timeout-seconds sources is to group long timeout * events which do not have critical timing resolution requirements so * that they are aligned together with one second granularity. This * minimises the number of processor wake-ups required to handle such * events, thereby helping power efficiency. These functions are to * be preferred for long timeouts where one second granularity is * acceptable. These larger granularity functions are only compiled * into the library if glib >= 2.14 is installed. */ #include #include #include namespace Cgu { class Releaser; /** * Starts a timeout in the glib main loop, and executes the callback * when the timeout expires. It is thread-safe (it may be called in * any thread) provided that the glib main loop has been made * thread-safe by a call to g_thread_init(). This function will not * throw. * @param millisec The interval of the timeout, in milliseconds. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param priority The priority to be given to the timeout in the * main loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main context to which the timeout is to be * attached (the default of NULL will cause the timeout to be attached * to the main program loop, and this is almost always what is * wanted). * @return The glib source id of the timeout. * @note Cancellation of the thread to which the timeout is attached is * blocked during execution of the callback. * @ingroup timeout * * Since 0.9.2 */ guint start_timeout(guint millisec, const Callback::CallbackArg* cb, gint priority = G_PRIORITY_DEFAULT, GMainContext* context = 0); /** * Starts a timeout in the glib main loop, and executes the callback * when the timeout expires. This version provides for automatic * timeout disconnection when the object whose function the callback * represents is destroyed, via the Releaser object. It is * thread-safe (it may be called in any thread) provided that the glib * main loop has been made thread-safe by a call to g_thread_init(). * @param millisec The interval of the timeout, in milliseconds. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param r A Releaser object which the protected object has as a * public member. * @param priority The priority to be given to the timeout in the * main loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main context to which the timeout is to be * attached (the default of NULL will cause the timeout to be attached * to the main program loop, and this is almost always what is * wanted). * @return The glib source id of the timeout. * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. If it * does so, the CallbackArg object will be disposed of. * @note Cancellation of the thread to which the timeout is attached is * blocked during execution of the callback. * @ingroup timeout * * Since 0.9.2 */ guint start_timeout(guint millisec, const Callback::CallbackArg* cb, Releaser& r, gint priority = G_PRIORITY_DEFAULT, GMainContext* context = 0); /** * Starts a timeout in the glib main loop using the higher granularity * glib timeout-seconds event sources, and executes the callback when * the timeout expires. It is thread-safe (it may be called in any * thread) provided that the glib main loop has been made thread-safe * by a call to g_thread_init(). This function will not throw. * @param sec The interval of the timeout, in seconds. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param priority The priority to be given to the timeout in the * main loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main context to which the timeout is to be * attached (the default of NULL will cause the timeout to be attached * to the main program loop, and this is almost always what is * wanted). * @return The glib source id of the timeout. * @note 1. Cancellation of the thread to which the timeout is * attached is blocked during execution of the callback. * @note 2. This function is only compiled into the library if glib >= * 2.14 is installed. * @ingroup timeout * * Since 1.2.1 */ guint start_timeout_seconds(guint sec, const Callback::CallbackArg* cb, gint priority = G_PRIORITY_DEFAULT, GMainContext* context = 0); /** * Starts a timeout in the glib main loop using the higher granularity * glib timeout-seconds event sources, and executes the callback when * the timeout expires. This version provides for automatic timeout * disconnection when the object whose function the callback * represents is destroyed, via the Releaser object. It is * thread-safe (it may be called in any thread) provided that the glib * main loop has been made thread-safe by a call to g_thread_init(). * @param sec The interval of the timeout, in seconds. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param r A Releaser object which the protected object has as a * public member. * @param priority The priority to be given to the timeout in the * main loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main context to which the timeout is to be * attached (the default of NULL will cause the timeout to be attached * to the main program loop, and this is almost always what is * wanted). * @return The glib source id of the timeout. * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. If it * does so, the CallbackArg object will be disposed of. * @note 1. Cancellation of the thread to which the timeout is * attached is blocked during execution of the callback. * @note 2. This function is only compiled into the library if glib >= * 2.14 is installed. * @ingroup timeout * * Since 1.2.1 */ guint start_timeout_seconds(guint sec, const Callback::CallbackArg* cb, Releaser& r, gint priority = G_PRIORITY_DEFAULT, GMainContext* context = 0); } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/widget.cpp0000644000175000001440000000256111524110041017023 00000000000000/* Copyright (C) 2005 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include namespace Cgu { MainWidgetBase::MainWidgetBase(GtkWidget* widget_p): g_widget_p(widget_p) { g_object_ref_sink(G_OBJECT(g_widget_p)); } MainWidgetBase::~MainWidgetBase() { g_object_unref(G_OBJECT(g_widget_p)); } } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/prog-presenter/0000755000175000001440000000000011544574524020112 500000000000000efax-gtk-3.2.8/src/internal/c++-gtk-utils/prog-presenter/prog-presenter.xml0000644000175000001440000000023711466007653023527 00000000000000 efax-gtk-3.2.8/src/internal/c++-gtk-utils/prog-presenter/prog-presenter-bindings.h0000644000175000001440000000351511466007653024753 00000000000000/* Generated by dbus-binding-tool; do not edit! */ #include #include G_BEGIN_DECLS #ifndef _DBUS_GLIB_ASYNC_DATA_FREE #define _DBUS_GLIB_ASYNC_DATA_FREE static #ifdef G_HAVE_INLINE inline #endif void _dbus_glib_async_data_free (gpointer stuff) { g_slice_free (DBusGAsyncData, stuff); } #endif #ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_cgu_CguProgPresenterInterface #define DBUS_GLIB_CLIENT_WRAPPERS_org_cgu_CguProgPresenterInterface static #ifdef G_HAVE_INLINE inline #endif gboolean org_cgu_CguProgPresenterInterface_present (DBusGProxy *proxy, const char ** IN_arg0, GError **error) { return dbus_g_proxy_call (proxy, "Present", error, G_TYPE_STRV, IN_arg0, G_TYPE_INVALID, G_TYPE_INVALID); } typedef void (*org_cgu_CguProgPresenterInterface_present_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); static void org_cgu_CguProgPresenterInterface_present_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) { DBusGAsyncData *data = (DBusGAsyncData*) user_data; GError *error = NULL; dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); (*(org_cgu_CguProgPresenterInterface_present_reply)data->cb) (proxy, error, data->userdata); return; } static #ifdef G_HAVE_INLINE inline #endif DBusGProxyCall* org_cgu_CguProgPresenterInterface_present_async (DBusGProxy *proxy, const char ** IN_arg0, org_cgu_CguProgPresenterInterface_present_reply callback, gpointer userdata) { DBusGAsyncData *stuff; stuff = g_slice_new (DBusGAsyncData); stuff->cb = G_CALLBACK (callback); stuff->userdata = userdata; return dbus_g_proxy_begin_call (proxy, "Present", org_cgu_CguProgPresenterInterface_present_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_arg0, G_TYPE_INVALID); } #endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_cgu_CguProgPresenterInterface */ G_END_DECLS efax-gtk-3.2.8/src/internal/c++-gtk-utils/prog-presenter/make_bindings.sh0000755000175000001440000000053311466007653023161 00000000000000#!/bin/sh # these bindings are for the dbus-glib implementation of prog_present # gio's GDBus has the introspection data in the code itself dbus-binding-tool --mode=glib-server --output=prog-presenter-glue.h --prefix=cgu_prog_presenter prog-presenter.xml dbus-binding-tool --mode=glib-client --output=prog-presenter-bindings.h prog-presenter.xml efax-gtk-3.2.8/src/internal/c++-gtk-utils/prog-presenter/prog-presenter-glue.h0000644000175000001440000001273611466007653024117 00000000000000/* Generated by dbus-binding-tool; do not edit! */ #ifndef __dbus_glib_marshal_cgu_prog_presenter_MARSHAL_H__ #define __dbus_glib_marshal_cgu_prog_presenter_MARSHAL_H__ #include G_BEGIN_DECLS #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) #define g_marshal_value_peek_char(v) g_value_get_char (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) #define g_marshal_value_peek_long(v) g_value_get_long (v) #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) #define g_marshal_value_peek_enum(v) g_value_get_enum (v) #define g_marshal_value_peek_flags(v) g_value_get_flags (v) #define g_marshal_value_peek_float(v) g_value_get_float (v) #define g_marshal_value_peek_double(v) g_value_get_double (v) #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) #define g_marshal_value_peek_param(v) g_value_get_param (v) #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the * g_value_get_*() functions */ #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int #define g_marshal_value_peek_char(v) (v)->data[0].v_int #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint #define g_marshal_value_peek_int(v) (v)->data[0].v_int #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint #define g_marshal_value_peek_long(v) (v)->data[0].v_long #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong #define g_marshal_value_peek_float(v) (v)->data[0].v_float #define g_marshal_value_peek_double(v) (v)->data[0].v_double #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ /* BOOLEAN:BOXED,POINTER */ extern void dbus_glib_marshal_cgu_prog_presenter_BOOLEAN__BOXED_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); void dbus_glib_marshal_cgu_prog_presenter_BOOLEAN__BOXED_POINTER (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_POINTER) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2); register GMarshalFunc_BOOLEAN__BOXED_POINTER callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; gboolean v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_BOOLEAN__BOXED_POINTER) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_boxed (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), data2); g_value_set_boolean (return_value, v_return); } G_END_DECLS #endif /* __dbus_glib_marshal_cgu_prog_presenter_MARSHAL_H__ */ #include static const DBusGMethodInfo dbus_glib_cgu_prog_presenter_methods[] = { { (GCallback) cgu_prog_presenter_present, dbus_glib_marshal_cgu_prog_presenter_BOOLEAN__BOXED_POINTER, 0 }, }; const DBusGObjectInfo dbus_glib_cgu_prog_presenter_object_info = { 0, dbus_glib_cgu_prog_presenter_methods, 1, "org.cgu.CguProgPresenterInterface\0Present\0S\0arg0\0I\0as\0\0\0", "\0", "\0" }; efax-gtk-3.2.8/src/internal/c++-gtk-utils/mutex.h0000644000175000001440000013126411524110041016352 00000000000000/* Copyright (C) 2005 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_MUTEX_H #define CGU_MUTEX_H #include #include #include #include #include /** * @file mutex.h * @brief Provides wrapper classes for pthread mutexes and condition * variables, and scoped locking classes for exception safe mutex * locking. * @note If the system supports monotonic clocks (and this library is * not being cross-compiled onto a different architecture), then a * system monotonic clock will be used in * Cgu::Thread::Cond::timed_wait() and * Cgu::Thread::Cond::get_abs_time(). This can be tested at run time * with Cgu::Thread::Cond::have_monotonic_clock(). */ namespace Cgu { namespace Thread { struct CondError: public std::exception { virtual const char* what() const throw() {return "Thread::CondError";} }; /* * Since version 1.2.0, which automatically checks for monotonic * clocks in its configure script, this exception is no longer thrown. * We keep the class just for source compatibility purposes. */ #ifndef DOXYGEN_PARSING struct CondSetClockError: public std::exception { virtual const char* what() const throw() {return "Thread::CondSetClockError";} }; #endif struct MutexError: public std::exception { virtual const char* what() const throw() {return "Thread::MutexError";} }; struct RecMutexError: public std::exception { virtual const char* what() const throw() {return "Thread::RecMutexError";} }; class Cond; /** * @class Mutex mutex.h c++-gtk-utils/mutex.h * @brief A wrapper class for pthread mutexes. * @sa Thread::Thread Thread::Mutex::Lock Thread::Mutex::TrackLock Thread::Cond Thread::RecMutex * * This class can be used interchangeably with threads started with * GThread and by this library, as both glib and this library use * pthreads underneath on POSIX and other unix-like OSes. Unlike with * GMutex, there is no separate class for static mutexes. That is not * necessary, as these Mutex objects can be constructed statically as * well as dynamically and there is no need to call g_thread_init() * before they are constructed. (If created as a static object in * global scope, it will not be possible to catch Thread::MutexError * thrown by its constructor, but if a static global mutex throws * there is nothing that could be done anyway except abort, and it * would show that the pthreads installation is seriously defective.) */ class Mutex { pthread_mutex_t pthr_mutex; // mutexes cannot be copied Mutex(const Mutex&); Mutex& operator=(const Mutex&); public: class Lock; class TrackLock; friend class Cond; /** * Locks the mutex and acquires ownership. Blocks if already locked * until it becomes free. It is not a cancellation point. It does * not throw. It is thread safe. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EDEADLK, which it * would do if the default pthread mutex behaviour happens to return * that error rather than deadlock in the case of recursive locking. * Most default implementations do not do this and hence the return * value is usually not worth checking for except during debugging. */ int lock() {return pthread_mutex_lock(&pthr_mutex);} /** * Tries to lock the mutex and acquire ownership, but returns * immediately if it is already locked with value EBUSY. It is not a * cancellation point. It does not throw. It is thread safe. * @return 0 if successful, otherwise EBUSY. * @note With this library implementation, the only pthread error * number which could be returned by this method is EBUSY. */ int trylock() {return pthread_mutex_trylock(&pthr_mutex);} /** * Unlocks a locked mutex owned by the calling thread and relinquishes * ownership. It is not a cancellation point. It does not throw. It * must be called by the thread which owns the mutex. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EPERM because the * calling thread does not own the mutex (however POSIX does not * require that return value in that case and hence the return value * is usually not worth checking for except during debugging). */ int unlock() {return pthread_mutex_unlock(&pthr_mutex);} /** * Initialises the pthread mutex. It is not a cancellation point. * @exception Cgu::Thread::MutexError Throws this exception if * initialization of the mutex fails. (It is often not worth checking * for this, as it means either memory is exhausted or pthread has run * out of other resources to create new mutexes.) */ Mutex() {if (pthread_mutex_init(&pthr_mutex, 0)) throw MutexError();} /** * Destroys the pthread mutex. It is not a cancellation point. It * does not throw. */ ~Mutex() {pthread_mutex_destroy(&pthr_mutex);} #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT CGU_GLIB_MEMORY_SLICES_FUNCS #endif }; // used as a second argument to Lock::Lock() and TrackLock::TrackLock // in cases where the mutex has already been locked (say by Mutex::trylock()) enum Locked {locked}; // used as a second argument to TrackLock::TrackLock() in cases where // locking of the mutex is to be deferred enum DeferLock {defer}; /** * @class Mutex::Lock mutex.h c++-gtk-utils/mutex.h * @brief A scoped locking class for exception safe Mutex locking. * @sa Thread::Mutex Thread::Mutex::TrackLock Thread::Thread Thread::Cond */ class Mutex::Lock { Mutex& mutex; // locks cannot be copied Lock(const Mutex::Lock&); Mutex::Lock& operator=(const Mutex::Lock&); public: friend class Cond; /** * Calls Mutex::lock(), and so locks the mutex and reacquires * ownership. It blocks if the mutex is already locked until the * mutex becomes free. This method should normally only be called if * a previous call has been made to Mutex::Lock::unlock() (that is, * where the thread owning the Mutex::Lock object has temporarily * allowed another thread to take the mutex concerned). It is not a * cancellation point. It does not throw. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EDEADLK, which it * would do if the default pthread mutex behaviour happens to return * that error rather than deadlock in the case of recursive locking. * Most default implementations do not do this and hence the return * value is usually not worth checking for except during debugging. * @sa Mutex::TrackLock. */ int lock() {return mutex.lock();} /** * Calls Mutex::trylock(), and so tries to lock the mutex and * reacquire ownership, but returns immediately if it is already * locked with value EBUSY. This method should normally only be * called if a previous call has been made to Mutex::Lock::unlock() * (that is, where the thread owning the Mutex::Lock object has * temporarily allowed another thread to take the mutex concerned). * It is not a cancellation point. It does not throw. * @return 0 if successful, otherwise EBUSY. * @note With this library implementation, the only pthread error * number which could be returned by this method is EBUSY. * @sa Mutex::TrackLock. */ int trylock() {return mutex.trylock();} /** * Calls Mutex::unlock(), and so unlocks a locked mutex owned by the * calling thread and relinquishes ownership (so temporarily allowing * another thread to take the mutex). This method should normally * only be called if it is to be followed by a call to * Mutex::Lock::lock() or a successful call to Mutex::Lock::trylock() * before the Mutex::Lock object concerned goes out of scope * (otherwise Mutex::Lock's destructor will attempt to unlock an * already unlocked mutex or a mutex of which another thread has by * then taken ownership - Mutex::Lock objects do not maintain state). * See Mutex::TrackLock::unlock() for a safe version of this method. * It is not a cancellation point. It does not throw. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EPERM because the * calling thread does not own the mutex (however POSIX does not * require that return value in that case and hence the return value * is usually not worth checking for except during debugging). * @sa Mutex::TrackLock. */ int unlock() {return mutex.unlock();} /** * This constructor locks the mutex passed to it. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be locked. */ Lock(Mutex& mutex_): mutex(mutex_) {mutex.lock();} /** * This constructor takes an already locked mutex (say as a result of * Mutex::trylock()), and takes ownership of it. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be managed by this object. * @param tag Pass the Cgu::Thread::locked enum tag to this parameter. */ Lock(Mutex& mutex_, Locked tag): mutex(mutex_) {} /** * The destructor unlocks the owned mutex. It is not a cancellation * point. It does not throw. */ ~Lock() {mutex.unlock();} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class Mutex::TrackLock mutex.h c++-gtk-utils/mutex.h * @brief A scoped locking class for exception safe Mutex locking * which tracks the status of its mutex. * @sa Thread::Mutex Thread::Mutex::Lock Thread::Thread Thread::Cond * * This class is similar to a Mutex::Lock object, except that it * tracks whether the mutex it manages is locked by the thread * creating the Mutex::TrackLock object (provided that, while the * Mutex::TrackLock object exists, the thread creating it only * accesses the mutex through that object). This enables * Mutex::TrackLock::unlock() to be used without it being followed * later by a call to Mutex::TrackLock::lock() or a successful call to * Mutex::TrackLock::trylock(), and also permits locking to be * deferred until after construction of the lock object. Note that * only one thread may call the methods of any one Mutex::TrackLock * object, including causing its destructor to be invoked. */ class Mutex::TrackLock { Mutex& mutex; bool owner; // locks cannot be copied TrackLock(const Mutex::TrackLock&); Mutex::TrackLock& operator=(const Mutex::TrackLock&); public: friend class Cond; /** * Calls Mutex::lock(), and so locks the mutex and acquires ownership. * It blocks if the mutex is already locked until the mutex becomes * free. This method should normally only be called if a previous * call has been made to Mutex::TrackLock::unlock() or this * Mutex::TrackLock object has been constructed with the Thread::defer * enum tag. It is not a cancellation point. It does not throw. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EDEADLK, which it * would do if the default pthread mutex behaviour happens to return * that error rather than deadlock in the case of recursive locking. * Most default implementations do not do this and hence the return * value is usually not worth checking for except during debugging. * * Since 1.2.1 */ int lock() {int ret = mutex.lock(); if (!owner) owner = !ret; return ret;} /** * Calls Mutex::trylock(), and so tries to lock the mutex and acquire * ownership, but returns immediately if it is already locked with * value EBUSY. This method should normally only be called if a * previous call has been made to Mutex::TrackLock::unlock() or this * Mutex::TrackLock object has been constructed with the Thread::defer * enum tag. It is not a cancellation point. It does not throw. * @return 0 if successful, otherwise EBUSY. * @note With this library implementation, the only pthread error * number which could be returned by this method is EBUSY. * * Since 1.2.1 */ int trylock() {int ret = mutex.trylock(); if (!owner) owner = !ret; return ret;} /** * Calls Mutex::unlock(), and so unlocks a locked mutex owned by the * calling thread. It will cause is_owner() to return false unless a * subsequent call is made to lock() or a subsequent successful call * is made to trylock(). It is not a cancellation point. It does not * throw. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EPERM because the * calling thread does not own the mutex (however POSIX does not * require that return value in that case and hence the return value * is usually not worth checking for except during debugging). * * Since 1.2.1 */ int unlock() {int ret = mutex.unlock(); if (owner) owner = ret; return ret;} /** * Indicates whether the mutex managed by this Mutex::TrackLock object * is locked, and so owned, by it. * @return true if the mutex is locked by this object, otherwise * false. * * Since 1.2.1 */ bool is_owner() const {return owner;} /** * This constructor locks the mutex passed to it. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be locked. * * Since 1.2.1 */ TrackLock(Mutex& mutex_): mutex(mutex_), owner(true) {mutex.lock();} /** * This constructor takes an already locked mutex (say as a result of * Mutex::trylock()), and takes ownership of it. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be managed by this object. * @param tag Pass the Cgu::Thread::locked enum tag to this parameter. * * Since 1.2.1 */ TrackLock(Mutex& mutex_, Locked tag): mutex(mutex_), owner(true) {} /** * This constructor defers locking of the mutex (and so taking * ownership of it) until an explicit call to lock() or trylock() is * made. It is not a cancellation point. It does not throw. * @param mutex_ The mutex to be managed by this object. * @param tag Pass the Cgu::Thread::defer enum tag to this parameter. * * Since 1.2.1 */ TrackLock(Mutex& mutex_, DeferLock tag): mutex(mutex_), owner(false) {} /** * The destructor unlocks the managed mutex if it is locked. It is * not a cancellation point. It does not throw. * * Since 1.2.1 */ ~TrackLock() {if (owner) mutex.unlock();} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class Cond mutex.h c++-gtk-utils/mutex.h * @brief A wrapper class for pthread condition variables. * @sa Thread::Thread Thread::Mutex Thread::Mutex::Lock Thread::Mutex::TrackLock */ class Cond { pthread_cond_t cond; // Cond cannot be copied Cond(const Cond&); Cond& operator=(const Cond&); public: /** * Unblock at least one thread waiting on this condition variable. * Can be called by any thread. It is not a cancellation point. Does * not throw. * @return 0 if successful, otherwise the pthread error number. * @note With this library implementation, no pthread error should * arise so there is no need to check the return value. */ int signal() {return pthread_cond_signal(&cond);} /** * Unblocks all threads waiting on this condition variable, which * acquire the mutex in an order determined by the scheduling policy. * Can be called by any thread. It is not a cancellation point. Does * not throw. * @return 0 if successful, otherwise the pthread error number. * @note With this library implementation, no pthread error should * arise so there is no need to check the return value. */ int broadcast() {return pthread_cond_broadcast(&cond);} /** * Waits on this condition variable until unblocked or otherwise * awoken. It must be called by the thread which owns the mutex. * Re-acquires the mutex when awoken. It is a cancellation point. * This method is cancellation safe even if the stack does not unwind * on cancellation (but if the stack does not unwind some other way of * destroying this object on cancellation is required, such as by * having it allocated on freestore and deleted in a cancellation * clean-up handler). This method does not throw. * @param mutex The locked mutex associated with the wait which is * re-acquired on being awoken. * @return 0 if successful, otherwise the pthread error number. * @note 1. pthread condition variables can, as a matter of design, * awake spontaneously (and Cond::signal() may awaken more than one * thread). Therefore the relevant condition should be tested in a * while loop and not in an if block. * @note 2. With this library implementation, the only pthread error * numbers which could be returned are EINVAL (if the mutex argument * is not a valid mutex) or EPERM (if the thread calling this method * does not own the mutex). */ int wait(Mutex& mutex) {return pthread_cond_wait(&cond, &mutex.pthr_mutex);} /** * Does the same as Cond::wait(Mutex&), except that as a convenience * it will take a Mutex::Lock object handling the Mutex object as an * alternative to passing the Mutex object itself. */ int wait(Mutex::Lock& lock) {return wait(lock.mutex);} /** * Does the same as Cond::wait(Mutex&), except that as a convenience * it will take a Mutex::TrackLock object handling the Mutex object as * an alternative to passing the Mutex object itself. * * Since 1.2.1 */ int wait(Mutex::TrackLock& lock) {return wait(lock.mutex);} /** * Waits on this condition variable until unblocked or otherwise * awoken (in which case it re-acquires the mutex), or until the * timeout expires (in which case it re-acquires the mutex and returns * with ETIMEDOUT). It must be called by the thread which owns the * mutex. Re-acquires the mutex when awoken or timing out. It is a * cancellation point. This method is cancellation safe even if the * stack does not unwind on cancellation (but if the stack does not * unwind some other way of destroying this object on cancellation is * required, such as by having it allocated on freestore and deleted * in a cancellation clean-up handler). This method does not throw. * @param mutex The locked mutex associated with the wait which is * re-acquired on being awoken or timing out. * @param abs_time The time at which the wait will unblock if not * previously awoken. A suitable value can be obtained by calling * the get_abs_time() function. * @return 0 if successful, otherwise ETIMEDOUT or other pthread error * number. * @note 1. With this library implementation, apart from ETIMEDOUT, * the only pthread error numbers which could be returned are EINVAL * (if the mutex argument is not a valid mutex or the abs_time * argument does not comprise a valid timespec struct) or EPERM (if * the thread calling this method does not own the mutex). * @note 2. pthread condition variables can, as a matter of design, * awake spontaneously (and Cond::signal() may awaken more than one * thread). Therefore the relevant condition should be tested in a * while loop and not in an if block. * @note 3. If the system supports monotonic clocks (and this library * is not being cross-compiled onto a different architecture), then * condition variables will use a monotonic clock in * Cond::timed_wait() and Cond::get_abs_time(). This can be tested at * run time with Cond::have_monotonic_clock(). */ int timed_wait(Mutex& mutex, const timespec& abs_time) { return pthread_cond_timedwait(&cond, &mutex.pthr_mutex, &abs_time); } /** * Does the same as Cond::timed_wait(Mutex&, const timespec&), except * that as a convenience it will take a Mutex::Lock object handling * the Mutex object as an alternative to passing the Mutex object * itself. */ int timed_wait(Mutex::Lock& lock, const timespec& abs_time) {return timed_wait(lock.mutex, abs_time);} /** * Does the same as Cond::timed_wait(Mutex&, const timespec&), except * that as a convenience it will take a Mutex::TrackLock object * handling the Mutex object as an alternative to passing the Mutex * object itself. * * Since 1.2.1 */ int timed_wait(Mutex::TrackLock& lock, const timespec& abs_time) {return timed_wait(lock.mutex, abs_time);} /** * This is a utility function that inserts into a timespec structure * the current time plus a given number of milliseconds ahead, which * can be applied to a call to Cond::timed_wait(). It does not throw. * It is thread-safe. * @param ts A timespec object into which the result of current time + * millisec will be placed. * @param millisec The number of milliseconds ahead of current time to * which the timespec object will be set. * @note If the system supports monotonic clocks (and this library is * not being cross-compiled onto a different architecture), then * condition variables will use a system monotonic clock in this * method and Cond::timed_wait(). This can be tested at run time with * Cond::have_monotonic_clock(). */ static void get_abs_time(timespec& ts, unsigned int millisec); /** * Indicates whether the library has been compiled with support for * monotonic clocks in Cond::timed_wait(). Most recent linux and BSD * distributions will support them, and this function would normally * return true unless the library has been cross-compiled from one * platform to a different platform. This function can be tested at * program initialization, and if they are not supported a warning can * be given to the user about the deficiences of using the system * clock for timed events. It does not throw. It is thread safe. * @return true if the library has been compiled with support for * monotonic clocks in Cond::timed_wait(), otherwise false. * * Since 1.2.0 */ static bool have_monotonic_clock(); /** * Initialises the pthread condition variable. It is not a * cancellation point. * @exception Cgu::Thread::CondError Throws this exception if * initialization of the condition variable fails. (It is often not * worth checking for CondError, as it means either memory is * exhausted or pthread has run out of other resources to create new * condition variables.) * @note If the system supports monotonic clocks (and this library is * not being cross-compiled onto a different architecture), then * condition variables will use a system monotonic clock in * Cond::timed_wait() and Cond::get_abs_time(). This can be tested at * run time by calling Cond::have_monotonic_clock(). */ Cond(); /** * Destroys the pthread condition variable. It is not a cancellation * point. The destructor does not throw. */ ~Cond(void) {pthread_cond_destroy(&cond);} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class RecMutex mutex.h c++-gtk-utils/mutex.h * @brief A wrapper class for pthread mutexes which provides a * recursive mutex. * @sa Thread::Thread Thread::RecMutex::Lock Thread::RecMutex::TrackLock Thread::Mutex * * This class can be used interchangeably with threads started with * GThread and by this library, as both glib and this library use * pthreads underneath on POSIX and other unix-like OSes. There is no * separate class for static mutexes. That is not necessary, as these * RecMutex objects can be constructed statically as well as * dynamically and there is no need to call g_thread_init() before * they are constructed. (If created as a static object in global * scope, it will not be possible to catch Thread::MutexError or * Thread::RecMutexError thrown by its constructor, but if a static * global mutex throws there is nothing that could be done anyway * except abort.) * * See the comments below on the test_support() method of this class, * about how the system's support for native recursive mutexes can be * tested at runtime (from version 1.2.0) and when a user program is * compiled (from version 1.2.1). */ class RecMutex { pthread_mutex_t pthr_mutex; // mutexes cannot be copied RecMutex(const RecMutex&); RecMutex& operator=(const RecMutex&); public: class Lock; class TrackLock; /** * Locks the mutex and acquires ownership. Blocks if already locked * until it becomes free, unless the calling thread already holds the * lock, in which case it increments the lock count and returns * immediately. It is not a cancellation point. It does not throw. * It is thread safe. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EAGAIN, which it * would do if the maximum recursive lock count for this mutex has * been reached. Usually this number is at or around INT_MAX and * hence the return value is usually not worth checking for. */ int lock() {return pthread_mutex_lock(&pthr_mutex);} /** * Tries to lock the mutex and acquire ownership, but returns * immediately if it is already locked with value EBUSY unless the * calling thread already holds the lock, in which case it returns * normally and increments the lock count. It is not a cancellation * point. It does not throw. It is thread safe. * @return 0 if successful, otherwise EBUSY or other pthread mutex * error number. * @note With this library implementation, apart from EBUSY, the only * other pthread error number which could be returned by this method * is EAGAIN, which it would do if the maximum recursive lock count * for this mutex has been reached. Usually this number is at or * around INT_MAX and hence an EAGAIN error return value is usually * not worth checking for except during debugging. */ int trylock() {return pthread_mutex_trylock(&pthr_mutex);} /** * Unlocks a locked mutex owned by the calling thread and either * relinquishes ownership (if the mutex has not been recursively * locked) or decrements the lock count (if it has). It is not a * cancellation point. It does not throw. It must be called by the * thread which owns.the mutex. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EPERM because the * calling thread does not own the mutex (however POSIX does not * require that return value in that case and hence the return value * is usually not worth checking for except during debugging). */ int unlock() {return pthread_mutex_unlock(&pthr_mutex);} /** * Indicates whether the system supports recursive mutexes. This * method does not throw. It is thread safe. * @return 0 if the system supports recursive mutexes, -1 if it does * not support recursive mutexes and 1 if pthread has run out of * sufficient resources to test this at run time (in which case any * attempt to create mutexes or start threads is likely to fail). * Practically all recent linux and BSD distributions will support * them, and this function would normally return 0. If it does not, * it is still possible to use GStaticRecMutex objects (for which * purpose see Cgu::Thread::GrecmutexLock). * * @note This method exists as from version 1.2.0, but from version * 1.2.1, the header file defines the * symbol CGU_HAVE_RECURSIVE_MUTEX if native recursive mutexes were * found to be supported when this library was compiled. Programs * using this library can therefore test for that symbol with the * pre-processor for conditional compilation purposes from version * 1.2.1 onwards (so that the program can, for example, be compiled to * use GStaticRecMutex if that symbol is not defined). However, if * the library was cross-compiled from one architecture to another, * that symbol may not be defined even though the target architecture * does, in fact, support them at program runtime. In other words, if * CGU_HAVE_RECURSIVE_MUTEX is defined then this method will always * return 0; but in the event of cross-compilation of the library this * method (which provides a separate runtime test) might return 0, * correctly showing support, even when CGU_HAVE_RECURSIVE_MUTEX is * not defined. * * Since 1.2.0 */ static int test_support(); /** * Initialises the pthread mutex. It is not a cancellation point. * @exception Cgu::Thread::RecMutexError Throws this exception if the * system does not support recursive mutexes. (If this has been * checked beforehand, say by calling test_support(), there should be * no need to check for this exception.) * @exception Cgu::Thread::MutexError Throws this exception if * initialization of the mutex fails, except because the system does * not support recursive mutexes. (It is often not worth checking for * MutexError, as it means either memory is exhausted or pthread has * run out of other resources to create new mutexes.) */ RecMutex(); /** * Destroys the pthread mutex. It is not a cancellation point. It * does not throw. */ ~RecMutex() {pthread_mutex_destroy(&pthr_mutex);} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class RecMutex::Lock mutex.h c++-gtk-utils/mutex.h * @brief A scoped locking class for exception safe RecMutex locking. * @sa Thread::RecMutex Thread::RecMutex::TrackLock Thread::Thread */ class RecMutex::Lock { RecMutex& mutex; // locks cannot be copied Lock(const RecMutex::Lock&); RecMutex::Lock& operator=(const RecMutex::Lock&); public: /** * This calls RecMutex::lock(), and so locks the mutex and reacquires * ownership. It blocks if the mutex is already locked until the * mutex becomes free, unless the calling thread already holds the * lock, in which case it increments the lock count and returns * immediately. This method should normally only be called if a * previous call has been made to RecMutex::Lock::unlock() (that is, * where the thread owning the RecMutex::Lock object has temporarily * allowed another thread to take the mutex concerned if it is not * recursively locked). It is not a cancellation point. It does not * throw. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EAGAIN, which it * would do if the maximum recursive lock count for the particular * mutex in question has been reached. Usually this number is at or * around INT_MAX and hence the return value is usually not worth * checking for except during debugging. * @sa RecMutex::TrackLock. */ int lock() {return mutex.lock();} /** * This calls RecMutex::trylock(), and so tries to lock the mutex and * reacquire ownership, but returns immediately if it is already * locked with value EBUSY unless the calling thread already holds the * lock, in which case it returns normally and increments the lock * count. This method should normally only be called if a previous * call has been made to RecMutex::Lock::unlock() (that is, where the * thread owning the RecMutex::Lock object has temporarily allowed * another thread to take the mutex concerned if it is not recursively * locked). It is not a cancellation point. It does not throw. * @return 0 if successful, otherwise EBUSY or other pthread mutex * error number. * @note With this library implementation, apart from EBUSY, the only * other pthread error number which could be returned by this method * is EAGAIN, which it would do if the maximum recursive lock count * for the particular mutex in question has been reached. Usually * this number is at or around INT_MAX and hence an EAGAIN error * return value is usually not worth checking for except during * debugging. * @sa RecMutex::TrackLock. */ int trylock() {return mutex.trylock();} /** * This calls RecMutex::unlock() and so unlocks a locked mutex owned * by the calling thread, so temporarily allowing another thread to * take the mutex if the mutex has not been recursively locked, or if * it has been recursively locked decrements the lock count, so * temporarily relinquishing ownership. This method should normally * only be called if it is to be followed by a call to * RecMutex::Lock::lock() or a successful call to * RecMutex::Lock::trylock() before the RecMutex::Lock object * concerned goes out of scope (otherwise RecMutex::Lock's destructor * will attempt to decrement the lock count of a mutex which already * has a lock count of 0 or which another thread has by then taken * ownership or leave the lock count in an unbalanced condition - * RecMutex::Lock objects do not maintain state). See * RecMutex::TrackLock::unlock() for a safe version of this method. * It is not a cancellation point. It does not throw. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EPERM because the * calling thread does not own the particular mutex in question * (however POSIX does not require that return value in that case and * hence the return value is usually not worth checking for except * during debugging). * @sa RecMutex::TrackLock. */ int unlock() {return mutex.unlock();} /** * This constructor locks the mutex passed to it. See * RecMutex::lock() for a description of the outcomes. It is not a * cancellation point. * @param mutex_ The mutex to be locked. * @exception Cgu::Thread::RecMutexError Throws this exception if * initialization of the mutex fails because the maximum recursive * lock count for the particular mutex in question has been reached. * Usually this number is at or around INT_MAX so it is not usually * useful to check for it except during debugging. */ Lock(RecMutex& mutex_): mutex(mutex_) {if (mutex.lock()) throw RecMutexError();} /** * This constructor takes an already locked mutex (say as a result of * RecMutex::trylock()), and takes ownership of it. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be managed by this object. * @param tag Pass the Cgu::Thread::locked enum tag to this parameter. */ Lock(RecMutex& mutex_, Locked tag): mutex(mutex_) {} /** * The destructor unlocks the owned mutex. See RecMutex::unlock() for * a description of the outcomes. It is not a cancellation point. It * does not throw. */ ~Lock() {mutex.unlock();} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class RecMutex::TrackLock mutex.h c++-gtk-utils/mutex.h * @brief A scoped locking class for exception safe RecMutex locking * which tracks the status of its mutex. * @sa Thread::RecMutex Thread::RecMutex::Lock Thread::Thread * * This class is similar to a RecMutex::Lock object, except that it * tracks whether the mutex it manages is locked by the thread * creating the RecMutex::TrackLock object with respect to the * particular locking operation to be governed by the object (provided * that, while the RecMutex::TrackLock object exists, the thread * creating it only accesses the mutex with respect that particular * operation through that object). This enables * RecMutex::TrackLock::unlock() to be used without it being followed * later by a call to RecMutex::TrackLock::lock() or a successful call * to RecMutex::TrackLock::trylock(), and also permits locking to be * deferred until after construction of the lock object. Note that * only one thread may call the methods of any one RecMutex::TrackLock * object, including causing its destructor to be invoked. */ class RecMutex::TrackLock { RecMutex& mutex; bool owner; // locks cannot be copied TrackLock(const RecMutex::TrackLock&); RecMutex::TrackLock& operator=(const RecMutex::TrackLock&); public: /** * This calls RecMutex::lock(), and so locks the mutex and acquires * ownership. It blocks if the mutex is already locked until the * mutex becomes free, unless the calling thread already holds the * lock, in which case it increments the lock count and returns * immediately. This method should normally only be called if a * previous call has been made to RecMutex::TrackLock::unlock() or * this RecMutex::TrackLock object has been constructed with the * Thread::defer enum tag. It is not a cancellation point. It does * not throw. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EAGAIN, which it * would do if the maximum recursive lock count for the particular * mutex in question has been reached. Usually this number is at or * around INT_MAX and hence the return value is usually not worth * checking for except during debugging. * * Since 1.2.1 */ int lock() {int ret = mutex.lock(); if (!owner) owner = !ret; return ret;} /** * This calls RecMutex::trylock(), and so tries to lock the mutex and * acquire ownership, but returns immediately if it is already locked * with value EBUSY unless the calling thread already holds the lock, * in which case it returns normally and increments the lock count. * This method should normally only be called if a previous call has * been made to RecMutex::TrackLock::unlock() or this * RecMutex::TrackLock object has been constructed with the * Thread::defer enum tag. It is not a cancellation point. It does * not throw. * @return 0 if successful, otherwise EBUSY or other pthread mutex * error number. * @note With this library implementation, apart from EBUSY, the only * other pthread error number which could be returned by this method * is EAGAIN, which it would do if the maximum recursive lock count * for the particular mutex in question has been reached. Usually * this number is at or around INT_MAX and hence an EAGAIN error * return value is usually not worth checking for except during * debugging. * * Since 1.2.1 */ int trylock() {int ret = mutex.trylock(); if (!owner) owner = !ret; return ret;} /** * This calls RecMutex::unlock(), and so unlocks a locked mutex owned * by the calling thread, or decrements the lock count (if it has been * recursively locked). It will cause is_owner() to return false * unless a subsequent call is made to lock() or a subsequent * successful call is made to trylock(). It is not a cancellation * point. It does not throw. * @return 0 if successful, otherwise the pthread mutex error number. * @note With this library implementation, the only pthread error * number which could be returned by this method is EPERM because the * calling thread does not own the particular mutex in question * (however POSIX does not require that return value in that case and * hence the return value is usually not worth checking for except * during debugging). * * Since 1.2.1 */ int unlock() {int ret = mutex.unlock(); if (owner) owner = ret; return ret;} /** * Indicates whether the mutex managed by this Mutex::TrackLock object * is locked by it (whether originally or recursively) and so owned by * it. * @return true if the mutex is owned by this object, otherwise false. * * Since 1.2.1 */ bool is_owner() const {return owner;} /** * This constructor locks the mutex passed to it. See * RecMutex::lock() for a description of the outcomes. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be locked. * @exception Cgu::Thread::RecMutexError Throws this exception if * initialization of the mutex fails because the maximum recursive * lock count for the particular mutex in question has been reached. * Usually this number is at or around INT_MAX so it is not usually * useful to check for it except during debugging. * * Since 1.2.1 */ TrackLock(RecMutex& mutex_): mutex(mutex_), owner(true) {if (mutex.lock()) throw RecMutexError();} /** * This constructor takes an already locked mutex (say as a result of * RecMutex::trylock()), and takes ownership of it. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be managed by this object. * @param tag Pass the Cgu::Thread::locked enum tag to this parameter. * * Since 1.2.1 */ TrackLock(RecMutex& mutex_, Locked tag): mutex(mutex_), owner(true) {} /** * This constructor defers locking of the mutex (and so taking * ownership of it) until an explicit call to lock() or trylock() is * made. It is not a cancellation point. It does not throw. * @param mutex_ The mutex to be managed by this object. * @param tag Pass the Cgu::Thread::defer enum tag to this parameter. * * Since 1.2.1 */ TrackLock(RecMutex& mutex_, DeferLock tag): mutex(mutex_), owner(false) {} /** * The destructor unlocks the managed mutex if it is owned by this * RecMutex::TrackLock object. See RecMutex::unlock() for a * description of the outcomes if it is so owned. It is not a * cancellation point. It does not throw. * * Since 1.2.1 */ ~TrackLock() {if (owner) mutex.unlock();} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class GrecmutexLock mutex.h c++-gtk-utils/mutex.h * @brief A scoped locking class for exception safe locking of * GStaticRecMutex objects. * @details This class is mainly intended for use where the native * pthreads implementation does not support recursive mutexes so * Cgu::Thread::RecMutex and Cgu::Thread::RecMutex::Lock cannot be * used. */ class GrecmutexLock { GStaticRecMutex& mutex; GrecmutexLock(const GrecmutexLock&); GrecmutexLock& operator=(const GrecmutexLock&); public: /** * This method provides access to the GStaticRecMutex object locked by * this GrecmutexLock object. It does not throw. It is thread safe. * @return A pointer to the GStaticRecMutex object. * * Since 1.2.0 */ GStaticRecMutex* get() const {return &mutex;} /** * This constructor locks the mutex and acquires ownership, and blocks * if it is already locked until it becomes free, unless the * constructing thread already holds the lock, in which case it * increments the lock count and returns immediately. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be locked. * * Since 1.2.0 */ GrecmutexLock(GStaticRecMutex& mutex_): mutex(mutex_) {g_static_rec_mutex_lock(&mutex);} /** * This constructor takes an already locked mutex (say as a result of * g_static_rec_mutex_trylock()), and takes ownership of it. It is not a * cancellation point. It does not throw. * @param mutex_ The mutex to be managed by this object. * @param tag Pass the Cgu::Thread::locked enum tag to this parameter. * * Since 1.2.0 */ GrecmutexLock(GStaticRecMutex& mutex_, Locked tag): mutex(mutex_) {} /** * The destructor unlocks the owned mutex, and either relinquishes * ownership (if the mutex has not been recursively locked) or * decrements the lock count (if it has). It is not a cancellation * point. It does not throw. * * Since 1.2.0 */ ~GrecmutexLock() {g_static_rec_mutex_unlock(&mutex);} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; } // namespace Thread } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/gvar_handle.h0000644000175000001440000003201511536141256017473 00000000000000/* Copyright (C) 2010 and 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_GVAR_HANDLE_H #define CGU_GVAR_HANDLE_H #include // for std::less #include #if defined(DOXYGEN_PARSING) || GLIB_CHECK_VERSION(2,24,0) #include /** * @addtogroup handles handles and smart pointers */ namespace Cgu { /** * @class GvarHandle gvar_handle.h c++-gtk-utils/gvar_handle.h * @brief This is a handle for managing the reference count of * GVariant objects. * @ingroup handles * @sa GobjHandle * * This is a class which manages the reference count of GVariant * objects. It does not maintain its own reference count, but * interfaces with that kept by the GVariant object. It is available * since version 1.2.7. * * GVariant objects created with one of the g_variant_new*() functions * are created with a floating reference. The constructor of a * GvarHandle which takes a pointer will automatically take * ownership of such a newly created GVariant object, by calling * g_variant_ref_sink(). * * GVariant objects which are obtained by one of the g_variant_get*() * or similar getter functions, such as g_variant_get_child_value(), * g_variant_get_variant(), g_variant_get() with a "v" or "(v)" format * string, or g_variant_iter_next_value(), or as the return value of a * dbus method call in gio's dbus implementation such as * g_dbus_connection_call_sync(), g_dbus_connection_call_finish(), * g_dbus_proxy_call_sync() or g_dbus_proxy_call_finish(), are not * created with a floating reference (the variant normally already * exists), but instead the reference count is incremented by the * function concerned when the object is passed out to the user, so * giving ownership to the user. * * It follows that g_variant_ref_sink() is not called by the * constructor taking a pointer if the floating reference has already * been sunk. This behaviour will ensure that the handle behaves the * same whether it is passed a GVariant object from one of the * g_variant_new*() functions, or from one of the g_variant_get*() and * other getter functions mentioned above. One consequence is that if * the constructor taking a pointer is passed a pointer which has * already been passed to and is managed by another GvarHandle object, * the user must call g_variant_ref() herself explicitly: but GVariant * objects already owned by a GvarHandle should not normally be passed * to another GvarHandle that way, as GvarHandles have a copy * constructor and assignment operator which will increment the * reference count automatically. * * In other words, invoke the constructor taking a pointer only with a * newly created GVariant object, or with a GVariant object directly * handed out by a GVariant getter function or as the return value of * a gio dbus method call, and everything else will take care of * itself. In this respect, GvarHandles work the same way as * conventional shared pointer implementations managing objects * allocated on free store. The same applies to the reset() method. * * Because glib and gio themselves increment the reference count of a * GVariant object where they need to take ownership, an * already-managed object held by a GvarHandle can safely be passed by * pointer as the first argument of one of glib's g_variant_*() * functions or as an argument to one of gio's dbus functions, and * that is one of its intended usages. For that purpose, the pointer * can be obtained by means of the operatorT*() type conversion * operator (which returns the underlying pointer), or by explicitly * calling the get() method to obtain the underlying pointer. * * By automatically handling GVariant reference counts, GvarHandle * makes GVariant objects exception-safe, and they also permit * GVariant objects to be kept in standard C++ containers. * * GVariant objects are thread safe, including their reference counts. * This means that a GVariant object may be held by GvarHandles in * containers in different threads, and accessed concurrently in those * different threads. * * From version 1.2.12, the library provides ==, != and < comparison * operators for GvarHandles, but only if the library is compiled with * the --with-smart-ptr-comp option, or if the user code defines the * symbol CGU_USE_SMART_PTR_COMPARISON before gvar_handle.h is first * parsed. This is because, if user code has provided such operators * for these smart pointers itself, a duplicated function definition * would arise. * * Typical usage might be, for example, as follows: * * @code * // execute a method "TwoInts" taking two 'int' arguments and * // returning a string-array via g_dbus_proxy_call_sync() * gint32 a = 2; * gint32 b = 10; * Cgu::GvarHandle result(g_dbus_proxy_call_sync(proxy, * "TwoInts", * g_variant_new("(ii)", a, b), * G_DBUS_CALL_FLAGS_NONE, * -1, * 0, * 0)); * if (!result.get()) { * g_critical("Failed to execute method TwoInts"); * execute_error_strategy(); * } * else { * // gio's dbus implementation wraps all return * // values in a tuple: first extract the string-array * // from the tuple * Cgu::GvarHandle sa_variant(g_variant_get_child_value(result, 0)); * // free str_arr with g_strfreev() * gchar** str_arr = g_variant_dup_strv(sa_variant, 0); * } * @endcode * * Further examples of the use of GvarHandle, see @ref Variants * * @note This class is only available if glib >= 2.24.0 is installed. */ class GvarHandle { GVariant* obj_p; void unreference() { if (obj_p) g_variant_unref(obj_p); } void reference() { if (obj_p) g_variant_ref(obj_p); } public: /** * The constructor does not throw. g_variant_ref_sink() is called if * the managed object has a floating reference. * @param ptr The GVariant object which the GvarHandle is to manage * (if any). * @note The pointer passed, if not NULL, should not normally already * have been given to and so managed by any other GvarHandle object. * Use the copy constructor instead instead in that case. * * Since 1.2.7 */ explicit GvarHandle(GVariant* ptr = 0) { obj_p = ptr; // if an object with a floating reference has been passed to this constructor, // take ownership of it if (ptr && g_variant_is_floating(ptr)) { g_variant_ref_sink(ptr); } } /** * Causes the handle to cease to manage its managed object (if any) * and decrements its reference count, so destroying it if the * reference count thereby becomes 0. If the argument passed is not * NULL, the handle will manage the new GVariant object passed and * g_variant_ref_sink() is called if the new object has a floating * reference. This method does not throw. * @param ptr NULL (the default), or a new GVariant object to manage. * @note The pointer passed, if not NULL, should not normally already * have been given to and so managed by any other GvarHandle object. * Use the assignment operator instead in that case. * * Since 1.2.7 */ void reset(GVariant* ptr = 0) { unreference(); obj_p = ptr; // if an object with a floating reference has been passed to this method, // take ownership of it if (ptr && g_variant_is_floating(ptr)) { g_variant_ref_sink(ptr); } } /** * The copy constructor does not throw. It increments the reference * count of the managed object. * @param gvar The handle to be copied. * * Since 1.2.7 */ GvarHandle(const GvarHandle& gvar) { obj_p = gvar.obj_p; reference(); } /** * This method does not throw. It decrements the reference count of * the former managed object (if any), so destroying it if the * reference count thereby becomes 0, and increments the reference * count of the new managed GVariant object. * @param gvar The assignor. * @return The GvarHandle object after assignment. * * Since 1.2.7 */ GvarHandle& operator=(const GvarHandle& gvar) { // check whether we are already referencing this object - // if so make this a null op. This will also deal with // self-assignment if (obj_p != gvar.obj_p) { // first unreference any object referenced by this handle unreference(); // now inherit the GObject from the assigning handle // and reference it obj_p = gvar.obj_p; reference(); } return *this; } /** * This method does not throw. * @return A pointer to the handled GVariant object (or NULL if none * is handled). * * Since 1.2.7 */ GVariant* get() const {return obj_p;} /** * This method does not throw. * @return A pointer to the handled GVariant object (or NULL if none * is handled). * * Since 1.2.7 */ operator GVariant*() const {return obj_p;} /** * The destructor does not throw. It decrements the reference count * of the managed object (if any), so destroying it if the reference * count thereby becomes 0. * * Since 1.2.7 */ ~GvarHandle() {unreference();} }; #if defined(CGU_USE_SMART_PTR_COMPARISON) || defined(DOXYGEN_PARSING) // we can use built-in operator == when comparing pointers referencing // different objects of the same type /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before gvar_handle.h is first parsed. * * Since 1.2.12 */ inline bool operator==(const GvarHandle& h1, const GvarHandle& h2) { return (h1.get() == h2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before gvar_handle.h is first parsed. * * Since 1.2.12 */ inline bool operator!=(const GvarHandle& h1, const GvarHandle& h2) { return !(h1 == h2); } // we must use std::less rather than the < built-in operator for // pointers to objects not within the same array or object: "For // templates greater, less, greater_equal, and less_equal, the // specializations for any pointer type yield a total order, even if // the built-in operators <, >, <=, >= do not." (para 20.3.3/8). /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before gvar_handle.h is first parsed. * * Since 1.2.12 */ inline bool operator<(const GvarHandle& h1, const GvarHandle& h2) { return std::less()(h1.get(), h2.get()); } #endif // CGU_USE_SMART_PTR_COMPARISON } // namespace Cgu #else #warning GvarHandle not available: glib >= 2.24.0 is required #endif /*GLIB_CHECK_VERSION(2,24,0)*/ #endif /*CGU_GVAR_HANDLE_H*/ efax-gtk-3.2.8/src/internal/c++-gtk-utils/window.h0000644000175000001440000003336711544200716016537 00000000000000/* Copyright (C) 2005 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_WINDOW_H #define CGU_WINDOW_H #include #include /** * @class Cgu::WinBase window.h c++-gtk-utils/window.h * @brief This is a class for managing the lifetime of top level * widgets. * @sa MainWidgetBase Application * * This class provides a base class for lifetime management of top * level widgets which can make GTK+ exception safe. It would be * possible to use GTK+ to control the lifetime of the contained GTK+ * window object, through the delete event handler and the destroy * signal. However in the case of a blocking window (say a dialog) * this would result in an invalid object remaining in scope. It is * better to use the C++ lifetime handling mechanisms to control * object status, and this class does that. Where a window is created * as an auto (local) object it will be valid while it remains in * scope. For a window which is not blocking (on which exec() is not * called) and which is therefore created on free store the WinBase * class will delete its own memory when it is closed (see below about * the close() function). * * If a NULL pointer is passed as the last argument of its * constructor, a new window object will be created with * gtk_window_new(GTK_WINDOW_TOPLEVEL). However, alternatively a * pre-formed object deriving from GtkWindow (such as a GtkDialog or * GtkMessageDialog object) can be passed as that argument, in which * case the class will manage that object. * * A window will block with a call to exec(), which returns an int * value. The exec() method obtains its return value by calling the * virtual protected function get_exec_val(), which by default returns * 0 but can be overridden to return something more meaningful. If * something other than an int needs to be returned, it will be * necessary for a derived class to provide an extractor function to * obtain the data from the object after exec() has returned. * * A convenience virtual protected on_delete_event() method is * provided for any derived class which needs to respond to that * signal. It does not return a value (it does not cause a destroy * event to be emitted as in the case of a GTK+ delete event handler * returning false). * * If the class is constructed on free store and exec() has not been * called on it, it self-destroys and any memory allocated to it freed * by calling the protected close() function. If exec() has been * called for an object, a call to close() will only terminate the * window event loop (that is, cause exec() to unblock), which is * correct for an auto (local) object as it will destroy itself when * it goes out of scope. By default (that is, if not overridden by * any derived classes) on_delete_event() calls close(). * * No special memory management for GTK+ widgets contained in the * WinBase object (or in an object of a class derived from WinBase) is * needed. The GTK+ object system takes care of that, and they will * be released when the life of the WinBase object finishes. For this * reason, the WinBase class can be used to make GTK+ exception safe: * as its constructor does not throw, exceptions thrown in the * constructors of classes derived from it will be correctly dealt * with without causing GTK+ to leak memory if a widget is put into * its container in the derived class's constructor immediately after * creation on a "top down" basis, or it is placed in another widget * class derived from MainWidgetBase. * * If a C string is passed to the caption argument of the constructor, * then the window will display that text as its caption. A NULL * pointer can be passed if no caption is required. Likewise if a * pointer to a GdkPixbuf object is passed as the second parameter, it * will be used to set a window icon in the window bar (if the user's * window manager supports this). * * The constructor of WinBase does not call gtk_widget_show() because * the constructor of a derived class may want to do this which * requires the widget not to be visible. Accordingly the constructor * of the derived class (or the library user) should call * gtk_widget_show()/gtk_widget_show_all() via WinBase::get_win()). * * See @ref Threading for particulars about GTK+ thread safety (and so * WinBase thread safety). * * A small compilable example is as follows: * * @anchor WinBaseExampleAnchor * @code * #include * #include * * * // *** class headers *** * * extern "C" void message_button_clicked(GtkWidget*, void*); * * class Message: public Cgu::WinBase { * public: * friend void message_button_clicked(GtkWidget*, void*); * Message(const char* text); * }; * * * // *** class implementation *** * * void message_button_clicked(GtkWidget*, void* data) { * static_cast(data)->close(); * } * * Message::Message(const char* text): Cgu::WinBase("Message", 0, true) { * GtkWidget* box = gtk_vbox_new(false, 2); * gtk_container_add(GTK_CONTAINER(get_win()), box); * GtkWidget* label = gtk_label_new(text); * gtk_box_pack_start(GTK_BOX(box), label, * true, false, 0); * GtkWidget* button_box = gtk_hbutton_box_new(); * gtk_box_pack_start(GTK_BOX(box), button_box, * false, false, 0); * GtkWidget* button = gtk_button_new_from_stock(GTK_STOCK_OK); * gtk_container_add(GTK_CONTAINER(button_box), button); * g_signal_connect(G_OBJECT(button), "clicked", * G_CALLBACK(message_button_clicked), this); * gtk_widget_set_can_default(button, true); * * gtk_widget_show_all(GTK_WIDGET(get_win())); * } * * * // *** user code *** * * int main(int argc, char* argv[]) { * gtk_init(&argc, &argv); * Message dialog("This is a message"); * dialog.exec(); * return 0; * } * @endcode * * See @ref Linkage for further discussion of the * message_button_clicked() callback. * * @note The WinBase class will work fine if a GtkDialog object is * passed to the last argument of the class's constructor formed from * a call to gtk_dialog_new()/gtk_dialog_new_with_buttons(), but a few * points should be noted: * * @note 1. If the response signal has been connected to, a delete * event will cause a response signal to be emitted with the * GTK_RESPONSE_DELETE_EVENT id, as well as causing the normal * WinBase::on_delete_event() method to be called. If the response * handler acts on the GTK_RESPONSE_DELETE_EVENT id by calling * close(), then WinBase::on_delete_event() should be overridden to do * nothing so that a double call to close() is not made (although * version 1.0.3 onwards of c++-gtk-utils will check against and * prevent such a double call of close() from a single delete event). * * @note 2. It is usually best not to call gtk_dialog_run(). Instead, * call WinBase::exec() for a blocking dialog, and override * WinBase::get_exec_val() to return any required button response id. * * @note 3. If creating a GtkDialog object with * gtk_dialog_new_with_buttons(), do not pass a GtkDialogFlags * argument of GTK_DIALOG_DESTROY_WITH_PARENT. A GtkDialogFlags * argument of GTK_DIALOG_MODAL can be passed, but alternatively to * make the dialog modal the user can pass 'true' as the modal * argument of the WinBase constructor and pass the parent widget to * that constructor rather than to gtk_dialog_new_with_buttons() (so * that GtkDialogFlags(0) is passed as the third argument of * gtk_dialog_new_with_buttons()). Either approach will work, but the * second has the advantage of consistency with the WinBase interface. * * @note 4. Likewise, if using gtk_dialog_new_with_buttons(), any * dialog caption can be passed either to the title argument of that * method or to the caption argument of the WinBase constructor. * * @note Similar principles apply to the management of objects derived from * GtkDialog. */ namespace Cgu { #if GTK_CHECK_VERSION(2,99,0) class Application; #endif class WinBase { // main class object GtkWindow* g_window_p; bool in_exec_loop; bool is_modal; bool close_guard; // we only use this struct to retain binary compatibility with // 1.2 series versions before 1.2.12 (we have changed the parent_p // pointer to the impl pointer). struct Impl { GtkWindow* parent_p; #if GTK_CHECK_VERSION(2,99,0) Application* app_p; #endif }; Impl* impl; #if GTK_CHECK_VERSION(2,99,0) // only Cgu::Application can access these void set_application(Application* app) {impl->app_p = app;} void unset_application() {impl->app_p = 0;} #endif // WinBase cannot be copied WinBase(const WinBase&); WinBase& operator=(const WinBase&); protected: /** * A convenience function for the use of derived classes which will * cause the window to unblock if exec() has been called. If it is * not a blocking window (ie exec() has not been called so it has * been constructed on freestore), the window will delete itself. * By default it is called by on_delete_event(). This method will * not throw (unless a derived class's destructor throws, which it * should not do). */ void close(); /** * Provides the value to be returned by exec(). This method will * not throw (unless it is overridden by a derived class's method * which throws). * @return By default returns 0. It is intended to be overridden by * derived classes where relevant to provide a more meaningful * value. */ virtual int get_exec_val() const; /** * Called when there is a delete event on the managed window. * Unless overridden by derived classes it just calls close(). */ virtual void on_delete_event(); public: #if GTK_CHECK_VERSION(2,99,0) friend class Application; #endif #ifndef DOXYGEN_PARSING // this helper class avoids exposing GObject callbacks with C // linkage to the global namespace class CB; friend class CB; #endif /** * Returns the GtkWindow object managed by this class. This method * will not throw. * @return The managed GtkWindow object. */ GtkWindow* get_win() const {return g_window_p;} /** * Makes the window block. Calls gtk_main(). It is usually a bad * idea to call this method (and so have nested loops) on a * non-modal dialog. This method will not throw. * @return The value returned by get_exec_val() * @note If this library is compiled against GTK+3 and the WinBase * object has been added to a Cgu::Application object, then this * method returns immediately with a value of -1. */ int exec(); /** * A convenience function which calls * gtk_widget_show_all(GTK_WIDGET(get_win())). For classes which * are intended to be derived from, it may be undesirable to call * gtk_widget_show_all() in the class's constructor (a derived class * may add widgets of its own in a way which requires the base * class's widgets not to be realized). In such a case, calling * gtk_widget_show_all() should be left to the user code. This is a * function which makes that less verbose. * * Since 1.2.5 */ void show_all() {gtk_widget_show_all(GTK_WIDGET(get_win()));} /** * The constructor will not throw. * @param caption Window caption (optional). * @param icon A pixbuf which will comprise the window icon (optional). * @param modal Whether the window is to be modal. If this argument * is false, the user may want to consider calling * gtk_window_set_type_hint() if the window is a dialog before it * becomes visible. * @param parent The parent of a modal dialog or NULL (this argument * is only relevant and acted on where the modal argument is true). * The parent will be made insensitive while the modal dialog is in * existence, and automatically made sensitive again when the modal * dialog is finished with. gtk_window_set_transient_for() is also * called, which means that the dialog will normally be kept on top * of its parent and/or centered over it by the window manager. If * the user does not want the parent to appear as insensitive, pass * NULL to this argument and call gtk_window_set_transient_for() in * the derived class's constructor. * @param window A preformed GtkWindow object (such as a GtkDialog * object), or NULL. If NULL, gtk_window_new(GTK_WINDOW_TOPLEVEL) * will be called. */ WinBase(const char* caption = 0, GdkPixbuf* icon = 0, bool modal = false, GtkWindow* parent = 0, GtkWindow* window = 0); /** * The destructor will not throw assuming (in a case where the * Cgu::WinBase object has been added to a Cgu::Application object) * that merely iterating through a list does not throw (as it would * not on any sane implementation). */ virtual ~WinBase(); #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT CGU_GLIB_MEMORY_SLICES_FUNCS #endif }; } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/reassembler.cpp0000644000175000001440000000560311524110041020044 00000000000000/* Copyright (C) 2005 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include namespace Cgu { namespace Utf8 { char* Reassembler::join_buffer(const char* str, size_t size) { char* out = new char[stored + size + 1]; std::memcpy(out, buffer, stored); std::memcpy(out + stored, str, size); *(out + stored + size) = 0; stored = 0; return out ; } SharedHandle Reassembler::operator() (const char* input_p, size_t size) { // we can add a little more efficiency (and robustness) by checking // if the input string is valid in itself - if it is then nothing // should be stored in the buffer (or if it is, it must be from a // different writer on a multi-writer pipe which isn't properly // protected by mutexes for atomic writes, so checking this now helps) if (g_utf8_validate(input_p, size, 0)) { char* out = new char[size + 1]; std::memcpy(out, input_p, size); *(out + size) = 0; return SharedHandle(out); } // we may have the previous read of a partial UTF-8 character to deal with SharedHandle return_val; size_t new_size = stored + size; char* assembled = join_buffer(input_p, size); char* end_p; if (g_utf8_validate(assembled, new_size, const_cast(&end_p))) { // we do not need to reset the value of stored: join_buffer() has done that return_val = SharedHandle(assembled); } else { size_t valid_size = end_p - assembled; stored = new_size - valid_size; if (stored <= buff_size) { std::memcpy(buffer, end_p, stored); *end_p = 0; // terminate the string at the end of the valid part return_val = SharedHandle(assembled); } else { stored = 0; // the input string was not valid UTF-8 delete[] assembled; } } return return_val; } } // namespace Utf8 } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/notifier.h0000644000175000001440000003601311524110041017023 00000000000000/* Copyright (C) 2005 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_NOTIFIER_H #define CGU_NOTIFIER_H /** * @file notifier.h * @brief This file provides a Notifier class to provide thread-safe * signalling between a worker thread and the main program thread. * * For further details read this: Notifier. */ #include #include #include #include #include #include namespace Cgu { /** * @class Notifier notifier.h c++-gtk-utils/notifier.h * @brief Provides thread-safe signalling between a worker thread and * the main program thread. * @sa Callback namespace Callback::post() * @sa EmitterArg SafeEmitterArg Releaser * * The Notifier class provides thread-safe signalling between two * threads. It does this through a pipe, to which an GSource (iowatch) * object is attached to connect it to the Glib program event loop. A * functor is connected to the notifier, which is called in the * receiving thread via the program event loop when operator()() (or * emit()) is called on the Notifier object by the signalling thread. * It therefore behaves like a SafeEmitter object, except that * connected functors execute in the Glib program event loop thread * rather than in the thread which calls operator()()/emit(). * * It is an alternative to the Callback::post() in callback.h, and the * documentation on callback.h contains a description of relevant * trade-offs between the two. * * If the signalling thread is the same thread as that in which the * functor connected to it will execute (which is the thread in which * the the main Glib program event loop executes), executing it via * the pipe would risk a deadlock - if the pipe fills up, the thread * would block on write and never be able to read from the pipe to * empty it. Accordingly, if the object is invoked by the same thread * as that in which the functor will execute, this is detected and the * functor will be invoked directly, rather than via the pipe. * Therefore, actions so invoked may be out of order with those * invoked by the other threads. * * If a Releaser object is passed as the second argument of * Notifier::connect(), then a connected functor will automatically be * disconnected if the object which has the Releaser object as a * member is destroyed. * * The main use of Notifier objects is for a worker thread to signal * an event to the main thread in which GTK+ is executing, which * implies that GTK+ should also be executing in the default Glib * program event loop (GMainContext) (as will almost always be the * case), which is the one with which the program first starts. * Before a Notifier object is first used, it is a requirement that * Notifier::init() (a static member function) be called in the thread * in which the default main Glib event loop executes, and any * connected slots will execute in that thread. Notifier::init() only * needs to be called once at program start-up - it doesn't need to be * called separately for each Notifier object, and can be called * before any Notifier objects have been constructed. If it has not * been called before the construction of the first Notifier object * has taken place, it will occur automatically on that first * construction. That means that if the first Notifier object is not * constructed in the main (event loop) thread of the program, then * Notifier::init() must be called explicitly before that first object * is constructed. Before Notifier::init() is called (or the first * Notifier object created) g_thread_init(0) should have been called: * as a result a Notifier object cannot be a global (non-local) static * object. It is a good idea also that Notifier::init() should have * been called (or the first Notifier object constructed) before the * main program thread creates any new threads. Then the state of * initialisation effected by Notifier::init() will automatically be * visible between threads. * * When executing a functor connected to a Notifier object, a check is * made for a case where between the signalling thread invoking a * Notifier object and the main program event loop calling that * functor, the Notifier object ceases to exist. However there can * still be a race condition if the lifetime of the Notifier object is * determined outside the thread of execution of the main program * event loop and a Notifier object is destroyed by that other thread * between the time the check is made and the functor executed. * Normally Notifier objects are constructed and destroyed in the main * program thread, but where that is not the case the user will need * to take this into account and if need be provide appropriate * synchronisation to secure the lifetime of the Notifier object until * after the functor has been called. Likewise, a Releaser object * cannot offer protection if the remote object whose non-static * method is represented by a connected functor is destroyed by * another thread while the main program loop is in the middle of * executing the functor. When the main loop begins invoking the * execution of the callback, the remote object must either wholly * exist (in which case the callback will be invoked) or have been * destroyed (in which case the callback will be ignored), and not be * in some transient half-state governed by another thread. * * Apart from that, the Notifier object is thread-safe and any of its * methods may be invoked in any thread. (It is as thread-safe as a * SafeEmitter object, as described in emitter.h, which contains * further details on thread safety.) * * To pass variable data to a functor executed by the Notifier object, * the AsyncQueue class can be employed. */ /* For a program with two GMainContext program event loops (not a usual case), it would be possible for a Notifier-like object to be initialised in the non-default GMainContext thread, and execute in that thread, by passing that other GMainContext object as the last argument when calling start_iowatch() in Notifier::Notifier(). However, to conserve file descriptors all Notifier objects share a common pipe and iowatch event watch, which implies that all Notifier objects would also need to execute in that other thread. To get around this it would be possible either to templatize Notifier with tag types for different GMainContexts (so that there would be a different static pipe/iowatch object for each GMainContext), or to have thread-local storage for each of the static objects in the Notifier class, but an easier solution for one-off cases would be to have a version of Notifier which does not use static (shared) PipeFifo and iowatch objects, at the expense of greater use of file descriptor resources. Such a special Notifier object could also be used to signal from a Unix (asynchronous) signal/interrupt handler, but in that case the write file descriptor of the pipe should be set non-blocking to prevent the very unlikely but theoretically possible case (in a program executing in a system under extreme load) of the pipe filling up before being emptied by the Notifier::read_pipe_cb() callback function executing in the main program and so blocking in the handler, thus deadlocking the program. */ namespace Thread { class Mutex; } class Notifier; class Notifier { static bool initialised; static pthread_t thread_id; // pointers can be keys of associative containers: "For templates // greater, less, greater_equal, and less_equal, the specializations // for any pointer type yield a total order, even if the built-in // operators <, >, <=, >= do not." (para 20.3.3/8). static std::set object_set; static PipeFifo pipe; static Thread::Mutex* set_mutex_p; static Thread::Mutex* write_mutex_p; static void read_pipe_cb(bool&); SafeEmitter emitter; // Notifier objects cannot be copied Notifier(const Notifier&); Notifier& operator=(const Notifier&); public: /** * A utility which tells the caller whether it is in the thread in * which the callback will execute (the main program thread). It will * not throw. It is thread safe. * @return true if the caller is in the thread in which the callback * will execute, otherwise false. */ // don't make this a static member function - it can then only be called // by object notation after a Notifier object has first been constructed, // which means Notifier::init() must have been called bool in_main_thread() {return pthread_equal(thread_id, pthread_self());} /** * This will cause the connected functors to be executed in the main * program thread. It is thread safe (but see the comments in the * introductory remarks above about race conditions where the lifetime * of a Notifier object is determined by a thread other than the main * program thread, and about protection by a Releaser object where a * connected remote object is destroyed in mid-emission by another * thread). * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case, and this * method is called in the thread in which the functors will execute * (the main program thread). In addition, it will throw if the * function or class methods represented by the functors throw (or if * the assignment operator of a bound argument throws) and the call is * made in that thread. If called in a different thread it will not * throw (an exception thrown by a connected functor will be caught * and reported in the iowatch dispatcher). */ void emit(); /** * This will cause the connected functors to be executed in the main * program thread. It is thread safe (but see the comments in the * introductory remarks above about race conditions where the lifetime * of a Notifier object is determined by a thread other than the main * program thread, and about protection by a Releaser object where a * connected remote object is destroyed in mid-emission by another * thread). * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case, and this * method is called in the thread in which the functors will execute * (the main program thread). In addition, it will throw if the * function or class methods represented by the functors throw (or if * the assignment operator of a bound argument throws) and the call is * made in that thread. If called in a different thread it will not * throw (an exception thrown by a connected functor will be caught * and reported in the iowatch dispatcher). */ void operator()() {emit();} /** * Connects a functor. It is thread safe. * @param f The functor to connect. * @return The functor connected. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. */ Callback::SafeFunctor connect(const Callback::SafeFunctor& f); /** * Connects a functor. It is thread safe. * @param f The functor to connect. * @param r A Releaser object for automatic disconnection of the * functor if the object whose method it represents is destroyed. * @return The functor connected. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. */ Callback::SafeFunctor connect(const Callback::SafeFunctor& f, Releaser& r); /** * Disconnects a functor previously connected. This does not throw * provided that the destructors of any bound arguments do not throw. * It is thread safe. * @param f The functor to disconnect. */ void disconnect(const Callback::SafeFunctor& f); /** * Blocks a connected functor from executing in the main program * thread when emit() or operator()() is called until unblock() is * called. This method does not throw. It is thread safe. * @param f The functor to block. * @note This has effect immediately: it will block a pending emission * for which emit() or operator()() has previously been called but * which has not yet been tested for execution in the main loop. */ void block(const Callback::SafeFunctor& f); /** * Unblocks a previously blocked functor. This method does not throw. * It is thread safe. * @param f The functor to unblock. * @note This has effect immediately: it will unblock a pending * emission for which emit() or operator()() has previously been * called but which has not yet been tested for execution in the main * loop. */ void unblock(const Callback::SafeFunctor& f); /** * Initialises the program for the use of Notifier objects. It only * needs to be called once at program start-up (it doesn't need to be * called separately for each Notifier object), and can be called * before any Notifier objects have been constructed. It should be * called in the thread in which the default main Glib event loop * executes (the main program thread) before that thread creates any * new threads. * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * @exception PipeError PipeError will be thrown if the static pipe * used by Notifier objects cannot be initialised. */ static void init(); /** * The constructor is thread safe provided init() has previously been * called before the main program thread creates any new threads. * @exception std::bad_alloc The constructor might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. * @exception PipeError PipeError can be thrown if this is the first * Notifier object to be constructed and Notifier::init() has not * previously been called. */ Notifier(); /** * The destructor does not throw provided the destructors of any bound * arguments do not throw. It is thread safe (but see the comments in * the introductory remarks above about race conditions where the * lifetime of a Notifier object is determined by a thread other than * the main program thread). */ ~Notifier(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/notifier.cpp0000644000175000001440000001366111524110041017362 00000000000000/* Copyright (C) 2005, 2006 and 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include #include #include bool Cgu::Notifier::initialised = false; pthread_t Cgu::Notifier::thread_id; std::set Cgu::Notifier::object_set; Cgu::PipeFifo Cgu::Notifier::pipe; Cgu::Thread::Mutex* Cgu::Notifier::set_mutex_p; Cgu::Thread::Mutex* Cgu::Notifier::write_mutex_p; namespace Cgu { void Notifier::init() { if (!initialised) { // slots will execute in this thread (the one in which this function // is called) - save the thread id so that we can detect if this object // is invoked through operator()() or emit() by the same thread and avoid // using the pipe thread_id = pthread_self(); pipe.open(PipeFifo::block); // these are global objects which should be initialised at program start-up // and last throughout program execution, so if an allocation fails just let // the program terminate - there is no need to do any catches to avoid // memory leaks set_mutex_p = new Thread::Mutex; write_mutex_p = new Thread::Mutex; start_iowatch(pipe.get_read_fd(), Callback::make(&Notifier::read_pipe_cb), G_IO_IN); initialised = true; } } Notifier::Notifier() { init(); // we need to place the address of this object in the object set. The object // set is used in Notifier::read_pipe_cb() to detect a case where between // Notifier::emit() being called on an object in one thread and the slot // executing (in the slot thread) in that object after propagation through // the pipe, the Notifier object ceases to exist Thread::Mutex::Lock lock(*set_mutex_p); object_set.insert(this); } Notifier::~Notifier() { Thread::Mutex::Lock lock(*set_mutex_p); object_set.erase(this); } Callback::SafeFunctor Notifier::connect(const Callback::SafeFunctor& cb) { return emitter.connect(cb); } Callback::SafeFunctor Notifier::connect(const Callback::SafeFunctor& cb, Releaser& r) { return emitter.connect(cb, r); } void Notifier::disconnect(const Callback::SafeFunctor& cb) { emitter.disconnect(cb); } void Notifier::block(const Callback::SafeFunctor& cb) { emitter.block(cb); } void Notifier::unblock(const Callback::SafeFunctor& cb) { emitter.unblock(cb); } void Notifier::emit() { // if the same thread is signalling as is connected to the slot, call the // functor directly rather than pass it through the pipe if (in_main_thread()) { emitter(); } else { // make sure the write is atomic between threads Thread::Mutex::Lock lock(*write_mutex_p); void* instance_p = this; pipe.write(reinterpret_cast(&instance_p), sizeof(void*)); } } void Notifier::read_pipe_cb(bool&) { void* instance_p; int remaining = sizeof(void*); ssize_t result; char* temp_p = reinterpret_cast(&instance_p); do { result = Notifier::pipe.read(temp_p, remaining); if (result > 0) { temp_p += result; remaining -= result; } } while (remaining // more to come && result // not end of file && result != -1); // no error if (result > 0) { if (instance_p == 0) g_critical("Null pointer passed in Notifier::read_pipe_cb()\n"); else { Notifier* notifier_p = static_cast(instance_p); // check that the Notifier object concerned still exists { // scope block for mutex lock Thread::Mutex::Lock lock(*set_mutex_p); if (object_set.find(notifier_p) == object_set.end()) return; } // we do not want to hold the set mutex lock here as we have no idea what is // in the slot connected to this signal and we could be creating deadlocks. // Therefore despite the use of a std::set object to check validity of this // Notifier object, there is still a potential race condition here if the // lifetime of this object is controlled by a thread other than the one in // which the main program event loop runs (the object's lifetime could end // between the set mutex lock being released above and Notifier::emit() // completing below). Notifier objects are normally constructed and destroyed // in the same thread as that in which the main program event loop runs, but // where that is not the case users should use their own synchronisation methods // for lifetime determination. // If a connected callback throws, this will not propagate beyond the iowatch // dispatcher because that has a C linkage specification. It will be caught // and reported there notifier_p->emitter(); } } else { // end of file or error on pipe // throwing an exception will not work as they must be caught and reported in // the iowatch dispatcher because that has a C linkage specification - so just // report the error here g_critical("IO error in Notifier::read_pipe_cb()\n"); } } } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/gobj_handle.h0000644000175000001440000005522211536141256017462 00000000000000/* Copyright (C) 2005 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_GOBJ_HANDLE_H #define CGU_GOBJ_HANDLE_H #include #include // for std::less #include #include /** * @addtogroup handles handles and smart pointers */ namespace Cgu { /** * @class GobjHandle gobj_handle.h c++-gtk-utils/gobj_handle.h * @brief This is a handle for managing the reference count of * GObjects. * @ingroup handles * @sa MainWidgetBase GobjWeakHandle * * This is a class which manages the reference count of GObjects. It * does not maintain its own reference count, but interfaces with that * kept by the glib object system. * * GobjHandles are most useful to manage GObjects which are not also * GtkWidgets or GInitiallyUnowned objects - GtkWidgets and * GInitiallyUnowned objects have initial floating references which * will result in them being automatically managed by the container in * which they are held. Nonetheless, GobjHandles can be used to hold * GtkWidgets and GInitiallyUnowned objects, as the constructor of a * GobjHandle which takes a pointer will automatically take ownership * of a newly created GtkWidget or GInitiallyUnowned object, by * calling g_object_ref_sink(). Plain GObjects do not need to be sunk * to be owned by the GobjHandle. * * Note that g_object_ref_sink() is not called by the constructor * taking a pointer if the floating reference has already been sunk, * so if that constructor is passed an object already owned by a GTK+ * container it will be necessary to call g_object_ref() on it * explicitly. This behaviour will ensure that the handle behaves the * same whether it is holding a plain GObject, or it is holding a * GInitiallyUnowned/GtkWidget object. Generally however, where an * object is already owned by a container, the object should be passed * by another handle - ie by the copy constructor (or by the * assignment operator), as those always increment the reference count * automatically. * * In other words, invoke the constructor taking a pointer only with a * newly created object (whether a GObject, GInitiallyUnowned or * GtkWidget object), and everything else will take care of itself. In * this respect, GobjHandles work the same way as conventional shared * pointer implementations managing objects allocated on free store. * The same applies to the reset() method. Because any GTK+ * containers themselves increment the reference count of a GObject or * GtkWidget where they need to take ownership, an already-managed * object held by a GobjHandle can safely be passed by pointer to a * GTK+ container, and that is one of the intended usages. * * For that purpose, although the class has operator*() and * operator->() dereferencing operators, and so has normal smart * pointer functionality, as it is intended for use with the normal C * GObject/pango/GTK+ interfaces, ordinary use would involve passing * the handle to a function taking a pointer by means of the * operatorT*() type conversion operator (which returns the underlying * pointer), or by explicitly calling the get() method to obtain the * underlying pointer. * * The principal intended usage of GobjHandle is to automatically * handle GObject reference counts and therefore to make GObjects * exception-safe, but they also permit GObjects/GtkWidgets to be kept * in standard C++ containers. * * As of glib-2.8, g_object_ref() and g_object_unref() are thread * safe, so with glib-2.8 or greater there can be different GobjHandle * instances in different threads referencing the same GObject object. * Of course, if that is done, this does not affect the need (or * otherwise) in the particular use in question to lock anything other * than the reference count - say when accessing the referenced object * itself in different threads. * * From version 1.2.12, the library provides ==, != and < comparison * operators for GobjHandles, but only if the library is compiled with * the --with-smart-ptr-comp option, or if the user code defines the * symbol CGU_USE_SMART_PTR_COMPARISON before gobj_handle.h is first * parsed. This is because, if user code has provided such operators * for these smart pointers itself, a duplicated function definition * would arise. * * Typical usage might be, for example, as follows: * * @code * using namespace Cgu; * GobjHandle store(gtk_list_store_new(1, G_TYPE_STRING)); * * [ ... fill the list store ... ] * * GobjHandle view(gtk_tree_view_new_with_model(GTK_TREE_MODEL(store.get())); * // 'view' will take sole ownership of the list store when 'store' goes out of scope, or * // 'store' could be kept alive so that the list store will survive removal from the view * * [ ... set up an interface including a GtkVBox 'vbox' which will hold the tree view ... ] * * gtk_container_add(GTK_CONTAINER(vbox), view); * // 'vbox' will take sole ownership of the tree view when 'view' goes out of scope, or * // 'view' could be kept alive so that the tree view will survive removal from the vbox * @endcode */ template class GobjHandle { T* obj_p; void unreference() { if (obj_p) g_object_unref(G_OBJECT(obj_p)); } void reference() { if (obj_p) g_object_ref(G_OBJECT(obj_p)); } public: /** * The constructor does not throw. g_object_ref_sink() is called if * the managed object has a floating reference. * @param ptr The object which the GobjHandle is to manage (if any). * @note The object passed should not normally be already owned by a * GTK+ container or managed by any other GobjHandle object. If it * is, g_object_ref() must be called explicitly by the user code. */ explicit GobjHandle(T* ptr = 0) { obj_p = ptr; // if an object with a floating reference has been passed to this constructor, // take ownership of it if (ptr && g_object_is_floating(G_OBJECT(ptr))) { g_object_ref_sink(G_OBJECT(ptr)); } } /** * Causes the handle to cease to manage its managed object (if any) * and decrements its reference count, so destroying it if the * reference count thereby becomes 0. If the argument passed is not * NULL, the handle will manage the new object passed and * g_object_ref_sink() is called if the new object has a floating * reference. This method does not throw. * @param ptr NULL (the default), or a new object to manage. * @note The new object passed should not normally be already owned * by a GTK+ container or managed by any other GobjHandle object. If * it is, g_object_ref() must be called explicitly by the user code. */ void reset(T* ptr = 0) { unreference(); obj_p = ptr; // if an object with a floating reference has been passed to this method, // take ownership of it if (ptr && g_object_is_floating(G_OBJECT(ptr))) { g_object_ref_sink(G_OBJECT(ptr)); } } /** * The copy constructor does not throw. It increments the reference * count of the managed object. * @param gobj The handle to be copied. */ GobjHandle(const GobjHandle& gobj) { obj_p = gobj.obj_p; reference(); } // We don't have a constructor for GobjHandle taking a GobjWeakHandle // object. If we did that, we would have to remove the GobjWeakHandle // constructor taking a pointer so we know that its tracked object // always has an owner when initialising a new GobjHandle with the // GobjWeakHandle, so we can in turn know we can increase the reference // count when initialising the GobjHandle. However, removing that // constructor would be inconsistent with one of the purposes of having // a GobjWeakHandle class. For the same reason, we don't have an // assignment operator for GobjHandle taking such an object. /** * This method does not throw. It decrements the reference count of * the former managed object (if any), so destroying it if the * reference count thereby becomes 0, and increments the reference * count of the new managed object. * @param gobj The assignor. * @return The GobjHandle object after assignment. */ GobjHandle& operator=(const GobjHandle& gobj) { // check whether we are already referencing this object - // if so make this a null op. This will also deal with // self-assignment if (obj_p != gobj.obj_p) { // first unreference any object referenced by this handle unreference(); // now inherit the GObject from the assigning handle // and reference it obj_p = gobj.obj_p; reference(); } return *this; } /** * This method does not throw. * @return A pointer to the handled GObject (or NULL if none is * handled). */ T* get() const {return obj_p;} /** * This method does not throw. * @return A reference to the handled GObject. */ T& operator*() const {return *obj_p;} /** * This method does not throw. * @return A pointer to the handled GObject (or NULL if none is * handled). */ T* operator->() const {return obj_p;} /** * This method does not throw. * @return A pointer to the handled GObject (or NULL if none is * handled). */ operator T*() const {return obj_p;} /** * The destructor does not throw. It decrements the reference count * of the managed object (if any), so destroying it if the reference * count thereby becomes 0. */ ~GobjHandle() {unreference();} }; /** * @class GobjWeakHandle gobj_handle.h c++-gtk-utils/gobj_handle.h * @brief This is a handle for managing weak references to GObjects. * @ingroup handles * @sa GobjHandle * * This class tracks a GObject, so that if that GObject no longer * exists then operator bool() or the expired() method will return * false, but does not take a strong reference by incrementing the * reference count to the GObject and so take ownership of it. It has * two main use areas: first, in order to break reference cycles that * may otherwise arise if two classes would otherwise hold strong * references to each other. Secondly, to manage a pointer to a * GObject returned by a GTK+ getter function where ownership is not * passed (that is, where the user is not expected to call * g_object_unref() when finished with the return value). A typical * example of this is the GtkTreeSelection object returned by * gtk_tree_view_get_selection(). The GtkTreeSelection object is part * of the GtkTreeView's implemention and will become invalid as soon * as the GtkTreeView object is finalized. * * As in the case of the GobjHandle class, although this class has * operator*() and operator->() dereferencing operators, and so has * normal smart pointer functionality, as it is intended for use with * the normal C GObject/pango/GTK+ interfaces, ordinary use would * involve passing the handle to a function taking a pointer by means * of the operatorT*() type conversion operator (which returns the * underlying pointer), or by explicitly calling the get() method to * obtain the underlying pointer. * * Typical usage is as follows: * * @code * using namespace Cgu; * GobjWeakHandle s(gtk_tree_view_get_selection(tree_view)); * gtk_tree_selection_set_mode(s, GTK_SELECTION_SINGLE); * ... * * [some code blocks later] * if (s) { // check that the GtkTreeSelection object still exists. * GtkTreeIter iter; * GtkTreeModel* model = 0; * gtk_tree_selection_get_selected(s, &model, &iter); * ... * } * else [report error]; * @endcode * * Or instead of an 'if' block, GobjWeakHandleError could be caught: * * @code * using namespace Cgu; * GobjWeakHandle s(gtk_tree_view_get_selection(tree_view)); * gtk_tree_selection_set_mode(s, GTK_SELECTION_SINGLE); * ... * * [some code blocks later] * GtkTreeIter iter; * GtkTreeModel* model = 0; * try { * gtk_tree_selection_get_selected(s, &model, &iter); * ... * } * catch (GobjWeakHandleError&) {[report error]} * @endcode * * @b Thread-safe @b use * * This class wraps * g_object_add_weak_pointer()/g_object_remove_weak_pointer(), and as * those GObject functions have practical limitations concerning * thread-safe use, this class has the same practical limitations. As * shown above, typical usage for a weak pointer 's' would be 'if (s) * do_it(s)', but if the thread calling that sequence (thread A) were * not the thread controlling the lifetime of the referenced GObject * (thread B), then thread B may have destroyed the GObject between * thread A testing 's' and then calling the referenced object. The * same applies to the test leading to GobjWeakHandleError being * thrown. * * In other words, in the GtkTreeSelection code example above, if the * thread calling gtk_tree_selection_get_selected() were not the main * GUI thread (which would anyway require the use of * gdk_threads_enter()/gdk_threads_leave()), then the calling thread * must ensure that the main GUI thread does not destroy the relevant * tree view, and so the GtkTreeSelection object, from the beginning * of the 'if' test to the end of the 'if' block, or for the duration * of the try block. (This cannot be done just by incrementing the * reference count of the tree view or the tree selection in the * calling thread before the 'if' test or the try block is entered, * because by the time the reference is incremented and the weak * pointer tested, the tree view and tree selection may already be in * their dispose functions but the tree selection's dispose function * may not yet have reached the point of dispatching the callback * NULLing the weak pointer. As a general design issue, it is usually * best only to call GTK+ functions in one thread, and in order to * make that straightforward, this library contains a number of * classes and functions for inter-thread communication.) */ struct GobjWeakHandleError: public std::exception { virtual const char* what() const throw() {return "GobjWeakHandleError\n";} }; template class GobjWeakHandle { T* obj_p; public: /** * This constructor does not throw. * @param ptr The object which the GobjWeakHandle is to track (if any). * * Since 1.2.1 */ explicit GobjWeakHandle(T* ptr = 0) { obj_p = ptr; if (ptr) g_object_add_weak_pointer(G_OBJECT(ptr), (void**)&obj_p); } /** * Causes the handle to cease to track its tracked object (if any). * If the argument passed is not NULL, the handle will track the new * object passed. This method does not throw. * @param ptr NULL (the default), or a new object to track. * * Since 1.2.1 */ void reset(T* ptr = 0) { if (obj_p) g_object_remove_weak_pointer(G_OBJECT(obj_p), (void**)&obj_p); obj_p = ptr; if (ptr) g_object_add_weak_pointer(G_OBJECT(ptr), (void**)&obj_p); } /** * The copy constructor does not throw. It constructs a new weak * pointer tracking the same GObject as that tracked by the existing * weak pointer. * @param gobj The handle to be copied. * * Since 1.2.1 */ GobjWeakHandle(const GobjWeakHandle& gobj) { obj_p = gobj.obj_p; if (obj_p) g_object_add_weak_pointer(G_OBJECT(obj_p), (void**)&obj_p); } /** * This constructor constructs a weak pointer for a GObject managed * by a GobjHandle handle. It does not throw. * @param gobj The GobjHandle managing the GObject which the * GobjWeakHandle is to track. * * Since 1.2.1 */ GobjWeakHandle(const GobjHandle& gobj) { obj_p = gobj.get(); if (obj_p) g_object_add_weak_pointer(G_OBJECT(obj_p), (void**)&obj_p); } /** * This method does not throw. It causes the handle to cease to * track its tracked object (if any), and begin tracking the same * GObject as that tracked by the assignor. This method does not * throw. * @param gobj The assignor. * @return The GobjWeakHandle object after assignment. * * Since 1.2.1 */ GobjWeakHandle& operator=(const GobjWeakHandle& gobj) { // self assignment takes care of itself reset(gobj.obj_p); return *this; } /** * This method does not throw. It causes the handle to cease to * track its tracked object (if any), and begin tracking the GObject * managed by the GobjHandle argument. This method does not throw. * @param gobj The assignor GobjHandle. * @return The GobjWeakHandle object after assignment. * * Since 1.2.1 */ GobjWeakHandle& operator=(const GobjHandle& gobj) { reset(gobj.get()); return *this; } /** * This method does not throw. * @return True if the tracked GObject still exists, or false if it * does not or no GObject is being tracked. * @note The expired() method is a synonym for this method. * * Since 1.2.1 */ operator bool() const {return obj_p;} /** * This method does not throw. * @return True if the tracked GObject still exists, or false if it * does not or no GObject is being tracked. * @note operator bool() is a synonym for this method. * * Since 1.2.1 */ bool expired() const {return obj_p;} /** * This method does not throw. * @return A pointer to the tracked GObject. * @exception GobjWeakHandleError This method will throw * GobjWeakHandleError if the tracked object no longer exists or none * is being tracked. There is no need to check for this exception if * the status of the tracked object has been established with * operator bool() or expired(). * * Since 1.2.1 */ T* get() const {if (!obj_p) throw GobjWeakHandleError(); return obj_p;} /** * This method does not throw. * @return A reference to the tracked GObject. * @exception GobjWeakHandleError This method will throw * GobjWeakHandleError if the tracked object no longer exists or none * is being tracked. There is no need to check for this exception if * the status of the tracked object has been established with * operator bool() or expired(). * * Since 1.2.1 */ T& operator*() const {if (!obj_p) throw GobjWeakHandleError(); return *obj_p;} /** * This method does not throw. * @return A pointer to the tracked GObject. * @exception GobjWeakHandleError This method will throw * GobjWeakHandleError if the tracked object no longer exists or none * is being tracked. There is no need to check for this exception if * the status of the tracked object has been established with * operator bool() or expired(). * * Since 1.2.1 */ T* operator->() const {if (!obj_p) throw GobjWeakHandleError(); return obj_p;} /** * This method does not throw. * @return A pointer to the tracked GObject. * @exception GobjWeakHandleError This method will throw * GobjWeakHandleError if the tracked object no longer exists or none * is being tracked. There is no need to check for this exception if * the status of the tracked object has been established with * operator bool() or expired(). * * Since 1.2.1 */ operator T*() const {if (!obj_p) throw GobjWeakHandleError(); return obj_p;} /** * The destructor does not throw. * * Since 1.2.1 */ ~GobjWeakHandle() {if (obj_p) g_object_remove_weak_pointer(G_OBJECT(obj_p), (void**)&obj_p);} }; #if defined(CGU_USE_SMART_PTR_COMPARISON) || defined(DOXYGEN_PARSING) // we can use built-in operator == when comparing pointers referencing // different objects of the same type /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before gobj_handle.h is first parsed. * * Since 1.2.12 */ template bool operator==(const GobjHandle& h1, const GobjHandle& h2) { return (h1.get() == h2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before gobj_handle.h is first parsed. * * Since 1.2.12 */ template bool operator!=(const GobjHandle& h1, const GobjHandle& h2) { return !(h1 == h2); } // we must use std::less rather than the < built-in operator for // pointers to objects not within the same array or object: "For // templates greater, less, greater_equal, and less_equal, the // specializations for any pointer type yield a total order, even if // the built-in operators <, >, <=, >= do not." (para 20.3.3/8). /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before gobj_handle.h is first parsed. * * Since 1.2.12 */ template bool operator<(const GobjHandle& h1, const GobjHandle& h2) { return std::less()(h1.get(), h2.get()); } #endif // CGU_USE_SMART_PTR_COMPARISON } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/emitter.h0000644000175000001440000025755711544200716016712 00000000000000/* Copyright (C) 2009 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_EMITTER_H #define CGU_EMITTER_H /** * @file emitter.h * @brief This file provides a thread-safe signal/slot mechanism, with * automatic disconnection. * * An EmitterArg object is a list of Callback::FunctorArg objects. * Callback::FunctorArg objects may be "connected" to the EmitterArg * object, and all functors so connected will be executed when the * operator()() or emit() member functions of the EmitterArg object * concerned is called. They will be called in the order in which * they were connected. Emitter is a typedef for EmitterArg\. * The generalised EmitterArg\ type contains * Callback::FunctorArg\ objects (type T being the unbound * argument of a Callback::CallbackArg\ callback or the type * container of unbound types - see Cgu::Callback for further * details, and "Usage" below for examples.) The Emitter type holds * Callback::Functor (namely Callback::FunctorArg\) objects. * * The main advantage of an emitter object as opposed to storing a * functor object directly, apart from the fact that more than one * functor can be dispatched by a single call to EmitterArg<>::emit() * or EmitterArg<>::operator()(), is that it provides for automatic * disconnection of a functor if the object whose member function it * represents has ceased to exist. * * Where automatic disconnection is wanted, the object whose method is * to be encapsulated by a functor must have a Releaser object as a * public member function. The Releaser object should be passed as * the second argument of EmitterArg<>::connect(). As well as a * Releaser object informing an emitter object when it has ceased to * exist, an emitter object will do the same to the Releaser object if * the emitter object happens to be destroyed before an object whose * members it references (and therefore before the Releaser object). * Automatic disconnection is mainly useful for non-static member * functions, but it can be employed for static member functions if * wanted (that will in effect bind the lifetime of the functor to * that of the object to whose Releaser the functor has been * attached.) * * It is safe for a connected function (i) to delete the EmitterArg * object to which it is connected, even if there are other functors * still to execute in the same emission (which will execute normally * provided they do not try to call any of the emitter's functions), * (ii) to call 'delete this' nothwithstanding that the connected * function is protected by a Releaser object (assuming all the other * restraints on calling 'delete this' are met), provided that no * other access would be made to the deleted object in a function call * connected to the same emitter which is due to execute subsequently * in the same emission, and (iii) to disconnect itself from the * EmitterArg object. This design approach has a trade-off: if a * connected function tries to block, unblock or disconnect another * function connected to the same EmitterArg object which is due to * execute subsequently in the same emission (or to block, unblock or * disconnect itself when it is due to execute again subsequently in * the same emission), the attempted block, unblock or disconnection * will not have any effect on that emission (it will only have effect * on a subsequent emission). In addition, a connected function may * not destroy an object whose non-static method is connected to the * same emitter and which would execute subsequently in the same * emission, even if that object is protected by a Releaser object * (the non-static method will unsuccessfully attempt to execute * notwithstanding the destruction of the object it would be operating * on). * * The SafeEmitterArg classes are the same as their EmitterArg * counterparts except that they contain Callback::SafeFunctorArg * objects, and their emit(), operator()(), connect(), disconnect(), * block(), unblock() and destructor methods are protected by a mutex * so that different threads can call these methods on the same * emitter object, or create and delete the object. * * Note that the mutexes are released when the operator()() methods of * the relevent Callback::SafeFunctorArg objects are called, as * SafeEmitterArg objects have no idea what the referenced callbacks * will do so if they were not released deadlocks could arise from * recursive or out-of-order locking of the SafeEmitterArg mutex. It * is therefore for users to provide additional synchronisation if the * functions encapsulated by the relevant functors themselves need * additional protection. Note also the subsidiary thread-safety * points mentioned below. * * The Releaser class is intrinsically thread safe (the overhead of * locking is so low that it is pointless having a separate * unprotected class). This means that if a program is * multi-threaded, you can use the plain EmitterArg classes provided * that only the thread which creates a particular EmitterArg object * calls connect(), block(), unblock((), emit() or operator()() on it, * or deletes it, or calls disconnect() on it (either directly or * through a Releaser object being destroyed). Where more than one * thread might do that in relation to any one emitter object, use * SafeEmitterArg. * * @b Alternatives * * These classes are intended as a lightweight thread-safe signal/slot * mechanism for GUI programming. For more demanding usage libsigc++ * is a good choice, except that it is not thread-safe. An * alternative to libsigc++ is the boost::signal2 module, which is * thread-safe. * * @b Subsidiary @b thread-safety @b points * * As mentioned, the SafeEmitterArg classes are thread safe, and their * methods can be called in different threads without ill effect. * However, there are some things that cannot be done. Users should * observe two points. * * First, it has been mentioned that if a connected function blocks, * unblocks or disconnects another function connected to the same * emitter object and due to execute subsequently in the same * emission, the blocking, unblocking or disconnection will not have * effect in that emission, and that a connected function may not * delete an object whose non-static method is due to execute * subsequently in the same emission. The same outcome would result * if another thread tries to do any of these things while an emission * is under way. Another thread should therefore leave alone objects * connected to a SafeEmitterArg object from the time of operator()() * or emit() beginning to the time of it ending, and not try to * interfere. * * Secondly, when a Releaser object is passed as the second argument * to the connect() method of a SafeEmitterArg object, the Releaser * object must remain in existence until the connect() method returns * or the emitter may be left in an inconsistent state. * * @anchor AssignmentAnchor * @b Assignment * * EmitterArg and SafeEmitterArg objects cannot be copied. Releaser * objects can be (we do not want to make a class uncopiable just * because it has the safety feature of having a Releaser object as a * member). * * So how should assignment of a Releaser object and of a class which * has a Releaser as a member be handled? An object which has a * Releaser as a member and which is being assigned to (the assignee) * could keep all its existing pre-assignment emitter connections - so * far as the Releaser object is concerned, it will have to do so * where the connections are not protected by the Releaser object, and * we could do the same in relation to protected connections, in which * case we would make operator=() of Releaser do nothing: that is, * just return - a default assignment would always be wrong as it * would take the assignor's Releaser state but inherit none of its * connections, which the assignee cannot inherit as they depend on a * remote emitter object or objects. * * However, the state of the assignee after assignment may not be such * as to permit the inheriting of all the assignor's state except its * connections. Accordingly, the default strategy adopted here is for * the Releaser object to become a blank sheet on assignment. After * assignment, an assignee which has a Releaser object as a member * will no longer have any of the emitter connections which were, * prior to assignment, protected by the Releaser object. If in a * particular case the user does not want this behaviour, she should * provide an assignment operator in the class which has Releaser as a * member and leave Releaser alone in the assignment operator. * * @b Usage * * For a class my_obj of type MyObj, with a method void * MyObj::my_method(int, const char*), usage for a fully bound functor * and emitter would be: * * @code * using namespace Cgu; * int arg = 1; * Emitter e; * e.connect(Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n")); * e(); * * SafeEmitter se; * se.connect(Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n")); * se(); * @endcode * * Or for a partially bound functor and emitter: * * @code * using namespace Cgu; * int arg = 1; * EmitterArg e; * e.connect(Callback::make(my_obj, &MyObj::my_method, arg)); * e("Hello\n"); * * SafeEmitterArg se; * se.connect(Callback::make(my_obj, &MyObj::my_method, arg)); * se("Hello\n"); * @endcode * * To provide for two or three unbound arguments, from version 1.2.10 * of the library the Cgu::TypeTuple struct is used (this struct has * no members and is never instantiated, so it does not impose any * overhead: see @ref TypeTuple for further information). As in the * case of a single unbound argument, if there are bound arguments * these multiple unbound arguments must be the last (trailing) * arguments of the function to be called. For a class object my_obj * of type MyObj, with a method void MyObj::my_method2(int, int, int, * const char*), usage with two unbound arguments would be: * * @code * int arg1 = 1, arg2 = 2, arg3 = 3; * Cgu::EmitterArg > e; * e.connect(Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1, arg2)); * e(arg3, "Hello\n"); * @endcode * * and for three unbound arguments: * * @code * int arg1 = 1, arg2 = 2, arg3 = 3; * Cgu::EmitterArg > e; * e.connect(Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1)); * e(arg2, arg3, "Hello\n"); * @endcode * * EmitterArg classes do not provide for a return value. If a * result is wanted, users should pass an unbound argument by * reference or pointer (or pointer to pointer). * * Although only two bound and three unbound arguments are provided * for, as any of those arguments can be a struct, any number of * arguments can be passed as members of a struct (or, in C++0x, a * std::tuple). * * @b Exception @b safety * * Apart from the emit()/operator()() and connect() methods, nothing * done to an EmitterArg object should cause an exception to be * thrown. This is because other methods only iterate through a * std::list object using std::for_each(), std::find() or by hand, and * the only things done by std::for_each() or after a std::find() or * iteration is to remove a functor from the list (copying a functor * and comparing functors never throw, nor does destroying a functor * provided the destructors of any bound argument type do not throw). * Thus, an EmitterArg/SafeEmitterArg and Releaser object should never * get into an inconsistent state. * * The connect() method could throw a std::bad_alloc exception, either * on creating new functors or on pushing the functors onto the list. * However, were it to do so, the method has strong exception safety * (assuming merely iterating over a list does not throw, as it should * not). * * The emit()/operator()() methods could throw std::bad_alloc, and so * far as that is concerned emission of all the connected functions * will either all succeed or all fail. In addition, the connected * functions referenced by the functors held by the emitter might * throw when executed. emit()/operator()() do not attempt to catch * these exceptions as there is nothing they could do with them. This * means that although a throwing connected function will not leave * the EmitterArg/SafeEmitterArg object in an inconsistent state, any * other connected functions due to execute subsequently on that same * emission will not execute. If that is important in any particular * case, the user must incorporate logic in the connected functions to * cater for an exception causing only part execution, or must connect * only one function to any one signal and "chain" emissions by hand * so as to do the right thing. */ /* Mutex locking heirarchy: Some out-of-order locking must take place because of the relationship between the Releaser and SafeEmitterArg<> classes. The mutex of Releaser is given the higher priority. This means that a plain EmitterArg<> object will not take any hit from the fact that Releaser is also useable with SafeEmitterArg<> objects. One consequence is that to avoid deadlocks, it is the SafeEmitterArg<> functions which must yield when a deadlock would otherwise arise. Yielding could occur in SafeEmitterArg<>::~SafeEmitterArg() and SafeEmitterArg<>::disconnect(). */ #ifdef CGU_USE_SCHED_YIELD #include #else #include #endif #include #include #include #include #include #include #include namespace Cgu { /* The four basic emitter types */ template class EmitterArg; template class SafeEmitterArg; typedef EmitterArg Emitter; typedef SafeEmitterArg SafeEmitter; /** * @class Releaser emitter.h c++-gtk-utils/emitter.h * @brief A class used for tracking EmitterArg and SafeEmitterArg * connections. * @sa EmitterArg SafeEmitterArg * @sa emitter.h * @sa Callback namespace * * This class provides tracking of EmitterArg and SafeEmitterArg * connections. It should be a public member of any target class * which wants functors representing any of its methods to be * disconnected automatically from an EmitterArg or SafeEmitterArg * object when the target class object is destroyed, and is passed as * one of the arguments to the connect() method of EmitterArg or * SafeEmitterArg. * * All its methods are thread-safe. * * For further background, read this: emitter.h */ class Releaser { // TODO: In the 2.0 series we use std::unordered_set instead of // std::list in Releaser. At a suitable binary break I think it // would be useful to convert to std::set in this 1.2 series. We // can't do that for EmitterArg/SafeEmitterArg objects, as they need // to execute connected functors in the order in which they were // connected. std::list disconnect_list; Thread::Mutex mutex; // only an EmitterArg or SafeEmitterArg object can access add(), remove and try_remove() void add(const Callback::SafeFunctor&); void remove(Callback::SafeFunctor); void try_remove(Callback::SafeFunctor, int*); public: template friend class EmitterArg; template friend class SafeEmitterArg; // operator=() and the copy constructor should copy nothing from the // assignor, because disconnect_list should be empty in the // sssignee, as any class containing us does not acquire as assignee // any emitter functors representing any of its methods /** * See notes on @ref AssignmentAnchor "assignment" to see how this * operates. This does not throw provided that the destructors of any * bound arguments of a functor managed by this Releaser object prior * to assignment do not throw (as they should not do), and assuming * that merely iterating through a list does not throw (as it would * not on any sane implementation). * @param r The assignee. */ Releaser& operator=(const Releaser& r); /** * This does not copy anything from the Releaser object passed as an * argument - see the notes on @ref AssignmentAnchor "assignment" for * an explanation of why. This does not throw. * @param r A Releaser object. * @exception std::bad_alloc This constructor might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. * @exception Thread::MutexError This constructor might throw * Thread::MutexError if initialisation of the contained mutex fails. * (It is often not worth checking for this, as it means either memory * is exhausted or pthread has run out of other resources to create * new mutexes.) */ Releaser(const Releaser& r) {} /** * @exception std::bad_alloc The default constructor might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. * @exception Thread::MutexError The default constructor might throw * Thread::MutexError if initialisation of the contained mutex fails. * (It is often not worth checking for this, as it means either memory * is exhausted or pthread has run out of other resources to create * new mutexes.) */ Releaser() {} /** * The destructor does not throw provided that the destructors of any * bound arguments of a functor managed by this Releaser object do not * throw (as they should not do), and assuming that merely iterating * through a list does not throw (as it would not on any sane * implementation). */ ~Releaser(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /* the emitter classes */ /** * @class EmitterArg emitter.h c++-gtk-utils/emitter.h * @brief A class to execute callbacks connected to it, with provision * for automatic disconnection. * @sa SafeEmitterArg Releaser * @sa emitter.h * @sa Callback namespace * * Callback::FunctorArg objects may be connected to Emitter classes, * and will be executed when EmitterArg<>::emit() or * EmitterArg<>::operator()() are called. * * One version of the connect() method takes a Releaser object as an * argument. Such a Releaser object should be a public member of any * target class which wants functors representing any of its methods * to be disconnected automatically from the EmitterArg object when * the target class object is destroyed. * * A connection may be explicitly disconnected by calling the * disconnect() method, and may also be temporarily blocked and * subsequently unblocked with the block() and unblock() methods. * * The template type is the type of the unbound argument, if any. * EmitterArg is typedef'ed to Emitter. * * @b Usage * * For a class my_obj of type MyObj, with a method void * MyObj::my_method(int, const char*), usage for a fully bound functor * and emitter would be: * * @code * using namespace Cgu; * int arg = 1; * Emitter e; * e.connect(Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n")); * e(); * @endcode * * Or for a partially bound functor and emitter: * * @code * using namespace Cgu; * int arg = 1; * EmitterArg e; * e.connect(Callback::make(my_obj, &MyObj::my_method, arg)); * e("Hello\n"); * @endcode * * For further background, including about thread-safety, exception * safety, the use of the Cgu::TypeTuple struct for calls involving * two or three unbound arguments and other matters, read this: * emitter.h */ template class EmitterArg { #ifndef DOXYGEN_PARSING // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed // before the remote object is struct ListItem { Callback::FunctorArg f1; Callback::Functor f2; bool blocked; ListItem(Callback::FunctorArg f1_, Callback::Functor f2_): f1(f1_), f2(f2_), blocked(false) {} }; #endif std::list emission_list; // only Releaser objects can access this void tracking_disconnect(Callback::FunctorArg); // emitters cannot be copied EmitterArg(const EmitterArg&); EmitterArg& operator=(const EmitterArg&); public: friend class Releaser; /** * This will execute the connected functors. * @param arg The argument to be passed to the referenced function or * class method, if any. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. In * addition, it will throw if the function or class methods * referenced by the functors throw (or if the assignment operator of * the free or a bound argument throws and it is not a reference * argument). * @note This function is specialised for Emitter (ie * EmitterArg) to take no argument, and for * EmitterArg > and EmitterArg * > to take two and three arguments respectively. */ void operator()(typename Cgu::Param::ParamType arg) const {emit(arg);} /** * This will execute the connected functors. * @param arg The argument to be passed to the referenced function or * class method, if any. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. In * addition, it will throw if the function or class methods * referenced by the functors throw (or if the assignment operator of * the free or a bound argument throws and it is not a reference * argument). * @note This function is specialised for Emitter (ie * EmitterArg) to take no argument, and for * EmitterArg > and EmitterArg * > to take two and three arguments respectively. */ void emit(typename Cgu::Param::ParamType arg) const; /** * This will execute the connected functors, but it also reports * whether in fact there were any connected functors to execute. (It * is not necessary to use this function just because it is not known * whether a functor is connected - if the standard emit() function is * called when no functor is connected, nothing will happen. The * feature of this method is that it will report the outcome.) * @param arg The argument to be passed to the connected functions or * class methods, if any. * @return Returns false if there were no functors to execute, or true * if functors have been executed. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. In * addition, it will throw if the function or class methods * referenced by the functors throw (or if the assignment operator of * the free or a bound argument throws and it is not a reference * argument). * @note This function is specialised for Emitter (ie * EmitterArg) to take no argument, and for * EmitterArg > and EmitterArg * > to take two and three arguments respectively. */ bool test_emit(typename Cgu::Param::ParamType arg) const; /** * Connects a functor. * @param f The functor to connect. * @return The functor connected. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * @note This function is specialised for Emitter (ie * EmitterArg) to take and return a Callback::Functor argument, * and for EmitterArg > and EmitterArg > to take and return a Callback::FunctorArg > and Callback::FunctorArg > argument * respectively. */ Callback::FunctorArg connect(const Callback::FunctorArg& f); /** * Connects a functor. * @param f The functor to connect. * @param r A Releaser object for automatic disconnection of the * functor if the object whose method it represents is destroyed. * @return The functor connected. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * @note This function is specialised for Emitter (ie * EmitterArg) to take and return a Callback::Functor argument, * and for EmitterArg > and EmitterArg > to take and return a Callback::FunctorArg > and Callback::FunctorArg > argument * respectively. */ Callback::FunctorArg connect(const Callback::FunctorArg& f, Releaser& r); /** * Disconnects a functor previously connected. This does not throw * provided that the destructors of any bound arguments do not throw * (as they should not do), and assuming that merely iterating through * a list does not throw (as it would not on any sane implementation). * @param f The functor to disconnect. * @note 1. If the same functor has been connected more than once to * the same EmitterArg object, this call will disconnect all of them. * @note 2. This function is specialised for Emitter (ie * EmitterArg) to take a Callback::Functor argument, and for * EmitterArg > and EmitterArg * > to take a Callback::FunctorArg > and * Callback::FunctorArg > argument respectively. */ void disconnect(const Callback::FunctorArg& f); /** * Blocks a connected functor from executing when emit() or * operator()() is called until unblock() is called. This method does * not throw (assuming that merely iterating through a list does not * throw, as it would not on any sane implementation). * @param f The functor to block. * @note 1. If the same functor has been connected more than once to * the same EmitterArg object, this call will block all of them. * @note 2. This function is specialised for Emitter (ie * EmitterArg) to take a Callback::Functor argument, and for * EmitterArg > and EmitterArg * > to take a Callback::FunctorArg > and * Callback::FunctorArg > argument respectively. */ void block(const Callback::FunctorArg& f); /** * Unblocks a previously blocked functor. This method does not throw * (assuming that merely iterating through a list does not throw, as * it would not on any sane implementation). * @param f The functor to unblock. * @note 1. If the same functor has been connected more than once to * the same EmitterArg object, this call will unblock all of them. * @note 2. This function is specialised for Emitter (ie * EmitterArg) to take a Callback::Functor argument, and for * EmitterArg > and EmitterArg * > to take a Callback::FunctorArg > and * Callback::FunctorArg > argument respectively. */ void unblock(const Callback::FunctorArg& f); /** * @exception std::bad_alloc The constructor might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. */ EmitterArg() {} /** * The destructor does not throw provided that the destructors of any * bound arguments do not throw (as they should not do), and assuming * that merely iterating through a list does not throw (as it would * not on any sane implementation). */ ~EmitterArg(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template EmitterArg::~EmitterArg() { struct DisconnectReleaserItem { static void exec(const ListItem& l) {(l.f2)();} }; std::for_each(emission_list.begin(), emission_list.end(), DisconnectReleaserItem::exec); } template void EmitterArg::emit(typename Cgu::Param::ParamType arg) const { // create a local copy of emission_list, to enable a connected // function (i) to delete the EmitterArg<> object to which it is // connected, even if there are other functors still to execute in // the same emission (which will execute normally provided they do // not try to call any of the emitter's functions), (ii) to call // 'delete this' nothwithstanding that the connected function is // protected by a Releaser object (assuming all the other restraints // on calling 'delete this' are met), provided that no other access // would be made to the deleted object in a function call connected // to the same emitter which is due to execute subsequently in the // same emission, and (iii) to disconnect itself from the // EmitterArg<> object. This design approach has a trade-off: if a // connected function tries to block, unblock or disconnect another // function connected to the same EmitterArg<> object which is due // to execute subsequently in the same emission (or to block, // unblock or disconnect itself when it is due to execute again // subsequently in the same emission), the attempted block, unblock // or disconnection will not have any effect on that emission (it // will only have effect on a subsequent emission). In addition, a // connected function may not destroy an object whose non-static // method is connected to the same emitter and which would execute // subsequently in the same emission, even if that object is // protected by a Releaser object (the non-static method will // unsuccessfully attempt to execute notwithstanding the destruction // of the object it would be operating on). std::list local_list = emission_list; // don't use std::bind2nd()/std::ptr_fun() with std::for_each() // or we cannot use reference arguments - iterate by hand typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg); } } template bool EmitterArg::test_emit(typename Cgu::Param::ParamType arg) const { if (emission_list.empty()) return false; emit(arg); return true; } template Callback::FunctorArg EmitterArg::connect(const Callback::FunctorArg& f1) { emission_list.push_back(ListItem(f1, Callback::Functor())); return f1; } template Callback::FunctorArg EmitterArg::connect(const Callback::FunctorArg& f1, Releaser& r) { // In this method: // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed before the // remote object is // f3 is the functor the remote object executes in its Releaser if it is destroyed // before we are, or if Releaser::operator=() is called Callback::SafeFunctor f3(Callback::make_val(*this, &EmitterArg::tracking_disconnect, f1)); Callback::Functor f2(Callback::make_val(r, &Releaser::remove, f3)); r.add(f3); try { emission_list.push_back(ListItem(f1, f2)); } catch (...) { r.remove(f3); throw; } return f1; } template void EmitterArg::disconnect(const Callback::FunctorArg& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::FunctorArg f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { // remove ourselves from the remote Releaser object (iter->f2)(); // remove this item from emission_list iter = emission_list.erase(iter); } else break; } } // tracking disconnect() is the same as disconnect(), except that we do not // execute f2 as the remote Releaser object will destroy its own functors // in that case template void EmitterArg::tracking_disconnect(Callback::FunctorArg arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::FunctorArg f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { // remove this item from emission_list iter = emission_list.erase(iter); } else break; } } template void EmitterArg::block(const Callback::FunctorArg& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::FunctorArg f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = true; ++iter; } else break; } } template void EmitterArg::unblock(const Callback::FunctorArg& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::FunctorArg f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = false; ++iter; } else break; } } /** * @class SafeEmitterArg emitter.h c++-gtk-utils/emitter.h * @brief A thread-safe class to execute callbacks connected to it, * with provision for automatic disconnection. * @sa EmitterArg Releaser * @sa emitter.h * @sa Callback namespace * * This is a thread-safe version of the EmitterArg class. * Callback::SafeFunctorArg objects may be connected to SafeEmitter * classes, and will be executed when SafeEmitterArg<>::emit() or * SafeEmitterArg<>::operator()() are called. * * One version of the connect() method takes a Releaser object as an * argument. Such a Releaser object should be a public member of any * target class which wants functors representing any of its methods * to be disconnected automatically from the SafeEmitterArg object * when the target class object is destroyed. * * A connection may be explicitly disconnected by calling the * disconnect() method, and may also be temporarily blocked and * subsequently unblocked with the block() and unblock() methods. * * The template type is the type of the unbound argument, if any. * SafeEmitterArg is typedef'ed to SafeEmitter. * * @b Usage * * For a class my_obj of type MyObj, with a method void * MyObj::my_method(int, const char*), usage for a fully bound functor * and emitter would be: * * @code * using namespace Cgu; * int arg = 1; * SafeEmitter se; * se.connect(Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n")); * se(); * @endcode * * Or for a partially bound functor and emitter: * * @code * using namespace Cgu; * int arg = 1; * SafeEmitterArg se; * se.connect(Callback::make(my_obj, &MyObj::my_method, arg)); * se("Hello\n"); * @endcode * * For further background, including about thread-safety, exception * safety, the use of the Cgu::TypeTuple struct for calls involving * two or three unbound arguments and other matters, read this: * emitter.h */ template class SafeEmitterArg { #ifndef DOXYGEN_PARSING // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed // before the remote object is struct ListItem { Callback::SafeFunctorArg f1; Callback::SafeFunctorArg f2; bool blocked; ListItem(Callback::SafeFunctorArg f1_, Callback::SafeFunctorArg f2_): f1(f1_), f2(f2_), blocked(false) {} }; #endif std::list emission_list; mutable Thread::Mutex mutex; // make this mutable so we can lock/unlock in const methods // only Releaser objects can access this void tracking_disconnect(Callback::SafeFunctorArg); // emitters cannot be copied SafeEmitterArg(const SafeEmitterArg&); SafeEmitterArg& operator=(const SafeEmitterArg&); public: friend class Releaser; /** * This will execute the connected functors. It is thread safe if the * functions or class methods referenced by the connected functors are * thread safe. * @param arg The argument, if any, to be passed to the functions or * class methods referenced by the connected functors. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. In * addition, it will throw if the functions or class methods * referenced by the functors throw (or if the assignment operator of * the free or a bound argument throws and it is not a reference * argument). * @note This function is specialised for SafeEmitter (ie * SafeEmitterArg) to take no argument, and for * SafeEmitterArg > and SafeEmitterArg > to take two and three arguments respectively. */ void operator()(typename Cgu::Param::ParamType arg) const {emit(arg);} /** * This will execute the connected functors. It is thread safe if the * functions or class methods referenced by the connected functors are * thread safe. * @param arg The argument to be passed to the referenced function or * class method, if any. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. In * addition, it will throw if the function or class methods * referenced by the functors throw (or if the assignment operator of * the free or a bound argument throws and it is not a reference * argument). * @note This function is specialised for SafeEmitter (ie * SafeEmitterArg) to take no argument, and for * SafeEmitterArg > and SafeEmitterArg > to take two and three arguments respectively. */ void emit(typename Cgu::Param::ParamType arg) const; /** * This will execute the connected functors, but it also reports * whether in fact there were any connected functors to execute. It * is thread safe if the functions or class methods referenced by the * connected functors are thread safe. (It is not necessary to use * this function just because it is not known whether a functor is * connected - if the standard emit() function is called when no * functor is connected, nothing will happen. The feature of this * method is that it will report the outcome.) * @param arg The argument to be passed to the connected functions or * class methods, if any. * @return Returns false if there were no functors to execute, or true * if functors have been executed. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. In * addition, it will throw if the function or class methods * referenced by the functors throw (or if the assignment operator of * the free or a bound argument throws and it is not a reference * argument). * @note This function is specialised for SafeEmitter (ie * SafeEmitterArg) to take no argument, and for * SafeEmitterArg > and SafeEmitterArg > to take two and three arguments respectively. */ bool test_emit(typename Cgu::Param::ParamType arg) const; /** * Connects a functor. It is thread safe. * @param f The functor to connect. * @return The functor connected. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * @note This function is specialised for SafeEmitter (ie * SafeEmitterArg) to take and return a Callback::SafeFunctor * argument, and for SafeEmitterArg > and * SafeEmitterArg > to take and return a * Callback::SafeFunctorArg > and * Callback::SafeFunctorArg > argument * respectively. */ Callback::SafeFunctorArg connect(const Callback::SafeFunctorArg& f); /** * Connects a functor. It is thread safe. * @param f The functor to connect. * @param r A Releaser object for automatic disconnection of the * functor if the object whose method it represents is destroyed. * @return The functor connected. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. * @note This function is specialised for SafeEmitter (ie * SafeEmitterArg) to take and return a Callback::SafeFunctor * argument, and for SafeEmitterArg > and * SafeEmitterArg > to take and return a * Callback::SafeFunctorArg > and * Callback::SafeFunctorArg > argument * respectively. */ Callback::SafeFunctorArg connect(const Callback::SafeFunctorArg& f, Releaser& r); /** * Disconnects a functor previously connected. This does not throw * provided that the destructors of any bound arguments do not throw * (as they should not do), and assuming that merely iterating through * a list does not throw (as it would not on any sane implementation). * It is thread safe. * @param f The functor to disconnect. * @note 1. If the same functor has been connected more than once to * the same SafeEmitterArg object, this call will disconnect all of * them. * @note 2. This function is specialised for SafeEmitter (ie * SafeEmitterArg) to take a Callback::SafeFunctor argument, and * for SafeEmitterArg > and * SafeEmitterArg > to take a * Callback::SafeFunctorArg > and * Callback::SafeFunctorArg > argument * respectively. */ void disconnect(const Callback::SafeFunctorArg& f); /** * Blocks a connected functor from executing when emit() or * operator()() is called until unblock() is called. This method does * not throw (assuming that merely iterating through a list does not * throw, as it would not on any sane implementation). It is thread * safe. * @param f The functor to block. * @note 1. If the same functor has been connected more than once to * the same SafeEmitterArg object, this call will block all of them. * @note 2. This function is specialised for SafeEmitter (ie * SafeEmitterArg) to take a Callback::SafeFunctor argument, and * for SafeEmitterArg > and * SafeEmitterArg > to take a * Callback::SafeFunctorArg > and * Callback::SafeFunctorArg > argument * respectively. */ void block(const Callback::SafeFunctorArg& f); /** * Unblocks a previously blocked functor. This method does not throw * (assuming that merely iterating through a list does not throw, as * it would not on any sane implementation). It is thread safe. * @param f The functor to unblock. * @note 1. If the same functor has been connected more than once to * the same SafeEmitterArg object, this call will unblock all of them. * @note 2. This function is specialised for SafeEmitter (ie * SafeEmitterArg) to take a Callback::SafeFunctor argument, and * for SafeEmitterArg > and * SafeEmitterArg > to take a * Callback::SafeFunctorArg > and * Callback::SafeFunctorArg > argument * respectively. */ void unblock(const Callback::SafeFunctorArg& f); /** * @exception std::bad_alloc The constructor might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. * @exception Thread::MutexError The default constructor might throw * Thread::MutexError if initialisation of the contained mutex fails. * (It is often not worth checking for this, as it means either memory * is exhausted or pthread has run out of other resources to create * new mutexes.) */ SafeEmitterArg() {} /** * The destructor does not throw provided that the destructors of any * bound arguments do not throw (as they should not do), and assuming * that merely iterating through a list does not throw (as it would * not on any sane implementation). It is thread-safe as regards the * dropping of any connected functors and of any relevant Releaser * objects. */ ~SafeEmitterArg(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template SafeEmitterArg::~SafeEmitterArg() { // go through emission_list() item by item, popping off the front and erasing // as we go in case Releaser::try_remove() fails to acquire the lock on one // of the iterations Thread::Mutex::Lock lock(mutex); while (!emission_list.empty()) { typename std::list::iterator iter = emission_list.begin(); int result = 0; // f2 might be a no-op // remove ourselves from the remote Releaser object (iter->f2)(&result); if (!result) { // we got the Releaser mutex lock or no-op // now remove this item from emission_list emission_list.erase(iter); } else { mutex.unlock(); // spin nicely #ifdef CGU_USE_SCHED_YIELD sched_yield(); #else usleep(10); #endif mutex.lock(); } } } template void SafeEmitterArg::emit(typename Cgu::Param::ParamType arg) const { // create a local copy of emission_list, to enable a connected // function (i) to delete the EmitterArg<> object to which it is // connected, even if there are other functors still to execute in // the same emission (which will execute normally provided they do // not try to call any of the emitter's functions), (ii) to call // 'delete this' nothwithstanding that the connected function is // protected by a Releaser object (assuming all the other restraints // on calling 'delete this' are met), provided that no other access // would be made to the deleted object in a function call connected // to the same emitter which is due to execute subsequently in the // same emission, and (iii) to disconnect itself from the // EmitterArg<> object. This design approach has a trade-off: if a // connected function tries to block, unblock or disconnect another // function connected to the same EmitterArg<> object which is due // to execute subsequently in the same emission (or to block, // unblock or disconnect itself when it is due to execute again // subsequently in the same emission), the attempted block, unblock // or disconnection will not have any effect on that emission (it // will only have effect on a subsequent emission). In addition, a // connected function may not destroy an object whose non-static // method is connected to the same emitter and which would execute // subsequently in the same emission, even if that object is // protected by a Releaser object (the non-static method will // unsuccessfully attempt to execute notwithstanding the destruction // of the object it would be operating on). // SafeFunctorArg<> usage has the additional point that while an // emission is in course, another thread should not try to do any of // those things, or the same outcome will result. Another thread // should leave alone objects connected to a SafeEmitterArg<> object // from the time of operator()() or emit() beginning to the time of // it ending, and not try to interfere. // a side effect of having a local list is that, as required, we // will not be holding our mutex when executing the functors it // contains. It is OK having the functors in two different lists // which are potentially (when our mutex is released) in two // different threads, because the functors hold their // Callback::Callback objects by SharedLockPtr so their reference // count is protected (they are SafeFunctorArg<> functors). std::list local_list; { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); local_list = emission_list; } // don't use std::bind2nd()/std::ptr_fun() with std::for_each() // or we cannot use reference arguments - iterate by hand typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg); } } template bool SafeEmitterArg::test_emit(typename Cgu::Param::ParamType arg) const { std::list local_list; { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); if (emission_list.empty()) return false; local_list = emission_list; } // don't use std::bind2nd()/std::ptr_fun() with std::for_each() // or we cannot use reference arguments - iterate by hand typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg); } return true; } template Callback::SafeFunctorArg SafeEmitterArg::connect(const Callback::SafeFunctorArg& f1) { Thread::Mutex::Lock lock(mutex); emission_list.push_back(ListItem(f1, Callback::SafeFunctorArg())); return f1; } template Callback::SafeFunctorArg SafeEmitterArg::connect(const Callback::SafeFunctorArg& f1, Releaser& r) { // In this method: // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed before the // remote object is // f3 is the functor the remote object executes in its Releaser if it is destroyed // before we are, or if Releaser::operator=() is called Callback::SafeFunctor f3(Callback::make_val(*this, &SafeEmitterArg::tracking_disconnect, f1)); Callback::SafeFunctorArg f2(Callback::make_val(r, &Releaser::try_remove, f3)); // we can't call Releaser::add() when holding our mutex or we will // get out of order locking, as Releaser's mutex is held when it // calls SafeEmitterArg::tracking_disconnect() via f3, and // we don't need to do so r.add(f3); Thread::Mutex::Lock lock(mutex); try { emission_list.push_back(ListItem(f1, f2)); } catch (...) { mutex.unlock(); r.remove(f3); mutex.lock(); throw; } return f1; } template void SafeEmitterArg::disconnect(const Callback::SafeFunctorArg& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::SafeFunctorArg f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object more than // once, so cater for that as well as Releaser::try_remove() failing Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for(;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { int result = 0; // f2 might be a no-op // remove ourselves from the remote Releaser object (iter->f2)(&result); if (!result) { // we got the Releaser mutex lock or no-op // now remove this item from emission_list iter = emission_list.erase(iter); } else { mutex.unlock(); // spin nicely #ifdef CGU_USE_SCHED_YIELD sched_yield(); #else usleep(10); #endif mutex.lock(); // start again at the beginning - we have released the mutex // so our iterator may have become invalid iter = emission_list.begin(); } } else break; } } // tracking disconnect() is the same as disconnect(), except that we do not // execute f2 as the remote Releaser object will destroy its own functors // in that case template void SafeEmitterArg::tracking_disconnect(Callback::SafeFunctorArg arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::SafeFunctorArg f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { // remove this item from emission_list iter = emission_list.erase(iter); } else break; } } template void SafeEmitterArg::block(const Callback::SafeFunctorArg& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::SafeFunctorArg f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = true; ++iter; } else break; } } template void SafeEmitterArg::unblock(const Callback::SafeFunctorArg& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::SafeFunctorArg f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = false; ++iter; } else break; } } #ifndef DOXYGEN_PARSING /* specialisations of EmitterArg and SafeEmitterArg for 0, 2 and 3 unbound arguments */ /* TODO: we could implement this better by passing all the ListItem * operations (including in the connect(), disconnect(), block() and * unblock() methods and so forth) into a separate templated class * which could be incorporated by composition or inheritance into * EmitterArg, which would avoid much of the code duplication arising * from the specialisations for 2 and 3 unbound arguments as added in * version 1.2.10: the only functions we actually need to specialise * for these additional arguments are the emit() ones. However, as * these classes are not PODSs this would give rise to binary breakage * of 1.2.9 and earlier, so we have to await a suitable ABI breakage * release to clean this up. */ template <> class EmitterArg { struct ListItem { Callback::Functor f1; Callback::Functor f2; bool blocked; ListItem(Callback::Functor f1_, Callback::Functor f2_): f1(f1_), f2(f2_), blocked(false) {} }; std::list emission_list; void tracking_disconnect(Callback::Functor); EmitterArg(const EmitterArg&); EmitterArg& operator=(const EmitterArg&); public: friend class Releaser; void operator()() const {emit();} void emit() const; bool test_emit() const; Callback::Functor connect(const Callback::Functor&); Callback::Functor connect(const Callback::Functor&, Releaser&); void disconnect(const Callback::Functor&); void block(const Callback::Functor&); void unblock(const Callback::Functor&); EmitterArg() {} ~EmitterArg(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template class EmitterArg > { struct ListItem { Callback::FunctorArg > f1; Callback::Functor f2; bool blocked; ListItem(Callback::FunctorArg > f1_, Callback::Functor f2_): f1(f1_), f2(f2_), blocked(false) {} }; std::list emission_list; void tracking_disconnect(Callback::FunctorArg >); EmitterArg(const EmitterArg&); EmitterArg& operator=(const EmitterArg&); public: friend class Releaser; void operator()(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const { emit(arg1, arg2); } void emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const; bool test_emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const; Callback::FunctorArg > connect(const Callback::FunctorArg >& f); Callback::FunctorArg > connect(const Callback::FunctorArg >& f, Releaser& r); void disconnect(const Callback::FunctorArg >& f); void block(const Callback::FunctorArg >& f); void unblock(const Callback::FunctorArg >& f); EmitterArg() {} ~EmitterArg(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template EmitterArg >::~EmitterArg() { struct DisconnectReleaserItem { static void exec(const ListItem& l) {(l.f2)();} }; std::for_each(emission_list.begin(), emission_list.end(), DisconnectReleaserItem::exec); } template void EmitterArg >::emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const { std::list local_list = emission_list; typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg1, arg2); } } template bool EmitterArg >::test_emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const { if (emission_list.empty()) return false; emit(arg1, arg2); return true; } template Callback::FunctorArg > EmitterArg >::connect(const Callback::FunctorArg >& f1) { emission_list.push_back(ListItem(f1, Callback::Functor())); return f1; } template Callback::FunctorArg > EmitterArg >::connect(const Callback::FunctorArg >& f1, Releaser& r) { // In this method: // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed before the // remote object is // f3 is the functor the remote object executes in its Releaser if it is destroyed // before we are, or if Releaser::operator=() is called Callback::SafeFunctor f3(Callback::make_val(*this, &EmitterArg >::tracking_disconnect, f1)); Callback::Functor f2(Callback::make_val(r, &Releaser::remove, f3)); r.add(f3); try { emission_list.push_back(ListItem(f1, f2)); } catch (...) { r.remove(f3); throw; } return f1; } template void EmitterArg >::disconnect(const Callback::FunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::FunctorArg > f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { (iter->f2)(); iter = emission_list.erase(iter); } else break; } } template void EmitterArg >::tracking_disconnect(Callback::FunctorArg > arg) { struct Pred { static bool pred(ListItem p, Callback::FunctorArg > f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter = emission_list.erase(iter); } else break; } } template void EmitterArg >::block(const Callback::FunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::FunctorArg > f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = true; ++iter; } else break; } } template void EmitterArg >::unblock(const Callback::FunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::FunctorArg > f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = false; ++iter; } else break; } } template class EmitterArg > { struct ListItem { Callback::FunctorArg > f1; Callback::Functor f2; bool blocked; ListItem(Callback::FunctorArg > f1_, Callback::Functor f2_): f1(f1_), f2(f2_), blocked(false) {} }; std::list emission_list; void tracking_disconnect(Callback::FunctorArg >); EmitterArg(const EmitterArg&); EmitterArg& operator=(const EmitterArg&); public: friend class Releaser; void operator()(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const { emit(arg1, arg2, arg3); } void emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const; bool test_emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const; Callback::FunctorArg > connect(const Callback::FunctorArg >& f); Callback::FunctorArg > connect(const Callback::FunctorArg >& f, Releaser& r); void disconnect(const Callback::FunctorArg >& f); void block(const Callback::FunctorArg >& f); void unblock(const Callback::FunctorArg >& f); EmitterArg() {} ~EmitterArg(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template EmitterArg >::~EmitterArg() { struct DisconnectReleaserItem { static void exec(const ListItem& l) {(l.f2)();} }; std::for_each(emission_list.begin(), emission_list.end(), DisconnectReleaserItem::exec); } template void EmitterArg >::emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const { std::list local_list = emission_list; typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg1, arg2, arg3); } } template bool EmitterArg >::test_emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const { if (emission_list.empty()) return false; emit(arg1, arg2, arg3); return true; } template Callback::FunctorArg > EmitterArg >::connect(const Callback::FunctorArg >& f1) { emission_list.push_back(ListItem(f1, Callback::Functor())); return f1; } template Callback::FunctorArg > EmitterArg >::connect(const Callback::FunctorArg >& f1, Releaser& r) { // In this method: // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed before the // remote object is // f3 is the functor the remote object executes in its Releaser if it is destroyed // before we are, or if Releaser::operator=() is called Callback::SafeFunctor f3(Callback::make_val(*this, &EmitterArg >::tracking_disconnect, f1)); Callback::Functor f2(Callback::make_val(r, &Releaser::remove, f3)); r.add(f3); try { emission_list.push_back(ListItem(f1, f2)); } catch (...) { r.remove(f3); throw; } return f1; } template void EmitterArg >::disconnect(const Callback::FunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::FunctorArg > f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { (iter->f2)(); iter = emission_list.erase(iter); } else break; } } template void EmitterArg >::tracking_disconnect(Callback::FunctorArg > arg) { struct Pred { static bool pred(ListItem p, Callback::FunctorArg > f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter = emission_list.erase(iter); } else break; } } template void EmitterArg >::block(const Callback::FunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::FunctorArg > f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = true; ++iter; } else break; } } template void EmitterArg >::unblock(const Callback::FunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::FunctorArg > f) { return (p.f1 == f); } }; typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = false; ++iter; } else break; } } /* SafeEmitterArg specialisations */ template <> class SafeEmitterArg { struct ListItem { Callback::SafeFunctor f1; Callback::SafeFunctorArg f2; bool blocked; ListItem(Callback::SafeFunctor f1_, Callback::SafeFunctorArg f2_): f1(f1_), f2(f2_), blocked(false) {} }; std::list emission_list; mutable Thread::Mutex mutex; void tracking_disconnect(Callback::SafeFunctor); SafeEmitterArg(const SafeEmitterArg&); SafeEmitterArg& operator=(const SafeEmitterArg&); public: friend class Releaser; void operator()() const {emit();} void emit() const; bool test_emit() const; Callback::SafeFunctor connect(const Callback::SafeFunctor&); Callback::SafeFunctor connect(const Callback::SafeFunctor&, Releaser&); void disconnect(const Callback::SafeFunctor&); void block(const Callback::SafeFunctor&); void unblock(const Callback::SafeFunctor&); SafeEmitterArg() {} ~SafeEmitterArg(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template class SafeEmitterArg > { struct ListItem { Callback::SafeFunctorArg > f1; Callback::SafeFunctorArg f2; bool blocked; ListItem(Callback::SafeFunctorArg > f1_, Callback::SafeFunctorArg f2_): f1(f1_), f2(f2_), blocked(false) {} }; std::list emission_list; mutable Thread::Mutex mutex; void tracking_disconnect(Callback::SafeFunctorArg >); SafeEmitterArg(const SafeEmitterArg&); SafeEmitterArg& operator=(const SafeEmitterArg&); public: friend class Releaser; void operator()(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const { emit(arg1, arg2); } void emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const; bool test_emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const; Callback::SafeFunctorArg > connect(const Callback::SafeFunctorArg >& f); Callback::SafeFunctorArg > connect(const Callback::SafeFunctorArg >& f, Releaser& r); void disconnect(const Callback::SafeFunctorArg >& f); void block(const Callback::SafeFunctorArg >& f); void unblock(const Callback::SafeFunctorArg >& f); SafeEmitterArg() {} ~SafeEmitterArg(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template SafeEmitterArg >::~SafeEmitterArg() { Thread::Mutex::Lock lock(mutex); while (!emission_list.empty()) { typename std::list::iterator iter = emission_list.begin(); int result = 0; (iter->f2)(&result); if (!result) { emission_list.erase(iter); } else { mutex.unlock(); #ifdef CGU_USE_SCHED_YIELD sched_yield(); #else usleep(10); #endif mutex.lock(); } } } template void SafeEmitterArg >::emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const { std::list local_list; { Thread::Mutex::Lock lock(mutex); local_list = emission_list; } typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg1, arg2); } } template bool SafeEmitterArg >::test_emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const { std::list local_list; { Thread::Mutex::Lock lock(mutex); if (emission_list.empty()) return false; local_list = emission_list; } typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg1, arg2); } return true; } template Callback::SafeFunctorArg > SafeEmitterArg >::connect(const Callback::SafeFunctorArg >& f1) { Thread::Mutex::Lock lock(mutex); emission_list.push_back(ListItem(f1, Callback::SafeFunctorArg())); return f1; } template Callback::SafeFunctorArg > SafeEmitterArg >::connect(const Callback::SafeFunctorArg >& f1, Releaser& r) { // In this method: // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed before the // remote object is // f3 is the functor the remote object executes in its Releaser if it is destroyed // before we are, or if Releaser::operator=() is called Callback::SafeFunctor f3(Callback::make_val(*this, &SafeEmitterArg >::tracking_disconnect, f1)); Callback::SafeFunctorArg f2(Callback::make_val(r, &Releaser::try_remove, f3)); r.add(f3); Thread::Mutex::Lock lock(mutex); try { emission_list.push_back(ListItem(f1, f2)); } catch (...) { mutex.unlock(); r.remove(f3); mutex.lock(); throw; } return f1; } template void SafeEmitterArg >::disconnect(const Callback::SafeFunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::SafeFunctorArg > f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for(;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { int result = 0; (iter->f2)(&result); if (!result) { iter = emission_list.erase(iter); } else { mutex.unlock(); #ifdef CGU_USE_SCHED_YIELD sched_yield(); #else usleep(10); #endif mutex.lock(); iter = emission_list.begin(); } } else break; } } template void SafeEmitterArg >::tracking_disconnect(Callback::SafeFunctorArg > arg) { struct Pred { static bool pred(ListItem p, Callback::SafeFunctorArg > f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter = emission_list.erase(iter); } else break; } } template void SafeEmitterArg >::block(const Callback::SafeFunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::SafeFunctorArg > f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = true; ++iter; } else break; } } template void SafeEmitterArg >::unblock(const Callback::SafeFunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::SafeFunctorArg > f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = false; ++iter; } else break; } } template class SafeEmitterArg > { struct ListItem { Callback::SafeFunctorArg > f1; Callback::SafeFunctorArg f2; bool blocked; ListItem(Callback::SafeFunctorArg > f1_, Callback::SafeFunctorArg f2_): f1(f1_), f2(f2_), blocked(false) {} }; std::list emission_list; mutable Thread::Mutex mutex; void tracking_disconnect(Callback::SafeFunctorArg >); SafeEmitterArg(const SafeEmitterArg&); SafeEmitterArg& operator=(const SafeEmitterArg&); public: friend class Releaser; void operator()(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const { emit(arg1, arg2, arg3); } void emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const; bool test_emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const; Callback::SafeFunctorArg > connect(const Callback::SafeFunctorArg >& f); Callback::SafeFunctorArg > connect(const Callback::SafeFunctorArg >& f, Releaser& r); void disconnect(const Callback::SafeFunctorArg >& f); void block(const Callback::SafeFunctorArg >& f); void unblock(const Callback::SafeFunctorArg >& f); SafeEmitterArg() {} ~SafeEmitterArg(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template SafeEmitterArg >::~SafeEmitterArg() { Thread::Mutex::Lock lock(mutex); while (!emission_list.empty()) { typename std::list::iterator iter = emission_list.begin(); int result = 0; (iter->f2)(&result); if (!result) { emission_list.erase(iter); } else { mutex.unlock(); #ifdef CGU_USE_SCHED_YIELD sched_yield(); #else usleep(10); #endif mutex.lock(); } } } template void SafeEmitterArg >::emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const { std::list local_list; { Thread::Mutex::Lock lock(mutex); local_list = emission_list; } typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg1, arg2, arg3); } } template bool SafeEmitterArg >::test_emit(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const { std::list local_list; { Thread::Mutex::Lock lock(mutex); if (emission_list.empty()) return false; local_list = emission_list; } typename std::list::const_iterator iter; for (iter = local_list.begin(); iter != local_list.end(); ++iter) { if (!iter->blocked) iter->f1(arg1, arg2, arg3); } return true; } template Callback::SafeFunctorArg > SafeEmitterArg >::connect(const Callback::SafeFunctorArg >& f1) { Thread::Mutex::Lock lock(mutex); emission_list.push_back(ListItem(f1, Callback::SafeFunctorArg())); return f1; } template Callback::SafeFunctorArg > SafeEmitterArg >::connect(const Callback::SafeFunctorArg >& f1, Releaser& r) { // In this method: // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed before the // remote object is // f3 is the functor the remote object executes in its Releaser if it is destroyed // before we are, or if Releaser::operator=() is called Callback::SafeFunctor f3(Callback::make_val(*this, &SafeEmitterArg >::tracking_disconnect, f1)); Callback::SafeFunctorArg f2(Callback::make_val(r, &Releaser::try_remove, f3)); r.add(f3); Thread::Mutex::Lock lock(mutex); try { emission_list.push_back(ListItem(f1, f2)); } catch (...) { mutex.unlock(); r.remove(f3); mutex.lock(); throw; } return f1; } template void SafeEmitterArg >::disconnect(const Callback::SafeFunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::SafeFunctorArg > f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for(;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { int result = 0; (iter->f2)(&result); if (!result) { iter = emission_list.erase(iter); } else { mutex.unlock(); #ifdef CGU_USE_SCHED_YIELD sched_yield(); #else usleep(10); #endif mutex.lock(); iter = emission_list.begin(); } } else break; } } template void SafeEmitterArg >::tracking_disconnect(Callback::SafeFunctorArg > arg) { struct Pred { static bool pred(ListItem p, Callback::SafeFunctorArg > f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter = emission_list.erase(iter); } else break; } } template void SafeEmitterArg >::block(const Callback::SafeFunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::SafeFunctorArg > f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = true; ++iter; } else break; } } template void SafeEmitterArg >::unblock(const Callback::SafeFunctorArg >& arg) { struct Pred { static bool pred(ListItem p, Callback::SafeFunctorArg > f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); typename std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = false; ++iter; } else break; } } #endif // DOXYGEN_PARSING } // namespace Cgu #endif // EMITTER_H efax-gtk-3.2.8/src/internal/c++-gtk-utils/async_queue.h0000644000175000001440000004670211524110041017533 00000000000000/* Copyright (C) 2006 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ /** * @file async_queue.h * @brief This file provides thread-safe asynchronous queue classes. * * AsyncQueue is a class which provides some of the functionality of a * std::queue object (but note that the AsyncQueue::pop(value_type& * obj) method provides the pop()ed element by reference - see the * comments on that method for the reason), except that it has mutex * locking of the data container so as to permit push()ing and * pop()ing from different threads. It is therefore useful for * passing data between threads, perhaps in response to a signal being * emitted from a Notifier object. Passing the data by means of a * SharedLockPtr object, or an IntrusivePtr object referencing data * derived from IntrusiveLockCounter, would be ideal. * * AsyncQueueDispatch is a class which has a blocking pop() method, * which allows it to be waited on by a dedicated event/message * dispatching thread for incoming work (represented by the data * pushed onto the queue). In the same way, it can be used to * implement thread pools, by having threads in the pool waiting on * the queue. * * By default the queues use a std::list object as their container * because in the kind of use mentioned above they are unlikely to * hold many objects but they can be changed to, say, a std::deque * object by specifying it as the second template parameter. */ #ifndef CGU_ASYNC_QUEUE_H #define CGU_ASYNC_QUEUE_H #include #include #include #include #include #include #include namespace Cgu { /** * @class AsyncQueuePopError async_queue.h c++-gtk-utils/async_queue.h * @brief An exception thrown if calling pop() on a AsyncQueue or * AsyncQueueDispatch object fails because the queue is empty. * @sa AsyncQueue AsyncQueueDispatch */ struct AsyncQueuePopError: public std::exception { virtual const char* what() const throw() {return "AsyncQueuePopError: popping from empty AsyncQueue object\n";} }; /** * @class AsyncQueue async_queue.h c++-gtk-utils/async_queue.h * @brief A thread-safe asynchronous queue. * @sa AsyncQueueDispatch * * AsyncQueue is a class which provides some of the functionality of a * std::queue object (but note that the AsyncQueue::pop(value_type& * obj) method provides the pop()ed element by reference - see the * comments on that method for the reason), except that it has mutex * locking of the data container so as to permit push()ing and * pop()ing from different threads. It is therefore useful for * passing data between threads, perhaps in response to a signal being * emitted from a Notifier object. Passing the data by means of a * SharedLockPtr object, or an IntrusivePtr object referencing data * derived from IntrusiveLockCounter, would be ideal. * * By default the queue uses a std::list object as its container * because in the kind of use mentioned above it is unlikely to hold * many objects but it can be changed to, say, a std::deque object by * specifying it as the second template parameter. * * If the library is installed using the * --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration options, any * AsyncQueue objects constructed on free store will be constructed in * glib memory slices. This does not affect the queue container * itself: to change the allocator of the C++ container, a custom * allocator type can be provided when the AsyncQueue object is * instantiated offering the standard allocator interface. */ template > class AsyncQueue { public: typedef typename Container::value_type value_type; typedef typename Container::size_type size_type; typedef Container container_type; private: std::queue q; mutable Thread::Mutex mutex; // AsyncQueue objects cannot be copied - they are mainly // intended to pass data between two known threads AsyncQueue(const AsyncQueue&); AsyncQueue& operator=(const AsyncQueue&); public: /** * Pushes an item onto the queue. This method has strong exception * safety if the container is a std::deque, std::list or std::vector * container (the default is std::list). * @param obj The item to be pushed onto the queue. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. It might * also throw if the assignment operator of the queue item might * throw. */ void push(const value_type& obj) { Thread::Mutex::Lock lock(mutex); q.push(obj); } /** * Pops an item from the queue. This method has strong exception * safety if the container is a std::deque or std::list container (the * default is std::list), provided the destructor of a contained item * does not throw. * @param obj A value type reference to which the item at the front of * the queue will be assigned. * @exception AsyncQueuePopError If the queue is empty when a pop is * attempted, this method will throw AsyncQueuePopError. It might * also throw if the assignment operator of the queue item might * throw. In order to complete pop() operations atomically under a * single lock and to retain strong exception safety, the object into * which the pop()ed data is to be placed is passed as an argument by * reference (this avoids a copy from a temporary object after the * data has been extracted from the queue, which would occur if the * item extracted were returned by value). It might also throw if the * destructor of the queue item might throw (but that should never * happen), or if the empty() method of the container type throws * (which would not happen on any sane implementation). */ void pop(value_type& obj) { Thread::Mutex::Lock lock(mutex); if (q.empty()) throw AsyncQueuePopError(); obj = q.front(); q.pop(); } /** * Discards the item at the front of the queue. This method has * strong exception safety if the container is a std::deque or * std::list container (the default is std::list), provided the * destructor of a contained item does not throw. * @exception AsyncQueuePopError If the queue is empty when a pop is * attempted, this method will throw AsyncQueuePopError. It might * also throw if the destructor of the queue item might throw (but * that should never happen), or if the empty() method of the * container type throws (which would not happen on any sane * implementation). */ void pop() { Thread::Mutex::Lock lock(mutex); if (q.empty()) throw AsyncQueuePopError(); q.pop(); } /** * @return Whether the queue is empty. It will not throw assuming * that the empty() method of the container type does not throw, as it * will not on any sane implementation. * @note The return value may not be valid if another thread has * pushed to or popped from the queue before the value returned by the * method is acted on. It is provided as a utility, but may not be * meaningful, depending on the intended usage. */ bool empty() const { Thread::Mutex::Lock lock(mutex); return q.empty(); } /** * @exception std::bad_alloc The constructor might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. * @exception Thread::MutexError The constructor might throw * Thread::MutexError if initialisation of the contained mutex fails. * (It is often not worth checking for this, as it means either memory * is exhausted or pthread has run out of other resources to create * new mutexes.) */ AsyncQueue() {} /** * The destructor does not throw unless the destructor of a contained * item throws. It is thread-safe (any thread may delete the * AsyncQueue object). */ ~AsyncQueue() { // lock and unlock the mutex in the destructor so that we have an // acquire operation to ensure that when the std::queue object is // destroyed memory is synchronised, so any thread may destroy the // AsyncQueue object Thread::Mutex::Lock lock(mutex); } /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class AsyncQueueDispatch async_queue.h c++-gtk-utils/async_queue.h * @brief A thread-safe asynchronous queue with a blocking pop() * method. * @sa AsyncQueue * * AsyncQueueDispatch is similar to the AsyncQueue class, except that * it has a blocking pop_dispatch() method, which allows it to be * waited on by a dedicated event/message dispatching thread for * incoming work (represented by the data pushed onto the queue). In * the same way, it can be used to implement thread pools, by having * threads in the pool waiting on the queue. * * By default the queue uses a std::list object as its container * because in the kind of use mentioned above it is unlikely to hold * many objects but it can be changed to, say, a std::deque object by * specifying it as the second template parameter. * * If the library is installed using the * --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration options, any * AsyncQueueDispatch objects constructed on free store will be * constructed in glib memory slices. This does not affect the queue * container itself: to change the allocator of the C++ container, a * custom allocator type can be provided when the AsyncQueueDispatch * object is instantiated offering the standard allocator interface. */ template > class AsyncQueueDispatch { public: typedef typename Container::value_type value_type; typedef typename Container::size_type size_type; typedef Container container_type; private: std::queue q; mutable Thread::Mutex mutex; Thread::Cond cond; // AsyncQueueDispatch objects cannot be copied - they are mainly // intended to pass data between two known threads AsyncQueueDispatch(const AsyncQueueDispatch&); AsyncQueueDispatch& operator=(const AsyncQueueDispatch&); public: /** * Pushes an item onto the queue. This method has strong exception * safety if the container is a std::deque, std::list or std::vector * container (the default is std::list). * @param obj The item to be pushed onto the queue. * @exception std::bad_alloc The method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. It might * also throw if the assignment operator of the queue item might * throw. */ void push(const value_type& obj) { Thread::Mutex::Lock lock(mutex); q.push(obj); cond.signal(); } /** * Pops an item from the queue. This method has strong exception * safety if the container is a std::deque or std::list container (the * default is std::list), provided the destructor of a contained item * does not throw. * @param obj A value type reference to which the item at the front of * the queue will be assigned. * @exception AsyncQueuePopError If the queue is empty when a pop is * attempted, this method will throw AsyncQueuePopError. It might * also throw if the assignment operator of the queue item might * throw. In order to complete pop() operations atomically under a * single lock and to retain strong exception safety, the object into * which the pop()ed data is to be placed is passed as an argument by * reference (this avoids a copy from a temporary object after the * data has been extracted from the queue, which would occur if the * item extracted were returned by value). It might also throw if the * destructor of the queue item might throw (but that should never * happen), or if the empty() method of the container type throws * (which would not happen on any sane implementation). */ void pop(value_type& obj) { Thread::Mutex::Lock lock(mutex); if (q.empty()) throw AsyncQueuePopError(); obj = q.front(); q.pop(); } /** * Pops an item from the queue. If the queue is empty, it will block * until an item becomes available. If it blocks, the wait comprises * a cancellation point. This method is cancellation safe if the * stack unwinds on cancellation, as cancellation is blocked while the * queue is being operated on after coming out of a wait. This method * has strong exception safety if the container is a std::deque or * std::list container (the default is std::list), provided the * destructor of a contained item does not throw. * @param obj A value type reference to which the item at the front of * the queue will be assigned. This method might throw if the * assignment operator of the queue item might throw. In order to * complete pop() operations atomically under a single lock and to * retain strong exception safety, the object into which the pop()ed * data is to be placed is passed as an argument by reference (this * avoids a copy from a temporary object after the data has been * extracted from the queue, which would occur if the item extracted * were returned by value). It might also throw if the destructor of * the queue item might throw (but that should never happen), or if * the empty() method of the container type throws (which would not * happen on any sane implementation). */ void pop_dispatch(value_type& obj) { Thread::Mutex::Lock lock(mutex); while (q.empty()) cond.wait(mutex); Thread::CancelBlock b; obj = q.front(); q.pop(); } /** * Pops an item from the queue. If the queue is empty, it will block * until an item becomes available or until the timeout expires. If * it blocks, the wait comprises a cancellation point. This method is * cancellation safe if the stack unwinds on cancellation, as * cancellation is blocked while the queue is being operated on after * coming out of a wait. This method has strong exception safety if * the container is a std::deque or std::list container (the default * is std::list), provided the destructor of a contained item does not * throw. * @param obj A value type reference to which the item at the front of * the queue will be assigned. This method might throw if the * assignment operator of the queue item might throw. In order to * complete pop() operations atomically under a single lock and to * retain strong exception safety, the object into which the pop()ed * data is to be placed is passed as an argument by reference (this * avoids a copy from a temporary object after the data has been * extracted from the queue, which would occur if the item extracted * were returned by value). It might also throw if the destructor of * the queue item might throw (but that should never happen), or if * the empty() method of the container type throws (which would not * happen on any sane implementation). * @param millisec The timeout interval, in milliseconds. * @return If the timeout expires without an item becoming available, * the method will return true. If an item from the queue is * extracted, it returns false. */ bool pop_timed_dispatch(value_type& obj, unsigned int millisec) { timespec ts; Thread::Cond::get_abs_time(ts, millisec); Thread::Mutex::Lock lock(mutex); while (q.empty()) { if (cond.timed_wait(mutex, ts)) return true; } Thread::CancelBlock b; obj = q.front(); q.pop(); return false; } /** * Discards the item at the front of the queue. This method has * strong exception safety if the container is a std::deque or * std::list container (the default is std::list), provided the * destructor of a contained item does not throw. * @exception AsyncQueuePopError If the queue is empty when a pop is * attempted, this method will throw AsyncQueuePopError. It might * also throw if the destructor of the queue item might throw (but * that should never happen), or if the empty() method of the * container type throws (which would not happen on any sane * implementation). */ void pop() { Thread::Mutex::Lock lock(mutex); if (q.empty()) throw AsyncQueuePopError(); q.pop(); } /** * @return Whether the queue is empty. It will not throw assuming * that the empty() method of the container type does not throw, as it * will not on any sane implementation. * @note The return value may not be valid if another thread has * pushed to or popped from the queue before the value returned by the * method is acted on. It is provided as a utility, but may not be * meaningful, depending on the intended usage. */ bool empty() const { Thread::Mutex::Lock lock(mutex); return q.empty(); } /** * @exception std::bad_alloc The constructor might throw this * exception if memory is exhausted and the system throws in that * case. * @exception Thread::MutexError The constructor might throw this * exception if initialisation of the contained mutex fails. (It is * often not worth checking for this, as it means either memory is * exhausted or pthread has run out of other resources to create new * mutexes.) * @exception Thread::CondError The constructor might throw this * exception if initialisation of the contained condition variable * fails. (It is often not worth checking for this, as it means * either memory is exhausted or pthread has run out of other * resources to create new condition variables.) */ AsyncQueueDispatch() {} /** * The destructor does not throw unless the destructor of a contained * item throws. It is thread-safe (any thread may delete the * AsyncQueueDispatch object). */ ~AsyncQueueDispatch() { // lock and unlock the mutex in the destructor so that we have an // acquire operation to ensure that when the std::queue object is // destroyed memory is synchronised, so any thread may destroy the // AsyncQueueDispatch object Thread::Mutex::Lock lock(mutex); } /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/mem_fun.h0000644000175000001440000002047711544200716016654 00000000000000/* Copyright (C) 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_MEM_FUN_H #define CGU_MEM_FUN_H /** * @file mem_fun.h * @brief This file contains an adaptor to create a functor from a * class member function to pass to C++ standard algorithms. * * \#include * * Cgu::MemFun::make() is an adaptor which allows a non-static class * member function to be called by standard algorithms such as * std::for_each() or std::transform(), whereby the member function is * passed a contained object as an argument on iterating through the * container. It can also be used to make predicates from member * functions to pass to other algorithms, or indeed to generate a * general functor object representing a member function with object * and one or two arguments. It does the equivalent of std::ptr_fun() * for ordinary functions. * * For example, to iterate over a std::vector container object * named 'vec', calling a class method 'void MyObj::my_method(int)' on * each iteration, Cgu::MemFun::make() could be invoked as: * * @code * using namespace Cgu; * std::for_each(vec.begin(), vec.end(), * MemFun::make(my_obj, &MyObj::my_method)); * @endcode * * As in the case of std::ptr_fun(), when called via std::for_each(), * the member function called must be a unary function, although an * additional argument can be bound with std::bind2nd() or * std::bind1st() to enable it to be used with binary class functions. * (Note that in many implementations of std::bind*, neither the free * nor the bound argument can be a reference, whether const or * non-const. A reference argument can be employed with * Cgu::MemFun::make() where std::bind* is not used.) * * If (in C++98) the member function is const, then the unary * Cgu::MemFun::make() can be mimicked by a combination of * std::mem_fun() and std::bind1st(), so that (if const) the above * example could be reproduced as: * * @code * std::for_each(vec.begin(), vec.end(), * std::bind1st(std::mem_fun(&MyObj::my_method), &my_obj)); * @endcode * * The binary version of Cgu::MemFun::make() cannot be reproduced by * any of the built-in function adaptors available in C++98/C++03. */ /** * @namespace Cgu::MemFun * @brief This namespace contains an adaptor to create a functor from a * class member function to pass to C++ standard algorithms. * * \#include * * Cgu::MemFun::make() is an adaptor which allows a non-static class * member function to be called by standard algorithms such as * std::for_each() or std::transform(), whereby the member function is * passed a contained object as an argument on iterating through the * container. It can also be used to make predicates from member * functions to pass to other algorithms, or indeed to generate a * general functor object representing a member function with object * and one or two arguments. It does the equivalent of std::ptr_fun() * for ordinary functions. * * For example, to iterate over a std::vector container object * named 'vec', calling a class method 'void MyObj::my_method(int)' on * each iteration, Cgu::MemFun::make() could be invoked as: * * @code * using namespace Cgu; * std::for_each(vec.begin(), vec.end(), * MemFun::make(my_obj, &MyObj::my_method)); * @endcode * * As in the case of std::ptr_fun(), when called via std::for_each(), * the member function called must be a unary function, although an * additional argument can be bound with std::bind2nd() or * std::bind1st() to enable it to be used with binary class functions. * (Note that in many implementations of std::bind*, neither the free * nor the bound argument can be a reference, whether const or * non-const. A reference argument can be employed with * Cgu::MemFun::make() where std::bind* is not used.) * * If (in C++98) the member function is const, then the unary * Cgu::MemFun::make() can be mimicked by a combination of * std::mem_fun() and std::bind1st(), so that (if const) the above * example could be reproduced as: * * @code * std::for_each(vec.begin(), vec.end(), * std::bind1st(std::mem_fun(&MyObj::my_method), &my_obj)); * @endcode * * The binary version of Cgu::MemFun::make() cannot be reproduced by * any of the built-in function adaptors available in C++98/C++03. */ #include #include namespace Cgu { namespace MemFun { template class Functor1: public std::unary_function { T* obj; Ret (T::*func)(Arg); public: Ret operator()(Arg arg) const {return (obj->*func)(arg);} Functor1(T& obj_, Ret (T::*func_)(Arg)): obj(&obj_), func(func_) {} }; template Functor1 make(T& t, Ret (T::*func)(Arg)) { return Functor1(t, func); } /* const version, for binding to const methods */ template class Functor1_const: public std::unary_function { const T* obj; Ret (T::*func)(Arg) const; public: Ret operator()(Arg arg) const {return (obj->*func)(arg);} Functor1_const(const T& obj_, Ret (T::*func_)(Arg) const): obj(&obj_), func(func_) {} }; template Functor1_const make(const T& t, Ret (T::*func)(Arg) const) { return Functor1_const(t, func); } /* two argument version for use with std::bind* */ template class Functor2: public std::binary_function { T* obj; Ret (T::*func)(Arg1, Arg2); public: Ret operator()(Arg1 arg1, Arg2 arg2) const {return (obj->*func)(arg1, arg2);} Functor2(T& obj_, Ret (T::*func_)(Arg1, Arg2)): obj(&obj_), func(func_) {} }; template Functor2 make(T& t, Ret (T::*func)(Arg1, Arg2)) { return Functor2(t, func); } /* const version, for binding to const methods */ template class Functor2_const: public std::binary_function { const T* obj; Ret (T::*func)(Arg1, Arg2) const; public: Ret operator()(Arg1 arg1, Arg2 arg2) const {return (obj->*func)(arg1, arg2);} Functor2_const(const T& obj_, Ret (T::*func_)(Arg1, Arg2) const): obj(&obj_), func(func_) {} }; template Functor2_const make(const T& t, Ret (T::*func)(Arg1, Arg2) const) { return Functor2_const(t, func); } } // namespace MemFun } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/convert.h0000644000175000001440000011725011524110041016667 00000000000000/* Copyright (C) 2005 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_CONVERT_H #define CGU_CONVERT_H #include #include #include #include #include namespace Cgu { /** * @file convert.h * @brief This file contains functions for converting between * character sets. * * \#include * * This file contains functions for converting between character sets. * If you want these functions to work, you will generally have needed * to have set the locale in the relevant program with either * std::locale::global(std::locale("")) (from the C++ * standard library) or setlocale(LC_ALL,"") (from the C * standard library). */ /** * @namespace Cgu::Utf8 * @brief This namespace contains utilities relevant to the use of * UTF-8 in programs. * * \#include (for conversion and validation * functions) * * \#include (for Reassembler class) * @sa convert.h reassembler.h * * This namespace contains utilities relevant to the use of UTF-8 in * programs. If you want these functions to work, you will generally * have needed to have set the locale in the relevant program with * either std::locale::global(std::locale("")) (from the C++ * standard library) or setlocale(LC_ALL,"") (from the C standard * library). */ namespace Utf8 { class ConversionError: public std::exception { gchar* message; public: virtual const char* what() const throw() {return (const char*)message;} ConversionError& operator=(const ConversionError& e) throw() { g_free(message); message = g_strdup(e.message); return *this; } ConversionError(const ConversionError& e) throw(): message(g_strdup(e.message)) {} ConversionError(const char* msg) throw(): message(g_strdup_printf("Utf8::ConversionError: %s", msg)) {} ConversionError(GError* error) throw(): message(g_strdup_printf("Utf8::ConversionError: %s", error->message)) {} ~ConversionError() throw() {g_free(message);} }; /** * Converts text from UTF-8 to the system's Unicode wide character * representation, which will be UCS-4/UTF-32 for systems with a wide * character size of 4 (almost all unix-like systems), and UTF-16 for * systems with a wide character size of 2. * @param input Text in valid UTF-8 format. * @return The input text converted to UCS-4 or UTF-16. * @exception Cgu::Utf8::ConversionError This exception will be thrown * if conversion fails because the input string is not in valid UTF-8 * format or the system does not support wide character Unicode * strings. * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. * * Since 0.9.2 */ std::wstring uniwide_from_utf8(const std::string& input); /** * Converts text from the system's Unicode wide character * representation, which will be UCS-4/UTF-32 for systems with a wide * character size of 4 (almost all unix-like systems) and UTF-16 for * systems with a wide character size of 2, to narrow character UTF-8 * format. * @param input Text in valid UCS-4 or UTF-16 format. * @return The input text converted to UTF-8. * @exception Cgu::Utf8::ConversionError This exception will be thrown * if conversion fails because the input string is not in valid UCS-4 * or UTF-16 format or the system does not support wide character * Unicode strings. * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. * * Since 0.9.2 */ std::string uniwide_to_utf8(const std::wstring& input); /** * Converts text from UTF-8 to the system's wide character locale * representation. For this function to work correctly, the system's * installed iconv() must support conversion to a generic wchar_t * target, but in POSIX whether it does so is implementation defined * (GNU's C library implemention does). For most unix-like systems * the wide character representation will be Unicode (UCS-4/UTF-32 or * UTF-16), and where that is the case use the uniwide_from_utf8() * function instead, which will not rely on the generic target being * available. * @param input Text in valid UTF-8 format. * @return The input text converted to the system's wide character * locale representation. * @exception Cgu::Utf8::ConversionError This exception will be thrown * if conversion fails because the input string is not in valid UTF-8 * format, or cannot be converted to the system's wide character * locale representation (eg because the input characters cannot be * represented by that encoding, or the system's installed iconv() * function does not support conversion to a generic wchar_t target). * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. * * Since 0.9.2 */ std::wstring wide_from_utf8(const std::string& input); /** * Converts text from the system's wide character locale * representation to UTF-8. For this function to work correctly, the * system's installed iconv() must support conversion from a generic * wchar_t target, but in POSIX whether it does so is implementation * defined (GNU's C library implemention does). For most unix-like * systems the wide character representation will be Unicode * (UCS-4/UTF-32 or UTF-16), and where that is the case use the * uniwide_to_utf8() function instead, which will not rely on the * generic target being available. * @param input Text in a valid wide character locale format. * @return The input text converted to UTF-8. * @exception Cgu::Utf8::ConversionError This exception will be thrown * if conversion fails because the input string is not in a valid wide * character locale format, or cannot be converted to UTF-8 (eg * because the system's installed iconv() function does not support * conversion from a generic wchar_t target). * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. * * Since 0.9.2 */ std::string wide_to_utf8(const std::wstring& input); /** * Converts text from UTF-8 to the system's filename encoding. * @param input Text in valid UTF-8 format. * @return The input text converted to filename encoding. * @exception Cgu::Utf8::ConversionError This exception will be thrown * if conversion fails because the input string is not in valid UTF-8 * format, or cannot be converted to filename encoding (eg because the * input characters cannot be represented by that encoding). * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. * @note glib takes the system's filename encoding from the * environmental variables G_FILENAME_ENCODING and G_BROKEN_FILENAMES. * If G_BROKEN_FILENAMES is set to 1 and G_FILENAME_ENCODING is not * set, it will be assumed that the filename encoding is the same as * the locale encoding. If G_FILENAME_ENCODING is set, then * G_BROKEN_FILENAMES is ignored, and filename encoding is taken from * the value held by G_FILENAME_ENCODING. * * Since 0.9.2 */ std::string filename_from_utf8(const std::string& input); /** * Converts text from the system's filename encoding to UTF-8. * @param input Text in valid filename encoding. * @return The input text converted to UTF-8. * @exception Cgu::Utf8::ConversionError This exception will be thrown * if conversion fails because the input string is not in valid * filename encoding. * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. * @note glib takes the system's filename encoding from the * environmental variables G_FILENAME_ENCODING and G_BROKEN_FILENAMES. * If G_BROKEN_FILENAMES is set to 1 and G_FILENAME_ENCODING is not * set, it will be assumed that the filename encoding is the same as * the locale encoding. If G_FILENAME_ENCODING is set, then * G_BROKEN_FILENAMES is ignored, and filename encoding is taken from * the value held by G_FILENAME_ENCODING. * * Since 0.9.2 */ std::string filename_to_utf8(const std::string& input); /** * Converts text from UTF-8 to the system's locale encoding. * @param input Text in valid UTF-8 format. * @return The input text converted to locale encoding. * @exception Cgu::Utf8::ConversionError This exception will be thrown * if conversion fails because the input string is not in valid UTF-8 * format, or cannot be converted to locale encoding (eg because the * input characters cannot be represented by that encoding). * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. * * Since 0.9.2 */ std::string locale_from_utf8(const std::string& input); /** * Converts text from the system's locale encoding to UTF-8. * @param input Text in valid locale encoding. * @return The input text converted to UTF-8. * @exception Cgu::Utf8::ConversionError This exception will be thrown * if conversion fails because the input string is not in valid locale * encoding. * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. * * Since 0.9.2 */ std::string locale_to_utf8(const std::string& input); /** * Indicates whether the input text comprises valid UTF-8. * @param text The text to be tested. * @return true if the input text is in valid UTF-8 format, otherwise * false. * @exception std::bad_alloc This function might throw std::bad_alloc * if std::string::data() might throw when memory is exhausted. * @note \#include for this function. * * Since 0.9.2 */ inline bool validate(const std::string& text) { return g_utf8_validate(text.data(), text.size(), 0); } /************** Iterator class **************/ /** * @class Iterator convert.h c++-gtk-utils/convert.h * @brief A class which will iterate through a std::string object by * reference to unicode characters rather than by bytes. * @sa Cgu::Utf8::ReverseIterator * * The Cgu::Utf8::Iterator class does the same as * std::string::const_iterator, except that when iterating through a * std::string object using the ++ and -- postfix and prefix * operators, it iterates by increments of whole unicode code points * rather than by reference to bytes. In addition, the dereferencing * operator returns the whole unicode code point (a UCS-4 gunichar * type) rather than a char type. * * Where, as in practically all unix-like systems, sizeof(wchar_t) == * 4, then the gunichar return value of the dereferencing operator can * be converted by a simple static_cast to the wchar_t type. So far * as displaying individual code points is concerned however, it * should be noted that because unicode allows combining characters, a * unicode code point may not contain the whole representation of a * character as displayed. This effect can be dealt with for all * characters capable of representation by Level 1 unicode (ie by * precomposed characters) using g_utf8_normalize() before iterating. * There will still however be some non-European scripts, in * particular some Chinese/Japanese/Korean ideograms, where * description of the ideogram requires more than one code point to be * finally resolved. For these, printing individual code points * sequentially one by one directly to a display (say with std::wcout) * may or not may not have the desired result, depending on how the * display device (eg console) deals with that case. * * A Cgu::Utf8::Iterator only allows reading from and not writing to * the std::string object being iterated through. This is because in * UTF-8 the representation of any one unicode code point will require * between 1 and 6 bytes: accordingly modifying a UTF-8 string may * change its length (in bytes) even though the number of unicode * characters stays the same. For the same reason, this iterator is a * bidirectional iterator but not a random access iterator. * * The std::string object concerned should contain valid UTF-8 text. * If necessary, this should be checked with Cgu::Utf8::validate() * first. In addition, before use, the Cgu::Utf8::Iterator object * must be initialized by a std::string::const_iterator or * std::string::iterator object pointing to the first byte of a valid * UTF-8 character in the string (or by another Cgu::Utf8::Iterator * object or by a Cgu::Utf8::ReverseIterator object), and iteration * will begin at the point of initialization: therefore, assuming the * string contains valid UTF-8 text, passing std::string::begin() to a * Cgu::Utf8::Iterator object will always be safe. Initialization by * std::string::end() is also valid if the first iteration is * backwards with the -- operator. This initialization can be done * either in the constructor or by assignment. Comparison operators * ==, !=, <, <=, > and >= are provided enabling the position of * Cgu::Utf8::Iterator objects to be compared with each other or with * std::string::const_iterator and std::string::iterator objects. * * This is an example: * @code * using namespace Cgu; * * std::wstring wide_str(L"ßøǿón"); * std::string narrow_str(Utf8::uniwide_to_utf8(wide_str)); * * Utf8::Iterator iter; * for (iter = narrow_str.begin(); * iter != narrow_str.end(); * ++iter) * std::wcout << static_cast(*iter) << std::endl; * @endcode * * This class assumes in using g_utf8_next_char(), g_utf8_prev_char() * and g_utf8_get_char() that the std::string object keeps its * internal string in contiguous storage. This is required by the * draft C++0x standard, but not formally by C++98/C++03. However, * known implementations of std::string in fact store the string * contiguously, and given the new draft standard it is reasonable to * assume that that will always be the case even before the latest * standard is promulgated. */ class ReverseIterator; class Iterator { public: typedef gunichar value_type; typedef gunichar reference; // read only typedef void pointer; // read only typedef std::string::difference_type difference_type; typedef std::bidirectional_iterator_tag iterator_category; private: std::string::const_iterator pos; public: /** * Increments the iterator so that it moves from the beginning of the * current UTF-8 character to the beginning of the next UTF-8 * character. It is a prefix operator. It will not throw. * @return A reference to the iterator in its new position. * * Since 1.0.1 */ Iterator& operator++(); /** * Increments the iterator so that it moves from the beginning of the * current UTF-8 character to the beginning of the next UTF-8 * character. It is a postfix operator. It will not throw provided * that copy constructing and assigning a std::string::const_iterator * object does not throw, as it will not in any sane implementation. * @return A copy of the iterator in its former position. * * Since 1.0.1 */ Iterator operator++(int); /** * Decrements the iterator so that it moves from the beginning of the * current UTF-8 character to the beginning of the previous UTF-8 * character. It is a prefix operator. It will not throw. * @return A reference to the iterator in its new position. * * Since 1.0.1 */ Iterator& operator--(); /** * Decrements the iterator so that it moves from the beginning of the * current UTF-8 character to the beginning of the previous UTF-8 * character. It is a postfix operator. It will not throw provided * that copy constructing and assigning a std::string::const_iterator * object does not throw, as it will not in any sane implementation. * @return A copy of the iterator in its former position. * * Since 1.0.1 */ Iterator operator--(int); /** * Assigns a std::string::const_iterator object to this object. It * should point to the beginning of a UTF-8 character (eg * std::string::begin()) or to std::string::end(). It will not throw * provided assigning a std::string::const_iterator object does not * throw, as it will not in any sane implementation. * @param iter The std::string::const_iterator. * @return A reference to this Cgu::Utf8::Iterator object after * assignment. * * Since 1.0.1 */ Iterator& operator=(const std::string::const_iterator& iter) {pos = iter; return *this;} /** * Assigns a std::string::iterator object to this object. It should * point to the beginning of a UTF-8 character (eg * std::string::begin()) or to std::string::end(). It will not throw * provided assigning a std::string::const_iterator object does not * throw, as it will not in any sane implementation. * @param iter The std::string::iterator. * @return A reference to this Cgu::Utf8::Iterator object after * assignment. * * Since 1.0.1 */ Iterator& operator=(const std::string::iterator& iter) {pos = iter; return *this;} /** * Assigns a Cgu::Utf8::Iterator object to this object. It will not * throw provided assigning a std::string::const_iterator object does * not throw, as it will not in any sane implementation. * @param iter The iterator. * @return A reference to this Cgu::Utf8::Iterator object after * assignment. * * Since 1.0.1 */ Iterator& operator=(const Iterator& iter) {pos = iter.pos; return *this;} /** * Assigns a Cgu::Utf8::ReverseIterator object to this object, so that * this iterator adopts the same physical position (but the logical * position will be offset to the following UTF-8 character). It will * not throw provided assigning a std::string::const_iterator object * does not throw, as it will not in any sane implementation. * @param iter The iterator. * @return A reference to this Cgu::Utf8::Iterator object after * assignment. * * Since 1.0.1 */ Iterator& operator=(const ReverseIterator& iter); /** * The dereference operator. * @return A 32-bit gunichar object containing the whole unicode code * point which is currently represented by this iterator. It will not * throw. * * Since 1.0.1 */ Iterator::value_type operator*() const {return g_utf8_get_char(&(*pos));} /** * @return The current underlying std::string::const_iterator kept by * this iterator. Once this iterator has been correctly initialized, * that will point to the beginning of the UTF-8 character currently * represented by this iterator or to std::string::end(). It will not * throw provided assigning a std::string::const_iterator object does * not throw, as it will not in any sane implementation. * * Since 1.0.1 */ std::string::const_iterator base() const {return pos;} /** * Constructs this iterator and initialises it with a * std::string::const_iterator object. It should point to the * beginning of a UTF-8 character (eg std::string::begin()) or to * std::string::end(). It will not throw provided that copy * constructing a std::string::const_iterator object does not throw, * as it will not in any sane implementation. This is a type * conversion constructor (it is not marked explicit) so that it can * be used with Cgu::Utf8::Iterator comparison operators to compare * the position of Cgu::Utf8::Iterator with * std::string::const_iterator objects. * @param iter The std::string::const_iterator. * * Since 1.0.1 */ Iterator(const std::string::const_iterator& iter): pos(iter) {} /** * Constructs this iterator and initialises it with a * std::string::iterator object. It should point to the beginning of * a UTF-8 character (eg std::string::begin()) or to * std::string::end(). It will not throw provided that copy * constructing a std::string::const_iterator object does not throw, * as it will not in any sane implementation. This is a type * conversion constructor (it is not marked explicit) so that it can * be used with Cgu::Utf8::Iterator comparison operators to compare * the position of Cgu::Utf8::Iterator with std::string::iterator * objects. * @param iter The std::string::iterator. * * Since 1.0.1 */ Iterator(const std::string::iterator& iter): pos(iter) {} /** * Constructs this iterator and initialises it with another * Cgu::Utf8::Iterator object. It will not throw provided that copy * constructing a std::string::const_iterator object does not throw, * as it will not in any sane implementation. * @param iter The iterator. * * Since 1.0.1 */ Iterator(const Iterator& iter): pos(iter.pos) {} /** * Constructs this iterator and initialises it with a * Cgu::Utf8::ReverseIterator object, so that this iterator adopts the * same physical position (but the logical position will be offset to * the following UTF-8 character). It will not throw provided that * copy constructing a std::string::const_iterator object does not * throw, as it will not in any sane implementation. * @param iter The iterator. * * Since 1.0.1 */ explicit Iterator(const ReverseIterator& iter); /** * The default constructor will not throw. * * Since 1.0.1 */ Iterator() {} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; inline Iterator& Iterator::operator++() { const std::string::value_type* tmp = &(*pos); // using g_utf8_next_char is safe even when pos points to the last character - // that macro calls up the g_utf8_skip look-up table rather than attempting to // read the following character, so we can safely iterate to std::string::end() pos += g_utf8_next_char(tmp) - tmp; return *this; } inline Iterator Iterator::operator++(int) { Iterator tmp(*this); ++(*this); return tmp; } inline Iterator& Iterator::operator--() { // we might be iterating from std::string::end() so we need // to decrement before dereferencing and then increment again const std::string::value_type* tmp = &(*(pos-1)); ++tmp; pos -= tmp - g_utf8_prev_char(tmp); return *this; } inline Iterator Iterator::operator--(int) { Iterator tmp(*this); --(*this); return tmp; } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ inline bool operator==(const Iterator& iter1, const Iterator& iter2) { return (iter1.base() == iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ inline bool operator!=(const Iterator& iter1, const Iterator& iter2) { return (iter1.base() != iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ inline bool operator<(const Iterator& iter1, const Iterator& iter2) { return (iter1.base() < iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ inline bool operator<=(const Iterator& iter1, const Iterator& iter2) { return (iter1.base() <= iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ inline bool operator>(const Iterator& iter1, const Iterator& iter2) { return (iter1.base() > iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ inline bool operator>=(const Iterator& iter1, const Iterator& iter2) { return (iter1.base() >= iter2.base()); } /************** ReverseIterator class **************/ /** * @class ReverseIterator convert.h c++-gtk-utils/convert.h * @brief A class which will iterate in reverse through a std::string * object by reference to unicode characters rather than by bytes. * @sa Cgu::Utf8::Iterator * * The Cgu::Utf8::ReverseIterator class does the same as * std::string::const_reverse_iterator, except that when iterating * through a std::string object using the ++ and -- postfix and prefix * operators, it iterates by increments of whole unicode code points * rather than by reference to bytes. In addition, the dereferencing * operator returns the whole unicode code point (a UCS-4 gunichar * type) rather than a char type. * * Before use, the Cgu::Utf8::ReverseIterator object must be * initialized by a std::string::const_reverse_iterator or * std::string::reverse_iterator object representing the first byte of * a valid UTF-8 character in the string (or by another * Cgu::Utf8::ReverseIterator object or by a Cgu::Utf8::Iterator * object): so assuming the string contains valid UTF-8 text, it is * always valid to initialise a Cgu::Utf8::ReverseIterator with * std::string::rbegin(). Initialization by std::string::rend() is * also valid if the first interation is backwards with the -- * operator. This initialization can be done either in the * constructor or by assignment. Comparison operators ==, !=, <, <=, * > and >= are provided enabling the position of * Cgu::Utf8::ReverseIterator objects to be compared with each other * or with std::string::const_reverse_iterator and * std::string::reverse_iterator objects. * * This is an example: * @code * using namespace Cgu; * * std::wstring wide_str(L"ßøǿón"); * std::string narrow_str(Utf8::uniwide_to_utf8(wide_str)); * * Utf8::ReverseIterator iter; * for (iter = narrow_str.rbegin(); * iter != narrow_str.rend(); * ++iter) * std::wcout << static_cast(*iter) << std::endl; * @endcode * * For further information on its use, see the Utf8::Iterator * documentation. */ class ReverseIterator { public: typedef gunichar value_type; typedef gunichar reference; // read only typedef void pointer; // read only typedef std::string::difference_type difference_type; typedef std::bidirectional_iterator_tag iterator_category; private: std::string::const_iterator pos; // we use cache to make iterating and then dereferencing more efficient mutable std::string::const_iterator cache; public: /** * Increments the iterator in the reverse direction so that it moves * from the beginning of the current UTF-8 character to the beginning * of the previous UTF-8 character in the std::string object * concerned. It is a prefix operator. It will not throw provided * assigning a std::string::const_iterator object does not throw, as * it will not in any sane implementation. * @return A reference to the iterator in its new position * * Since 1.0.1 */ ReverseIterator& operator++(); /** * Increments the iterator in the reverse direction so that it moves * from the beginning of the current UTF-8 character to the beginning * of the previous UTF-8 character in the std::string object * concerned. It is a postfix operator. It will not throw provided * that copy constructing and assigning a std::string::const_iterator * object does not throw, as it will not in any sane implementation. * @return A copy of the iterator in its former position * * Since 1.0.1 */ ReverseIterator operator++(int); /** * Decrements the iterator in the reverse direction so that it moves * from the beginning of the current UTF-8 character to the beginning * of the following UTF-8 character in the std::string object * concerned. It is a prefix operator. It will not throw provided * assigning a std::string::const_iterator object does not throw, as * it will not in any sane implementation. * @return A reference to the iterator in its new position * * Since 1.0.1 */ ReverseIterator& operator--(); /** * Decrements the iterator in the reverse direction so that it moves * from the beginning of the current UTF-8 character to the beginning * of the following UTF-8 character in the std::string object * concerned. It is a postfix operator. It will not throw provided * that copy constructing and assigning a std::string::const_iterator * object does not throw, as it will not in any sane implementation. * @return A copy of the iterator in its former position * * Since 1.0.1 */ ReverseIterator operator--(int); /** * Assigns a std::string::const_reverse_iterator object to this * object. It should represent the beginning of a UTF-8 character (eg * std::string::rbegin()) or comprise std::string::rend(). It will * not throw provided assigning a std::string::const_iterator object * does not throw, as it will not in any sane implementation. * @param iter The const_reverse_iterator. * @return A reference to this Cgu::Utf8::ReverseIterator object after * assignment. * * Since 1.0.1 */ ReverseIterator& operator=(const std::string::const_reverse_iterator& iter) {pos = iter.base(); cache = pos; return *this;} /** * Assigns a std::string::reverse_iterator object to this object. It * should represent the beginning of a UTF-8 character (eg * std::string::rbegin()) or comprise std::string::rend(). It will * not throw provided assigning a std::string::const_iterator object * does not throw, as it will not in any sane implementation. * @param iter The reverse_iterator. * @return A reference to this Cgu::Utf8::ReverseIterator object after * assignment. * * Since 1.0.1 */ ReverseIterator& operator=(const std::string::reverse_iterator& iter) {pos = iter.base(); cache = pos; return *this;} /** * Assigns a Cgu::Utf8::ReverseIterator object to this object. It * will not throw provided assigning a std::string::const_iterator * object does not throw, as it will not in any sane implementation. * @param iter The iterator. * @return A reference to this Cgu::Utf8::ReverseIterator object after * assignment. * * Since 1.0.1 */ ReverseIterator& operator=(const ReverseIterator& iter) {pos = iter.pos; cache = iter.cache; return *this;} /** * Assigns a Cgu::Utf8::Iterator object to this object, so that this * iterator adopts the same physical position (but the logical * position will be offset to the previous UTF-8 character in the * std::string object concerned). It will not throw provided * assigning a std::string::const_iterator object does not throw, as * it will not in any sane implementation. * @param iter The iterator. * @return A reference to this Cgu::Utf8::ReverseIterator object after * assignment. * * Since 1.0.1 */ ReverseIterator& operator=(const Iterator& iter) {pos = iter.base(); cache = pos; return *this;} /** * The dereference operator. * @return A 32-bit gunichar object containing the whole unicode code * point which is currently represented by this iterator. It will not * throw. * * Since 1.0.1 */ ReverseIterator::value_type operator*() const; /** * @return The current underlying std::string::const_iterator kept by * this iterator. Once this iterator has been correctly initialized, * that will point to the beginning of the UTF-8 character after the * one currently represented by this iterator or to * std::string::end(). It will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ std::string::const_iterator base() const {return pos;} /** * Constructs this iterator and initialises it with a * std::string::const_reverse_iterator object. It should represent * the beginning of a UTF-8 character (eg std::string::rbegin()) or * comprise std::string::rend(). It will not throw provided that copy * constructing a std::string::const_iterator object does not throw, * as it will not in any sane implementation. This is a type * conversion constructor (it is not marked explicit) so that it can * be used with Cgu::Utf8::ReverseIterator comparison operators to * compare the position of Cgu::Utf8::ReverseIterator with * std::string::const_reverse_iterator objects. * @param iter The const_reverse_iterator. * * Since 1.0.1 */ ReverseIterator(const std::string::const_reverse_iterator& iter): pos(iter.base()), cache(pos) {} /** * Constructs this iterator and initialises it with a * std::string::reverse_iterator object. It should represent the * beginning of a UTF-8 character (eg std::string::rbegin()) or * comprise std::string::rend(). It will not throw provided that copy * constructing a std::string::const_iterator object does not throw, * as it will not in any sane implementation. This is a type * conversion constructor (it is not marked explicit) so that it can * be used with Cgu::Utf8::ReverseIterator comparison operators to * compare the position of Cgu::Utf8::ReverseIterator with * std::string::reverse_iterator objects. * @param iter The reverse_iterator. * * Since 1.0.1 */ ReverseIterator(const std::string::reverse_iterator& iter): pos(iter.base()), cache(pos) {} /** * Constructs this iterator and initialises it with another * Cgu::Utf8::ReverseIterator object. It will not throw provided that * copy constructing a std::string::const_iterator object does not * throw, as it will not in any sane implementation. * @param iter The iterator. * * Since 1.0.1 */ ReverseIterator(const ReverseIterator& iter): pos(iter.pos), cache(iter.cache) {} /** * Constructs this iterator and initialises it with a * Cgu::Utf8::Iterator object, so that this iterator adopts the same * physical position (but the logical position will be offset to the * previous UTF-8 character in the std::string object concerned). It * will not throw provided that copy constructing a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * @param iter The iterator. * * Since 1.0.1 */ explicit ReverseIterator(const Iterator& iter): pos(iter.base()), cache(pos) {} /** * The default constructor will not throw. * * Since 1.0.1 */ ReverseIterator() {} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; inline ReverseIterator& ReverseIterator::operator++() { if (pos > cache) pos = cache; else { // we might be iterating from std::string::end()/std::string::rbegin() so // we need to decrement before dereferencing and then increment again const std::string::value_type* tmp = &(*(pos-1)); ++tmp; pos -= tmp - g_utf8_prev_char(tmp); } return *this; } inline ReverseIterator ReverseIterator::operator++(int) { ReverseIterator tmp(*this); ++(*this); return tmp; } inline ReverseIterator& ReverseIterator::operator--() { cache = pos; const std::string::value_type* tmp = &(*pos); // using g_utf8_next_char is safe even when pos points to the first character - // that macro calls up the g_utf8_skip look-up table rather than attempting to // read the following character, so we can safely iterate to std::string::rbegin() pos += g_utf8_next_char(tmp) - tmp; return *this; } inline ReverseIterator ReverseIterator::operator--(int) { ReverseIterator tmp(*this); --(*this); return tmp; } inline ReverseIterator::value_type ReverseIterator::operator*() const { Iterator tmp(*this); --tmp; cache = tmp.base(); return g_utf8_get_char(&(*(tmp.base()))); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ inline bool operator==(const ReverseIterator& iter1, const ReverseIterator& iter2) { return (iter1.base() == iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. * * Since 1.0.1 */ inline bool operator!=(const ReverseIterator& iter1, const ReverseIterator& iter2) { return (iter1.base() != iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. Ordering is viewed from the * perspective of the logical operation (reverse iteration), so that * for example an iterator at position std::string::rbegin() is less * than an iterator at position std::string::rend(). * * Since 1.0.1 */ inline bool operator<(const ReverseIterator& iter1, const ReverseIterator& iter2) { return (iter1.base() > iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. Ordering is viewed from the * perspective of the logical operation (reverse iteration), so that * for example an iterator at position std::string::rbegin() is less * than an iterator at position std::string::rend(). * * Since 1.0.1 */ inline bool operator<=(const ReverseIterator& iter1, const ReverseIterator& iter2) { return (iter1.base() >= iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. Ordering is viewed from the * perspective of the logical operation (reverse iteration), so that * for example an iterator at position std::string::rbegin() is less * than an iterator at position std::string::rend(). * * Since 1.0.1 */ inline bool operator>(const ReverseIterator& iter1, const ReverseIterator& iter2) { return (iter1.base() < iter2.base()); } /** * The comparison operators will not throw provided assigning a * std::string::const_iterator object does not throw, as it will not * in any sane implementation. Ordering is viewed from the * perspective of the logical operation (reverse iteration), so that * for example an iterator at position std::string::rbegin() is less * than an iterator at position std::string::rend(). * * Since 1.0.1 */ inline bool operator>=(const ReverseIterator& iter1, const ReverseIterator& iter2) { return (iter1.base() <= iter2.base()); } /*** Iterator class methods which require ReverseIterator as a complete type ***/ inline Iterator& Iterator::operator=(const ReverseIterator& iter) { pos = iter.base(); return *this; } inline Iterator::Iterator(const ReverseIterator& iter): pos(iter.base()) {} } // namespace Utf8 } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/prog_present.cpp0000644000175000001440000005570011524110041020252 00000000000000/* Copyright (C) 2009 and 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include // for config.h, HAVE_GIO_DBUS and HAVE_DBUS_GLIB #include /* CGU_PROG_PRESENTER_DBUS_INTERFACE needs to match the interface name in prog-presenter.xml used to generate prog-presenter-glue.h and prog-presenter-bindings.h because we might be compiling against dbus-glib. The introspection data for gio's gdbus will also use this interface name */ #define CGU_PROG_PRESENTER_DBUS_INTERFACE "org.cgu.CguProgPresenterInterface" /* REGISTER_SERVICE_PREFIX can be anything sensible */ #define REGISTER_SERVICE_PREFIX "org.cgu.progs" /* REGISTER_PATH_PREFIX is the namespace for the dbus object path (name) and can be anything sensible */ #define REGISTER_PATH_PREFIX "/org/cgu/progs" #ifdef HAVE_GIO_DBUS #include #include #include #include /* since gio does are not use libdbus, provide our own defines */ #define CGU_DBUS_SERVICE "org.freedesktop.DBus" #define CGU_DBUS_PATH "/org/freedesktop/DBus" #define CGU_DBUS_INTERFACE "org.freedesktop.DBus" #define CGU_DBUS_BECOME_PRIMARY_OWNER 1 namespace Cgu { /* with gio we have to provide our introspection data in the code */ static const gchar introspection_xml[] = "" " " " " " " " " " " ""; /* for error reporting on CguProgPresenterInterface */ typedef enum {CGU_PROG_PRESENTER_FALSE = 0} CguProgPresenterError; static GDBusErrorEntry cgu_prog_presenter_errors[] = { {CGU_PROG_PRESENTER_FALSE, "org.cgu.CguProgPresenterInterface.FalseReturnValue"} }; static GQuark cgu_prog_presenter_error_get_quark() { static volatile gsize error_quark = 0; if (!error_quark) { g_dbus_error_register_error_domain("CguProgPresenterErrorDomain", &error_quark, cgu_prog_presenter_errors, 1); } return (GQuark)error_quark; } /* this struct contains the function pointer and persistent data executed by cgu_present_cb() */ static struct { Cgu::PresentFunc func; void* data; } cgu_present_items = {0, 0}; /* this is the dbus object callback */ extern "C" { static void cgu_present_cb(GDBusConnection*, const gchar*, const gchar*, const gchar*, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, void*) { if (!g_strcmp0(method_name, "Present")) { gboolean ret; if (!cgu_present_items.func) // we shouldn't ever get a false value ret = FALSE; else { // parameters is a variant holding a tuple containing a variant // holding either a bytestring-array or a boolean: now decompose GvarHandle decomposed(g_variant_get_child_value(parameters, 0)); // decomposed is a variant holding a variant holding either // a bytestring-array or a boolean decomposed.reset(g_variant_get_variant(decomposed)); // decomposed is now a variant holding either a bytestring-array or // a boolean: the variant will be of boolean type if there are no // instance arguments if (!g_variant_type_equal(g_variant_get_type(decomposed), G_VARIANT_TYPE_BOOLEAN)) { const gchar** ar = g_variant_get_bytestring_array(decomposed, 0); ret = cgu_present_items.func(cgu_present_items.data, (const char**)ar); g_free(ar); } else ret = cgu_present_items.func(cgu_present_items.data, 0); } if (!ret) { g_dbus_method_invocation_return_error(invocation, cgu_prog_presenter_error_get_quark(), CGU_PROG_PRESENTER_FALSE, "%s", "Cgu::PresentFunc function returned FALSE"); } else g_dbus_method_invocation_return_value(invocation, 0); } else g_warning("ProgPresenter call to invalid method name\n"); } } // extern "C" static const GDBusInterfaceVTable cgu_prog_presenter_interface_vtable = { cgu_present_cb, 0, 0, }; /* register_service and register_path are allocated on the heap in register_prog() as they may need to be visible also in present_instance(). They are freed in register_prog() or present_instance(), as appropriate */ static gchar* register_service = 0; static gchar* register_path = 0; static void clean_up_dbus_variables() { g_free(register_service); g_free(register_path); register_service = 0; register_path = 0; } // making session_connection static will shut valgrind up static GDBusConnection* session_connection; gboolean register_prog(const char* prog_name, PresentFunc func, void* object_data) { // we only call register_prog() once in any one program invocation - // once it has returned FALSE go on to call present_instance() static bool initialised = false; // because of that also store previous return value so we can supply // it again rather than just abort static gboolean return_val = FALSE; if (initialised) { g_warning("Only call register_prog() once in any one program instance - ignoring this call\n"); return return_val; } initialised = true; GError* error = 0; // use the session bus // don't keep the connection object in a GobjHandle, as it needs to survive // the call to this method and last throughout the running of this process // instead it has been made a static object session_connection = g_bus_get_sync(G_BUS_TYPE_SESSION, 0, &error); if (!session_connection) { // problem in obtaining a connection - bail out g_critical("Failed to open connection to bus: %s\n", error->message); g_error_free(error); return return_val; } // we have a connection on the session bus g_object_set(session_connection, "exit-on-close", false, static_cast(0)); gchar* delimited_prog_name = g_strdup(prog_name); g_strdelimit(delimited_prog_name, "-|<>./+", '_'); register_service = g_strdup_printf("%s.%s", REGISTER_SERVICE_PREFIX, delimited_prog_name); register_path = g_strdup_printf("%s/%s/%s", REGISTER_PATH_PREFIX, delimited_prog_name, "presenter"); g_free(delimited_prog_name); GobjHandle proxy(g_dbus_proxy_new_sync(session_connection, G_DBUS_PROXY_FLAGS_NONE, 0, CGU_DBUS_SERVICE, CGU_DBUS_PATH, CGU_DBUS_INTERFACE, 0, &error)); if (!proxy.get()) { // problem in creating proxy object - bail out g_critical("Failed to create proxy object: %s\n", error->message); g_error_free(error); clean_up_dbus_variables(); return return_val; } GvarHandle result(g_dbus_proxy_call_sync(proxy, "RequestName", g_variant_new("(su)", register_service, 0), G_DBUS_CALL_FLAGS_NONE, -1, 0, &error)); if (!result.get()) { // problem in obtaining the service name - bail out if (g_dbus_error_is_remote_error(error)) { gchar* dbus_msg = g_dbus_error_get_remote_error(error); if (dbus_msg) { g_critical("Dbus error: %s", dbus_msg); g_dbus_error_strip_remote_error(error); g_free(dbus_msg); } } g_critical("Failed to obtain name %s on session bus: %s", register_service, error->message); g_error_free(error); clean_up_dbus_variables(); return return_val; } if (g_variant_get_uint32(GvarHandle(g_variant_get_child_value(result, 0))) != CGU_DBUS_BECOME_PRIMARY_OWNER) { // the program is already running - return FALSE return return_val; } // first invocation of the program - this process now owns the // service name, so register a dbus object for cgu_present_cb() GDBusNodeInfo* introspection_data = g_dbus_node_info_new_for_xml(introspection_xml, 0); if (!introspection_data) { // this can't really happen g_critical("Failed to create introspection data for GDBus\n"); clean_up_dbus_variables(); return return_val; } cgu_present_items.func = func; cgu_present_items.data = object_data; guint id = g_dbus_connection_register_object(session_connection, register_path, introspection_data->interfaces[0], &cgu_prog_presenter_interface_vtable, 0, 0, &error); if (!id) { // problem in registering dbus object - bail out g_critical("Failed to register dbus object at path %s on session bus: %s", register_path, error->message); g_error_free(error); clean_up_dbus_variables(); g_dbus_node_info_unref(introspection_data); return return_val; } // we don't need register_service or register_path any more as // this is the first invocation of the program and we will not // call present_instance() clean_up_dbus_variables(); g_dbus_node_info_unref(introspection_data); return_val = TRUE; return return_val; } int present_instance(const char** instance_args) { if (!register_service) { g_warning("Error in present_instance(): either register_prog() has not been called,\n" "there was an error in obtaining a connection or service name in register_prog(),\n" "present_instance() has been called in the first invocation of the program\n" "or present_instance() has already been called once before in this invocation of\n" "the program. Ignoring this call() to present_instance\n"); return 1; } GError* error = 0; // use the session bus GobjHandle connection(g_bus_get_sync(G_BUS_TYPE_SESSION, 0, &error)); if (!connection.get()) { // problem in obtaining a connection - bail out g_critical("Failed to open connection to bus: %s\n", error->message); g_error_free(error); clean_up_dbus_variables(); return 1; } // we have a connection on the session bus g_object_set(connection.get(), "exit-on-close", false, static_cast(0)); GobjHandle proxy(g_dbus_proxy_new_sync(connection, G_DBUS_PROXY_FLAGS_NONE, 0, register_service, register_path, CGU_PROG_PRESENTER_DBUS_INTERFACE, 0, &error)); if (!proxy.get()) { // problem in creating proxy object - bail out g_critical("Failed to create proxy object: %s\n", error->message); g_error_free(error); clean_up_dbus_variables(); return 1; } GvarHandle args; if (!instance_args) args.reset(g_variant_new_boolean(FALSE)); else args.reset(g_variant_new_bytestring_array((const gchar* const*)instance_args, -1)); GvarHandle result(g_dbus_proxy_call_sync(proxy, "Present", g_variant_new("(v)", args.get()), G_DBUS_CALL_FLAGS_NONE, -1, 0, &error)); if (!result.get()) { int return_val; gchar* dbus_msg = 0; if (g_dbus_error_is_remote_error(error)) { dbus_msg = g_dbus_error_get_remote_error(error); return_val = 2; } else return_val = 1; if (dbus_msg) { g_dbus_error_strip_remote_error(error); g_critical("Failed to present instance: %s", error->message); g_critical("Dbus error name is %s", dbus_msg); g_free(dbus_msg); } else g_critical("Failed to present instance: %s", error->message); g_error_free(error); clean_up_dbus_variables(); return return_val; } clean_up_dbus_variables(); return 0; } } // namespace Cgu #elif defined(HAVE_DBUS_GLIB) #include #include #include #include /* GObject stuff */ /* CguProgPresenter is the dbus method part of the functionality in this file. A CguProgPresenter object is created on the first occasion that register_prog() is called by the program in question. It will listen on the dbus session bus for any messages that are sent to it that the program has been started again (the client - the new program instance - does this by calling present_instance()). CguProgPresenter is private to the implementation in this file. None of it is exported to the program at large (all its methods are static). The public interface to the functionality in this file only consists of register_prog() and present_instance() */ extern "C" { #define CGU_PROG_PRESENTER_TYPE (cgu_prog_presenter_get_type()) #define CGU_PROG_PRESENTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CGU_PROG_PRESENTER_TYPE, CguProgPresenter)) #define IS_CGU_PROG_PRESENTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CGU_PROG_PRESENTER_TYPE)) typedef struct _CguProgPresenter { GObject object; Cgu::PresentFunc func; void* data; } CguProgPresenter; typedef struct _CguProgPresenterClass { GObjectClass object_class; } CguProgPresenterClass; /* this is the Present method for interface CguProgPresenterInterface required by and registered in prog-presenter-glue.h. It is the callback executed by the CguProgPresenter object via dbus after present_instance() has been called. As declared in prog-presenter.xml (and registered via make_bindings.sh in prog-presenter-glue.h) it is also a CguProgPresenter class method */ static gboolean cgu_prog_presenter_present(CguProgPresenter* presenter, const char** args, GError** error); G_DEFINE_TYPE(CguProgPresenter, cgu_prog_presenter, G_TYPE_OBJECT); static void cgu_prog_presenter_class_init(CguProgPresenterClass* presenter_class); static void cgu_prog_presenter_init(CguProgPresenter* presenter); static void cgu_prog_presenter_set(CguProgPresenter* presenter, Cgu::PresentFunc func, void* object_data); static CguProgPresenter* cgu_prog_presenter_new(); // any dbus error domains have to be enums registered as GTypes // but we only have one error code within the domain, namely // CGU_PROG_PRESENTER_FALSE typedef enum {CGU_PROG_PRESENTER_FALSE = 0} CguProgPresenterError; static GType cgu_prog_presenter_error_get_type(); static GQuark cgu_prog_presenter_error_get_quark(); } // extern "C" #include #include /* the callback executed by dbus when present_instance() is called which is also a CguProgPresenter class method */ // this function is declared as static and with C calling specification gboolean cgu_prog_presenter_present(CguProgPresenter* presenter, const char** args, GError** error) { // dbus-glib requires this method to return TRUE if successful // just return FALSE if the presenter object is invalid or the // cgu_prog_presenter_set() has not been called: that is a // programmer error (or a very weird dbus error) g_return_val_if_fail(IS_CGU_PROG_PRESENTER(presenter), FALSE); g_return_val_if_fail(presenter->func != 0, FALSE); gboolean ret = presenter->func(presenter->data, args); if (!ret) { // let dbus map this error into - // domain: DBUS_GERROR // code: DBUS_GERROR_REMOTE_EXCEPTION // name: org.cgu.CguProgPresenterInterface.FalseReturnValue g_set_error(error, cgu_prog_presenter_error_get_quark(), CGU_PROG_PRESENTER_FALSE, "%s", "Cgu::PresentFunc function returned FALSE"); } return ret; } // this function is declared as static and with C calling specification void cgu_prog_presenter_class_init(CguProgPresenterClass* presenter_class) { dbus_g_object_type_install_info(G_TYPE_FROM_CLASS(presenter_class), &dbus_glib_cgu_prog_presenter_object_info); dbus_g_error_domain_register(cgu_prog_presenter_error_get_quark(), CGU_PROG_PRESENTER_DBUS_INTERFACE, cgu_prog_presenter_error_get_type()); } // this function is declared as static and with C calling specification void cgu_prog_presenter_init(CguProgPresenter* presenter) { presenter->func = 0; presenter->data = 0; } // this function is declared as static and with C calling specification void cgu_prog_presenter_set(CguProgPresenter* presenter, Cgu::PresentFunc func, void* object_data) { presenter->func = func; presenter->data = object_data; } // this function is declared as static and with C calling specification CguProgPresenter* cgu_prog_presenter_new() { return static_cast(g_object_new(CGU_PROG_PRESENTER_TYPE, static_cast(0))); } // this function is declared as static and with C calling specification GType cgu_prog_presenter_error_get_type() { // this very cumbersome function just registers the CguProgPresenterError // enumeration as a GType with its enumerators static GType enum_type = 0; if (!enum_type) { static const GEnumValue values[] = { {CGU_PROG_PRESENTER_FALSE, "CGU_PROG_PRESENTER_FALSE", "FalseReturnValue"}, {0, 0, 0} }; enum_type = g_enum_register_static("CguProgPresenterError", values); } return enum_type; } // this function is declared as static and with C calling specification GQuark cgu_prog_presenter_error_get_quark() { // provide a GQuark representing the domain name of the error codes // in the CguProgPresenterError enumeration static volatile GQuark error_quark = 0; if (!error_quark) error_quark = g_quark_from_string("CguProgPresenterErrorDomain"); return error_quark; } /* End of GObject stuff */ namespace Cgu { /* register_service and register_path are allocated on the heap in register_prog() as they may need to be visible also in present_instance(). They are freed in register_prog() or present_instance(), as appropriate */ static gchar* register_service = 0; static gchar* register_path = 0; static void clean_up_dbus_variables() { g_free(register_service); g_free(register_path); register_service = 0; register_path = 0; } // making presenter_instance static will shut valgrind up CguProgPresenter* presenter_instance; gboolean register_prog(const char* prog_name, PresentFunc func, void* object_data) { // we only call register_prog() once in any one program invocation - // once it has returned FALSE go on to call present_instance() static bool initialised = false; // because of that also store previous return value so we can supply // it again rather than just abort static gboolean return_val = FALSE; if (initialised) { g_warning("Only call register_prog() once in any one program instance - ignoring this call\n"); return return_val; } initialised = true; GError* error = 0; // use the session bus DBusGConnection* connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error); if (!connection) { // problem in obtaining a connection - bail out g_critical("Failed to open connection to bus: %s\n", error->message); g_error_free(error); return return_val; } // we have a connection on the session bus gchar* delimited_prog_name = g_strdup(prog_name); g_strdelimit(delimited_prog_name, "-|<>./+", '_'); register_service = g_strdup_printf("%s.%s", REGISTER_SERVICE_PREFIX, delimited_prog_name); register_path = g_strdup_printf("%s/%s/%s", REGISTER_PATH_PREFIX, delimited_prog_name, "presenter"); g_free(delimited_prog_name); DBusGProxy* proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); guint32 dbus_ret_val; if (!org_freedesktop_DBus_request_name(proxy, register_service, 0, &dbus_ret_val, &error)) { // problem in obtaining the service name - bail out g_critical("Failed to obtain name %s on session bus: %s", register_service, error->message); g_error_free(error); clean_up_dbus_variables(); return return_val; } if (dbus_ret_val != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { // the program is already running - return FALSE return return_val; } // first invocation of the program - this process now owns the // service name, so create a CguProgPresenter object for dbus presenter_instance = cgu_prog_presenter_new(); cgu_prog_presenter_set(presenter_instance, func, object_data); dbus_g_connection_register_g_object(connection, register_path, G_OBJECT(presenter_instance)); // we don't need register_service or register_path any more as // this is the first invocation of the program and we will not // call present_instance() clean_up_dbus_variables(); return_val = TRUE; return return_val; } int present_instance(const char** instance_args) { if (!register_service) { g_warning("Error in present_instance(): either register_prog() has not been called,\n" "there was an error in obtaining a connection or service name in register_prog(),\n" "present_instance() has been called in the first invocation of the program\n" "or present_instance() has already been called once before in this invocation of\n" "the program. Ignoring this call() to present_instance\n"); return 1; } GError* error = 0; // use the session bus DBusGConnection* connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error); if (!connection) { // problem in obtaining a connection - bail out g_critical("Failed to open connection to bus: %s\n", error->message); g_error_free(error); clean_up_dbus_variables(); return 1; } // we have a connection on the session bus DBusGProxy* proxy = dbus_g_proxy_new_for_name(connection, register_service, register_path, CGU_PROG_PRESENTER_DBUS_INTERFACE); /* org_cgu_CguProgPresenterInterface_present() is defined in prog-presenter-bindings.h and represents the client proxy version of the Present method for interface CguProgPresenterInterface. It is a blocking call which will wait for the callback (cgu_prog_presenter_present()) to complete and then report the outcome */ if (!org_cgu_CguProgPresenterInterface_present(proxy, instance_args, &error)) { int return_val; g_critical("Failed to present instance: %s", error->message); if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_REMOTE_EXCEPTION) { g_critical("Dbus error name is %s", dbus_g_error_get_name(error)); return_val = 2; } else return_val = 1; g_error_free(error); clean_up_dbus_variables(); return return_val; } clean_up_dbus_variables(); return 0; } } // namespace Cgu #endif /* HAVE_GIO_DBUS || HAVE_DBUS_GLIB */ efax-gtk-3.2.8/src/internal/c++-gtk-utils/emitter.cpp0000644000175000001440000004533311524110041017215 00000000000000/* Copyright (C) 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include namespace Cgu { Releaser::~Releaser(void) { Thread::Mutex::Lock lock(mutex); // we don't have lambdas in C++03, so use a struct in function scope struct DisconnectItem { static void exec(const Callback::SafeFunctor& f) {f();} }; std::for_each(disconnect_list.begin(), disconnect_list.end(), DisconnectItem::exec); } Releaser& Releaser::operator=(const Releaser&) { // first disconnect ourselves from any existing emitters protected // by this object and then vacate disconnect_list - effectively, on // assignment we drop our old identity and become a blank sheet, // since our parent cannot be assigned any emitter connections in // its new identity - the assignee retains them - and it may not be // safe for it to keep its pre-assignment emitter connections. // (Note, EmitterArg<> and SafeEmitterArg<> objects can't be copied) Thread::Mutex::Lock lock(mutex); // we don't have lambdas in C++03, so use a struct in function scope struct DisconnectItem { static void exec(const Callback::SafeFunctor& f) {f();} }; std::for_each(disconnect_list.begin(), disconnect_list.end(), DisconnectItem::exec); disconnect_list.clear(); return *this; } void Releaser::add(const Callback::SafeFunctor& f) { Thread::Mutex::Lock lock(mutex); disconnect_list.push_back(f); } void Releaser::remove(Callback::SafeFunctor f) { Thread::Mutex::Lock lock(mutex); std::list::iterator iter = std::find(disconnect_list.begin(), disconnect_list.end(), f); if (iter != disconnect_list.end()) { disconnect_list.erase(iter); } } // this method is called instead of Releaser::remove() when called by a // SafeEmitterArg<> object which has locked its mutex, so as to avoid // out of order locking deadlocks. It is primarily intended to cover a // case where both the Releaser and SafeEmitterArg<> destructors are // operating and will cause the SafeEmitterArg<> destructor to spin // until the Releaser destructor has done its business, although it is // also used in SafeEmitterArg<>::disconnect() void Releaser::try_remove(Callback::SafeFunctor f, int* result_p) { if (!(*result_p = mutex.trylock())) { Thread::Mutex::Lock lock(mutex, Thread::locked); std::list::iterator iter = std::find(disconnect_list.begin(), disconnect_list.end(), f); if (iter != disconnect_list.end()) { disconnect_list.erase(iter); } } } EmitterArg::~EmitterArg() { struct DisconnectReleaserItem { static void exec(const ListItem& l) {(l.f2)();} }; std::for_each(emission_list.begin(), emission_list.end(), DisconnectReleaserItem::exec); } void EmitterArg::emit() const { // create a local copy of emission_list, to enable a connected // function (i) to delete the EmitterArg<> object to which it is // connected, even if there are other functors still to execute in // the same emission (which will execute normally provided they do // not try to call any of the emitter's functions), (ii) to call // 'delete this' nothwithstanding that the connected function is // protected by a Releaser object (assuming all the other restraints // on calling 'delete this' are met), provided that no other access // would be made to the deleted object in a function call connected // to the same emitter which is due to execute subsequently in the // same emission, and (iii) to disconnect itself from the // EmitterArg<> object. This design approach has a trade-off: if a // connected function tries to block, unblock or disconnect another // function connected to the same EmitterArg<> object which is due // to execute subsequently in the same emission (or to block, // unblock or disconnect itself when it is due to execute again // subsequently in the same emission), the attempted block, unblock // or disconnection will not have any effect on that emission (it // will only have effect on a subsequent emission). In addition, a // connected function may not destroy an object whose non-static // method is connected to the same emitter and which would execute // subsequently in the same emission, even if that object is // protected by a Releaser object (the non-static method will // unsuccessfully attempt to execute notwithstanding the destruction // of the object it would be operating on). std::list local_list = emission_list; // we don't have lambdas in C++03, so use a struct in function scope struct EmitItem { static void exec(const ListItem& l) {if (!l.blocked) (l.f1)();} }; std::for_each(local_list.begin(), local_list.end(), EmitItem::exec); } bool EmitterArg::test_emit() const { if (emission_list.empty()) return false; emit(); return true; } Callback::Functor EmitterArg::connect(const Callback::Functor& f1) { emission_list.push_back(ListItem(f1, Callback::Functor())); return f1; } Callback::Functor EmitterArg::connect(const Callback::Functor& f1, Releaser& r) { // In this method: // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed before the // remote object is // f3 is the functor the remote object executes in its Releaser if it is destroyed // before we are, or if Releaser::operator=() is called Callback::SafeFunctor f3(Callback::make_val(*this, &EmitterArg::tracking_disconnect, f1)); Callback::Functor f2(Callback::make_val(r, &Releaser::remove, f3)); r.add(f3); try { emission_list.push_back(ListItem(f1, f2)); } catch (...) { r.remove(f3); throw; } return f1; } void EmitterArg::disconnect(const Callback::Functor& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::Functor f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { // remove ourselves from the remote Releaser object (iter->f2)(); // remove this item from emission_list iter = emission_list.erase(iter); } else break; } } // tracking disconnect() is the same as disconnect(), except that we do not // execute f2 as the remote Releaser object will destroy its own functors // in that case void EmitterArg::tracking_disconnect(Callback::Functor arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::Functor f) { return (p.f1 == f); } }; std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { // remove this item from emission_list iter = emission_list.erase(iter); } else break; } } void EmitterArg::block(const Callback::Functor& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::Functor f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = true; ++iter; } else break; } } void EmitterArg::unblock(const Callback::Functor& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::Functor f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = false; ++iter; } else break; } } SafeEmitterArg::~SafeEmitterArg() { // go through emission_list() item by item, popping off the front and erasing // as we go in case Releaser::try_remove() fails to acquire the lock on one // of the iterations Thread::Mutex::Lock lock(mutex); while (!emission_list.empty()) { std::list::iterator iter = emission_list.begin(); int result = 0; // f2 might be a no-op // remove ourselves from the remote Releaser object (iter->f2)(&result); if (!result) { // we got the Releaser mutex lock or no-op // now remove this item from emission_list emission_list.erase(iter); } else { mutex.unlock(); // spin nicely #ifdef CGU_USE_SCHED_YIELD sched_yield(); #else usleep(10); #endif mutex.lock(); } } } void SafeEmitterArg::emit() const { // create a local copy of emission_list, to enable a connected // function (i) to delete the EmitterArg<> object to which it is // connected, even if there are other functors still to execute in // the same emission (which will execute normally provided they do // not try to call any of the emitter's functions), (ii) to call // 'delete this' nothwithstanding that the connected function is // protected by a Releaser object (assuming all the other restraints // on calling 'delete this' are met), provided that no other access // would be made to the deleted object in a function call connected // to the same emitter which is due to execute subsequently in the // same emission, and (iii) to disconnect itself from the // EmitterArg<> object. This design approach has a trade-off: if a // connected function tries to block, unblock or disconnect another // function connected to the same EmitterArg<> object which is due // to execute subsequently in the same emission (or to block, // unblock or disconnect itself when it is due to execute again // subsequently in the same emission), the attempted block, unblock // or disconnection will not have any effect on that emission (it // will only have effect on a subsequent emission). In addition, a // connected function may not destroy an object whose non-static // method is connected to the same emitter and which would execute // subsequently in the same emission, even if that object is // protected by a Releaser object (the non-static method will // unsuccessfully attempt to execute notwithstanding the destruction // of the object it would be operating on). // SafeFunctorArg<> usage has the additional point that while an // emission is in course, another thread should not try to do any of // those things, or the same outcome will result. Another thread // should leave alone objects connected to a SafeEmitterArg<> object // from the time of operator()() or emit() beginning to the time of // it ending, and not try to interfere. // a side effect of having a local list is that, as required, we // will not be holding our mutex when executing the functors it // contains. It is OK having the functors in two different lists // which are potentially (when our mutex is released) in two // different threads, because the functors hold their // Callback::Callback objects by SharedLockPtr so their reference // count is protected (they are SafeFunctorArg<> functors). std::list local_list; { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); local_list = emission_list; } // we don't have lambdas in C++03, so use a struct in function scope struct EmitItem { static void exec(const ListItem& l) {if (!l.blocked) (l.f1)();} }; std::for_each(local_list.begin(), local_list.end(), EmitItem::exec); } bool SafeEmitterArg::test_emit() const { std::list local_list; { // scope block for mutex lock Thread::Mutex::Lock lock(mutex); if (emission_list.empty()) return false; local_list = emission_list; } // we don't have lambdas in C++03, so use a struct in function scope struct EmitItem { static void exec(const ListItem& l) {if (!l.blocked) (l.f1)();} }; std::for_each(local_list.begin(), local_list.end(), EmitItem::exec); return true; } Callback::SafeFunctor SafeEmitterArg::connect(const Callback::SafeFunctor& f1) { Thread::Mutex::Lock lock(mutex); emission_list.push_back(ListItem(f1, Callback::SafeFunctorArg())); return f1; } Callback::SafeFunctor SafeEmitterArg::connect(const Callback::SafeFunctor& f1, Releaser& r) { // In this method: // f1 is the functor we execute when we emit() // f2 is the functor we execute in our destructor if we are destroyed before the // remote object is, or in SafeEmitterArg::disconnect() // f3 is the functor the remote object executes in its Releaser if it is destroyed // before we are, or if Releaser::operator=() is called Callback::SafeFunctor f3(Callback::make_val(*this, &SafeEmitterArg::tracking_disconnect, f1)); Callback::SafeFunctorArg f2(Callback::make_val(r, &Releaser::try_remove, f3)); // we can't call Releaser::add() when holding our mutex or we will // get out of order locking, as Releaser's mutex is held when it // calls SafeEmitterArg::tracking_disconnect() via f3, and // we don't need to do so r.add(f3); Thread::Mutex::Lock lock(mutex); try { emission_list.push_back(ListItem(f1, f2)); } catch (...) { mutex.unlock(); r.remove(f3); mutex.lock(); throw; } return f1; } void SafeEmitterArg::disconnect(const Callback::SafeFunctor& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::SafeFunctor f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object more than // once, so cater for that as well as Releaser::try_remove() failing Thread::Mutex::Lock lock(mutex); std::list::iterator iter = emission_list.begin(); for(;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { int result = 0; // f2 might be a no-op // remove ourselves from the remote Releaser object (iter->f2)(&result); if (!result) { // we got the Releaser mutex lock or no-op // now remove this item from emission_list iter = emission_list.erase(iter); } else { mutex.unlock(); // spin nicely #ifdef CGU_USE_SCHED_YIELD sched_yield(); #else usleep(10); #endif mutex.lock(); // start again at the beginning - we have released the mutex // so our iterator may have become invalid iter = emission_list.begin(); } } else break; } } // tracking disconnect() is the same as disconnect(), except that we do not // execute f2 as the remote Releaser object will destroy its own functors // in that case void SafeEmitterArg::tracking_disconnect(Callback::SafeFunctor arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::SafeFunctor f) { return (p.f1 == f); } }; Thread::Mutex::Lock lock(mutex); std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { // remove this item from emission_list iter = emission_list.erase(iter); } else break; } } void SafeEmitterArg::block(const Callback::SafeFunctor& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::SafeFunctor f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that Thread::Mutex::Lock lock(mutex); std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = true; ++iter; } else break; } } void SafeEmitterArg::unblock(const Callback::SafeFunctor& arg) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(ListItem p, Callback::SafeFunctor f) { return (p.f1 == f); } }; // in theory, we could have connected the same functor object // more than once, so cater for that Thread::Mutex::Lock lock(mutex); std::list::iterator iter = emission_list.begin(); for (;;) { iter = std::find_if(iter, emission_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), arg)); if (iter != emission_list.end()) { iter->blocked = false; ++iter; } else break; } } } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/cgu_config.h.in0000644000175000001440000001174511536141256017740 00000000000000/* Copyright (C) 2010 and 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_CONFIG_H #define CGU_CONFIG_H /* * This file is produced from cgu_config.h.in by the ./configure * script. */ #@AC_USE_GLIB_MEMORY_SLICES_COMPAT@ #@AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT@ /* * None of these new operators throw std::bad_alloc as glib terminates * the whole application if it cannot allocate memory. * * These functions are only suitable as class member functions, * because they do not check whether the passed size request value is * 0, and g_slice_alloc() will not allocate any memory if passed a * size of 0. (A class allocator will not be passed a size value less * than 1 as an empty class/struct object has sizeof 1 in C++, so * these will always be safe as member functions.) * * For anyone porting this library to windows, operator new[]() and * operator delete[]() for arrays should not be included, because * Visual Studio does not correctly comply with the C++ standard with * respect to the two argument version of operator delete[](). */ #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT) #include #include #include #define CGU_GLIB_MEMORY_SLICES_FUNCS \ static void* operator new(std::size_t s) throw() {return g_slice_alloc(s);} \ static void* operator new(std::size_t s, const std::nothrow_t&) throw() {return g_slice_alloc(s);} \ static void* operator new(std::size_t s, void* p) throw() {return ::operator new(s, p);} \ static void operator delete(void* p, std::size_t s) throw() {if (p) g_slice_free1(s, p);} \ static void operator delete(void* p, std::size_t s, const std::nothrow_t&) throw() {if (p) g_slice_free1(s, p);} \ static void operator delete(void* p, void* q) throw() {::operator delete(p, q);} \ static void* operator new[](std::size_t s) throw() {return g_slice_alloc(s);} \ static void* operator new[](std::size_t s, const std::nothrow_t&) throw() {return g_slice_alloc(s);} \ static void* operator new[](std::size_t s, void* p) throw() {return ::operator new[](s, p);} \ static void operator delete[](void* p, std::size_t s) throw() {if (p) g_slice_free1(s, p);} \ static void operator delete[](void* p, std::size_t s, const std::nothrow_t&) throw() {if (p) g_slice_free1(s, p);} \ static void operator delete[](void* p, void* q) throw() {return ::operator delete[](p, q);} #else #define CGU_GLIB_MEMORY_SLICES_FUNCS // Using global operator new, new[], delete and delete[] #endif /* This determines whether each of the library headers will contain a 'using namespace Cgu' directive. It will include such a using directive if configure is passed the --with-cgu-using-directive option. (It can also be edited by hand.) */ namespace Cgu {} @AC_USING_NAMESPACE@ /* whether the system provides sched_yield */ #@AC_USE_SCHED_YIELD@ /* whether the system was found to provide working recursive mutexes when the library was compiled */ #@AC_HAVE_RECURSIVE_MUTEX_RUNTIME@ /* whether CallbackArg, FunctorArg and EmitterArg objects may take more than one free argument */ #@AC_USE_TYPE_TUPLE_ARGS@ /* whether ==, != and < operators to be available for smart pointers */ #@AC_USE_SMART_PTR_COMPARISON@ #endif // CGU_CONFIG_H efax-gtk-3.2.8/src/internal/c++-gtk-utils/shared_handle.h0000644000175000001440000016774011536141256020020 00000000000000/* Copyright (C) 2004 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_SHARED_HANDLE_H #define CGU_SHARED_HANDLE_H // define this if, instead of GLIB atomic funcions/memory barriers, // you want to use a (slower) mutex to lock the reference count in the // SharedLockHandle class (however, if wanted, this is best left for // definition in the user code) /* #define CGU_SHARED_LOCK_HANDLE_USE_MUTEX 1 */ #include #include #include // for std::less #include #include #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX #include #endif #include /** * @addtogroup handles handles and smart pointers */ namespace Cgu { /** * @class SharedHandle shared_handle.h c++-gtk-utils/shared_handle.h * @brief This is a generic class for managing the lifetime of objects * allocated on freestore. * @ingroup handles * @sa SharedLockHandle * @sa ScopedHandle * @sa SharedHandleError * @sa GcharSharedHandle * @sa GerrorSharedHandle * @sa StandardArrayDelete CFree GFree GerrorFree GSliceFree GSliceFreeSize GSliceDestroy * * The SharedHandle class is similar to the SharedPtr class (it keeps * a reference count and deletes the handled object when the count * reaches 0), but it does not have pointer semantics. Accordingly, * it can be used to manage the memory of arrays and other objects * allocated on the heap. * * Because it is useful with arrays, by default it deallocates memory * using C++ delete[]. However, if a SharedHandle object is passed a * function object type as a second template argument when * instantiated, it will use that function object to delete memory. * This enables it to handle the memory of any object, such as objects * to be deleted using std::free() or Glib's g_free(), g_list_free() * or g_slice_free(). Instances (such as @ref GcharScopedHandleAnchor * "GcharScopedHandle", @ref GcharSharedHandleAnchor * "GcharSharedHandle", @ref GerrorSharedHandleAnchor * "GerrorSharedHandle" and @ref GerrorScopedHandleAnchor * "GerrorScopedHandle") typdef'ed for particular deleters can * conveniently manage objects of any kind. * * To reflect the fact that it is just a handle for a pointer, it has * different instantiation semantics from a SharedPtr object. A * SharedPtr object is instantiated using this syntax: * * @code SharedPtr sh_ptr(new ObjType); @endcode * * A SharedHandle is instantiated using this syntax (note that the * instantiated handle is for type T* and not T): * * @code SharedHandle sh_handle(new ObjType[n]); @endcode * * * Apart from the operatorT() type conversion operator (which returns * the underlying pointer), the only other method to obtain the * underlying pointer is the get() method. If the object referenced * is an array allocated on the heap, to use indexing you could either * do this: * * @code * using namespace Cgu; * SharedHandle handle(new char[10]); * handle.get()[0] = 'a'; * std::cout << handle.get()[0] << std::endl; * @endcode * * or this: * * @code * using namespace Cgu; * SharedHandle handle(new char[10]); * handle[0] = 'a'; * std::cout << handle[0] << std::endl; * @endcode * * There is also a SharedLockHandle class, which has a thread-safe * reference count, and a ScopedHandle class, which deletes its object * as soon as it goes out of scope. A ScopedHandle class can be * viewed as a SharedHandle which cannot be assigned to or used as the * argument to a copy constructor and therefore which cannot have a * reference count of more than 1. It is used where, if you wanted * pointer semantics, you might use a const std::auto_ptr<>. * * As of version 1.0.2, SharedHandle objects can be instantiated for * pointers to constant objects (such as SharedHandle), * provided the deleter functor will take such pointers. Prior to * version 1.0.2, it could only manage pointers to non-const objects. * * This library provides StandardArrayDelete, CFree, GFree, * GerrorFree, GSliceFree, GSliceFreeSize and GSliceDestroy deleter * functors, which can be used as the second template parameter of the * SharedHandle class. As mentioned above, StandardArrayDelete is the * default, and some typedef'ed instances of SharedHandle for gchar * (with the GFree deleter) and for GError (with the GerrorFree * deleter) are provided. * * From version 1.2.12, the library provides ==, != and < comparison * operators for SharedHandles, but only if the library is compiled * with the --with-smart-ptr-comp option, or if the user code defines * the symbol CGU_USE_SMART_PTR_COMPARISON before shared_handle.h is * first parsed. This is because, if user code has provided such * operators for these smart pointers itself, a duplicated function * definition would arise. */ /********************* here are some deleter classes *******************/ /** * @class StandardArrayDelete shared_handle.h c++-gtk-utils/shared_handle.h * @brief A deleter functor for use as the second (Dealloc) template * parameter of the SharedHandle, SharedLockHandle or ScopedHandle * template classes, which calls the C++ delete[] expression. * @ingroup handles * @details This functor enables those classes to manage arrays * created with the new expression. It is the default type of the * second template paramenter of those classes. */ template class StandardArrayDelete { public: void operator()(T obj) { delete[] obj; } }; /** * @class CFree shared_handle.h c++-gtk-utils/shared_handle.h * @brief A deleter functor for use as the second (Dealloc) template * parameter of the SharedHandle, SharedLockHandle or ScopedHandle * template classes, which calls std::free. * @ingroup handles * @details This functor enables those classes to manage memory * allocated with std::malloc(), std::calloc() and std::realloc(). */ class CFree { public: void operator()(const void* obj) { std::free(const_cast(obj)); } }; /** * @class GFree shared_handle.h c++-gtk-utils/shared_handle.h * @brief A deleter functor for use as the second (Dealloc) template * parameter of the SharedHandle, SharedLockHandle or ScopedHandle * template classes, which calls glib's g_free(). * @ingroup handles * @details This functor enables those classes to manage memory * allocated by glib or gtk+ functions which requires to be freed with * g_free(). It is used in the typedefs @ref GcharSharedHandleAnchor * "GcharSharedHandle" and @ref GcharScopedHandleAnchor * "GcharScopedHandle". */ class GFree { public: void operator()(const void* obj) { g_free(const_cast(obj)); } }; /** * @class GSliceFree shared_handle.h c++-gtk-utils/shared_handle.h * @brief A deleter functor for use as the second (Dealloc) template * parameter of the SharedHandle, SharedLockHandle or ScopedHandle * template classes, which calls glib's g_slice_free1(). * @ingroup handles * * @details This functor enables those classes to manage a memory * block allocated using glib memory slices. The managed memory block * to be deleted by the GSliceFree functor must have the same size as * the size of the object for which the functor is instantiated by * pointer, as for example as allocated with the g_slice_new, * g_slice_new0 or g_slice_dup macros (in other words, the GSliceFree * template parameter must match the argument passed to those macros): * see the example below. Use GSliceFreeSize where it is necessary or * more convenient to have the size of the block to be freed as the * template parameter. Use GSliceDestroy where the memory holds a C++ * object constructed in the memory by the global placement new * expression. * * The type of the template argument for the functor is a pointer to * the managed type: it is the same as the the first template argument * of the relevant SharedHandle, SharedLockHandle or ScopedHandle * object. For example: * * @code * using namespace Cgu; * SharedHandle > h(g_slice_new(MyStruct)); * ... * @endcode * * The availability of this functor is not dependent on the library * having been installed with the --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option (see @ref * Memory for further details of those options). * * Since 1.0.3 */ template class GSliceFree { public: void operator()(T obj) { g_slice_free1(sizeof(*obj), (void*)obj); } }; /** * @class GSliceDestroy shared_handle.h c++-gtk-utils/shared_handle.h * @brief A deleter functor for use as the second (Dealloc) template * parameter of the SharedHandle, SharedLockHandle or ScopedHandle * template classes, which calls glib's g_slice_free1(), but before * doing so also explicitly calls the destructor of a C++ object * constructed in the memory. * @ingroup handles * * @details The managed memory block to be deleted by the * GSliceDestroy functor must have the same size as the size of the * object for which the functor is instantiated by pointer, as for * example as allocated with the g_slice_new or g_slice_new0 macros * (in other words, the GSliceDestroy template parameter must match * the argument passed to those macros), and the memory block must * have had that object constructed in it with the global placement * new expression: see the example below. Sometimes it is more * convenient to implement C++ objects in glib memory slices that way, * rather than to have custom new and delete member operators of the * classes concerned which use glib's g_slice_*(). However, a * SharedHandle class with a GSliceDestroy deleter is not as easy to * use as the SharedPtr class, as SharedHandle has no operator*() nor * operator->() method (the get() method would have to be used to * obtain the underlying pointer). * * One consequence of the static sizing (and so typing) of memory * slices is that a GSliceDestroy object instantiated for the * management of a particular class must not be used by a * SharedHandle, SharedLockHandle or ScopedHandle object which * attempts to manage a class derived from it. This comes back to the * point that the GSliceDestroy template parameter must match the * argument passed to the g_slice_new or g_slice_new0 macros. * * The type of the template argument for the functor is a pointer to * the managed type: it is the same as the the first template argument * of the relevant SharedHandle, SharedLockHandle or ScopedHandle * object. For example, to construct a SharedHandle managing an * object of type MyClass to be constructed in a glib memory slice in * an exception safe way: * * @code * using namespace Cgu; * SharedHandle > h; // won't throw * { // scope block for p variable * MyClass* p = g_slice_new(MyClass); * try {new(p) MyClass;} // MyClass constructor might throw * catch(...) { * g_slice_free(MyClass, p); * throw; * } * h.reset(p); // might throw but if so cleans up * } * ... * @endcode * * The availability of this functor is not dependent on the library * having been installed with the --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option (see @ref * Memory for further details of those options). * * Since 1.0.3 */ template class GSliceDestroy { template void destroy(U& obj) {obj.~U();} public: void operator()(T obj) { destroy(*obj); g_slice_free1(sizeof(*obj), (void*)obj); } }; /** * @class GSliceFreeSize shared_handle.h c++-gtk-utils/shared_handle.h * @brief A deleter functor for use as the second (Dealloc) template * parameter of the SharedHandle, SharedLockHandle or ScopedHandle * template classes, which calls glib's g_slice_free1(). * @ingroup handles * * @details This functor enables those classes to manage memory * allocated with g_slice_alloc(), g_slice_alloc0() or g_slice_copy(). * It is an alternative to using GSliceFree where, instead of the the * template parameter being a pointer to a particular managed type, * the size of the memory block to be freed is passed, so enabling it * to be more conveniently used to free memory containing arrays of * built-in types or of PODSs. Use GSliceDestroy where the memory * holds a C++ object constructed in the memory by the global * placement new expression. * * The type of the template argument for the functor is an integer * type (gsize) and is the size of the block to be managed. For * example: * * @code * using namespace Cgu; * SharedHandle > h(static_cast(g_slice_alloc(10))); * ... * @endcode * * The availability of this functor is not dependent on the library * having been installed with the --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration option (see @ref * Memory for further details of those options). * * Since 1.0.3 */ template class GSliceFreeSize { public: void operator()(const void* obj) { g_slice_free1(block_size, const_cast(obj)); } }; /* * we could provide a functor class for * g_slice_free_chain_with_offset() such as: * * template class GSliceFreeChain { * public: * void operator()(T obj) { * g_slice_free_chain_with_offset(sizeof(*obj), (void*)obj, offset); * } * }; * * However, this is not going to be particularly useful because the * G_STRUCT_OFFSET macro and/or C's offsetof macro, needed to provide * the value for the offset parameter, do not work for other than * PODSs. g_slice_free_chain_with_offset() is intended for internal * implementations and in the event of a user wanting such memory * management it is best achieved by having custom new[] and delete[] * member operators of the class concerned which use glib's * g_slice_*() directly. */ /********************* define some typedefs for Glib ******************/ template class SharedHandle; template class ScopedHandle; /** * @typedef GcharSharedHandle. * @brief A handle comprising a typed instance of the SharedHandle * class for gchar* arrays and strings * @anchor GcharSharedHandleAnchor * @ingroup handles * \#include */ typedef SharedHandle GcharSharedHandle; /** * @typedef GcharScopedHandle. * @brief A handle comprising a typed instance of the ScopedHandle * class for gchar* arrays and strings * @anchor GcharScopedHandleAnchor * @ingroup handles * \#include */ typedef ScopedHandle GcharScopedHandle; /******************* now the handle class definitions *****************/ /** * @class SharedHandleError shared_handle.h c++-gtk-utils/shared_handle.h * @brief This is an exception struct thrown as an alternative to * deleting a managed object when internal memory allocation for * SharedHandle or SharedLockHandle fails in their reset() method or * in their constructor which takes a pointer. * @sa SharedHandle SharedLockHandle SharedHandleAllocFail * @ingroup handles * * This is an exception struct thrown as an alternative to deleting a * managed object when SharedHandle::SharedHandle(T), * SharedLockHandle::SharedLockHandle(T), SharedHandle::reset(T) * or SharedLockHandle::reset(T) would otherwise throw * std::bad_alloc. To make those methods do that, * Cgu::SharedHandleAllocFail::leave is passed as their second * argument. * * If the exception is thrown, the struct has a member 'obj' of type * T, which is a pointer to the object or array originally passed to * those methods, so the user can deal with it appropriately. This * enables the result of the new expression to be passed directly as * the argument to those methods without giving rise to a resource * leak, as in: * * @code * using namespace Cgu; * SharedHandle s; // doesn't throw * try { * s.reset(new T[2], SharedHandleAllocFail::leave); // both T allocation and reset() might throw * } * catch (std::bad_alloc&) { * ... * } * catch (SharedHandleError& e) { * e.obj[0].do_something(); * e.obj[1].do_something(); * ... * } * ... * @endcode * * As above, a catch block will need to deal with std::bad_alloc (if * the call to the new expression when creating the T object fails) * as well as SharedHandleError (if the call to the new expression in * the reset() method fails after a valid T object has been * constructed). */ template struct SharedHandleError: public std::exception { T obj; virtual const char* what() const throw() {return "SharedHandleError\n";} SharedHandleError(T p): obj(p) {} }; /** * enum Cgu::SharedHandleAllocFail::Leave * The enumerator Cgu::SharedHandleAllocFail::leave is passed as the * second argument of the reset() method of SharedHandle or * SharedLockHandle in order to prevent the method deleting the object * passed to it if reset() fails internally because of memory * exhaustion. * @ingroup handles */ namespace SharedHandleAllocFail { enum Leave {leave}; } template > class SharedHandle { Dealloc deleter; #ifndef DOXYGEN_PARSING struct { unsigned int* ref_count_p; T obj; } ref_items; #endif void unreference() { if (!ref_items.ref_count_p) return; --(*ref_items.ref_count_p); if (*ref_items.ref_count_p == 0) { #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT g_slice_free(unsigned int, ref_items.ref_count_p); #else delete ref_items.ref_count_p; #endif deleter(ref_items.obj); } } void reference() { if (!ref_items.ref_count_p) return; ++(*ref_items.ref_count_p); } public: /** * Constructor taking an unmanaged object. * @param ptr The object which the SharedHandle is to manage (if * any). * @exception std::bad_alloc This constructor will not throw if the * 'ptr' argument has a NULL value (the default), otherwise it might * throw std::bad_alloc if memory is exhausted and the system throws * in that case. If such an exception is thrown, this constructor is * exception safe (it does not leak resources), but as well as * cleaning itself up this constructor will also delete the managed * object passed to it to avoid a memory leak. If such automatic * deletion is not wanted in that case, use the version of this * constructor taking a Cgu::SharedHandleAllocFail::Leave tag argument. * @note std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if it * is unable to obtain memory from the operating system. * * Since 1.0.2, SharedHandle objects can be instantiated for * pointers to constant objects (such as SharedHandle), * provided the deleter functor will take such pointers. Prior to * version 1.0.2, it could only manage pointers to non-const objects. */ explicit SharedHandle(T ptr = 0) { if ((ref_items.obj = ptr)) { // not NULL #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(unsigned int); *ref_items.ref_count_p = 1; #else try { ref_items.ref_count_p = new unsigned int(1); } catch (...) { deleter(ptr); // if allocating the int referenced by ref_items.ref_count_p // has failed then delete the object to be referenced to // avoid a memory leak throw; } #endif } else ref_items.ref_count_p = 0; } /** * Constructor taking an unmanaged object. * @param ptr The object which the SharedHandle is to manage * @param tag Passing the tag emumerator * Cgu::SharedHandleAllocFail::leave causes this constructor not to * delete the new managed object passed as the 'ptr' argument in the * event of internal allocation in this method failing because of * memory exhaustion (in that event, Cgu::SharedHandleError will be * thrown). * @exception Cgu::SharedHandleError This constructor might throw * Cgu::SharedHandleError if memory is exhausted and the system would * otherwise throw std::bad_alloc in that case. This constructor is * exception safe (it does not leak resources), and if such an * exception is thrown it will clean itself up, but it will not * attempt to delete the new managed object passed to it. Access to * the object passed to the 'ptr' argument can be obtained via the * thrown Cgu::SharedHandleError object. * @note 1. On systems with over-commit/lazy-commit combined with * virtual memory (swap), it is rarely useful to check for memory * exhaustion, so in those cases this version of the constructor will * not be useful. * @note 2. If the library has been installed using the * --with-glib-memory-slices-no-compat configuration option this * version of the constructor will also not be useful: instead glib * will terminate the program if it is unable to obtain memory from * the operating system. * * Since 0.9.1 (first version in which this constructor available). * * Since 1.0.2, SharedHandle objects can be instantiated for * pointers to constant objects (such as SharedHandle), * provided the deleter functor will take such pointers. Prior to * version 1.0.2, it could only manage pointers to non-const objects. */ SharedHandle(T ptr, Cgu::SharedHandleAllocFail::Leave tag) { if ((ref_items.obj = ptr)) { // not NULL #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(unsigned int); *ref_items.ref_count_p = 1; #else try { ref_items.ref_count_p = new unsigned int(1); } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedHandleError(ptr); } #endif } else ref_items.ref_count_p = 0; } /** * Causes the SharedHandle to cease to manage its managed object (if * any), deleting it if this is the last SharedHandle object managing * it. If the argument passed is not NULL, the SharedHandle object * will manage the new object passed (which must not be managed by any * other SharedHandle object). This method is exception safe, but see * the comments below on std::bad_alloc. * @param ptr NULL (the default), or a new unmanaged object to manage. * @exception std::bad_alloc This method will not throw if the 'ptr' * argument has a NULL value (the default) and the destructor of a * managed object does not throw, otherwise it might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. Note that if such an exception is thrown then this method * will do nothing (it is strongly exception safe and will continue to * manage the object it was managing prior to the call), except that * it will delete the new managed object passed to it to avoid a * memory leak. If such automatic deletion in the event of such an * exception is not wanted, use the reset() method taking a * Cgu::SharedHandleAllocFail::Leave tag type as its second argument. * @note std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if it * is unable to obtain memory from the operating system. * * Since 0.9.1 */ void reset(T ptr = 0) { if (ptr) { unsigned int* new_count_p; #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(unsigned int); *new_count_p = 1; #else try { new_count_p = new unsigned int(1); } catch (...) { deleter(ptr); // if allocating the new int has failed then delete the // object to be referenced to avoid a memory leak throw; } #endif unreference(); ref_items.ref_count_p = new_count_p; ref_items.obj = ptr; } else { unreference(); ref_items.ref_count_p = 0; ref_items.obj = 0; } } /** * Causes the SharedHandle to cease to manage its managed object (if * any), deleting it if this is the last SharedHandle object managing * it. The SharedHandle object will manage the new object passed * (which must not be managed by any other SharedHandle object). This * method is exception safe, but see the comments below on * Cgu::SharedHandleError. * @param ptr A new unmanaged object to manage (if no new object is to * be managed, use the version of reset() taking a default value of * NULL). * @param tag Passing the tag emumerator * Cgu::SharedHandleAllocFail::leave causes this method not to delete * the new managed object passed as the 'ptr' argument in the event of * internal allocation in this method failing because of memory * exhaustion (in that event, Cgu::SharedHandleError will be thrown). * @exception Cgu::SharedHandleError This method might throw * Cgu::SharedHandleError if memory is exhausted and the system would * otherwise throw std::bad_alloc in that case. Note that if such an * exception is thrown then this method will do nothing (it is * strongly exception safe and will continue to manage the object it * was managing prior to the call), and it will not attempt to delete * the new managed object passed to it. Access to the object passed * to the 'ptr' argument can be obtained via the thrown * Cgu::SharedHandleError object. * @note 1. On systems with over-commit/lazy-commit combined with * virtual memory (swap), it is rarely useful to check for memory * exhaustion, so in those cases this version of the reset() method * will not be useful. * @note 2. If the library has been installed using the * --with-glib-memory-slices-no-compat configuration option this * version of the reset() method will also not be useful: instead glib * will terminate the program if it is unable to obtain memory from * the operating system. * * Since 0.9.1 */ void reset(T ptr, Cgu::SharedHandleAllocFail::Leave tag) { if (ptr) { unsigned int* new_count_p; #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(unsigned int); *new_count_p = 1; #else try { new_count_p = new unsigned int(1); } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedHandleError(ptr); } #endif unreference(); ref_items.ref_count_p = new_count_p; ref_items.obj = ptr; } else { unreference(); ref_items.ref_count_p = 0; ref_items.obj = 0; } } /** * The copy constructor does not throw. * @param sh_hand The handle to be copied. */ SharedHandle(const SharedHandle& sh_hand) { ref_items = sh_hand.ref_items; reference(); } /** * This method does not throw unless the destructor of a handled * object throws - that should never happen. * @param sh_hand the assignor. * @return The SharedHandle object after assignment. */ // If the destructor of the handled object throws then the // SharedHandle object may be left in an invalid state - we won't // make this method less efficient by trying to handle something // that should not happen SharedHandle& operator=(const SharedHandle& sh_hand) { // check whether we are already referencing this object - // if so make this a null op. This will also deal with // self-assignment if (ref_items.obj != sh_hand.ref_items.obj) { // first unreference any object referenced by this shared handle unreference(); // now inherit the ref_items structure from the assigning // shared handle and reference the object it references ref_items = sh_hand.ref_items; reference(); } return *this; } /** * This method does not throw. * @return A pointer to the handled object (or NULL if none is * handled). */ T get() const {return ref_items.obj;} /** * This method does not throw. * @return A pointer to the handled object (or NULL if none is * handled). */ operator T() const {return ref_items.obj;} /** * This method does not throw. * @return The number of SharedHandle objects referencing the managed * object (or 0 if none is managed by this SharedHandle).. */ unsigned int get_refcount() const {return (ref_items.ref_count_p) ? *ref_items.ref_count_p : 0;} /** * The destructor does not throw unless the destructor of a handled * object throws - that should never happen. */ ~SharedHandle() {unreference();} }; /** * @class ScopedHandle shared_handle.h c++-gtk-utils/shared_handle.h * @brief This is a generic scoped class for managing the lifetime of objects * allocated on freestore. * @ingroup handles * @sa SharedHandle SharedLockHandle SharedHandleError * @sa StandardArrayDelete CFree GFree GerrorFree GSliceFree GSliceFreeSize GSliceDestroy * * This class deletes its object as soon as it goes out of scope. It * can be viewed as a SharedHandle which cannot be assigned to or used * as the argument to a copy constructor and therefore which cannot * have a reference count of more than 1. It is used where, if you * wanted pointer semantics, you might use a const std::auto_ptr<>, * except that it has a reset() method. * * As of version 1.0.2, ScopedHandle objects can be instantiated for * pointers to constant objects (such as ScopedHandle), * provided the deleter functor will take such pointers. Prior to * version 1.0.2, it could only manage pointers to non-const objects. * * This library provides StandardArrayDelete, CFree, GFree, * GerrorFree, GSliceFree, GSliceFreeSize and GSliceDestroy deleter * functors, which can be used as the second template parameter of the * ScopedHandle class. StandardArrayDelete is the default, and some * typedef'ed instances of ScopedHandle for gchar (with the GFree * deleter) and for GError (with the GerrorFree deleter) are provided: * @ref GcharScopedHandleAnchor "GcharScopedHandle" and @ref * GerrorScopedHandleAnchor "GerrorScopedHandle") */ template > class ScopedHandle { Dealloc deleter; T obj; // private copy constructor and assignment operator - // scoped handle cannot be copied ScopedHandle(const ScopedHandle&); ScopedHandle& operator=(const ScopedHandle&); public: /** * The constructor does not throw. * @param ptr The object which the ScopedHandle is to manage (if * any). * * Since 1.0.2, ScopedHandle objects can be instantiated for * pointers to constant objects (such as SharedHandle), * provided the deleter functor will take such pointers. Prior to * version 1.0.2, it could only manage pointers to non-const objects. */ explicit ScopedHandle(T ptr = 0): obj(ptr) {} /** * Causes the ScopedHandle to delete its managed object (if any), and * if the argument passed is not NULL, the ScopedHandle object will * manage the new object passed (which must not be managed by any * other ScopedHandle object). This method does not throw (assuming * the destructor of a managed object does not throw). * @param ptr NULL (the default), or a new unmanaged object to manage. * * Since 0.9.1 */ void reset(T ptr = 0) { if (obj) deleter(obj); obj = ptr; } /** * Causes the ScopedHandle to cease to manage the handled object, but * does not delete that object. This method does not throw. * @return A pointer to the previously handled object (or NULL if none * was handled). * * Since 1.0.2 */ T release() {T tmp = obj; obj = 0; return tmp;} /** * This method does not throw. * @return A pointer to the handled object (or NULL if none is * handled). */ T get() const {return obj;} /** * This method does not throw. * @return A pointer to the handled object (or NULL if none is * handled). */ operator T() const {return obj;} /** * The destructor does not throw unless the destructor of a handled * object throws - that should never happen. */ ~ScopedHandle() {if (obj) deleter(obj);} }; /** * @class SharedLockHandle shared_handle.h c++-gtk-utils/shared_handle.h * @brief This is a generic class for managing the lifetime of objects * allocated on freestore, with a thread safe reference count.. * @ingroup handles * @sa SharedHandle ScopedHandle SharedHandleError * @sa StandardArrayDelete CFree GFree GerrorFree GSliceFree GSliceFreeSize GSliceDestroy * * Class SharedLockHandle is a version of the SharedHandle class which * includes locking so that it can be accessed in multiple threads * (although the word Lock is in the title, by default it uses glib * atomic functions to access the reference count rather than a mutex, * so the overhead should be very small). Note that only the * reference count is protected, so this is thread safe in the sense * in which a raw pointer is thread safe. A shared handle accessed in * one thread referencing a particular object is thread safe as * against another shared handle accessing the same object in a * different thread. It is thus suitable for use in different Std C++ * containers which exist in different threads but which contain * shared objects by reference. But: * * 1. If the referenced object is to be modified in one thread and * read or modified in another thread an appropriate mutex for the * referenced object is required (unless that referenced object * does its own locking). * * 2. If the same instance of shared handle is to be modified in one * thread (by assigning to the handle so that it references a * different object), and copied (assigned from or used as the * argument of a copy constructor) or modified in another thread, * a mutex for that instance of shared handle is required. * * 3. Objects referenced by shared handles which are objects for * which POSIX provides no guarantees (in the main, those which * are not built-in types), such as strings and similar * containers, may not support concurrent reads in different * threads. That depends on the library implementation concerned. * If that is the case, a mutex for the referenced object will * also be required when reading any given instance of such an * object in more than one thread by dereferencing any shared * handles referencing it (and indeed, when not using shared * handles at all). * * As of version 1.0.2, SharedLockHandle objects can be instantiated * for pointers to constant objects (such as SharedLockHandle), provided the deleter functor will take such pointers. * Prior to version 1.0.2, it could only manage pointers to non-const * objects. * * This library provides StandardArrayDelete, CFree, GFree, * GerrorFree, GSliceFree, GSliceFreeSize and GSliceDestroy deleter * functors, which can be used as the second template parameter of the * SharedLockHandle class. StandardArrayDelete is the default. * * As mentioned, by default glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_HANDLE_USE_MUTEX before shared_handle.h is parsed * so as to use mutexes instead, which might be useful for some * debugging purposes. * * From version 1.2.12, the library provides ==, != and < comparison * operators for SharedLockHandles, but only if the library is * compiled with the --with-smart-ptr-comp option, or if the user code * defines the symbol CGU_USE_SMART_PTR_COMPARISON before * shared_handle.h is first parsed. This is because, if user code has * provided such operators for these smart pointers itself, a * duplicated function definition would arise. */ template > class SharedLockHandle { Dealloc deleter; #ifndef DOXYGEN_PARSING struct { #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX Thread::Mutex* mutex_p; unsigned int* ref_count_p; #else gint* ref_count_p; #endif T obj; } ref_items; #endif // SharedLockHandle::unreference() does not throw exceptions // because Thread::Mutex::~Mutex(), Thread::Mutex::lock() and Thread::Mutex::unlock() // do not throw void unreference() { // we can (and should) check whether ref_items.ref_count_p is NULL without // a lock, because that member is specific to this SharedLockHandle object. // Only the integer pointed to by it is shared amongst SharedLockHandle // objects and requires locking if (!ref_items.ref_count_p) return; #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX ref_items.mutex_p->lock(); --(*ref_items.ref_count_p); if (*ref_items.ref_count_p == 0) { # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT g_slice_free(unsigned int, ref_items.ref_count_p); # else delete ref_items.ref_count_p; # endif ref_items.mutex_p->unlock(); delete ref_items.mutex_p; deleter(ref_items.obj); } else ref_items.mutex_p->unlock(); #else if (g_atomic_int_dec_and_test(ref_items.ref_count_p)) { # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT g_slice_free(gint, ref_items.ref_count_p); # else delete ref_items.ref_count_p; # endif deleter(ref_items.obj); } #endif } // SharedLockHandle::reference() does not throw exceptions because // Thread::Mutex::Lock::Lock() and Thread::Mutex::Lock::~Lock() do not throw void reference() { // we can (and should) check whether ref_items.ref_count_p is NULL without // a lock, because that member is specific to this SharedLockHandle object. // Only the integer pointed to by it is shared amongst SharedLockHandle // objects and requires locking if (!ref_items.ref_count_p) return; #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX Thread::Mutex::Lock lock(*ref_items.mutex_p); ++(*ref_items.ref_count_p); #else g_atomic_int_inc(ref_items.ref_count_p); #endif } public: /** * Constructor taking an unmanaged object. * @param ptr The object which the SharedLockHandle is to manage (if * any). * @exception std::bad_alloc This constructor will not throw if the * 'ptr' argument has a NULL value (the default), otherwise it might * throw std::bad_alloc if memory is exhausted and the system throws * in that case. If such an exception is thrown, this constructor is * exception safe (it does not leak resources), but as well as * cleaning itself up this constructor will also delete the managed * object passed to it to avoid a memory leak. If such automatic * deletion is not wanted in that case, use the version of this * constructor taking a Cgu::SharedHandleAllocFail::Leave tag * argument. * @note 1. std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if it * is unable to obtain memory from the operating system. * @note 2. By default, glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_HANDLE_USE_MUTEX before shared_handle.h is parsed * so as to use mutexes instead, which might be useful for some * debugging purposes. Were she to do so, Cgu::Thread::MutexError * might be thrown by this constructor if initialization of the mutex * fails, but it is usually not worth checking for this. * * Since 1.0.2, SharedLockHandle objects can be instantiated for * pointers to constant objects (such as SharedLockHandle), provided the deleter functor will take such pointers. * Prior to version 1.0.2, it could only manage pointers to non-const * objects. */ explicit SharedLockHandle(T ptr = 0) { if ((ref_items.obj = ptr)) { // not NULL #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX try { ref_items.mutex_p = new Thread::Mutex; } catch (...) { deleter(ptr); // if allocating the object referenced by ref_items.mutex_p // has failed then delete the object to be referenced to // avoid a memory leak throw; } # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(unsigned int); *ref_items.ref_count_p = 1; # else try { ref_items.ref_count_p = new unsigned int(1); } catch (...) { delete ref_items.mutex_p; deleter(ptr); throw; } # endif #else # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(gint); *ref_items.ref_count_p = 1; # else try { ref_items.ref_count_p = new gint(1); } catch (...) { deleter(ptr); // if allocating the int referenced by ref_items.ref_count_p // has failed then delete the object to be referenced to // avoid a memory leak throw; } # endif #endif } else { #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX ref_items.mutex_p = 0; // make sure the value is valid as we may assign it #endif ref_items.ref_count_p = 0; } } /** * Constructor taking an unmanaged object. * @param ptr The object which the SharedLockHandle is to manage. * @param tag Passing the tag emumerator * Cgu::SharedHandleAllocFail::leave causes this constructor not to * delete the new managed object passed as the 'ptr' argument in the * event of internal allocation in this method failing because of * memory exhaustion (in that event, Cgu::SharedHandleError will be * thrown). * @exception Cgu::SharedHandleError This constructor might throw * Cgu::SharedHandleError if memory is exhausted and the system would * otherwise throw std::bad_alloc in that case. This constructor is * exception safe (it does not leak resources), and if such an * exception is thrown it will clean itself up, but it will not * attempt to delete the new managed object passed to it. Access to * the object passed to the 'ptr' argument can be obtained via the * thrown Cgu::SharedHandleError object. * @note 1. On systems with over-commit/lazy-commit combined with * virtual memory (swap), it is rarely useful to check for memory * exhaustion, so in those cases this version of the constructor will * not be useful. * @note 2. If the library has been installed using the * --with-glib-memory-slices-no-compat configuration option this * version of the constructor will also not be useful: instead glib * will terminate the program if it is unable to obtain memory from * the operating system. * @note 3. By default, glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_HANDLE_USE_MUTEX before shared_handle.h is parsed * so as to use mutexes instead, which might be useful for some * debugging purposes. Were she to do so, Cgu::SharedHandleError * might be thrown by this constructor if initialization of the mutex * fails (even if the --with-glib-memory-slices-no-compat * configuration option is chosen), but it is usually not worth * checking for such mutex initialization failure. * * Since 0.9.1 (first version in which this constructor available). * * Since 1.0.2, SharedLockHandle objects can be instantiated for * pointers to constant objects (such as SharedLockHandle), provided the deleter functor will take such pointers. * Prior to version 1.0.2, it could only manage pointers to non-const * objects. */ SharedLockHandle(T ptr, Cgu::SharedHandleAllocFail::Leave tag) { if ((ref_items.obj = ptr)) { // not NULL #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX try { ref_items.mutex_p = new Thread::Mutex; } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedHandleError(ptr); } catch (Thread::MutexError&) { // as we are not rethrowing, make NPTL friendly throw SharedHandleError(ptr); } # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(unsigned int); *ref_items.ref_count_p = 1; # else try { ref_items.ref_count_p = new unsigned int(1); } catch (std::bad_alloc&) { delete ref_items.mutex_p; throw SharedHandleError(ptr); } # endif #else # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(gint); *ref_items.ref_count_p = 1; # else try { ref_items.ref_count_p = new gint(1); } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedHandleError(ptr); } # endif #endif } else { #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX ref_items.mutex_p = 0; // make sure the value is valid as we may assign it #endif ref_items.ref_count_p = 0; } } /** * Causes the SharedLockHandle to cease to manage its managed object * (if any), deleting it if this is the last ShareLockHandle object * managing it. If the argument passed is not NULL, the * SharedLockHandle object will manage the new object passed (which * must not be managed by any other SharedLockHandle object). * @param ptr NULL (the default), or a new unmanaged object to manage. * @exception std::bad_alloc This method will not throw if the 'ptr' * argument has a NULL value (the default) and the destructor of a * managed object does not throw, otherwise it might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. Note that if such an exception is thrown then this method * will do nothing (it is strongly exception safe and will continue to * manage the object it was managing prior to the call), except that * it will delete the new managed object passed to it to avoid a * memory leak. If such automatic deletion in the event of such an * exception is not wanted, use the reset() method taking a * Cgu::SharedHandleAllocFail::Leave tag type as its second argument. * @note 1. std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if it * is unable to obtain memory from the operating system. * @note 2. By default, glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_HANDLE_USE_MUTEX before shared_handle.h is parsed * so as to use mutexes instead, which might be useful for some * debugging purposes. Were she to do so, Cgu::Thread::MutexError * might be thrown by this method if initialization of the mutex * fails, but it is usually not worth checking for this. * @note 3. A SharedLockHandle object protects its reference count but * not the managed object or its other internals. The reset() method * should not be called by one thread in respect of a particular * SharedLockHandle object while another thread may be operating on, * copying or dereferencing the same instance of SharedLockHandle. It * is thread-safe as against another instance of SharedLockHandle * managing the same object. * * Since 0.9.1 */ void reset(T ptr = 0) { if (ptr) { #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX Thread::Mutex* new_mutex_p; try { new_mutex_p = new Thread::Mutex; } catch (...) { deleter(ptr); // if allocating the object referenced by ref_items.mutex_p // has failed then delete the object to be referenced to // avoid a memory leak throw; } unsigned int* new_count_p; # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(unsigned int); *new_count_p = 1; # else try { new_count_p = new unsigned int(1); } catch (...) { delete new_mutex_p; deleter(ptr); throw; } # endif unreference(); ref_items.mutex_p = new_mutex_p; #else gint* new_count_p; # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(gint); *new_count_p = 1; # else try { new_count_p = new gint(1); } catch (...) { deleter(ptr); // if allocating the new gint has failed then delete the // object to be referenced to avoid a memory leak throw; } # endif unreference(); #endif ref_items.ref_count_p = new_count_p; ref_items.obj = ptr; } else { unreference(); #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX ref_items.mutex_p = 0; // make sure the value is valid as we may assign it #endif ref_items.ref_count_p = 0; ref_items.obj = 0; } } /** * Causes the SharedLockHandle to cease to manage its managed object * (if any), deleting it if this is the last ShareLockHandle object * managing it. The SharedLockHandle object will manage the new * object passed (which must not be managed by any other * SharedLockHandle object). This method is exception safe, but see * the comments below on Cgu::SharedHandleError. * @param ptr A new unmanaged object to manage (if no new object is to * be managed, use the version of reset() taking a default value of * NULL). * @param tag Passing the tag emumerator * Cgu::SharedHandleAllocFail::leave causes this method not to delete * the new managed object passed as the 'ptr' argument in the event of * internal allocation in this method failing because of memory * exhaustion (in that event, Cgu::SharedHandleError will be thrown). * @exception Cgu::SharedHandleError This method might throw * Cgu::SharedHandleError if memory is exhausted and the system would * otherwise throw std::bad_alloc in that case. Note that if such an * exception is thrown then this method will do nothing (it is * strongly exception safe and will continue to manage the object it * was managing prior to the call), and it will not attempt to delete * the new managed object passed to it (if any). Access to the object * passed to the 'ptr' argument can be obtained via the thrown * Cgu::SharedHandleError object. * @note 1. A SharedLockHandle object protects its reference count but * not the managed object or its other internals. The reset() method * should not be called by one thread in respect of a particular * SharedLockHandle object while another thread may be operating on, * copying or dereferencing the same instance of SharedLockHandle. It * is thread-safe as against another instance of SharedLockHandle * managing the same object. * @note 2. On systems with over-commit/lazy-commit combined with * virtual memory (swap), it is rarely useful to check for memory * exhaustion, so in those cases this version of the reset() method * will not be useful. * @note 3. If the library has been installed using the * --with-glib-memory-slices-no-compat configuration option this * version of the reset() method will also not be useful: instead glib * will terminate the program if it is unable to obtain memory from * the operating system. * @note 4. By default, glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_HANDLE_USE_MUTEX before shared_handle.h is parsed * so as to use mutexes instead, which might be useful for some * debugging purposes. Were she to do so, Cgu::SharedHandleError * might be thrown by this method if initialization of the mutex fails * (even if the --with-glib-memory-slices-no-compat configuration * option is chosen), but it is usually not worth checking for such * mutex initialization failure. * * Since 0.9.1 */ void reset(T ptr, Cgu::SharedHandleAllocFail::Leave tag) { if (ptr) { #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX Thread::Mutex* new_mutex_p; try { new_mutex_p = new Thread::Mutex; } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedHandleError(ptr); } catch (Thread::MutexError&) { // as we are not rethrowing, make NPTL friendly throw SharedHandleError(ptr); } unsigned int* new_count_p; # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(unsigned int); *new_count_p = 1; # else try { new_count_p = new unsigned int(1); } catch (std::bad_alloc&) { delete new_mutex_p; throw SharedHandleError(ptr); } # endif unreference(); ref_items.mutex_p = new_mutex_p; #else gint* new_count_p; # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(gint); *new_count_p = 1; # else try { new_count_p = new gint(1); } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedHandleError(ptr); } # endif unreference(); #endif ref_items.ref_count_p = new_count_p; ref_items.obj = ptr; } else { unreference(); #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX ref_items.mutex_p = 0; // make sure the value is valid as we may assign it #endif ref_items.ref_count_p = 0; ref_items.obj = 0; } } /** * The copy constructor does not throw. * @param sh_hand The handle to be copied. */ SharedLockHandle(const SharedLockHandle& sh_hand) { ref_items = sh_hand.ref_items; reference(); } /** * This method does not throw unless the destructor of a handled * object throws - that should never happen. * @param sh_hand the assignor. * @return The SharedLockHandle object after assignment. */ // If the destructor of the handled object throws then the // SharedLockHandle object may be left in an invalid state - we // won't make this method less efficient by trying to handle // something that should not happen SharedLockHandle& operator=(const SharedLockHandle& sh_hand) { // check whether we are already referencing this object - // if so make this a null op. This will also deal with // self-assignment if (ref_items.obj != sh_hand.ref_items.obj) { // first unreference any object referenced by this shared handle unreference(); // now inherit the ref_items structure from the assigning // shared handle and reference the object it references ref_items = sh_hand.ref_items; reference(); } return *this; } /** * This method does not throw. * @return A pointer to the handled object (or NULL if none is * handled). */ T get() const {return ref_items.obj;} /** * This method does not throw. * @return A pointer to the handled object (or NULL if none is * handled). */ operator T() const {return ref_items.obj;} /** * This method does not throw. * @return The number of SharedLockHandle objects referencing the * managed object (or 0 if none is managed by this SharedLockHandle). * @note The return value may not be valid if another thread has * changed the reference count before the value returned by this * method is acted on. It is provided as a utility, but may not be * meaningful, depending on the intended usage. */ unsigned int get_refcount() const { if (!ref_items.ref_count_p) return 0; #ifdef CGU_SHARED_LOCK_HANDLE_USE_MUTEX Thread::Mutex::Lock lock(*ref_items.mutex_p); return *ref_items.ref_count_p; #else return g_atomic_int_get(ref_items.ref_count_p); #endif } /** * The destructor does not throw unless the destructor of a handled * object throws - that should never happen. */ ~SharedLockHandle() {unreference();} }; #if defined(CGU_USE_SMART_PTR_COMPARISON) || defined(DOXYGEN_PARSING) // we can use built-in operator == when comparing pointers referencing // different objects of the same type /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_handle.h is first parsed. * * Since 1.2.12 */ template bool operator==(const SharedHandle& s1, const SharedHandle& s2) { return (s1.get() == s2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_handle.h is first parsed. * * Since 1.2.12 */ template bool operator!=(const SharedHandle& s1, const SharedHandle& s2) { return !(s1 == s2); } // we must use std::less rather than the < built-in operator for // pointers to objects not within the same array or object: "For // templates greater, less, greater_equal, and less_equal, the // specializations for any pointer type yield a total order, even if // the built-in operators <, >, <=, >= do not." (para 20.3.3/8). /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_handle.h is first parsed. * * Since 1.2.12 */ template bool operator<(const SharedHandle& s1, const SharedHandle& s2) { return std::less()(s1.get(), s2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_handle.h is first parsed. * * Since 1.2.12 */ template bool operator==(const SharedLockHandle& s1, const SharedLockHandle& s2) { return (s1.get() == s2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_handle.h is first parsed. * * Since 1.2.12 */ template bool operator!=(const SharedLockHandle& s1, const SharedLockHandle& s2) { return !(s1 == s2); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_handle.h is first parsed. * * Since 1.2.12 */ template bool operator<(const SharedLockHandle& s1, const SharedLockHandle& s2) { return std::less()(s1.get(), s2.get()); } #endif // CGU_USE_SMART_PTR_COMPARISON } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/timeout.cpp0000644000175000001440000001272611524110041017232 00000000000000/* Copyright (C) 2009 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include extern "C" { static gboolean cgu_timeout_wrapper(void*); static gboolean cgu_tracked_timeout_wrapper(void*); static void cgu_timeout_destroy_func(void*); static void cgu_tracked_timeout_destroy_func(void*); } gboolean cgu_timeout_wrapper(void* data) { const Cgu::Callback::CallbackArg* cb = static_cast*>(data); bool keep_source = true; // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { cb->dispatch(keep_source); } catch (...) { g_critical("Exception thrown in timeout_wrapper() for timeout function\n"); } return keep_source; } gboolean cgu_tracked_timeout_wrapper(void* data) { const Cgu::SafeEmitterArg* e = static_cast*>(data); bool keep_source = true; bool connected; // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { connected = e->test_emit(keep_source); } catch (...) { g_critical("Exception thrown in tracked_timeout_wrapper() for timeout function\n"); return true; } return (keep_source && connected); } void cgu_timeout_destroy_func(void* data) { delete static_cast*>(data); } void cgu_tracked_timeout_destroy_func(void* data) { delete static_cast*>(data); } namespace Cgu { guint start_timeout(guint millisec, const Callback::CallbackArg* cb, gint priority, GMainContext* context) { // context has a default value of NULL which will attach the timeout source // to the default program main context GSource* source_p = g_timeout_source_new(millisec); if (priority != G_PRIORITY_DEFAULT) g_source_set_priority(source_p, priority); g_source_set_callback(source_p, cgu_timeout_wrapper, const_cast*>(cb), cgu_timeout_destroy_func); guint id = g_source_attach(source_p, context); g_source_unref(source_p); return id; } guint start_timeout(guint millisec, const Callback::CallbackArg* cb, Releaser& r, gint priority, GMainContext* context) { // context has a default value of NULL which will attach the timeout source // to the default program main context Callback::SafeFunctorArg f(cb); // take ownership SafeEmitterArg* e = new SafeEmitterArg; try { e->connect(f, r); } catch (...) { delete e; throw; } GSource* source_p = g_timeout_source_new(millisec); if (priority != G_PRIORITY_DEFAULT) g_source_set_priority(source_p, priority); g_source_set_callback(source_p, cgu_tracked_timeout_wrapper, e, cgu_tracked_timeout_destroy_func); guint id = g_source_attach(source_p, context); g_source_unref(source_p); return id; } #if GLIB_CHECK_VERSION(2,14,0) guint start_timeout_seconds(guint sec, const Callback::CallbackArg* cb, gint priority, GMainContext* context) { // context has a default value of NULL which will attach the timeout source // to the default program main context GSource* source_p = g_timeout_source_new_seconds(sec); if (priority != G_PRIORITY_DEFAULT) g_source_set_priority(source_p, priority); g_source_set_callback(source_p, cgu_timeout_wrapper, const_cast*>(cb), cgu_timeout_destroy_func); guint id = g_source_attach(source_p, context); g_source_unref(source_p); return id; } guint start_timeout_seconds(guint sec, const Callback::CallbackArg* cb, Releaser& r, gint priority, GMainContext* context) { // context has a default value of NULL which will attach the timeout source // to the default program main context Callback::SafeFunctorArg f(cb); // take ownership SafeEmitterArg* e = new SafeEmitterArg; try { e->connect(f, r); } catch (...) { delete e; throw; } GSource* source_p = g_timeout_source_new_seconds(sec); if (priority != G_PRIORITY_DEFAULT) g_source_set_priority(source_p, priority); g_source_set_callback(source_p, cgu_tracked_timeout_wrapper, e, cgu_tracked_timeout_destroy_func); guint id = g_source_attach(source_p, context); g_source_unref(source_p); return id; } #endif // GLIB_CHECK_VERSION } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/LGPL.TXT0000644000175000001440000006346511512303316016213 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 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. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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) This 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. 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; 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. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! efax-gtk-3.2.8/src/internal/c++-gtk-utils/window.cpp0000644000175000001440000001211211544200716017053 00000000000000/* Copyright (C) 2005 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include #ifndef DOXYGEN_PARSING namespace Cgu { class WinBase::CB { public: static void delete_event(void* data) { static_cast(data)->on_delete_event(); } }; } // namespace Cgu // the GObject callback function with both C linkage // specification and internal linkage extern "C" { static gboolean cgu_winbase_delete_event(GtkWidget*, GdkEvent*, void* data) { Cgu::WinBase::CB::delete_event(data); return true; // returning true prevents destroy sig being emitted we call // gtk_object_destroy() ourselves in the WinBase destructor } } // extern "C" #endif // DOXYGEN_PARSING namespace Cgu { WinBase::WinBase(const char* caption, GdkPixbuf* icon_p, bool modal, GtkWindow* parent_p_, GtkWindow* window_p): in_exec_loop(false), is_modal(modal), close_guard(false) { // use memory slices here: they will not throw (so maintaining API // compatibility with versions prior to 1.2.12) and since a number // of the following GTK+ functions will invoke // g_slice_new()/g_slice_alloc(), we are not losing anything by // doing so in terms of program robustness impl = g_slice_new(Impl); impl->parent_p = parent_p_; #if GTK_CHECK_VERSION(2,99,0) impl->app_p = 0; #endif if (window_p) g_window_p = window_p; else { g_window_p = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); } if (caption) gtk_window_set_title(g_window_p, caption); if (is_modal) { gtk_window_set_modal(g_window_p, true); if (parent_p_) { gtk_window_set_transient_for(g_window_p, parent_p_); gtk_widget_set_sensitive(GTK_WIDGET(parent_p_), false); } } g_signal_connect(G_OBJECT(g_window_p), "delete_event", G_CALLBACK(cgu_winbase_delete_event), this); if (icon_p) gtk_window_set_icon(g_window_p, icon_p); } WinBase::~WinBase() { #if GTK_CHECK_VERSION(2,99,0) if (impl->app_p) impl->app_p->remove(this); #endif gtk_widget_destroy(GTK_WIDGET(g_window_p)); // call gtk_main_quit() if we have previously called WinBase::exec() on this // object and we have not reached this destructor via a call to WinBase::close() // (perhaps a parent window has called WinBase::close() or gtk_main_quit() via // one of its callbacks so hoping to destroy itself by going out of scope but // has caused this WinBase object to unblock instead - this further call to // gtk_main_quit() will balance up the recursive calls to gtk_main() to ensure // that both the parent and this object are unblocked and so destroyed) if (in_exec_loop) gtk_main_quit(); g_slice_free(Impl, impl); } int WinBase::get_exec_val() const { return 0; } void WinBase::close() { // protect against a case where a user has connected a GtkDialog // object to the response signal and called this method in the // response signal handler, but has forgotten to override // on_delete_event() to prevent a double call here. This guard will // in practice only have an effect (and be necessary) if exec() has // been called - otherwise the first call to close() from the // response event will delete this WinBase object and destroy the // GtkWindow object, so any subsequent delete event will not be // delivered by GTK+ if (close_guard) return; close_guard = true; if (is_modal && impl->parent_p) gtk_widget_set_sensitive(GTK_WIDGET(impl->parent_p), true); gtk_widget_hide(GTK_WIDGET(g_window_p)); if (in_exec_loop) { in_exec_loop = false; gtk_main_quit(); } // if we have not called exec(), then the dialog is self-owning // and it is safe and necessary to call 'delete this' else delete this; } void WinBase::on_delete_event() { close(); } int WinBase::exec() { #if GTK_CHECK_VERSION(2,99,0) if (impl->app_p) { g_critical("Cgu::WinBase::exec() called in relation to a WinBase " "object added to a Cgu::Application object\n"); return -1; } #endif in_exec_loop = true; gtk_main(); return get_exec_val(); } } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/convert.cpp0000644000175000001440000001361711544200716017237 00000000000000/* Copyright (C) 2005, 2009 and 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the src/utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include namespace Cgu { namespace Utf8 { std::wstring uniwide_from_utf8(const std::string& input) { GError* error_p = 0; glong written = 0; #if SIZEOF_WCHAR_T == 2 if (sizeof(gunichar2) != 2) { // let the optimiser elide this block if it cannot be reached throw ConversionError("wchar_t and gunichar2 are of different sizes " "(char type used with UTF-8 may not be an octet)"); } ScopedHandle result_h(g_utf8_to_utf16(input.data(), input.size(), 0, &written, &error_p)); #elif SIZEOF_WCHAR_T == 4 if (sizeof(gunichar) != 4) { // let the optimiser elide this block if it cannot be reached throw ConversionError("wchar_t and gunichar are of different sizes " "(char type used with UTF-8 may not be an octet)"); } ScopedHandle result_h(g_utf8_to_ucs4(input.data(), input.size(), 0, &written, &error_p)); #else throw ConversionError("char type used with UTF-8 is not an octet"); ScopedHandle result_h; // dummy value to prevent compile error #endif if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::wstring(reinterpret_cast(result_h.get()), written); } std::string uniwide_to_utf8(const std::wstring& input) { GError* error_p = 0; glong written = 0; #if SIZEOF_WCHAR_T == 2 if (sizeof(gunichar2) != 2) { // let the optimiser elide this block if it cannot be reached throw ConversionError("wchar_t and gunichar2 are of different sizes " "(char type used with UTF-8 may not be an octet)"); } GcharScopedHandle result_h(g_utf16_to_utf8(reinterpret_cast(input.data()), input.size(), 0, &written, &error_p)); #elif SIZEOF_WCHAR_T == 4 if (sizeof(gunichar) != 4) { // let the optimiser elide this block if it cannot be reached throw ConversionError("wchar_t and gunichar are of different sizes " "(char type used with UTF-8 may not be an octet)"); } GcharScopedHandle result_h(g_ucs4_to_utf8(reinterpret_cast(input.data()), input.size(), 0, &written, &error_p)); #else throw ConversionError("char type used with UTF-8 is not an octet"); GcharScopedHandle result_h; // dummy value to prevent compile error #endif if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::string(result_h.get(), written); } std::wstring wide_from_utf8(const std::string& input) { GError* error_p = 0; gsize written = 0; GcharScopedHandle result_h(g_convert(input.data(), input.size(), "WCHAR_T", "UTF-8", 0, &written, &error_p)); if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::wstring(reinterpret_cast(result_h.get()), written/sizeof(wchar_t)); } std::string wide_to_utf8(const std::wstring& input) { GError* error_p = 0; gsize written = 0; GcharScopedHandle result_h(g_convert(reinterpret_cast(input.data()), input.size() * sizeof(wchar_t), "UTF-8", "WCHAR_T", 0, &written, &error_p)); if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::string(result_h.get(), written); } std::string filename_from_utf8(const std::string& input) { GError* error_p = 0; gsize written = 0; GcharScopedHandle result_h(g_filename_from_utf8(input.data(), input.size(), 0, &written, &error_p)); if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::string(result_h.get(), written); } std::string filename_to_utf8(const std::string& input) { GError* error_p = 0; gsize written = 0; GcharScopedHandle result_h(g_filename_to_utf8(input.data(), input.size(), 0, &written, &error_p)); if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::string(result_h.get(), written); } std::string locale_from_utf8(const std::string& input) { GError* error_p = 0; gsize written = 0; GcharScopedHandle result_h(g_locale_from_utf8(input.data(), input.size(), 0, &written, &error_p)); if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::string(result_h.get(), written); } std::string locale_to_utf8(const std::string& input) { GError* error_p = 0; gsize written = 0; GcharScopedHandle result_h(g_locale_to_utf8(input.data(), input.size(), 0, &written, &error_p)); if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::string(result_h.get(), written); } } // namespace Utf8 } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/callback.h0000644000175000001440000042764111524110041016753 00000000000000/* Copyright (C) 2008 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_CALLBACK_H #define CGU_CALLBACK_H /** * @file callback.h * @brief This file provides classes encapsulating callbacks. * * \#include * * These classes encapsulate callbacks (they are closures). They * comprise a generic callback creation and execution interface. * There is a basic Callback::Callback type, which is a pure closure * where all the arguments are bound in the constructor and is * completely opaque. Callback::CallbackArg is a class which takes * one unbound argument of type T when the callback is dispatched, * with any other arguments being bound at construction time. (The * pure Callback::Callback type is in fact just a typedef for * Callback::CallbackArg: the two types are interchangeable.) * In addition, from version 1.2.10 of the library, by default a * callback can be executed by a Callback::CallbackArg object with * two or three unbound arguments by providing a Cgu::TypeTuple struct * as the template type: see under "Usage" below and @ref TypeTuple * for further information. * * The classes can represent static and non-static member functions * and plain functions. The function referred to must be one of void * return type. * * They are particularly useful where a callback object may need to be * handed between threads. * * The pure Callback::Callback class can also be useful as the data * argument of a call to g_signal_connect_data(), in a case where a * better design arises when passing arguments known at connect time * by storing them in the callback object itself (say, where otherwise * you would pass a plain struct as the data argument), or for general * event passing when used together with g_idle_add_full() from glib * (see the Callback::post() functions). * * These classes are also used in the Emitter/EmitterArg classes in * emitter.h, which enable callbacks to be connected to an emitter and * provide for automatic disconnection where a class object whose * member a callback represents ceases to exist. * * @b The @b Callback::make() @b functions * * The templated helper Callback::make() functions make it trivial to * create a callback object of the correct type. A maximum of two * bound arguments to pass to the relevant function or class method is * provided for and from version 1.2.10 a maximum of three free * arguments to pass at call time - but this can be extended * indefinitely (prior to version 1.2.10 only one unbound argument was * provided for). If there are free arguments, they must be the last * (trailing) arguments of the relevant function or method to be * called. Callback/CallbackArg classes do not provide for a return * value. If a result is wanted, users should pass an unbound * argument by reference or pointer (or pointer to pointer). * * Although as mentioned above only two bound and three unbound * arguments are provided for, as any of those arguments can be a * struct, any number of arguments can be passed as members of a * struct (or, in C++0x, a std::tuple). * * With the Callback::make() functions, bound arguments of the * relevant function or method to be called can comprise a reference * argument (T& or const T&) with C++-98/03 if the template parameters * of the Callback::make() call are qualified by hand to avoid a type * mismatch: see under "Usage" below for further particulars. However * as that would result in the lifetime of the argument not being * controlled by the callback object (it would not keep its own copy), * it will often be unsafe to do so. (The documentation on * Thread::JoinableHandle give a usage where where binding a reference * argument would be safe.) * * Where more than one unbound argument is to be passed to the target * function, the Cgu::TypeTuple type container struct is used - see * under Usage below for examples. * * @b The @b Callback::make_val() @b functions * * In order to enable the widest variety of types to be accepted as * arguments (including reference arguments in those cases where it is * safe, and also string literals), when constructing a callback * object, Callback::make() receives non-reference bound arguments by * value, and if unoptimised these may be copied up to two times, and * once more when the target function is dispatched. Where a bound * argument is a pointer or a fundamental type (an integral or * floating-point type), optimization by copy elision will reduce the * number of times argument copying takes place when constructing a * callback object to once, but the standard does not permit that with * class types where the constructor or destructor have side effects * or it cannot be ascertained whether they have side effects. * Therefore, if class objects are passed as bound arguments, it is * best for them to be constructed on free store and for the target * function to receive them by pointer or by Cgu::SharedPtr or (if * passed between threads) Cgu::SharedLockPtr. * * However to cater for cases where a target function does take a * class type by value for good reason (or for ungood reason), from * version 1.2.8 the Callback::make_val() functions are provided. * These do exactly the same as Callback::make(), except that they * receive bound arguments internally by reference to const, so that a * single copy operation only is forced when constructing the callback * object. (The "val" in make_val() refers to their use with * class-type bound value arguments, not that they copy by value, * which they avoid.) This means however that these functions cannot * be used with reference arguments in strict C++-98/03. * * (Implementation note: From version 1.2.10, the callback object * constructors take their arguments by a Param struct which uses * template partial specialisation in order to provide automatic type * mapping for arguments, which automatically causes value types to be * passed to the constructors by reference to const. The * Callback::make() functions do not receive their arguments this way * as to do so would require explicit function prototype casting * whenever callback objects are constructed for overloaded functions. * Instead, the design decision has been taken to provide the separate * make_val() functions for the construction of callback objects * representing functions which take class objects by value.) * * @b Functors * * If a functor class is required (say for passing to a c++ algorithm * or container, or for automatic lifetime management of the Callback * object), the Callback::Functor and Callback::FunctorArg wrapper * classes can be used. However, for many c++ algorithms where * anonymous functors created as temporaries can be used, the * std::ptr_fun() and MemFun::make() factory functions will be a more * obvious choice. * * Callback::SafeFunctor and Callback::SafeFunctorArg classes are the * same as Callback::Functor and Callback::FunctorArg classes, except * that objects of the safe version may be passed and copied between * threads and put in different containers in different threads (that * is, the reference count maintained with respect to the contained * callback object is thread-safe). They use a SharedLockPtr object * to hold the referenced callback object. * * @b Memory @b allocation * * If the library is installed using the * --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration options, any * Callback::Functor, Callback::FunctorArg, Callback::SafeFunctor or * Callback::SafeFunctorArg objects constructed on free store (usually * they won't be) will be constructed in glib memory slices. A * contained Callback::Callback or Callback::CallbackArg object, which * will always be constructed on free store, will be constructed in * glib memory slices if the --with-glib-memory-slices-no-compat * configuration option is chosen. * * @b Usage * * For a class object my_obj of type MyObj, with a method void * MyObj::my_method(int, const char*), usage for a fully bound * callback or functor would be: * * @code * using namespace Cgu; * int arg = 1; * Callback::Callback* cb = * Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n"); * cb->dispatch(); * delete cb; * * Callback::Functor f(Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n")); * f(); * @endcode * * Or for a partially bound callback or functor: * * @code * using namespace Cgu; * int arg = 1; * Callback::CallbackArg* cb = * Callback::make(my_obj, &MyObj::my_method, arg); * cb->dispatch("Hello\n"); * delete cb; * * Callback::FunctorArg f(Callback::make(my_obj, &MyObj::my_method, arg)); * f("Hello\n"); * @endcode * * To provide for two or three unbound arguments, from version 1.2.10 * of the library the Cgu::TypeTuple struct is used (this struct has * no members and is never instantiated, so it does not impose any * overhead: see @ref TypeTuple for further information). As in the * case of a single unbound argument, if there are bound arguments * these multiple unbound arguments must be the last (trailing) * arguments of the function to be called. For a class object my_obj * of type MyObj, with a method void MyObj::my_method2(int, int, int, * const char*), usage with two unbound arguments would be: * * @code * int arg1 = 1, arg2 = 2, arg3 = 3; * Cgu::Callback::CallbackArg >* cb = * Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1, arg2); * cb->dispatch(arg3, "Hello\n"); * delete cb; * * Cgu::Callback::FunctorArg > f(Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1, arg2)); * f(arg3, "Hello\n"); * @endcode * * and for three unbound arguments: * * @code * int arg1 = 1, arg2 = 2, arg3 = 3; * Cgu::Callback::CallbackArg >* cb = * Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1); * cb->dispatch(arg2, arg3, "Hello\n"); * delete cb; * * Cgu::Callback::FunctorArg > f(Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1)); * f(arg2, arg3, "Hello\n"); * @endcode * * The syntax for the construction of a callback object representing a * static member function with a signature void MyObj::my_func(int, * const char*), or for a normal function, is similar to the * non-static member function case, except that the call to * Callback::make would comprise: * * @code * Callback::make(&MyObj::my_func, arg, "Hello\n"); * @endcode * (fully bound), or * @code * Callback::make(&MyObj::my_func, arg); * @endcode * (partially bound), and so on, and similarly with * Callback::make_val(). * * To bind to reference arguments, the call to Callback::make() must * be explicitly typed. For a class object my_obj of type MyObj, with * a method void MyObj::my_method(int&), usage for a fully bound * callback or functor would be: * * @code * int arg = 1; * Callback::Callback* cb = * Callback::make(my_obj, &MyObj::my_method, arg); * @endcode * * Note however the caveats above about binding to reference * arguments. * * @b Overloaded @b functions * * Note that creating callbacks for overloaded functions can give rise * to an ambiguity when using Callback::make() or * Callback::make_val(), arising from the fact that the callback * object may have an unbound argument. For example: * * @code * class MyClass { * ... * void add(int i); * void add(int i, int j); * void add(double d); * }; * MyClass obj; * using namespace Cgu; * Callback::Callback* cb1 = Callback::make(obj, &MyClass::add, 1, 2); // ok * Callback::Callback* cb2 = Callback::make(obj, &MyClass::add, 1.0); // ok * Callback::Callback* cb3 = Callback::make(obj, &MyClass::add, 1); // ambiguous - compilation failure * @endcode * * The third call to Callback::make() is ambiguous, as it could be * creating a callback for either the function MyClass::add(int) with * no unbound argument (that is, creating a Callback::Callback * object), or the function MyClass::add(int, int) with an unbound int * argument (that is, creating a Callback::CallbackArg object). * This situation could be disambiguated by specifically stating the * type of the function which is to be chosen, namely, to instantiate * the callback in the third call with: * * @code * // either: * Callback::Callback* cb3 = * Callback::make(obj, static_cast(&MyClass::add), 1); * // or: * Callback::CallbackArg* cb3 = * Callback::make(obj, static_cast(&MyClass::add), 1); * @endcode * * or to create by hand an explicit Callback object of type * Callback::Callback1 (derived from Callback::Callback) * or type Callback::CallbackArg1 (derived from * Callback::CallbackArg). * * Template type resolution with Callback::make() and * Callback::make_val() can also fail with overloaded functions taking * different types and unbound arguments in other circumstances, * requiring similar disambiguation. Generally, it is best to avoid * creating callbacks for overloaded functions giving rise to * ambiguities. * * @b Posting @b of @b callbacks * * This file also provides Callback::post() functions which will * execute a callback in a glib main loop and can be used (amongst * other things) to pass an event from a worker thread to the main * program thread. In that respect, it provides an alternative to the * Notifier class. It is passed a pointer to a Callback::CallbackArg * object created with a call to Callback::make. * * To provide for thread-safe automatic disconnection of the callback * if the object whose method it represents is destroyed before the * callback executes in the main loop, include a Releaser as a public * member of that object and pass the Releaser object as the second * argument of Callback::post(). Note that for this to be race free, * the lifetime of the remote object whose method is to be invoked * must be determined by the thread to whose main loop the callback * has been attached. When the main loop begins invoking the * execution of the callback, the remote object must either wholly * exist (in which case the callback will be invoked) or have been * destroyed (in which case the callback will be ignored), and not be * in some transient half-state governed by another thread. * * Advantages as against Notifier: * * 1. If there are a lot of different events requiring callbacks to be * dispatched in the program from worker threads to the main * thread, this avoids having separate Notifier objects for each * event. * * 2. It is easier to pass arguments with varying values - they can be * passed as templated arguments to the Callback::make functions * and no special synchronisation is normally required (the call to * g_source_attach() invokes locking of the main loop which will * have the effect of ensuring memory visibility). With a Notifier * object it may be necessary to use an asynchronous queue to pass * variable values (or to bind a reference to the data, thus * normally requiring separate synchronisation). * * 3. Although the callback would normally be sent for execution by * the main program loop, and that is the default, it can be sent * for execution by any thread which has its own * GMainContext/GMainLoop objects. Thus callbacks can be passed * for execution between worker threads, or from the main program * thread to worker threads, as well as from worker threads to the * main program thread. * * Disadvantages as against Notifier: * * 1. Less efficient, as a new callback object has to be created on * freestore every time the callback is invoked, together with a * new Emitter object if a Releaser is used to track the callback. * * 2. Multiple callbacks relevant to a single event cannot be invoked * from a single call for the event - each callback has to be * separately dispatched. */ /** * @namespace Cgu::Callback * @brief This namespace provides classes encapsulating callbacks. * * \#include * * These classes encapsulate callbacks (they are closures). They * comprise a generic callback creation and execution interface. * There is a basic Callback::Callback type, which is a pure closure * where all the arguments are bound in the constructor and is * completely opaque. Callback::CallbackArg is a class which takes * one unbound argument of type T when the callback is dispatched, * with any other arguments being bound at construction time. (The * pure Callback::Callback type is in fact just a typedef for * Callback::CallbackArg: the two types are interchangeable.) * In addition, from version 1.2.10 of the library, by default a * callback can be executed by a Callback::CallbackArg object with * two or three unbound arguments by providing a Cgu::TypeTuple struct * as the template type: see under "Usage" below and @ref TypeTuple * for further information. * * The classes can represent static and non-static member functions * and plain functions. The function referred to must be one of void * return type. * * They are particularly useful where a callback object may need to be * handed between threads. * * The pure Callback::Callback class can also be useful as the data * argument of a call to g_signal_connect_data(), in a case where a * better design arises when passing arguments known at connect time * by storing them in the callback object itself (say, where otherwise * you would pass a plain struct as the data argument), or for general * event passing when used together with g_idle_add_full() from glib * (see the Callback::post() functions). * * These classes are also used in the Emitter/EmitterArg classes in * emitter.h, which enable callbacks to be connected to an emitter and * provide for automatic disconnection where a class object whose * member a callback represents ceases to exist. * * @b The @b Callback::make() @b functions * * The templated helper Callback::make() functions make it trivial to * create a callback object of the correct type. A maximum of two * bound arguments to pass to the relevant function or class method is * provided for and from version 1.2.10 a maximum of three free * arguments to pass at call time - but this can be extended * indefinitely (prior to version 1.2.10 only one unbound argument was * provided for). If there are free arguments, they must be the last * (trailing) arguments of the relevant function or method to be * called. Callback/CallbackArg classes do not provide for a return * value. If a result is wanted, users should pass an unbound * argument by reference or pointer (or pointer to pointer). * * Although as mentioned above only two bound and three unbound * arguments are provided for, as any of those arguments can be a * struct, any number of arguments can be passed as members of a * struct (or, in C++0x, a std::tuple). * * With the Callback::make() functions, bound arguments of the * relevant function or method to be called can comprise a reference * argument (T& or const T&) with C++-98/03 if the template parameters * of the Callback::make() call are qualified by hand to avoid a type * mismatch: see under "Usage" below for further particulars. However * as that would result in the lifetime of the argument not being * controlled by the callback object (it would not keep its own copy), * it will often be unsafe to do so. (The documentation on * Thread::JoinableHandle give a usage where where binding a reference * argument would be safe.) * * Where more than one unbound argument is to be passed to the target * function, the Cgu::TypeTuple type container struct is used - see * under Usage below for examples. * * @b The @b Callback::make_val() @b functions * * In order to enable the widest variety of types to be accepted as * arguments (including reference arguments in those cases where it is * safe, and also string literals), when constructing a callback * object, Callback::make() receives non-reference bound arguments by * value, and if unoptimised these may be copied up to two times, and * once more when the target function is dispatched. Where a bound * argument is a pointer or a fundamental type (an integral or * floating-point type), optimization by copy elision will reduce the * number of times argument copying takes place when constructing a * callback object to once, but the standard does not permit that with * class types where the constructor or destructor have side effects * or it cannot be ascertained whether they have side effects. * Therefore, if class objects are passed as bound arguments, it is * best for them to be constructed on free store and for the target * function to receive them by pointer or by Cgu::SharedPtr or (if * passed between threads) Cgu::SharedLockPtr. * * However to cater for cases where a target function does take a * class type by value for good reason (or for ungood reason), from * version 1.2.8 the Callback::make_val() functions are provided. * These do exactly the same as Callback::make(), except that they * receive bound arguments internally by reference to const, so that a * single copy operation only is forced when constructing the callback * object. (The "val" in make_val() refers to their use with * class-type bound value arguments, not that they copy by value, * which they avoid.) This means however that these functions cannot * be used with reference arguments in strict C++-98/03. * * (Implementation note: From version 1.2.10, the callback object * constructors take their arguments by a Param struct which uses * template partial specialisation in order to provide automatic type * mapping for arguments, which automatically causes value types to be * passed to the constructors by reference to const. The * Callback::make() functions do not receive their arguments this way * as to do so would require explicit function prototype casting * whenever callback objects are constructed for overloaded functions. * Instead, the design decision has been taken to provide the separate * make_val() functions for the construction of callback objects * representing functions which take class objects by value.) * * @b Functors * * If a functor class is required (say for passing to a c++ algorithm * or container, or for automatic lifetime management of the Callback * object), the Callback::Functor and Callback::FunctorArg wrapper * classes can be used. However, for many c++ algorithms where * anonymous functors created as temporaries can be used, the * std::ptr_fun() and MemFun::make() factory functions will be a more * obvious choice. * * Callback::SafeFunctor and Callback::SafeFunctorArg classes are the * same as Callback::Functor and Callback::FunctorArg classes, except * that objects of the safe version may be passed and copied between * threads and put in different containers in different threads (that * is, the reference count maintained with respect to the contained * callback object is thread-safe). They use a SharedLockPtr object * to hold the referenced callback object. * * @b Memory @b allocation * * If the library is installed using the * --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat configuration options, any * Callback::Functor, Callback::FunctorArg, Callback::SafeFunctor or * Callback::SafeFunctorArg objects constructed on free store (usually * they won't be) will be constructed in glib memory slices. A * contained Callback::Callback or Callback::CallbackArg object, which * will always be constructed on free store, will be constructed in * glib memory slices if the --with-glib-memory-slices-no-compat * configuration option is chosen. * * @b Usage * * For a class object my_obj of type MyObj, with a method void * MyObj::my_method(int, const char*), usage for a fully bound * callback or functor would be: * * @code * using namespace Cgu; * int arg = 1; * Callback::Callback* cb = * Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n"); * cb->dispatch(); * delete cb; * * Callback::Functor f(Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n")); * f(); * @endcode * * Or for a partially bound callback or functor: * * @code * using namespace Cgu; * int arg = 1; * Callback::CallbackArg* cb = * Callback::make(my_obj, &MyObj::my_method, arg); * cb->dispatch("Hello\n"); * delete cb; * * Callback::FunctorArg f(Callback::make(my_obj, &MyObj::my_method, arg)); * f("Hello\n"); * @endcode * * To provide for two or three unbound arguments, from version 1.2.10 * of the library the Cgu::TypeTuple struct is used (this struct has * no members and is never instantiated, so it does not impose any * overhead: see @ref TypeTuple for further information). As in the * case of a single unbound argument, if there are bound arguments * these multiple unbound arguments must be the last (trailing) * arguments of the function to be called. For a class object my_obj * of type MyObj, with a method void MyObj::my_method2(int, int, int, * const char*), usage with two unbound arguments would be: * * @code * int arg1 = 1, arg2 = 2, arg3 = 3; * Cgu::Callback::CallbackArg >* cb = * Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1, arg2); * cb->dispatch(arg3, "Hello\n"); * delete cb; * * Cgu::Callback::FunctorArg > f(Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1, arg2)); * f(arg3, "Hello\n"); * @endcode * * and for three unbound arguments: * * @code * int arg1 = 1, arg2 = 2, arg3 = 3; * Cgu::Callback::CallbackArg >* cb = * Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1); * cb->dispatch(arg2, arg3, "Hello\n"); * delete cb; * * Cgu::Callback::FunctorArg > f(Cgu::Callback::make(my_obj, &MyObj::my_method2, arg1)); * f(arg2, arg3, "Hello\n"); * @endcode * * The syntax for the construction of a callback object representing a * static member function with a signature void MyObj::my_func(int, * const char*), or for a normal function, is similar to the * non-static member function case, except that the call to * Callback::make would comprise: * * @code * Callback::make(&MyObj::my_func, arg, "Hello\n"); * @endcode * (fully bound), or * @code * Callback::make(&MyObj::my_func, arg); * @endcode * (partially bound), and so on, and similarly with * Callback::make_val(). * * To bind to reference arguments, the call to Callback::make() must * be explicitly typed. For a class object my_obj of type MyObj, with * a method void MyObj::my_method(int&), usage for a fully bound * callback or functor would be: * * @code * int arg = 1; * Callback::Callback* cb = * Callback::make(my_obj, &MyObj::my_method, arg); * @endcode * * Note however the caveats above about binding to reference * arguments. * * @b Overloaded @b functions * * Note that creating callbacks for overloaded functions can give rise * to an ambiguity when using Callback::make() or * Callback::make_val(), arising from the fact that the callback * object may have an unbound argument. For example: * * @code * class MyClass { * ... * void add(int i); * void add(int i, int j); * void add(double d); * }; * MyClass obj; * using namespace Cgu; * Callback::Callback* cb1 = Callback::make(obj, &MyClass::add, 1, 2); // ok * Callback::Callback* cb2 = Callback::make(obj, &MyClass::add, 1.0); // ok * Callback::Callback* cb3 = Callback::make(obj, &MyClass::add, 1); // ambiguous - compilation failure * @endcode * * The third call to Callback::make() is ambiguous, as it could be * creating a callback for either the function MyClass::add(int) with * no unbound argument (that is, creating a Callback::Callback * object), or the function MyClass::add(int, int) with an unbound int * argument (that is, creating a Callback::CallbackArg object). * This situation could be disambiguated by specifically stating the * type of the function which is to be chosen, namely, to instantiate * the callback in the third call with: * * @code * // either: * Callback::Callback* cb3 = * Callback::make(obj, static_cast(&MyClass::add), 1); * // or: * Callback::CallbackArg* cb3 = * Callback::make(obj, static_cast(&MyClass::add), 1); * @endcode * * or to create by hand an explicit Callback object of type * Callback::Callback1 (derived from Callback::Callback) * or type Callback::CallbackArg1 (derived from * Callback::CallbackArg). * * Template type resolution with Callback::make() and * Callback::make_val() can also fail with overloaded functions taking * different types and unbound arguments in other circumstances, * requiring similar disambiguation. Generally, it is best to avoid * creating callbacks for overloaded functions giving rise to * ambiguities. * * @b Posting @b of @b callbacks * * This namespace also provides Callback::post() functions which will * execute a callback in a glib main loop and can be used (amongst * other things) to pass an event from a worker thread to the main * program thread. In that respect, it provides an alternative to the * Notifier class. It is passed a pointer to a Callback::CallbackArg * object created with a call to Callback::make. * * To provide for thread-safe automatic disconnection of the callback * if the object whose method it represents is destroyed before the * callback executes in the main loop, include a Releaser as a public * member of that object and pass the Releaser object as the second * argument of Callback::post(). Note that for this to be race free, * the lifetime of the remote object whose method is to be invoked * must be determined by the thread to whose main loop the callback * has been attached. When the main loop begins invoking the * execution of the callback, the remote object must either wholly * exist (in which case the callback will be invoked) or have been * destroyed (in which case the callback will be ignored), and not be * in some transient half-state governed by another thread. * * Advantages as against Notifier: * * 1. If there are a lot of different events requiring callbacks to be * dispatched in the program from worker threads to the main * thread, this avoids having separate Notifier objects for each * event. * * 2. It is easier to pass arguments with varying values - they can be * passed as templated arguments to the Callback::make functions * and no special synchronisation is normally required (the call to * g_source_attach() invokes locking of the main loop which will * have the effect of ensuring memory visibility). With a Notifier * object it may be necessary to use an asynchronous queue to pass * variable values (or to bind a reference to the data, thus * normally requiring separate synchronisation). * * 3. Although the callback would normally be sent for execution by * the main program loop, and that is the default, it can be sent * for execution by any thread which has its own * GMainContext/GMainLoop objects. Thus callbacks can be passed * for execution between worker threads, or from the main program * thread to worker threads, as well as from worker threads to the * main program thread. * * Disadvantages as against Notifier: * * 1. Less efficient, as a new callback object has to be created on * freestore every time the callback is invoked, together with a * new Emitter object if a Releaser is used to track the callback. * * 2. Multiple callbacks relevant to a single event cannot be invoked * from a single call for the event - each callback has to be * separately dispatched. */ #include // for std::less #include #include #include #include namespace Cgu { namespace Callback { /* The CallbackArg class could be additionally templated to provide a return value, but that would affect the simplicity of the interface, and if a case were to arise where a result is needed, an alternative is for users to pass an argument by pointer (or pointer to pointer) rather than have a return value. */ /* Declare the two basic interface types */ template class CallbackArg; typedef CallbackArg Callback; /* now the class definitions */ /** * @class CallbackArg callback.h c++-gtk-utils/callback.h * @brief The callback interface class * @sa Callback namespace * @sa FunctorArg SafeFunctorArg * * This provides the basic interface class that users will generally * see, and is suitable for passing by void*, which if using glib * and/or gthreads and/or pthreads is almost certain to happen at some * stage. The template type is the type of the unbound argument or * container of unbound argument types, if any. * Callback::CallbackArg is typedef'ed to Callback::Callback. * * @b Usage * * For a class object my_obj of type MyObj, with a method void * MyObj::my_method(int, const char*), usage for a fully bound * callback would be: * * @code * using namespace Cgu; * int arg = 1; * Callback::Callback* cb = * Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n"); * cb->dispatch(); * delete cb; * @endcode * * Or for a partially bound callback: * * @code * using namespace Cgu; * int arg = 1; * Callback::CallbackArg* cb = * Callback::make(my_obj, &MyObj::my_method, arg); * cb->dispatch("Hello\n"); * delete cb; * @endcode * * Callback/CallbackArg classes do not provide for a return value. If * a result is wanted, users should pass an unbound argument by * reference or pointer (or pointer to pointer). * * For further background, including about the Callback::make() and * Callback::make_val() functions, and the use of the Cgu::TypeTuple * struct for calls involving two or three unbound arguments, read * this: Callback */ template class CallbackArg { public: /** * This will execute the referenced function or class method * encapsulated by this class. It will only throw if the dispatched * function or class method throws, or if the copy constructor of the * free or a bound argument throws and it is not a reference argument. * It is thread safe if the referenced function or class method is * thread safe. * @param arg The argument to be passed to the referenced function or * class method, if any. * @note 1. We use dispatch() to execute the callback, because the * callback would normally be invoked through a base class pointer. * To invoke it through operator()(), use the FunctorArg wrapper * class. * @note 2. This function is specialised for Callback::Callback (ie * Callback::CallbackArg) to take no argument, and for * Callback::CallbackArg > and * Callback::CallbackArg > to take two and three * arguments respectively. */ virtual void dispatch(typename Cgu::Param::ParamType arg) const = 0; /** * The constructor will not throw unless the copy constructor of an * argument bound to the derived implementation class throws. */ CallbackArg() {} /** * The destructor will not throw unless the destructor of an argument * bound to the derived implementation class throws. */ virtual ~CallbackArg() {} /* these functions will be inherited by the derived callback classes */ #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT CGU_GLIB_MEMORY_SLICES_FUNCS #endif }; #ifndef DOXYGEN_PARSING /* * Partial template specialisation could be used to provide more than * one unbound argument to a CallbackArg object, by having a maximum * number of template arguments which then have a default value of * 'void' so enabling instantiation (by partial template * specialisation) of less arguments. The problem with that approach * is that if the maximum number of unbound arguments is changed, * binary compatibility of the library is broken. * * Accordingly, the approach taken in this library is to provide the * template struct Cgu::TypeTuple, defined in the param.h header file. * This struct us never instantiated, but is instead just used as a * type holder. The advantage of this approach is that binary * compatibility of the library is maintained, so that a user can * extend the number of unbound arguments by extending the type holder * struct (or to use, say, Loki typelists) and write additional * specialisations of the CallbackArg* classes. * * TODO: we could implement this scheme better by passing all the * class data members of the CallbackArg0, CallbackArg1, etc, concrete * classes to an intermediate base class, so that the specialised * child classes just had a dispatch() method, which would avoid much * of the code duplication arising from the specialisations for 2 and * 3 unbound arguments as added in version 1.2.10: the only function * we actually need to specialise for these additional arguments is * the dispatch() method. However, as these classes are not PODSs * this would give rise to binary breakage of 1.2.9 and earlier, so we * have to await a suitable ABI breakage release to clean this up. */ template class CallbackArg > { public: virtual void dispatch(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const = 0; CallbackArg() {} virtual ~CallbackArg() {} /* these functions will be inherited by the derived callback classes */ #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT CGU_GLIB_MEMORY_SLICES_FUNCS #endif }; template class CallbackArg > { public: virtual void dispatch(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const = 0; CallbackArg() {} virtual ~CallbackArg() {} /* these functions will be inherited by the derived callback classes */ #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT CGU_GLIB_MEMORY_SLICES_FUNCS #endif }; template <> class CallbackArg { public: virtual void dispatch() const = 0; CallbackArg() {} virtual ~CallbackArg() {} /* these functions will be inherited by the derived callback classes */ #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT CGU_GLIB_MEMORY_SLICES_FUNCS #endif }; #endif // DOXYGEN_PARSING /* The four basic functor types */ template class FunctorArg; template class SafeFunctorArg; typedef FunctorArg Functor; typedef SafeFunctorArg SafeFunctor; /* Functor friend functions */ // we can use built-in operator == when comparing pointers referencing // different objects of the same type /** * This comparison operator does not throw. */ template bool operator==(const FunctorArg& f1, const FunctorArg& f2) { return (f1.cb_s.get() == f2.cb_s.get()); } /** * This comparison operator does not throw. * * Since 1.2.5 */ template bool operator!=(const FunctorArg& f1, const FunctorArg& f2) { return !(f1 == f2); } // we must use std::less rather than the < built-in operator for // pointers to objects not within the same array or object: "For // templates greater, less, greater_equal, and less_equal, the // specializations for any pointer type yield a total order, even if // the built-in operators <, >, <=, >= do not." (para 20.3.3/8). /** * This comparison operator does not throw. */ template bool operator<(const FunctorArg& f1, const FunctorArg& f2) { return std::less*>()(f1.cb_s.get(), f2.cb_s.get()); } /** * This comparison operator does not throw. */ template bool operator==(const SafeFunctorArg& f1, const SafeFunctorArg& f2) { return (f1.cb_s.get() == f2.cb_s.get()); } /** * This comparison operator does not throw. * * Since 1.2.5 */ template bool operator!=(const SafeFunctorArg& f1, const SafeFunctorArg& f2) { return !(f1 == f2); } /** * This comparison operator does not throw. */ template bool operator<(const SafeFunctorArg& f1, const SafeFunctorArg& f2) { return std::less*>()(f1.cb_s.get(), f2.cb_s.get()); } /* the functor classes */ /** * @class FunctorArg callback.h c++-gtk-utils/callback.h * @brief Functor class holding a Callback::CallbackArg object. * @sa SafeFunctorArg * @sa Callback namespace * * This class wraps a CallbackArg object. The callback object is kept * by SharedPtr so the functor can be copied and offers automatic * lifetime management of the wrapped callback object, as well as * providing an operator()() function. Ownership is taken of the * CallbackArg object passed to the constructor taking a CallbackArg * pointer, so that constructor should be treated like a shared * pointer constructor - only pass a newly allocated object to it (or * copy construct it or assign to it from another existing FunctorArg * object.). The template type is the type of the unbound argument or * container of unbound argument types, if any. * Callback::FunctorArg is typedef'ed to Callback::Functor. * * The constructor taking a Callback::CallbackArg pointer is not * marked explicit, so the results of Callback::make() can be passed * directly to a function taking a Callback::FunctorArg argument, and * implicit conversion will take place. * * @b Usage * * For a class object my_obj of type MyObj, with a method void * MyObj::my_method(int, const char*), usage for a fully bound functor * would be: * * @code * using namespace Cgu; * int arg = 1; * Callback::Functor f(Callback::make(my_obj, &MyObj::my_method, arg, "Hello\n")); * f(); * @endcode * * Or for a partially bound functor: * * @code * using namespace Cgu; * int arg = 1; * Callback::FunctorArg f(Callback::make(my_obj, &MyObj::my_method, arg)); * f("Hello\n"); * @endcode * * Callback/CallbackArg classes do not provide for a return value. If * a result is wanted, users should pass an unbound argument by * reference or pointer (or pointer to pointer). * * For further background, including about the Callback::make() and * Callback::make_val() functions, and the use of the Cgu::TypeTuple * struct for calls with two or three unbound arguments, read this: * Callback */ template class FunctorArg { SharedPtr > cb_s; public: /** * This will execute the referenced function or class method * encapsulated by this class. It will only throw if the executed * function or class method throws, or if the copy constructor of the * free or a bound argument throws and it is not a reference argument. * It is thread safe if the referenced function or class method is * thread safe. * @param arg The argument to be passed to the referenced function or * class method, if any. * @note This function is specialised for Callback::Functor (ie * Callback::FunctorArg) to take no argument, and for * Callback::FunctorArg > and * Callback::FunctorArg > to take two and three * arguments respectively. */ void operator()(typename Cgu::Param::ParamType arg) const { if (cb_s.get()) cb_s->dispatch(arg); } /** * This comparison operator does not throw (this friend function is * also called by operator!=<>() from version 1.2.5). */ friend bool operator== <>(const FunctorArg&, const FunctorArg&); /** * This comparison operator does not throw. */ friend bool operator< <>(const FunctorArg&, const FunctorArg&); /** * Constructor of first FunctorArg holding the referenced callback. * As it is not marked explicit, it is also a type conversion * constructor. * @param cb The CallbackArg object which the functor is to manage. * @exception std::bad_alloc This might throw std::bad_alloc if * memory is exhausted and the system throws in that case. Note that * if such an exception is thrown, then this constructor will clean * itself up and also delete the callback object passed to it. * @note 1. std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if * it is unable to obtain memory from the operating system. * @note 2. This function is specialised for Callback::Functor (ie * Callback::FunctorArg) to take a Callback::Callback argument, * and for Callback::FunctorArg > and * Callback::FunctorArg > to take a * Callback::CallbackArg > and * Callback::CallbackArg > argument * respectively. */ FunctorArg(const CallbackArg* cb): cb_s(cb) {} /** * The copy constructor does not throw. * @param f The assignor. */ FunctorArg(const FunctorArg& f): cb_s(f.cb_s) {} /** * Default constructor, where a Callback::CallbackArg object is to be * assigned later (via the type conversion constructor and/or the * implicit assignment operator). This constructor does not throw. */ FunctorArg() {} /* Only has effect if --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; #ifndef DOXYGEN_PARSING template class FunctorArg > { SharedPtr > > cb_s; public: void operator()(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const { if (cb_s.get()) cb_s->dispatch(arg1, arg2); } friend bool operator== <>(const FunctorArg&, const FunctorArg&); friend bool operator< <>(const FunctorArg&, const FunctorArg&); FunctorArg(const CallbackArg >* cb): cb_s(cb) {} FunctorArg(const FunctorArg& f): cb_s(f.cb_s) {} FunctorArg() {} /* Only has effect if --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template class FunctorArg > { SharedPtr > > cb_s; public: void operator()(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const { if (cb_s.get()) cb_s->dispatch(arg1, arg2, arg3); } friend bool operator== <>(const FunctorArg&, const FunctorArg&); friend bool operator< <>(const FunctorArg&, const FunctorArg&); FunctorArg(const CallbackArg >* cb): cb_s(cb) {} FunctorArg(const FunctorArg& f): cb_s(f.cb_s) {} FunctorArg() {} /* Only has effect if --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template <> class FunctorArg { SharedPtr cb_s; public: void operator()() const {if (cb_s.get()) cb_s->dispatch();} friend bool operator== <>(const FunctorArg&, const FunctorArg&); friend bool operator< <>(const FunctorArg&, const FunctorArg&); FunctorArg(const Callback* cb_p): cb_s(cb_p) {} FunctorArg(const FunctorArg& f): cb_s(f.cb_s) {} FunctorArg() {} /* Only has effect if --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; #endif // DOXYGEN_PARSING /** * @class SafeFunctorArg callback.h c++-gtk-utils/callback.h * @brief Functor class holding a Callback::CallbackArg object, with * thread-safe reference count. * @sa FunctorArg * @sa Callback namespace * * This class is the same as Callback::FunctorArg except that it will * provide synchronisation of the reference count between threads. * Use it where a functor wrapper object is to be passed between * threads. The FunctorArg documentation gives details on usage. * * Callback::SafeFunctorArg is typedef'ed to * Callback::SafeFunctor. * * For further background, read this: Callback */ template class SafeFunctorArg { SharedLockPtr > cb_s; public: /** * This will execute the referenced function or class method * encapsulated by this class. It will only throw if the executed * function or class method throws, or if the copy constructor of the * free or a bound argument throws and it is not a reference argument. * It is thread safe if the referenced function or class method is * thread safe. * @param arg The argument to be passed to the referenced function or * class method, if any. * @note This function is specialised for Callback::SafeFunctor (ie * Callback::SafeFunctorArg) to take no argument, and for * Callback::SafeFunctorArg > and * Callback::SafeFunctorArg > to take two and * three arguments respectively. */ void operator()(typename Cgu::Param::ParamType arg) const { if (cb_s.get()) cb_s->dispatch(arg); } /** * This comparison operator does not throw (this friend function is * also called by operator!=<>() from version 1.2.5). */ friend bool operator== <>(const SafeFunctorArg&, const SafeFunctorArg&); /** * This comparison operator does not throw. */ friend bool operator< <>(const SafeFunctorArg&, const SafeFunctorArg&); /** * Constructor of first SafeFunctorArg holding the referenced * callback. As it is not marked explicit, it is also a type * conversion constructor. * @param cb The CallbackArg object which the functor is to manage. * @exception std::bad_alloc This might throw std::bad_alloc if * memory is exhausted and the system throws in that case. Note that * if such an exception is thrown, then this constructor will clean * itself up and also delete the callback object passed to it. * @note 1. std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if * it is unable to obtain memory from the operating system. * @note 2. This function is specialised for Callback::SafeFunctor (ie * Callback::SafeFunctorArg) to take a Callback::Callback * argument, and for Callback::SafeFunctorArg > and * Callback::SafeFunctorArg > to take a * Callback::CallbackArg > and * Callback::CallbackArg > argument * respectively. */ SafeFunctorArg(const CallbackArg* cb): cb_s(cb) {} /** * The copy constructor does not throw. * @param f The assignor. */ SafeFunctorArg(const SafeFunctorArg& f): cb_s(f.cb_s) {} /** * Default constructor, where a Callback::CallbackArg object is to be * assigned later (via the type conversion constructor and/or the * implicit assignment operator). This constructor does not throw. * @note The reference count maintained with respect to the contained * callback object is thread-safe, so SafeFunctorArg objects may be * copied between threads by the implicit assignment operator and put * in different containers in different threads. They use a * SharedLockPtr object to hold the referenced callback object. */ SafeFunctorArg() {} /* Only has effect if --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; #ifndef DOXYGEN_PARSING template class SafeFunctorArg > { SharedLockPtr > > cb_s; public: void operator()(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2) const { if (cb_s.get()) cb_s->dispatch(arg1, arg2); } friend bool operator== <>(const SafeFunctorArg&, const SafeFunctorArg&); friend bool operator< <>(const SafeFunctorArg&, const SafeFunctorArg&); SafeFunctorArg(const CallbackArg >* cb): cb_s(cb) {} SafeFunctorArg(const SafeFunctorArg& f): cb_s(f.cb_s) {} SafeFunctorArg() {} /* Only has effect if --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template class SafeFunctorArg > { SharedLockPtr > > cb_s; public: void operator()(typename Cgu::Param::ParamType arg1, typename Cgu::Param::ParamType arg2, typename Cgu::Param::ParamType arg3) const { if (cb_s.get()) cb_s->dispatch(arg1, arg2, arg3); } friend bool operator== <>(const SafeFunctorArg&, const SafeFunctorArg&); friend bool operator< <>(const SafeFunctorArg&, const SafeFunctorArg&); SafeFunctorArg(const CallbackArg >* cb): cb_s(cb) {} SafeFunctorArg(const SafeFunctorArg& f): cb_s(f.cb_s) {} SafeFunctorArg() {} /* Only has effect if --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; template <> class SafeFunctorArg { SharedLockPtr cb_s; public: void operator()() const {if (cb_s.get()) cb_s->dispatch();} friend bool operator== <>(const SafeFunctorArg&, const SafeFunctorArg&); friend bool operator< <>(const SafeFunctorArg&, const SafeFunctorArg&); SafeFunctorArg(const Callback* cb_p): cb_s(cb_p) {} SafeFunctorArg(const SafeFunctorArg& f): cb_s(f.cb_s) {} SafeFunctorArg() {} /* Only has effect if --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; #endif // DOXYGEN_PARSING /* the callback implementation classes */ template class Callback0: public Callback { public: typedef void (T::* MemFunc)(); private: T* obj; MemFunc func; public: void dispatch() const {(obj->*func)();} Callback0(T& obj_, MemFunc func_): obj(&obj_), func(func_) {} }; template class CallbackArg0: public CallbackArg { public: typedef void (T::* MemFunc)(FreeArg); private: T* obj; MemFunc func; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { (obj->*func)(free_arg); } CallbackArg0(T& obj_, MemFunc func_): obj(&obj_), func(func_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg0 >: public CallbackArg > { public: typedef void (T::* MemFunc)(FreeArg1, FreeArg2); private: T* obj; MemFunc func; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { (obj->*func)(free_arg1, free_arg2); } CallbackArg0(T& obj_, MemFunc func_): obj(&obj_), func(func_) {} }; template class CallbackArg0 >: public CallbackArg > { public: typedef void (T::* MemFunc)(FreeArg1, FreeArg2, FreeArg3); private: T* obj; MemFunc func; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { (obj->*func)(free_arg1, free_arg2, free_arg3); } CallbackArg0(T& obj_, MemFunc func_): obj(&obj_), func(func_) {} }; #endif // DOXYGEN_PARSING template class Callback1: public Callback { public: typedef void (T::* MemFunc)(BoundArg); private: T* obj; MemFunc func; BoundArg arg; public: void dispatch() const {(obj->*func)(arg);} Callback1(T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg_): obj(&obj_), func(func_), arg(arg_) {} }; template class CallbackArg1: public CallbackArg { public: typedef void (T::* MemFunc)(BoundArg, FreeArg); private: T* obj; MemFunc func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { (obj->*func)(arg, free_arg); } CallbackArg1(T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg_): obj(&obj_), func(func_), arg(arg_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg1 >: public CallbackArg > { public: typedef void (T::* MemFunc)(BoundArg, FreeArg1, FreeArg2); private: T* obj; MemFunc func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { (obj->*func)(arg, free_arg1, free_arg2); } CallbackArg1(T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg_): obj(&obj_), func(func_), arg(arg_) {} }; template class CallbackArg1 >: public CallbackArg > { public: typedef void (T::* MemFunc)(BoundArg, FreeArg1, FreeArg2, FreeArg3); private: T* obj; MemFunc func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { (obj->*func)(arg, free_arg1, free_arg2, free_arg3); } CallbackArg1(T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg_): obj(&obj_), func(func_), arg(arg_) {} }; #endif // DOXYGEN_PARSING template class Callback2: public Callback { public: typedef void (T::* MemFunc)(BoundArg1, BoundArg2); private: T* obj; MemFunc func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch() const {(obj->*func)(arg1, arg2);} Callback2(T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): obj(&obj_), func(func_), arg1(arg1_), arg2(arg2_) {} }; template class CallbackArg2: public CallbackArg { public: typedef void (T::* MemFunc)(BoundArg1, BoundArg2, FreeArg); private: T* obj; MemFunc func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { (obj->*func)(arg1, arg2, free_arg); } CallbackArg2(T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): obj(&obj_), func(func_), arg1(arg1_), arg2(arg2_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg2 >: public CallbackArg > { public: typedef void (T::* MemFunc)(BoundArg1, BoundArg2, FreeArg1, FreeArg2); private: T* obj; MemFunc func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { (obj->*func)(arg1, arg2, free_arg1, free_arg2); } CallbackArg2(T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): obj(&obj_), func(func_), arg1(arg1_), arg2(arg2_) {} }; template class CallbackArg2 >: public CallbackArg > { public: typedef void (T::* MemFunc)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3); private: T* obj; MemFunc func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { (obj->*func)(arg1, arg2, free_arg1, free_arg2, free_arg3); } CallbackArg2(T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): obj(&obj_), func(func_), arg1(arg1_), arg2(arg2_) {} }; #endif // DOXYGEN_PARSING /* const versions, for binding to const methods */ template class Callback0_const: public Callback { public: typedef void (T::* MemFunc)() const; private: const T* obj; MemFunc func; public: void dispatch() const {(obj->*func)();} Callback0_const(const T& obj_, MemFunc func_): obj(&obj_), func(func_) {} }; template class CallbackArg0_const: public CallbackArg { public: typedef void (T::* MemFunc)(FreeArg) const; private: const T* obj; MemFunc func; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { (obj->*func)(free_arg); } CallbackArg0_const(const T& obj_, MemFunc func_): obj(&obj_), func(func_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg0_const >: public CallbackArg > { public: typedef void (T::* MemFunc)(FreeArg1, FreeArg2) const; private: const T* obj; MemFunc func; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { (obj->*func)(free_arg1, free_arg2); } CallbackArg0_const(const T& obj_, MemFunc func_): obj(&obj_), func(func_) {} }; template class CallbackArg0_const >: public CallbackArg > { public: typedef void (T::* MemFunc)(FreeArg1, FreeArg2, FreeArg3) const; private: const T* obj; MemFunc func; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { (obj->*func)(free_arg1, free_arg2, free_arg3); } CallbackArg0_const(const T& obj_, MemFunc func_): obj(&obj_), func(func_) {} }; #endif // DOXYGEN_PARSING template class Callback1_const: public Callback { public: typedef void (T::* MemFunc)(BoundArg) const; private: const T* obj; MemFunc func; BoundArg arg; public: void dispatch() const {(obj->*func)(arg);} Callback1_const(const T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg_): obj(&obj_), func(func_), arg(arg_) {} }; template class CallbackArg1_const: public CallbackArg { public: typedef void (T::* MemFunc)(BoundArg, FreeArg) const; private: const T* obj; MemFunc func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { (obj->*func)(arg, free_arg); } CallbackArg1_const(const T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg_): obj(&obj_), func(func_), arg(arg_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg1_const >: public CallbackArg > { public: typedef void (T::* MemFunc)(BoundArg, FreeArg1, FreeArg2) const; private: const T* obj; MemFunc func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { (obj->*func)(arg, free_arg1, free_arg2); } CallbackArg1_const(const T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg_): obj(&obj_), func(func_), arg(arg_) {} }; template class CallbackArg1_const >: public CallbackArg > { public: typedef void (T::* MemFunc)(BoundArg, FreeArg1, FreeArg2, FreeArg3) const; private: const T* obj; MemFunc func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { (obj->*func)(arg, free_arg1, free_arg2, free_arg3); } CallbackArg1_const(const T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg_): obj(&obj_), func(func_), arg(arg_) {} }; #endif // DOXYGEN_PARSING template class Callback2_const: public Callback { public: typedef void (T::* MemFunc)(BoundArg1, BoundArg2) const; private: const T* obj; MemFunc func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch() const {(obj->*func)(arg1, arg2);} Callback2_const(const T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): obj(&obj_), func(func_), arg1(arg1_), arg2(arg2_) {} }; template class CallbackArg2_const: public CallbackArg { public: typedef void (T::* MemFunc)(BoundArg1, BoundArg2, FreeArg) const; private: const T* obj; MemFunc func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { (obj->*func)(arg1, arg2, free_arg); } CallbackArg2_const(const T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): obj(&obj_), func(func_), arg1(arg1_), arg2(arg2_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg2_const >: public CallbackArg > { public: typedef void (T::* MemFunc)(BoundArg1, BoundArg2, FreeArg1, FreeArg2) const; private: const T* obj; MemFunc func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { (obj->*func)(arg1, arg2, free_arg1, free_arg2); } CallbackArg2_const(const T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): obj(&obj_), func(func_), arg1(arg1_), arg2(arg2_) {} }; template class CallbackArg2_const >: public CallbackArg > { public: typedef void (T::* MemFunc)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3) const; private: const T* obj; MemFunc func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { (obj->*func)(arg1, arg2, free_arg1, free_arg2, free_arg3); } CallbackArg2_const(const T& obj_, MemFunc func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): obj(&obj_), func(func_), arg1(arg1_), arg2(arg2_) {} }; #endif // DOXYGEN_PARSING /* for static class methods and non-class functions */ class Callback0_static: public Callback { public: typedef void (*Func)(); private: Func func; public: void dispatch() const {func();} Callback0_static(Func func_): func(func_) {} }; template class CallbackArg0_static: public CallbackArg { public: typedef void (*Func)(FreeArg); private: Func func; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { func(free_arg); } CallbackArg0_static(Func func_): func(func_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg0_static >: public CallbackArg > { public: typedef void (*Func)(FreeArg1, FreeArg2); private: Func func; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { func(free_arg1, free_arg2); } CallbackArg0_static(Func func_): func(func_) {} }; template class CallbackArg0_static >: public CallbackArg > { public: typedef void (*Func)(FreeArg1, FreeArg2, FreeArg3); private: Func func; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { func(free_arg1, free_arg2, free_arg3); } CallbackArg0_static(Func func_): func(func_) {} }; #endif // DOXYGEN_PARSING template class Callback1_static: public Callback { public: typedef void (*Func)(BoundArg); private: Func func; BoundArg arg; public: void dispatch() const {func(arg);} Callback1_static(Func func_, typename Cgu::Param::ParamType arg_): func(func_), arg(arg_) {} }; template class CallbackArg1_static: public CallbackArg { public: typedef void (*Func)(BoundArg, FreeArg); private: Func func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { func(arg, free_arg); } CallbackArg1_static(Func func_, typename Cgu::Param::ParamType arg_): func(func_), arg(arg_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg1_static >: public CallbackArg > { public: typedef void (*Func)(BoundArg, FreeArg1, FreeArg2); private: Func func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { func(arg, free_arg1, free_arg2); } CallbackArg1_static(Func func_, typename Cgu::Param::ParamType arg_): func(func_), arg(arg_) {} }; template class CallbackArg1_static >: public CallbackArg > { public: typedef void (*Func)(BoundArg, FreeArg1, FreeArg2, FreeArg3); private: Func func; BoundArg arg; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { func(arg, free_arg1, free_arg2, free_arg3); } CallbackArg1_static(Func func_, typename Cgu::Param::ParamType arg_): func(func_), arg(arg_) {} }; #endif // DOXYGEN_PARSING template class Callback2_static: public Callback { public: typedef void (*Func)(BoundArg1, BoundArg2); private: Func func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch() const {func(arg1, arg2);} Callback2_static(Func func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): func(func_), arg1(arg1_), arg2(arg2_) {} }; template class CallbackArg2_static: public CallbackArg { public: typedef void (*Func)(BoundArg1, BoundArg2, FreeArg); private: Func func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg) const { func(arg1, arg2, free_arg); } CallbackArg2_static(Func func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): func(func_), arg1(arg1_), arg2(arg2_) {} }; #ifndef DOXYGEN_PARSING template class CallbackArg2_static >: public CallbackArg > { public: typedef void (*Func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2); private: Func func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2) const { func(arg1, arg2, free_arg1, free_arg2); } CallbackArg2_static(Func func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): func(func_), arg1(arg1_), arg2(arg2_) {} }; template class CallbackArg2_static >: public CallbackArg > { public: typedef void (*Func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3); private: Func func; BoundArg1 arg1; BoundArg2 arg2; public: void dispatch(typename Cgu::Param::ParamType free_arg1, typename Cgu::Param::ParamType free_arg2, typename Cgu::Param::ParamType free_arg3) const { func(arg1, arg2, free_arg1, free_arg2, free_arg3); } CallbackArg2_static(Func func_, typename Cgu::Param::ParamType arg1_, typename Cgu::Param::ParamType arg2_): func(func_), arg1(arg1_), arg2(arg2_) {} }; #endif // DOXYGEN_PARSING /* Convenience functions making callback objects on freestore. These * can for example be passed as the first argument of the * Thread::start() method in thread.h. They are also used by the * Callback::post() function. */ /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). */ template Callback* make(T& t, void (T::*func)()) { return new Callback0(t, func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.8 */ template Callback* make_val(T& t, void (T::*func)()) { return new Callback0(t, func); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). */ template CallbackArg* make(T& t, void (T::*func)(FreeArg)) { return new CallbackArg0(t, func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.8 */ template CallbackArg* make_val(T& t, void (T::*func)(FreeArg)) { return new CallbackArg0(t, func); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(T& t, void (T::*func)(FreeArg1, FreeArg2)) { return new CallbackArg0 >(t, func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(T& t, void (T::*func)(FreeArg1, FreeArg2)) { return new CallbackArg0 >(t, func); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(T& t, void (T::*func)(FreeArg1, FreeArg2, FreeArg3)) { return new CallbackArg0 >(t, func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(T& t, void (T::*func)(FreeArg1, FreeArg2, FreeArg3)) { return new CallbackArg0 >(t, func); } #endif // CGU_USE_TYPE_TUPLE_ARGS /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template Callback* make(T& t, void (T::*func)(BoundArg), BoundArg arg) { return new Callback1(t, func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template Callback* make_val(T& t, void (T::*func)(BoundArg), const BoundArg& arg) { return new Callback1(t, func, arg); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template CallbackArg* make(T& t, void (T::*func)(BoundArg, FreeArg), BoundArg arg) { return new CallbackArg1(t, func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template CallbackArg* make_val(T& t, void (T::*func)(BoundArg, FreeArg), const BoundArg& arg) { return new CallbackArg1(t, func, arg); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(T& t, void (T::*func)(BoundArg, FreeArg1, FreeArg2), BoundArg arg) { return new CallbackArg1 >(t, func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(T& t, void (T::*func)(BoundArg, FreeArg1, FreeArg2), const BoundArg& arg) { return new CallbackArg1 >(t, func, arg); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(T& t, void (T::*func)(BoundArg, FreeArg1, FreeArg2, FreeArg3), BoundArg arg) { return new CallbackArg1 >(t, func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(T& t, void (T::*func)(BoundArg, FreeArg1, FreeArg2, FreeArg3), const BoundArg& arg) { return new CallbackArg1 >(t, func, arg); } #endif // CGU_USE_TYPE_TUPLE_ARGS /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template Callback* make(T& t, void (T::*func)(BoundArg1, BoundArg2), BoundArg1 arg1, BoundArg2 arg2) { return new Callback2(t, func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template Callback* make_val(T& t, void (T::*func)(BoundArg1, BoundArg2), const BoundArg1& arg1, const BoundArg2& arg2) { return new Callback2(t, func, arg1, arg2); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template CallbackArg* make(T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg), BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2(t, func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template CallbackArg* make_val(T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg), const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2(t, func, arg1, arg2); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make(T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2), BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2 >(t, func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2), const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2 >(t, func, arg1, arg2); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make(T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3), BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2 >(t, func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3), const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2 >(t, func, arg1, arg2); } #endif // CGU_USE_TYPE_TUPLE_ARGS /* const versions, for binding to const methods */ /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). */ template Callback* make(const T& t, void (T::*func)() const) { return new Callback0_const(t, func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.8 */ template Callback* make_val(const T& t, void (T::*func)() const) { return new Callback0_const(t, func); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). */ template CallbackArg* make(const T& t, void (T::*func)(FreeArg) const) { return new CallbackArg0_const(t, func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.8 */ template CallbackArg* make_val(const T& t, void (T::*func)(FreeArg) const) { return new CallbackArg0_const(t, func); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(const T& t, void (T::*func)(FreeArg1, FreeArg2) const) { return new CallbackArg0_const >(t, func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(const T& t, void (T::*func)(FreeArg1, FreeArg2) const) { return new CallbackArg0_const >(t, func); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(const T& t, void (T::*func)(FreeArg1, FreeArg2, FreeArg3) const) { return new CallbackArg0_const >(t, func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(const T& t, void (T::*func)(FreeArg1, FreeArg2, FreeArg3) const) { return new CallbackArg0_const >(t, func); } #endif // CGU_USE_TYPE_TUPLE_ARGS /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template Callback* make(const T& t, void (T::*func)(BoundArg) const, BoundArg arg) { return new Callback1_const(t, func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template Callback* make_val(const T& t, void (T::*func)(BoundArg) const, const BoundArg& arg) { return new Callback1_const(t, func, arg); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template CallbackArg* make(const T& t, void (T::*func)(BoundArg, FreeArg) const, BoundArg arg) { return new CallbackArg1_const(t, func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template CallbackArg* make_val(const T& t, void (T::*func)(BoundArg, FreeArg) const, const BoundArg& arg) { return new CallbackArg1_const(t, func, arg); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(const T& t, void (T::*func)(BoundArg, FreeArg1, FreeArg2) const, BoundArg arg) { return new CallbackArg1_const >(t, func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(const T& t, void (T::*func)(BoundArg, FreeArg1, FreeArg2) const, const BoundArg& arg) { return new CallbackArg1_const >(t, func, arg); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(const T& t, void (T::*func)(BoundArg, FreeArg1, FreeArg2, FreeArg3) const, BoundArg arg) { return new CallbackArg1_const >(t, func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(const T& t, void (T::*func)(BoundArg, FreeArg1, FreeArg2, FreeArg3) const, const BoundArg& arg) { return new CallbackArg1_const >(t, func, arg); } #endif // CGU_USE_TYPE_TUPLE_ARGS /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template Callback* make(const T& t, void (T::*func)(BoundArg1, BoundArg2) const, BoundArg1 arg1, BoundArg2 arg2) { return new Callback2_const(t, func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template Callback* make_val(const T& t, void (T::*func)(BoundArg1, BoundArg2) const, const BoundArg1& arg1, const BoundArg2& arg2) { return new Callback2_const(t, func, arg1, arg2); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template CallbackArg* make(const T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg) const, BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2_const(t, func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template CallbackArg* make_val(const T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg) const, const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2_const(t, func, arg1, arg2); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make(const T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2) const, BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2_const >(t, func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(const T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2) const, const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2_const >(t, func, arg1, arg2); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make(const T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3) const, BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2_const >(t, func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(const T& t, void (T::*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3) const, const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2_const >(t, func, arg1, arg2); } #endif // CGU_USE_TYPE_TUPLE_ARGS /* for static class methods and non-class functions */ /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). */ inline Callback* make(void (*func)()) { return new Callback0_static(func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.8 */ inline Callback* make_val(void (*func)()) { return new Callback0_static(func); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). */ template CallbackArg* make(void (*func)(FreeArg)) { return new CallbackArg0_static(func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.8 */ template CallbackArg* make_val(void (*func)(FreeArg)) { return new CallbackArg0_static(func); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(void (*func)(FreeArg1, FreeArg2)) { return new CallbackArg0_static >(func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(void (*func)(FreeArg1, FreeArg2)) { return new CallbackArg0_static >(func); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(void (*func)(FreeArg1, FreeArg2, FreeArg3)) { return new CallbackArg0_static >(func); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(void (*func)(FreeArg1, FreeArg2, FreeArg3)) { return new CallbackArg0_static >(func); } #endif // CGU_USE_TYPE_TUPLE_ARGS /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template Callback* make(void (*func)(BoundArg), BoundArg arg) { return new Callback1_static(func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template Callback* make_val(void (*func)(BoundArg), const BoundArg& arg) { return new Callback1_static(func, arg); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template CallbackArg* make(void (*func)(BoundArg, FreeArg), BoundArg arg) { return new CallbackArg1_static(func, arg); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template CallbackArg* make_val(void (*func)(BoundArg, FreeArg), const BoundArg& arg) { return new CallbackArg1_static(func, arg); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(void (*func)(BoundArg, FreeArg1, FreeArg2), BoundArg arg) { return new CallbackArg1_static >(func, arg); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(void (*func)(BoundArg, FreeArg1, FreeArg2), const BoundArg& arg) { return new CallbackArg1_static >(func, arg); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make(void (*func)(BoundArg, FreeArg1, FreeArg2, FreeArg3), BoundArg arg) { return new CallbackArg1_static >(func, arg); } /** * Since this function constructs a callback which does not take a * bound argument, it is a synonym for make() (the two are identical). * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(void (*func)(BoundArg, FreeArg1, FreeArg2, FreeArg3), const BoundArg& arg) { return new CallbackArg1_static >(func, arg); } #endif // CGU_USE_TYPE_TUPLE_ARGS /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template Callback* make(void (*func)(BoundArg1, BoundArg2), BoundArg1 arg1, BoundArg2 arg2) { return new Callback2_static(func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template Callback* make_val(void (*func)(BoundArg1, BoundArg2), const BoundArg1& arg1, const BoundArg2& arg2) { return new Callback2_static(func, arg1, arg2); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template CallbackArg* make(void (*func)(BoundArg1, BoundArg2, FreeArg), BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2_static(func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.8 */ template CallbackArg* make_val(void (*func)(BoundArg1, BoundArg2, FreeArg), const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2_static(func, arg1, arg2); } #if defined(CGU_USE_TYPE_TUPLE_ARGS) || defined(DOXYGEN_PARSING) /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. */ template CallbackArg >* make(void (*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2), BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2_static >(func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case. This exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option (instead * glib will terminate the program if it is unable to obtain memory * from the operating system). * * Since 1.2.10 */ template CallbackArg >* make_val(void (*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2), const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2_static >(func, arg1, arg2); } /** * A convenience function to make Callback::CallbackArg objects * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make(void (*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3), BoundArg1 arg1, BoundArg2 arg2) { return new CallbackArg2_static >(func, arg1, arg2); } /** * An alternative function to make Callback::CallbackArg objects, * which is for use where a target function receives an argument of * class type by value which is to be a bound argument, so the * compiler is not able to carry out copy elision when constructing * the callback object. * @exception std::bad_alloc It might throw std::bad_alloc if memory * is exhausted and the system throws in that case (this exception * will not be thrown if the library has been installed using the * --with-glib-memory-slices-no-compat configuration option: instead * glib will terminate the program if it is unable to obtain memory * from the operating system). It will also throw if the copy * constructor of a bound argument throws and it is not a reference * argument. * * Since 1.2.10 */ template CallbackArg >* make_val(void (*func)(BoundArg1, BoundArg2, FreeArg1, FreeArg2, FreeArg3), const BoundArg1& arg1, const BoundArg2& arg2) { return new CallbackArg2_static >(func, arg1, arg2); } #endif // CGU_USE_TYPE_TUPLE_ARGS } // namespace Callback class Releaser; namespace Callback { /** * Posts a callback for execution by a glib main loop. It is * thread-safe provided g_thread_init() has been called. This * function will not throw. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param priority The priority to be given to the callback in the * main loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT_IDLE. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt * @param context The glib main loop context in which the callback is * to be executed (the default of NULL will cause the callback to be * executed in the main program loop, and this is usually what is * wanted). * @note Cancellation of the receiving thread is blocked when the * callback executes. * * Since 0.9.2 choice of main context available. */ void post(const Callback* cb, gint priority = G_PRIORITY_DEFAULT_IDLE, GMainContext* context = 0); /** * Posts a callback for execution by a glib main loop. It is * thread-safe provided g_thread_init() has been called. * @param cb The callback object. Ownership is taken of this object, * and it will be deleted when it has been finished with. * @param r A Releaser object for automatic disconnection of the * callback from the main loop. * @param priority The priority to be given to the callback in the * main loop. In ascending order of priorities, priorities are * G_PRIORITY_LOW, G_PRIORITY_DEFAULT_IDLE, G_PRIORITY_HIGH_IDLE, * G_PRIORITY_DEFAULT and G_PRIORITY_HIGH. The default is * G_PRIORITY_DEFAULT_IDLE. This determines the order in which the * callback will appear in the event list in the main loop, not the * priority which the OS will adopt. * @param context The glib main loop context in which the callback is * to be executed (the default of NULL will cause the callback to be * executed in the main program loop, and this is usually what is * wanted). * @exception std::bad_alloc This function might throw std::bad_alloc * if memory is exhausted and the system throws in that case. If it * does so, the Callback object will be disposed of. * @note Cancellation of the receiving thread is blocked when the * callback executes. * * Since 0.9.2 choice of main context available. */ void post(const Callback* cb, Releaser& r, gint priority = G_PRIORITY_DEFAULT_IDLE, GMainContext* context = 0); } // namespace Callback } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/io_watch.cpp0000644000175000001440000003353711536141256017363 00000000000000/* Copyright (C) 2005 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include struct WatchSource { GSource source; GPollFD poll_fd; GIOCondition watch_condition; Cgu::SafeEmitterArg* emitter_p; }; struct WatchSourceCondition { GSource source; GPollFD poll_fd; GIOCondition watch_condition; Cgu::SafeEmitterArg >* emitter_p; }; extern "C" { static gboolean cgu_io_watch_prepare_func(GSource*, gint*); static gboolean cgu_io_watch_check_func(GSource*); static gboolean cgu_io_watch_check_condition_func(GSource*); static gboolean cgu_io_watch_dispatch_func(GSource*, GSourceFunc, void*); static gboolean cgu_io_watch_dispatch_condition_func(GSource*, GSourceFunc, void*); static void cgu_io_watch_finalize_func(GSource*); static void cgu_io_watch_finalize_condition_func(GSource*); } gboolean cgu_io_watch_prepare_func(GSource*, gint* timeout_p) { *timeout_p = -1; return false; // we want the file descriptor to be polled } gboolean cgu_io_watch_check_func(GSource* source_p) { // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSource* watch_source_p = reinterpret_cast(source_p); // what we have got gushort poll_condition = watch_source_p->poll_fd.revents; // what we are looking for gushort watch_condition = watch_source_p->watch_condition; // return true if we have what we are looking for return (poll_condition & watch_condition); } gboolean cgu_io_watch_check_condition_func(GSource* source_p) { // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSourceCondition* watch_source_p = reinterpret_cast(source_p); // what we have got gushort poll_condition = watch_source_p->poll_fd.revents; // what we are looking for gushort watch_condition = watch_source_p->watch_condition; // return true if we have what we are looking for return (poll_condition & watch_condition); } gboolean cgu_io_watch_dispatch_func(GSource* source_p, GSourceFunc, void*) { // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSource* watch_source_p = reinterpret_cast(source_p); // we are not interested in the GSourceFunc argument here as we have never // called g_source_set_callback() bool keep_source = true; bool connected; // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { connected = watch_source_p->emitter_p->test_emit(keep_source); } // we can't propagate exceptions from functions with C linkage. catch (...) { g_critical("Exception thrown in io_watch_dispatch_func()\n"); return true; } return (keep_source && connected); } gboolean cgu_io_watch_dispatch_condition_func(GSource* source_p, GSourceFunc, void*) { // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSourceCondition::source must be the same as the address // of the instance of the WatchSourceCondition struct of which it is the // first member as both are PODSs WatchSourceCondition* watch_source_p = reinterpret_cast(source_p); // we are not interested in the GSourceFunc argument here as we have never // called g_source_set_callback() bool keep_source = true; bool connected; // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { connected = watch_source_p->emitter_p->test_emit(GIOCondition(watch_source_p->poll_fd.revents), keep_source); } // we can't propagate exceptions from functions with C linkage. catch (...) { g_critical("Exception thrown in io_watch_dispatch_func()\n"); return true; } return (keep_source && connected); } void cgu_io_watch_finalize_func(GSource* source_p) { // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSource* watch_source_p = reinterpret_cast(source_p); delete watch_source_p->emitter_p; watch_source_p->emitter_p = 0; } void cgu_io_watch_finalize_condition_func(GSource* source_p) { // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSourceCondition* watch_source_p = reinterpret_cast(source_p); delete watch_source_p->emitter_p; watch_source_p->emitter_p = 0; } static GSourceFuncs cgu_io_watch_source_funcs = { cgu_io_watch_prepare_func, cgu_io_watch_check_func, cgu_io_watch_dispatch_func, cgu_io_watch_finalize_func }; static GSourceFuncs cgu_io_watch_source_condition_funcs = { cgu_io_watch_prepare_func, cgu_io_watch_check_condition_func, cgu_io_watch_dispatch_condition_func, cgu_io_watch_finalize_condition_func }; namespace Cgu { guint start_iowatch(int fd, const Callback::CallbackArg* cb, GIOCondition io_condition, gint priority, GMainContext* context_p) { // context_p has a default value of NULL which will create the watch // in the default program main context Callback::SafeFunctorArg f(cb); // take ownership GSource* source_p = g_source_new(&cgu_io_watch_source_funcs, sizeof(WatchSource)); // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSource* watch_source_p = reinterpret_cast(source_p); watch_source_p->poll_fd.fd = fd; watch_source_p->poll_fd.events = io_condition; watch_source_p->poll_fd.revents = 0; watch_source_p->watch_condition = io_condition; watch_source_p->emitter_p = 0; try { watch_source_p->emitter_p = new SafeEmitterArg; watch_source_p->emitter_p->connect(f); } catch (...) { delete watch_source_p->emitter_p; // either NULL or object allocated g_source_unref(source_p); throw; } g_source_set_priority(source_p, priority); // connect the source object to its polling object g_source_add_poll(source_p, &watch_source_p->poll_fd); // attach the source to the relevant main context guint id = g_source_attach(source_p, context_p); // g_source_attach() will add a reference count to the GSource object // so we unreference it here so that the callback returning false or // calling g_source_remove() on the return value of this function will // finalize/destroy the GSource object g_source_unref(source_p); return id; } guint start_iowatch(int fd, const Callback::CallbackArg* cb, Releaser& r, GIOCondition io_condition, gint priority, GMainContext* context_p) { // context_p has a default value of NULL which will create the watch // in the default program main context Callback::SafeFunctorArg f(cb); // take ownership GSource* source_p = g_source_new(&cgu_io_watch_source_funcs, sizeof(WatchSource)); // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSource* watch_source_p = reinterpret_cast(source_p); watch_source_p->poll_fd.fd = fd; watch_source_p->poll_fd.events = io_condition; watch_source_p->poll_fd.revents = 0; watch_source_p->watch_condition = io_condition; watch_source_p->emitter_p = 0; try { watch_source_p->emitter_p = new SafeEmitterArg; watch_source_p->emitter_p->connect(f, r); } catch (...) { delete watch_source_p->emitter_p; // either NULL or object allocated g_source_unref(source_p); throw; } g_source_set_priority(source_p, priority); // connect the source object to its polling object g_source_add_poll(source_p, &watch_source_p->poll_fd); // attach the source to the relevant main context guint id = g_source_attach(source_p, context_p); // g_source_attach() will add a reference count to the GSource object // so we unreference it here so that the callback returning false or // calling g_source_remove() on the return value of this function will // finalize/destroy the GSource object g_source_unref(source_p); return id; } guint start_iowatch(int fd, const Callback::CallbackArg >* cb, GIOCondition io_condition, gint priority, GMainContext* context_p) { // context_p has a default value of NULL which will create the watch // in the default program main context Callback::SafeFunctorArg > f(cb); // take ownership GSource* source_p = g_source_new(&cgu_io_watch_source_condition_funcs, sizeof(WatchSourceCondition)); // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSourceCondition* watch_source_p = reinterpret_cast(source_p); watch_source_p->poll_fd.fd = fd; watch_source_p->poll_fd.events = io_condition; watch_source_p->poll_fd.revents = 0; watch_source_p->watch_condition = io_condition; watch_source_p->emitter_p = 0; try { watch_source_p->emitter_p = new SafeEmitterArg >; watch_source_p->emitter_p->connect(f); } catch (...) { delete watch_source_p->emitter_p; // either NULL or object allocated g_source_unref(source_p); throw; } g_source_set_priority(source_p, priority); // connect the source object to its polling object g_source_add_poll(source_p, &watch_source_p->poll_fd); // attach the source to the relevant main context guint id = g_source_attach(source_p, context_p); // g_source_attach() will add a reference count to the GSource object // so we unreference it here so that the callback returning false or // calling g_source_remove() on the return value of this function will // finalize/destroy the GSource object g_source_unref(source_p); return id; } guint start_iowatch(int fd, const Callback::CallbackArg >* cb, Releaser& r, GIOCondition io_condition, gint priority, GMainContext* context_p) { // context_p has a default value of NULL which will create the watch // in the default program main context Callback::SafeFunctorArg > f(cb); // take ownership GSource* source_p = g_source_new(&cgu_io_watch_source_condition_funcs, sizeof(WatchSourceCondition)); // reinterpret_cast<>() is guaranteed to give the correct result here as the // address of WatchSource::source must be the same as the address of the // instance of the WatchSource struct of which it is the first member as // both are PODSs WatchSourceCondition* watch_source_p = reinterpret_cast(source_p); watch_source_p->poll_fd.fd = fd; watch_source_p->poll_fd.events = io_condition; watch_source_p->poll_fd.revents = 0; watch_source_p->watch_condition = io_condition; watch_source_p->emitter_p = 0; try { watch_source_p->emitter_p = new SafeEmitterArg >; watch_source_p->emitter_p->connect(f, r); } catch (...) { delete watch_source_p->emitter_p; // either NULL or object allocated g_source_unref(source_p); throw; } g_source_set_priority(source_p, priority); // connect the source object to its polling object g_source_add_poll(source_p, &watch_source_p->poll_fd); // attach the source to the relevant main context guint id = g_source_attach(source_p, context_p); // g_source_attach() will add a reference count to the GSource object // so we unreference it here so that the callback returning false or // calling g_source_remove() on the return value of this function will // finalize/destroy the GSource object g_source_unref(source_p); return id; } } // namespace Cgu efax-gtk-3.2.8/src/internal/c++-gtk-utils/shared_ptr.h0000644000175000001440000012733011536141256017361 00000000000000/* Copyright (C) 2004 to 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_SHARED_PTR_H #define CGU_SHARED_PTR_H // define this if, instead of GLIB atomic funcions/memory barriers, // you want to use a (slower) mutex to lock the reference count in the // SharedLockPtr class (however, if wanted, this is best left for // definition in the user code) /* #define CGU_SHARED_LOCK_PTR_USE_MUTEX 1 */ #include #include #include // for std::less #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX #include #else #include #endif #include /** * @addtogroup handles handles and smart pointers */ namespace Cgu { /** * @class SharedPtrError shared_ptr.h c++-gtk-utils/shared_ptr.h * @brief This is an exception struct thrown as an alternative to * deleting a managed object when internal memory allocation for * SharedPtr or SharedLockPtr fails in their reset() method or in * their constructor which takes a pointer. * @ingroup handles * @sa SharedPtr SharedLockPtr SharedPtrAllocFail * * This is an exception struct thrown as an alternative to deleting a * managed object when SharedPtr::SharedPtr(T*), * SharedLockPtr::SharedLockPtr(T*), SharedPtr::reset(T*) or * SharedLockPtr::reset(T*), would otherwise throw std::bad_alloc. * To make those methods do that, Cgu::SharedPtrAllocFail::leave is * passed as their second argument. * * If the exception is thrown, the struct has a member 'obj' of type * T*, which is a pointer to the object originally passed to those * methods, so the user can deal with it appropriately. This enables * the result of the new expression to be passed directly as the * argument to those methods without giving rise to a resource leak, * as in: * * @code * using namespace Cgu; * SharedPtr s; // doesn't throw * try { * s.reset(new T, SharedPtrAllocFail::leave); // both T allocation and reset() might throw * } * catch (std::bad_alloc&) { * ... * } * catch (SharedPtrError& e) { * e.obj->do_something(); * ... * } * ... * @endcode * * As above, a catch block will need to deal with std::bad_alloc (if * the call to the new expression when creating the T object fails) * as well as SharedPtrError (if the call to the new expression in * the reset() method fails after a valid T object has been * constructed). */ template struct SharedPtrError: public std::exception { T* obj; virtual const char* what() const throw() {return "SharedPtrError\n";} SharedPtrError(T* p): obj(p) {} }; /** * enum Cgu::SharedPtrAllocFail::Leave * The enumerator Cgu::SharedPtrAllocFail::leave is passed as the * second argument of the reset() method of SharedPtr or * SharedLockPtr, or in their constructor which takes a pointer, in * order to prevent the method deleting the object passed to it if * reset() fails internally because of memory exhaustion. * @ingroup handles */ namespace SharedPtrAllocFail { enum Leave {leave}; } /** * @class SharedPtr shared_ptr.h c++-gtk-utils/shared_ptr.h * @brief This is a smart pointer for managing the lifetime of objects * allocated on freestore. * @ingroup handles * @sa SharedLockPtr SharedPtrError * * This is a smart pointer for managing the lifetime of objects * allocated on freestore with the new expression. A managed object * will be deleted when the last SharedPtr referencing it is * destroyed. * * From version 1.2.12, the library provides ==, != and < comparison * operators for SharedPtr, but only if the library is compiled with * the --with-smart-ptr-comp option, or if the user code defines the * symbol CGU_USE_SMART_PTR_COMPARISON before shared_ptr.h is first * parsed. This is because, if user code has provided such operators * for these smart pointers itself, a duplicated function definition * would arise. */ template class SharedPtr { #ifndef DOXYGEN_PARSING struct { unsigned int* ref_count_p; T* obj_p; } ref_items; #endif void unreference() { if (!ref_items.ref_count_p) return; --(*ref_items.ref_count_p); if (*ref_items.ref_count_p == 0) { #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT g_slice_free(unsigned int, ref_items.ref_count_p); #else delete ref_items.ref_count_p; #endif delete ref_items.obj_p; } } void reference() { if (!ref_items.ref_count_p) return; ++(*ref_items.ref_count_p); } public: /** * Constructor taking an unmanaged object. * @param ptr The object which the SharedPtr is to manage (if any). * @exception std::bad_alloc This constructor will not throw if the * 'ptr' argument has a NULL value (the default), otherwise it might * throw std::bad_alloc if memory is exhausted and the system throws * in that case. If such an exception is thrown, this constructor is * exception safe (it does not leak resources), but as well as * cleaning itself up this constructor will also delete the managed * object passed to it to avoid a memory leak. If such automatic * deletion is not wanted in that case, use the version of this * constructor taking a Cgu::SharedPtrAllocFail::Leave tag argument. * @note std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if it * is unable to obtain memory from the operating system. */ explicit SharedPtr(T* ptr = 0) { if ((ref_items.obj_p = ptr)) { // not NULL #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(unsigned int); *ref_items.ref_count_p = 1; #else try { ref_items.ref_count_p = new unsigned int(1); } catch (...) { delete ptr; // if allocating the int referenced by ref_items.ref_count_p // has failed then delete the object to be referenced to // avoid a memory leak throw; } #endif } else ref_items.ref_count_p = 0; } /** * Constructor taking an unmanaged object. * @param ptr The object which the SharedPtr is to manage. * @param tag Passing the tag emumerator * Cgu::SharedPtrAllocFail::leave causes this constructor not to * delete the new managed object passed as the 'ptr' argument in the * event of internal allocation in this method failing because of * memory exhaustion (in that event, Cgu::SharedPtrError will be * thrown). * @exception Cgu::SharedPtrError This constructor might throw * Cgu::SharedPtrError if memory is exhausted and the system would * otherwise throw std::bad_alloc in that case. This constructor is * exception safe (it does not leak resources), and if such an * exception is thrown it will clean itself up, but it will not * attempt to delete the new managed object passed to it. Access to * the object passed to the 'ptr' argument can be obtained via the * thrown Cgu::SharedPtrError object. * @note 1. On systems with over-commit/lazy-commit combined with * virtual memory (swap), it is rarely useful to check for memory * exhaustion, so in those cases this version of the constructor will * not be useful. * @note 2. If the library has been installed using the * --with-glib-memory-slices-no-compat configuration option this * version of the constructor will also not be useful: instead glib * will terminate the program if it is unable to obtain memory from * the operating system. * * Since 0.9.1 */ SharedPtr(T* ptr, Cgu::SharedPtrAllocFail::Leave tag) { if ((ref_items.obj_p = ptr)) { // not NULL #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(unsigned int); *ref_items.ref_count_p = 1; #else try { ref_items.ref_count_p = new unsigned int(1); } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedPtrError(ptr); } #endif } else ref_items.ref_count_p = 0; } /** * Causes the SharedPtr to cease to manage its managed object (if * any), deleting it if this is the last SharedPtr object managing it. * If the argument passed is not NULL, the SharedPtr object will * manage the new object passed (which must not be managed by any * other SharedPtr object). This method is exception safe, but see * the comments below on std::bad_alloc. * @param ptr NULL (the default), or a new unmanaged object to manage. * @exception std::bad_alloc This method will not throw if the 'ptr' * argument has a NULL value (the default) and the destructor of a * managed object does not throw, otherwise it might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. Note that if such an exception is thrown then this method * will do nothing (it is strongly exception safe and will continue to * manage the object it was managing prior to the call), except that * it will delete the new managed object passed to it to avoid a * memory leak. If such automatic deletion in the event of such an * exception is not wanted, use the reset() method taking a * Cgu::SharedPtrAllocFail::Leave tag type as its second argument. * @note std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if it * is unable to obtain memory from the operating system. * * Since 0.9.1 */ void reset(T* ptr = 0) { if (ptr) { unsigned int* new_count_p; #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(unsigned int); *new_count_p = 1; #else try { new_count_p = new unsigned int(1); } catch (...) { delete ptr; // if allocating the new int has failed then delete the // object to be referenced to avoid a memory leak throw; } #endif unreference(); ref_items.ref_count_p = new_count_p; ref_items.obj_p = ptr; } else { unreference(); ref_items.ref_count_p = 0; ref_items.obj_p = 0; } } /** * Causes the SharedPtr to cease to manage its managed object (if * any), deleting it if this is the last SharedPtr object managing it. * The SharedPtr object will manage the new object passed (which must * not be managed by any other SharedPtr object). This method is * exception safe, but see the comments below on Cgu::SharedPtrError. * @param ptr A new unmanaged object to manage (if no new object is to * be managed, use the version of reset() taking a default value of * NULL). * @param tag Passing the tag emumerator * Cgu::SharedPtrAllocFail::leave causes this method not to delete the * new managed object passed as the 'ptr' argument in the event of * internal allocation in this method failing because of memory * exhaustion (in that event, Cgu::SharedPtrError will be thrown). * @exception Cgu::SharedPtrError This method might throw * Cgu::SharedPtrError if memory is exhausted and the system would * otherwise throw std::bad_alloc in that case. Note that if such an * exception is thrown then this method will do nothing (it is * strongly exception safe and will continue to manage the object it * was managing prior to the call), and it will not attempt to delete * the new managed object passed to it. Access to the object passed * to the 'ptr' argument can be obtained via the thrown * Cgu::SharedPtrError object. * @note 1. On systems with over-commit/lazy-commit combined with * virtual memory (swap), it is rarely useful to check for memory * exhaustion, so in those cases this version of the reset() method * will not be useful. * @note 2. If the library has been installed using the * --with-glib-memory-slices-no-compat configuration option this * version of the reset() method will also not be useful: instead glib * will terminate the program if it is unable to obtain memory from * the operating system. * * Since 0.9.1 */ void reset(T* ptr, Cgu::SharedPtrAllocFail::Leave tag) { if (ptr) { unsigned int* new_count_p; #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(unsigned int); *new_count_p = 1; #else try { new_count_p = new unsigned int(1); } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedPtrError(ptr); } #endif unreference(); ref_items.ref_count_p = new_count_p; ref_items.obj_p = ptr; } else { unreference(); ref_items.ref_count_p = 0; ref_items.obj_p = 0; } } /** * This copy constructor does not throw. * @param sh_ptr The shared pointer to be copied. */ SharedPtr(const SharedPtr& sh_ptr) { ref_items = sh_ptr.ref_items; reference(); } template friend class SharedPtr; /** * A version of the copy constructor which enables pointer type * conversion (assuming the type passed is implicitly type * convertible to the managed type, such as a derived type). This * copy constructor does not throw. * @param sh_ptr The shared pointer to be copied. */ template SharedPtr(const SharedPtr& sh_ptr) { // because we are allowing an implicit cast from derived to // base class referenced object, we need to assign from each // member of sh_ptr.ref_items separately ref_items.ref_count_p = sh_ptr.ref_items.ref_count_p; ref_items.obj_p = sh_ptr.ref_items.obj_p; reference(); } /** * This method does not throw unless the destructor of a managed * object throws - that should never happen. * @param sh_ptr the assignor. * @return The SharedPtr object after assignment. */ // If the destructor of the handled object throws then the SharedPtr // object may be left in an invalid state - we won't make this // method less efficient by trying to handle something that should // not happen SharedPtr& operator=(const SharedPtr& sh_ptr) { // check whether we are already referencing this object - // if so make this a null op. This will also deal with // self-assignment if (ref_items.obj_p != sh_ptr.ref_items.obj_p) { // first unreference any object referenced by this shared pointer unreference(); // now inherit the ref_items structure from the assigning // shared pointer and reference the object it references ref_items = sh_ptr.ref_items; reference(); } return *this; } /** * A version of the assignment operator which enables pointer type * conversion (assuming the type passed is implicitly type * convertible to the managed type, such as a derived type). This * method does not throw unless the destructor of a managed object * throws - that should never happen. * @param sh_ptr the assignor. * @return The SharedPtr object after assignment. */ template SharedPtr& operator=(const SharedPtr& sh_ptr) { return operator=(SharedPtr(sh_ptr)); } /** * This method does not throw. * @return A pointer to the managed object (or NULL if none is * managed). */ T* get() const {return ref_items.obj_p;} /** * This method does not throw. * @return A reference to the managed object. */ T& operator*() const {return *ref_items.obj_p;} /** * This method does not throw. * @return A pointer to the managed object (or NULL if none is * managed). */ T* operator->() const {return ref_items.obj_p;} /** * This method does not throw. * @return The number of SharedPtr objects referencing the managed * object (or 0 if none is managed by this SharedPtr). */ unsigned int get_refcount() const {return (ref_items.ref_count_p) ? *ref_items.ref_count_p : 0;} /** * The destructor does not throw unless the destructor of a managed * object throws - that should never happen. */ ~SharedPtr() {unreference();} }; /** * @class SharedLockPtr shared_ptr.h c++-gtk-utils/shared_ptr.h * @brief This is a smart pointer for managing the lifetime of objects * allocated on freestore, with a thread safe reference count. * @ingroup handles * @sa SharedPtr SharedPtrError * * Class SharedLockPtr is a version of the shared pointer class which * includes locking so that it can be accessed in multiple threads * (although the word Lock is in the title, by default it uses glib * atomic functions to access the reference count rather than a mutex, * so the overhead should be very small). Note that only the * reference count is protected, so this is thread safe in the sense * in which a raw pointer is thread safe. A shared pointer accessed * in one thread referencing a particular object is thread safe as * against another shared pointer accessing the same object in a * different thread. It is thus suitable for use in different Std C++ * containers which exist in different threads but which contain * shared objects by reference. But: * * 1. If the referenced object is to be modified in one thread and * read or modified in another thread an appropriate mutex for the * referenced object is required (unless that referenced object * does its own locking). * * 2. If the same instance of shared pointer is to be modified in one * thread (by assigning to the pointer so that it references a * different object), and copied (assigned from or used as the * argument of a copy constructor) or modified in another thread, * a mutex for that instance of shared pointer is required. * * 3. Objects referenced by shared pointers which are objects for * which POSIX provides no guarantees (in the main, those which * are not built-in types), such as strings and similar * containers, may not support concurrent reads in different * threads. That depends on the library implementation concerned. * If that is the case, a mutex for the referenced object will * also be required when reading any given instance of such an * object in more than one thread by dereferencing any shared * pointers referencing it (and indeed, when not using shared * pointers at all). * * As mentioned, by default glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_PTR_USE_MUTEX before shared_ptr.h is parsed so as * to use mutexes instead, which might be useful for some debugging * purposes. * * From version 1.2.12, the library provides ==, != and < comparison * operators for SharedLockPtr, but only if the library is compiled * with the --with-smart-ptr-comp option, or if the user code defines * the symbol CGU_USE_SMART_PTR_COMPARISON before shared_ptr.h is * first parsed. This is because, if user code has provided such * operators for these smart pointers itself, a duplicated function * definition would arise. */ template class SharedLockPtr { #ifndef DOXYGEN_PARSING struct { #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX Thread::Mutex* mutex_p; unsigned int* ref_count_p; #else gint* ref_count_p; #endif T* obj_p; } ref_items; #endif // SharedLockPtr::unreference() does not throw if the destructor of the // contained object does not throw, because Thread::Mutex::~Mutex(), // Thread::Mutex::lock() and Thread::Mutex::unlock() do not throw void unreference() { // we can (and should) check whether ref_items.ref_count_p is NULL without // a lock, because that member is specific to this SharedLockPtr object. // Only the integer pointed to by it is shared amongst SharedLockPtr // objects and requires locking if (!ref_items.ref_count_p) return; #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX ref_items.mutex_p->lock(); --(*ref_items.ref_count_p); if (*ref_items.ref_count_p == 0) { # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT g_slice_free(unsigned int, ref_items.ref_count_p); # else delete ref_items.ref_count_p; # endif ref_items.mutex_p->unlock(); delete ref_items.mutex_p; delete ref_items.obj_p; } else ref_items.mutex_p->unlock(); #else if (g_atomic_int_dec_and_test(ref_items.ref_count_p)) { # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT g_slice_free(gint, ref_items.ref_count_p); # else delete ref_items.ref_count_p; # endif delete ref_items.obj_p; } #endif } // SharedLockPtr::reference() does not throw because // Thread::Mutex::Lock::Lock() and Thread::Mutex::Lock::~Lock() do not throw void reference() { // we can (and should) check whether ref_items.ref_count_p is NULL without // a lock, because that member is specific to this SharedLockPtr object. // Only the integer pointed to by it is shared amongst SharedLockPtr // objects and requires locking if (!ref_items.ref_count_p) return; #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX Thread::Mutex::Lock lock(*ref_items.mutex_p); ++(*ref_items.ref_count_p); #else g_atomic_int_inc(ref_items.ref_count_p); #endif } public: /** * Constructor taking an unmanaged object. * @param ptr The object which the SharedLockPtr is to manage (if * any). * @exception std::bad_alloc This constructor will not throw if the * 'ptr' argument has a NULL value (the default), otherwise it might * throw std::bad_alloc if memory is exhausted and the system throws * in that case. If such an exception is thrown, this constructor is * exception safe (it does not leak resources), but as well as * cleaning itself up this constructor will also delete the managed * object passed to it to avoid a memory leak. If such automatic * deletion is not wanted in that case, use the version of this * constructor taking a Cgu::SharedPtrAllocFail::Leave tag argument. * @note 1. std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if it * is unable to obtain memory from the operating system. * @note 2. By default, glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_PTR_USE_MUTEX before shared_ptr.h is parsed so as * to use mutexes instead, which might be useful for some debugging * purposes. Were she to do so, Cgu::Thread::MutexError might be * thrown by this constructor if initialization of the mutex fails, * but it is usually not worth checking for this. */ explicit SharedLockPtr(T* ptr = 0) { if ((ref_items.obj_p = ptr)) { // not NULL #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX try { ref_items.mutex_p = new Thread::Mutex; } catch (...) { delete ptr; // if allocating the object referenced by ref_items.mutex_p // has failed then delete the object to be referenced to // avoid a memory leak throw; } # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(unsigned int); *ref_items.ref_count_p = 1; # else try { ref_items.ref_count_p = new unsigned int(1); } catch (...) { delete ref_items.mutex_p; delete ptr; throw; } # endif #else # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(gint); *ref_items.ref_count_p = 1; # else try { ref_items.ref_count_p = new gint(1); } catch (...) { delete ptr; // if allocating the int referenced by ref_items.ref_count_p // has failed then delete the object to be referenced to // avoid a memory leak throw; } # endif #endif } else { #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX ref_items.mutex_p = 0; // make sure the value is valid as we may assign it #endif ref_items.ref_count_p = 0; } } /** * Constructor taking an unmanaged object. * @param ptr The object which the SharedLockPtr is to manage. * @param tag Passing the tag emumerator * Cgu::SharedPtrAllocFail::leave causes this constructor not to * delete the new managed object passed as the 'ptr' argument in the * event of internal allocation in this method failing because of * memory exhaustion (in that event, Cgu::SharedPtrError will be * thrown). * @exception Cgu::SharedPtrError This constructor might throw * Cgu::SharedPtrError if memory is exhausted and the system would * otherwise throw std::bad_alloc in that case. This constructor is * exception safe (it does not leak resources), and if such an * exception is thrown it will clean itself up, but it will not * attempt to delete the new managed object passed to it. Access to * the object passed to the 'ptr' argument can be obtained via the * thrown Cgu::SharedPtrError object. * @note 1. On systems with over-commit/lazy-commit combined with * virtual memory (swap), it is rarely useful to check for memory * exhaustion, so in those cases this version of the constructor will * not be useful. * @note 2. If the library has been installed using the * --with-glib-memory-slices-no-compat configuration option this * version of the constructor will also not be useful: instead glib * will terminate the program if it is unable to obtain memory from * the operating system. * @note 3. By default, glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_PTR_USE_MUTEX before shared_ptr.h is parsed so as * to use mutexes instead, which might be useful for some debugging * purposes. Were she to do so, Cgu::SharedPtrError might be thrown * by this constructor if initialization of the mutex fails (even if * the --with-glib-memory-slices-no-compat configuration option is * chosen), but it is usually not worth checking for such mutex * initialization failure. * * Since 0.9.1 */ SharedLockPtr(T* ptr, Cgu::SharedPtrAllocFail::Leave tag) { if ((ref_items.obj_p = ptr)) { // not NULL #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX try { ref_items.mutex_p = new Thread::Mutex; } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedPtrError(ptr); } catch (Thread::MutexError&) { // as we are not rethrowing, make NPTL friendly throw SharedPtrError(ptr); } # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(unsigned int); *ref_items.ref_count_p = 1; # else try { ref_items.ref_count_p = new unsigned int(1); } catch (std::bad_alloc&) { delete ref_items.mutex_p; throw SharedPtrError(ptr); } # endif #else # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT ref_items.ref_count_p = g_slice_new(gint); *ref_items.ref_count_p = 1; # else try { ref_items.ref_count_p = new gint(1); } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedPtrError(ptr); } # endif #endif } else { #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX ref_items.mutex_p = 0; // make sure the value is valid as we may assign it #endif ref_items.ref_count_p = 0; } } /** * Causes the SharedLockPtr to cease to manage its managed object (if * any), deleting it if this is the last SharedLockPtr object managing * it. If the argument passed is not NULL, the SharedLockPtr object * will manage the new object passed (which must not be managed by any * other SharedLockPtr object). This method is exception safe, but * see the comments below on std::bad_alloc. * @param ptr NULL (the default), or a new unmanaged object to manage. * @exception std::bad_alloc This method will not throw if the 'ptr' * argument has a NULL value (the default) and the destructor of a * managed object does not throw, otherwise it might throw * std::bad_alloc if memory is exhausted and the system throws in that * case. Note that if such an exception is thrown then this method * will do nothing (it is strongly exception safe and will continue to * manage the object it was managing prior to the call), except that * it will delete the new managed object passed to it to avoid a * memory leak. If such automatic deletion in the event of such an * exception is not wanted, use the reset() method taking a * Cgu::SharedPtrAllocFail::Leave tag type as its second argument. * @note 1. std::bad_alloc will not be thrown if the library has been * installed using the --with-glib-memory-slices-no-compat * configuration option: instead glib will terminate the program if it * is unable to obtain memory from the operating system. * @note 2. By default, glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_PTR_USE_MUTEX before shared_ptr.h is parsed so as * to use mutexes instead, which might be useful for some debugging * purposes. Were she to do so, Cgu::Thread::MutexError might be * thrown by this method if initialization of the mutex fails, but it * is usually not worth checking for this. * @note 3. A SharedLockPtr object protects its reference count but * not the managed object or its other internals. The reset() method * should not be called by one thread in respect of a particular * SharedLockPtr object while another thread may be operating on, * copying or dereferencing the same instance of SharedLockPtr. It is * thread-safe as against another instance of SharedLockPtr managing * the same object. * * Since 0.9.1 */ void reset(T* ptr = 0) { if (ptr) { #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX Thread::Mutex* new_mutex_p; try { new_mutex_p = new Thread::Mutex; } catch (...) { delete ptr; // if allocating the object referenced by ref_items.mutex_p // has failed then delete the object to be referenced to // avoid a memory leak throw; } unsigned int* new_count_p; # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(unsigned int); *new_count_p = 1; # else try { new_count_p = new unsigned int(1); } catch (...) { delete new_mutex_p; delete ptr; throw; } # endif unreference(); ref_items.mutex_p = new_mutex_p; #else gint* new_count_p; # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(gint); *new_count_p = 1; # else try { new_count_p = new gint(1); } catch (...) { delete ptr; // if allocating the new gint has failed then delete the // object to be referenced to avoid a memory leak throw; } # endif unreference(); #endif ref_items.ref_count_p = new_count_p; ref_items.obj_p = ptr; } else { unreference(); #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX ref_items.mutex_p = 0; // make sure the value is valid as we may assign it #endif ref_items.ref_count_p = 0; ref_items.obj_p = 0; } } /** * Causes the SharedLockPtr to cease to manage its managed object (if * any), deleting it if this is the last SharedLockPtr object managing * it. The SharedLockPtr object will manage the new object passed * (which must not be managed by any other SharedLockPtr object). * This method is exception safe, but see the comments below on * Cgu::SharedPtrError. * @param ptr A new unmanaged object to manage (if no new object is to * be managed, use the version of reset() taking a default value of * NULL). * @param tag Passing the tag emumerator * Cgu::SharedPtrAllocFail::leave causes this method not to delete the * new managed object passed as the 'ptr' argument in the event of * internal allocation in this method failing because of memory * exhaustion (in that event, Cgu::SharedPtrError will be thrown). * @exception Cgu::SharedPtrError This method might throw * Cgu::SharedPtrError if memory is exhausted and the system would * otherwise throw std::bad_alloc in that case. Note that if such an * exception is thrown then this method will do nothing (it is * strongly exception safe and will continue to manage the object it * was managing prior to the call), and it will not attempt to delete * the new managed object passed to it. Access to the object passed * to the 'ptr' argument can be obtained via the thrown * Cgu::SharedPtrError object. * @note 1. A SharedLockPtr object protects its reference count but * not the managed object or its other internals. The reset() method * should not be called by one thread in respect of a particular * SharedLockPtr object while another thread may be operating on, * copying or dereferencing the same instance of SharedLockPtr. It is * thread-safe as against another instance of SharedLockPtr managing * the same object. * @note 2. On systems with over-commit/lazy-commit combined with * virtual memory (swap), it is rarely useful to check for memory * exhaustion, so in those cases this version of the reset() method * will not be useful. * @note 3. If the library has been installed using the * --with-glib-memory-slices-no-compat configuration option this * version of the reset() method will also not be useful: instead glib * will terminate the program if it is unable to obtain memory from * the operating system. * @note 4. By default, glib atomic functions are used to provide * thread-safe manipulation of the reference count. However, from * version 1.2.0 a library user can define the symbol * CGU_SHARED_LOCK_PTR_USE_MUTEX before shared_ptr.h is parsed so as * to use mutexes instead, which might be useful for some debugging * purposes. Were she to do so, Cgu::SharedPtrError might be thrown * by this method if initialization of the mutex fails (even if the * --with-glib-memory-slices-no-compat configuration option is * chosen), but it is usually not worth checking for such mutex * initialization failure. * * Since 0.9.1 */ void reset(T* ptr, Cgu::SharedPtrAllocFail::Leave tag) { if (ptr) { #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX Thread::Mutex* new_mutex_p; try { new_mutex_p = new Thread::Mutex; } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedPtrError(ptr); } catch (Thread::MutexError&) { // as we are not rethrowing, make NPTL friendly throw SharedPtrError(ptr); } unsigned int* new_count_p; # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(unsigned int); *new_count_p = 1; # else try { new_count_p = new unsigned int(1); } catch (std::bad_alloc&) { delete new_mutex_p; throw SharedPtrError(ptr); } # endif unreference(); ref_items.mutex_p = new_mutex_p; #else gint* new_count_p; # ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT new_count_p = g_slice_new(gint); *new_count_p = 1; # else try { new_count_p = new gint(1); } catch (std::bad_alloc&) { // as we are not rethrowing, make NPTL friendly throw SharedPtrError(ptr); } # endif unreference(); #endif ref_items.ref_count_p = new_count_p; ref_items.obj_p = ptr; } else { unreference(); #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX ref_items.mutex_p = 0; // make sure the value is valid as we may assign it #endif ref_items.ref_count_p = 0; ref_items.obj_p = 0; } } /** * This copy constructor does not throw. * @param sh_ptr The shared pointer to be copied. */ SharedLockPtr(const SharedLockPtr& sh_ptr) { ref_items = sh_ptr.ref_items; reference(); } template friend class SharedLockPtr; /** * A version of the copy constructor which enables pointer type * conversion (assuming the type passed is implicitly type * convertible to the managed type, such as a derived type). This * copy constructor does not throw. * @param sh_ptr The shared pointer to be copied. */ template SharedLockPtr(const SharedLockPtr& sh_ptr) { // because we are allowing an implicit cast from derived to // base class referenced object, we need to assign from each // member of sh_ptr.ref_items separately #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX ref_items.mutex_p = sh_ptr.ref_items.mutex_p; #endif ref_items.obj_p = sh_ptr.ref_items.obj_p; ref_items.ref_count_p = sh_ptr.ref_items.ref_count_p; reference(); } /** * This method does not throw unless the destructor of a managed * object throws - that should never happen. * @param sh_ptr the assignor. * @return The SharedLockPtr object after assignment. */ // If the destructor of the handled object throws then the // SharedLockPtr object may be left in an invalid state - we won't // make this method less efficient by trying to handle something // that should not happen SharedLockPtr& operator=(const SharedLockPtr& sh_ptr) { // check whether we are already referencing this object - // if so make this a null op. This will also deal with // self-assignment if (ref_items.obj_p != sh_ptr.ref_items.obj_p) { // first unreference any object referenced by this shared pointer unreference(); // now inherit the ref_items structure from the assigning // shared pointer and reference the object it references ref_items = sh_ptr.ref_items; reference(); } return *this; } /** * A version of the assignment operator which enables pointer type * conversion (assuming the type passed is implicitly type * convertible to the managed type, such as a derived type). This * method does not throw unless the destructor of a managed object * throws - that should never happen. * @param sh_ptr the assignor. * @return The SharedLockPtr object after assignment. */ template SharedLockPtr& operator=(const SharedLockPtr& sh_ptr) { return operator=(SharedLockPtr(sh_ptr)); } /** * This method does not throw. * @return A pointer to the managed object (or NULL if none is * managed). */ T* get() const {return ref_items.obj_p;} /** * This method does not throw. * @return A reference to the managed object. */ T& operator*() const {return *ref_items.obj_p;} /** * This method does not throw. * @return A pointer to the managed object (or NULL if none is * managed). */ T* operator->() const {return ref_items.obj_p;} /** * This method does not throw. * @return The number of SharedLockPtr objects referencing the * managed object (or 0 if none is managed by this SharedLockPtr). * @note The return value may not be valid if another thread has * changed the reference count before the value returned by this * method is acted on. It is provided as a utility, but may not be * meaningful, depending on the intended usage. */ unsigned int get_refcount() const { if (!ref_items.ref_count_p) return 0; #ifdef CGU_SHARED_LOCK_PTR_USE_MUTEX Thread::Mutex::Lock lock(*ref_items.mutex_p); return *ref_items.ref_count_p; #else return g_atomic_int_get(ref_items.ref_count_p); #endif } /** * The destructor does not throw unless the destructor of a managed * object throws - that should never happen. */ ~SharedLockPtr() {unreference();} }; #if defined(CGU_USE_SMART_PTR_COMPARISON) || defined(DOXYGEN_PARSING) // we can use built-in operator == when comparing pointers referencing // different objects of the same type /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator==(const SharedPtr& s1, const SharedPtr& s2) { return (s1.get() == s2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator!=(const SharedPtr& s1, const SharedPtr& s2) { return !(s1 == s2); } // we must use std::less rather than the < built-in operator for // pointers to objects not within the same array or object: "For // templates greater, less, greater_equal, and less_equal, the // specializations for any pointer type yield a total order, even if // the built-in operators <, >, <=, >= do not." (para 20.3.3/8). /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator<(const SharedPtr& s1, const SharedPtr& s2) { return std::less()(s1.get(), s2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator==(const SharedLockPtr& s1, const SharedLockPtr& s2) { return (s1.get() == s2.get()); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator!=(const SharedLockPtr& s1, const SharedLockPtr& s2) { return !(s1 == s2); } /** * @ingroup handles * * This comparison operator does not throw. It compares the addresses * of the managed objects. This function is only available if the * library is compiled with the --with-smart-ptr-comp option, or if * the user code defines the symbol CGU_USE_SMART_PTR_COMPARISON * before shared_ptr.h is first parsed. * * Since 1.2.12 */ template bool operator<(const SharedLockPtr& s1, const SharedLockPtr& s2) { return std::less()(s1.get(), s2.get()); } #endif // CGU_USE_SMART_PTR_COMPARISON } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/param.h0000644000175000001440000001105311524110041016301 00000000000000/* Copyright (C) 2010 and 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. However, it is not intended that the object code of a program whose source code instantiates a template from this file or uses macros or inline functions (of any length) should by reason only of that instantiation or use be subject to the restrictions of use in the GNU Lesser General Public License. With that in mind, the words "and macros, inline functions and instantiations of templates (of any length)" shall be treated as substituted for the words "and small macros and small inline functions (ten lines or less in length)" in the fourth paragraph of section 5 of that licence. This does not affect any other reason why object code may be subject to the restrictions in that licence (nor for the avoidance of doubt does it affect the application of section 2 of that licence to modifications of the source code in this file). */ #ifndef CGU_PARAM_H #define CGU_PARAM_H #include namespace Cgu { /** * @class Param param.h c++-gtk-utils/param.h * @brief Struct for automatic typing of parameter arguments for template functions * * @details This struct uses template partial specialisation in order * to provide automatic type mapping for arguments for templated * functions. It is used by callback object constructors, the unbound * arguments of callback objects and their related functors and * emitter objects, and the DoIf::mem_fun() and DoIf::fun() functions. * With DoIf::mem_fun() and DoIf::fun(), its use avoids errors arising * from a template function being instantiated for a reference to * reference type, and also ensures that value arguments are passed by * reference to const to avoid unnecessary copying. * * Mapping is as follows: * * A value argument is mapped to reference to const of the value * type. * * A pointer argument is mapped to pointer argument (its original * type). * * A non-const reference argument is mapped to non-const reference * (its original type). * * A const reference argument is mapped to const reference (its * original type). * * Since 1.2.10 */ template struct Param { typedef const T& ParamType; }; template struct Param { typedef T& ParamType; }; template struct Param { typedef T* ParamType; }; /** * @class TypeTuple param.h c++-gtk-utils/param.h * @brief Struct type to provide unbound arguments for * Callback::CallbackArg objects. * * @details This struct is used with template partial specialisation * of Callback::CallbackArg, Callback::FunctorArg and EmitterArg * objects to enable them to take up to five unbound arguments, * although at present these classes are only specialised to take two * or three unbound arguments. This struct has no members and is * never instantiated: it is just used as a placeholder for its * contained types. * * As the compiled part of this library does not use this struct (it * just makes it available), the advantage of specialising the * (single) template type of Callback::CallbackArg, * Callback::FunctorArg and EmitterArg via this struct, rather than * specialising them directly, is that this struct can be extended (or * have Loki-like typelists substituted) without breaking binary * compatibility. The types have default type values of void, * indicating no argument, so this struct is capable of representing * any number of arguments from 0 to 5. * * Since 1.2.10 */ template struct TypeTuple {}; } // namespace Cgu #endif // CGU_PARAM_H efax-gtk-3.2.8/src/internal/c++-gtk-utils/pipes.h0000644000175000001440000007217611536141256016355 00000000000000/* Copyright (C) 1999 - 2004, 2009 and 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_PIPES_H #define CGU_PIPES_H #include #include #include namespace Cgu { /** * @class PipeFifo pipes.h c++-gtk-utils/pipes.h * @brief A wrapper for unix anonymous pipes. * @sa SyncPipe * * This class provides a simplified front end for anonymous fifo pipes * (as created by the pipe() system call). The constructor of the * class may be passed an enumerator to indicate whether the pipe is * to read in non-blocking mode. * * With the write(const char*, int) method, taking an array and int * arguments, the value of int (indicating the number of chars in the * array to be written) should usually be less than PIPE_BUF, as POSIX * write() guarantees that if it is less than PIPE_BUF, either all * will be written or, if the pipe is too full, none will be written. * This prevents data interleaving if a number of independent writes * to the fifo are made. The same is true of the write (const char*) * method taking a string - if the string is longer than PIPE_BUF in * size, data interleaving may occur. * * The pipe is set to read in non-blocking mode if the constructor of * PipeFifo, or PipeFifo::open(), is passed the value * PipeFifo::non_block. If constructed in this way, the pipe can also * be set to write in non-block mode (eg to minimise the impact on * another program running in a child process to which the child * process has exec()ed when monitoring its stdin or stderr) by * calling make_write_non_block(). However use this very sparingly -- * when set in this way write() will always try to write something. * The atomic guarantees mentioned in the preceding paragraph do not * apply and data can be interleaved or lost. * * PIPE_BUF is defined in limits.h, and is at least 512 bytes, and * usually 4096 bytes, but may be calculated from other files included * by limits.h. * * Where a pipe is used to communicate between parent and child after * a call to fork(), the pipe will normally be used unidirectionally * unless guards or semaphores are used to prevent a process reading * data intended for the other. However, because each process * inherits its own duplicate of the file descriptors, this cannot be * enforced without closing the read or write file descriptor for the * process for which the reading or writing is to be prohibited. This * can be done by the process concerned calling the methods * PipeFifo::make_writeonly() or PipeFifo::make_readonly() after the * fork. If an attempt is made to read or write to a descriptor * closed in this way, the PipeFifo::read() or PipeFifo::write() * method will ensure that no read or write will take place, and * instead -2 will be returned. * * The methods PipeFifo::connect_to_stdin(), * PipeFifo::connect_to_stdout() and PipeFifo::connect_to_stderr() are * available to be used in the child process before it exec()s another * program so as to connect the pipe to that program's stdin, stdout * or stderr. PipeFifo::connect_to_stdin() cannot be used by a * process after that process has called PipeFifo::make_writeonly(), * and PipeFifo::connect_to_stdout() and PipeFifo::connect_to_stderr() * cannot be used after the process has called * PipeFifo::make_readonly(), nor can a pipe in any one process be * connected to more than one of stdin, stdout or stderr. If that is * attempted the methods will return -2. Furthermore, they should * only be used after the process creating the pipe has forked. If * the connection to stdin, stdout or stderr is to be made before the * fork, this must be done by hand using dup2(), * PipeFifo::get_write_fd()/ PipeFifo::get_read_fd() and * PipeFifo::make_read_only()/ PipeFifo::make_write_only(). * * If PipeFifo::connect_to_stdin() is called by a method, * PipeFifo::make_readonly() will also be called, and if * PipeFifo::connect_to_stdout() or PipeFifo::connect_to_stderr() are * called, PipeFifo::make_writeonly() will also be called. This will * isolate the use of the pipe by the child process to stdin, stdout * or stderr, as appropriate. * * It uses no static members, so is thread safe as between different * objects, but its methods are not thread safe as regards any one * object in the sense that the read() and write() methods check the * value of read_fd and write_fd respectively (and get_read_fd() and * get_write_fd() return them), and make_writeonly(), make_readonly(), * close(), connect_to_stdin(), open(), connect_to_stdout() and * connect_to_stderr() change those values. Likewise the read() and * write() methods access read_blocking_mode and write_blocking_mode * respectively, and these are changed by open() and * make_write_non_block(). Provided there is no concurrent use of * read(), write(), get_read_fd() or get_write_fd() in one thread with * a call of a method which changes read_fd, write_fd, * read_blocking_mode or write_blocking_mode as described above in * another thread then no mutex is required to ensure thread safety. * * All the read() and write() methods check for an interruption of the * system call from a signal (EINTR is checked), and will continue to * read() or write() where necessary. Users do not need to check * EINTR themselves. Where the write file descriptor is flagged as * blocking (that is, where PipeFifo::make_write_non_block() has not * been called), then in the absence of some other error, everything * passed to PipeFifo::write() will be written (but as mentioned above * there may be data interleaving if this is greater than PIPE_BUF in * size). Where the write file descriptor is flagged as non-blocking, * then the result of Unix write is returned, and less bytes than * those passed to PipeFifo::write() may have been written, or -1 may * be returned with errno set to EAGAIN - it is for the user to check * this. * * If you are using pipes to write and read between processes, you * will probably want to call sigaction() to cause the SIGPIPE signal * to be ignored. SIGPIPE has little use in most programming: if * SIGPIPE is ignored, and an attempt is made to write to a pipe which * has been closed at the read end, then the write will return -1 and * errno will be set to EPIPE. */ struct PipeError: public std::exception { virtual const char* what() const throw() {return "PipeError: error opening pipe\n";} }; class PipeFifo { public: enum Fifo_mode{block, non_block}; private: int read_fd; int write_fd; Fifo_mode read_blocking_mode; Fifo_mode write_blocking_mode; // this class cannot be copied - file descriptors are owned and not shared PipeFifo(const PipeFifo&); PipeFifo& operator=(const PipeFifo&); public: /** * Opens read and write file descriptors for the pipe. If the pipe is * already open, it will close the existing file descriptors. This * function call is thread-safe to the extent that all the system * calls made in its implementation are async-signal-safe, so it may * safely be called in a multi-threaded program after a fork() and * before an exec(). However, the manipulation of the file * descriptors and related variables is not protected by a mutex, so * if different threads in the same process are to manipulate the same * pipe object with this method, close(), connect_to_stdin(), * connect_to_stdout() or connect_to_stderr() (which manipulate both * descriptors), make_readonly() or make_write_non_block() (which * manipulate the write file descriptor), or make_writeonly() (which * manipulates the read file descriptor), or read the value of the * file descriptor with get_read_fd() or read() (which access the read * file descriptor) or get_write_fd() or write() (which access the * write file descriptor) concurrently with such a manipulation, then * the user should provide appropriate synchronisation. * @param mode The mode in which the read file descriptor of the pipe * is to be opened - either Cgu::PipeFifo::block or * Cgu::PipeFifo::non_block. * @exception Cgu::PipeError This exception is thrown if the opening * of the pipe fails. No other exceptions will be thrown. */ void open(Fifo_mode mode); /** * Closes the read and write file descriptors of the pipe (if they are * open). This function call is thread-safe to the extent that all * the system calls made in its implementation are async-signal-safe, * so it may safely be called in a multi-threaded program after a * fork() and before an exec(). However, the manipulation of the file * descriptors and related variables is not protected by a mutex, so * if different threads in the same process are to manipulate the same * pipe object with this method, open(), connect_to_stdin(), * connect_to_stdout() or connect_to_stderr() (which manipulate both * descriptors), make_readonly() or make_write_non_block() (which * manipulate the write file descriptor), or make_writeonly() (which * manipulates the read file descriptor), or read the value of the * file descriptor with get_read_fd() or read() (which access the read * file descriptor) or get_write_fd() or write() (which access the * write file descriptor) concurrently with such a manipulation, then * the user should provide appropriate synchronisation. No exceptions * will be thrown. */ void close(); /** * Reads up to max_num characters from the pipe. This read does not * carry on blocking until the read request is met: unless there is an * interrupt, it just calls POSIX read() once and takes what is * available. If a specific number of characters is required, the * user should provide an appropriate do/while loop. It does not * throw. Any reasonable POSIX implementation will do an atomic read * as between threads if max_num is PIPE_BUF or less in size, but the * POSIX standard only requires such atomic reads as between processes * rather than as between threads. The user does not need to check * for EINTR and an interrupt: this method deals with that * automatically. All the system calls made in its implementation are * async-signal-safe, and it is re-entrant subject to errno being * saved. This method does not throw. * @param buf A buffer into which the characters will be placed. * @param max_num The maximum number of characters to be read * (normally the size of the buffer). * @return -2 if the read file descriptor is invalid, otherwise the * result of unix read() - that is, the number of characters read, or * 0 if end of file is reached (ie the write descriptor has been * closed), or -1 if there has been an error (but EINTR never returns * as an error as the implementation handles that). In the event of * an error, errno is set. */ ssize_t read(char* buf, size_t max_num); /** * Extracts a character from the pipe. This method does not throw. * All the system calls made in its implementation are * async-signal-safe and it is re-entrant subject to errno being * saved. It is thread safe. * @return The character at the front of the pipe if available, * otherwise -2 if the read file descriptor is invalid, 0 if end of * file is reached (ie the write descriptor has been closed), or -1 if * there has been an error (but EINTR never returns as an error as the * implementation handles that). In the event of an error, errno is * set. */ int read(); /** * Write a NUL terminated C string to the pipe, excluding the * terminating NUL character. If the write file descriptor is set as * blocking (the default) then this method will carry on blocking * until everything is sent, even if it exceeds PIPE_BUF in size. Any * reasonable POSIX implementation will do an atomic write (with no * interleaving) as between threads if the number of characters in the * string is PIPE_BUF or less in size, but the POSIX standard only * requires such atomic writes as between processes rather than as * between threads. All the system calls made in its implementation * are async-signal-safe and it is re-entrant subject to errno being * saved. This method does not throw. * @param str The string to be written. * @return -2 if write file descriptor invalid, otherwise it returns * the number of bytes written or -1 if there has been an error (but * EINTR never returns as an error as the implementation handles * that). In the event of an error, errno is set. */ ssize_t write(const char* str); /** * Write a buffer of characters to the pipe. If the write file * descriptor is set as blocking (the default) then this method will * carry on blocking until everything is sent, even if it exceeds * PIPE_BUF in size. Any reasonable POSIX implementation will do an * atomic write (with no interleaving) as between threads if num is * PIPE_BUF or less in size, but the POSIX standard only requires such * atomic writes as between processes rather than as between threads. * All the system calls made in its implementation are * async-signal-safe and it is re-entrant subject to errno being * saved. This method does not throw. * @param buf The buffer to be written. * @param num The number of characters in the buffer. * @return -2 if write file descriptor invalid, otherwise it returns * the number of bytes written or -1 if there has been an error (but * EINTR never returns as an error as the implementation handles * that). In the event of an error, errno is set. */ ssize_t write(const char* buf, size_t num); /** * Write a character to the pipe. All the system calls made in its * implementation are async-signal-safe and it is re-entrant subject * to errno being saved. This method does not throw. It is thread * safe. * @param item The character to be written. * @return 1 if the character was written, -2 if the write file * descriptor is invalid, or -1 if there has been an error (but EINTR * never returns as an error as the implementation handles that). In * the event of an error, errno is set. */ int write(char item) {return write(&item, 1);} /** * Make the pipe only available for writing in the calling process, by * closing the read file descriptor. This function call is thread * safe to the extent that all the system calls made in its * implementation are async-signal-safe, so it may safely be called in * a multi-threaded program after a fork() and before an exec(). * However, the manipulation of the file descriptor and related * variables is not protected by a mutex, so if different threads in * the same process are to manipulate the same pipe object with * open(), close(), connect_to_stdin(), connect_to_stdout() or * connect_to_stderr() (which manipulate both descriptors), or this * method (which manipulates the read file descriptor), or read the * value of the read file descriptor with get_read_fd() or read() * concurrently with such a manipulation, then the user should provide * appropriate synchronisation. No exceptions will be thrown. */ void make_writeonly(); /** * Make the pipe only available for reading in the calling process, by * closing the write file descriptor. This function call is * thread-safe to the extent that all the system calls made in its * implementation are async-signal-safe, so it may safely be called in * a multi-threaded program after a fork() and before an exec(). * However, the manipulation of the file descriptor and related * variables is not protected by a mutex, so if different threads in * the same process are to manipulate the same pipe object with * open(), close(), connect_to_stdin(), connect_to_stdout() or * connect_to_stderr() (which manipulate both descriptors), or this * method or make_write_non_block() (which manipulate the write file * descriptor), or read the value of the write file descriptor with * get_write_fd() or write() concurrently with such a manipulation, * then the user should provide appropriate synchronisation. No * exceptions will be thrown. */ void make_readonly(); /** * Makes the write file descriptor non-blocking. This is only very * rarely needed. If the write file descriptor is set non-blocking, * then there are no atomic write guarantees. This function call is * thread safe to the extent that all the system calls made in its * implementation are async-signal-safe, so it may safely be called in * a multi-threaded program after a fork() and before an exec(). * However, the manipulation of the file descriptor and related * variables is not protected by a mutex, so if different threads in * the same process are to manipulate the same pipe object with * open(), close(), connect_to_stdin(), connect_to_stdout() or * connect_to_stderr() (which manipulate both descriptors), or this * method or make_readonly() (which manipulate the write file * descriptor), or read the value of the write file descriptor with * get_write_fd() or write() concurrently with such a manipulation, * then the user should provide appropriate synchronisation. No * exceptions will be thrown. * @return 0 if the write file descriptor is open, or -1 otherwise. */ int make_write_non_block(); /** * Get the read file descriptor (if any). The fetching of the file * descriptor is not protected by a mutex, so if different threads in * the same process are to manipulate the same pipe object with * open(), close(), connect_to_stdin(), connect_to_stdout() or * connect_to_stderr() (which manipulate both descriptors), or * make_writeonly() (which manipulates the read file descriptor), or * read the value of the file descriptor with this method or read() * concurrently with such a manipulation, then the user should provide * appropriate synchronisation. No exceptions will be thrown. * @return The read file descriptor, or -1 is none is open. */ int get_read_fd() const {return read_fd;} /** * Get the write file descriptor (if any). The fetching of the file * descriptor is not protected by a mutex, so if different threads in * the same process are to manipulate the same pipe object with * open(), close(), connect_to_stdin(), connect_to_stdout() or * connect_to_stderr() (which manipulate both descriptors), or * make_readonly() or make_write_non_block() (which manipulate the * write file descriptor), or read the value of the file descriptor * with this method or write() concurrently with such a manipulation, * then the user should provide appropriate synchronisation. No * exceptions will be thrown. * @return The write file descriptor, or -1 is none is open. */ int get_write_fd() const {return write_fd;} /** * Connect the read file descriptor of the pipe to stdin. Once * called, any read from stdin in the process which calls this method * will be read from the pipe. It should only be called in a child * process or parent process after a fork() where the PipeFifo object * has been created in the parent process, and typically is called by * the child process before one of the exec() functions is invoked by * the child process. It should only be called once, and cannot be * called after connect_to_stdout(), connect_to_stderr() or * make_writeonly() has been called in the same process. Once called, * the write file descriptor is no longer available to the process * calling this method. Typically it would be used in order that when * the new process image created by exec() reads from stdin, it reads * from the pipe, and the parent process (or another child process) * writes to the pipe. This function call is thread safe to the * extent that all the system calls made in its implementation are * async-signal-safe, so it may safely be called in a multi-threaded * program after a fork() and before an exec(). However, the * manipulation of the file descriptors and related variables is not * protected by a mutex, so if different threads in the same process * are to manipulate the same pipe object with this method, open(), * close(), connect_to_stdout() or connect_to_stderr() (which * manipulate both descriptors), make_readonly() or * make_write_non_block() (which manipulate the write file * descriptor), or make_writeonly() (which manipulates the read file * descriptor), or read the value of the file descriptor with * get_read_fd() or read() (which access the read file descriptor) or * get_write_fd() or write() (which access the write file descriptor) * concurrently with such a manipulation, then the user should provide * appropriate synchronisation. It does not throw. * @return -2 if the read file descriptor has previously been closed * or this method, connect_to_stdout() or connect_to_stderr() has * previously been called in the same process, otherwise it returns * the value returned by dup2(), that is 0 if the operation succeeds, * or -1 (with errno set) if not. It does not throw. * @note Prior to version 1.0.0, this function would only return -1 in * case of error. */ int connect_to_stdin(); /** * Connect the write file descriptor of the pipe to stdout. Once * called, any write to stdout in the process which calls this method * will be written to the pipe. It should only be called in a child * or parent process after a fork() where the PipeFifo object has been * created in the parent process, and typically is called by the child * process before one of the exec() functions is invoked by the child * process. It should only be called once, and cannot be called after * connect_to_stdin(), connect_to_stderr() or make_readonly() has been * called in the same process. Once called, the read file descriptor * is no longer available to the process calling this method. * Typically it would be used in order that when the new process image * created by exec() writes to stdout, it writes to the pipe, and the * parent process (or another child process) reads from the pipe. * This function call is thread safe to the extent that all the system * calls made in its implementation are async-signal-safe, so it may * safely be called in a multi-threaded program after a fork() and * before an exec(). However, the manipulation of the file * descriptors and related variables is not protected by a mutex, so * if different threads in the same process are to manipulate the same * pipe object with this method, open(), close(), connect_to_stdin() * or connect_to_stderr() (which manipulate both descriptors), * make_readonly() or make_write_non_block() (which manipulate the * write file descriptor), or make_writeonly() (which manipulates the * read file descriptor), or read the value of the file descriptor * with get_read_fd() or read() (which access the read file * descriptor) or get_write_fd() or write() (which access the write * file descriptor) concurrently with such a manipulation, then the * user should provide appropriate synchronisation. It does not * throw. * @return -2 if the write file descriptor has previously been closed * or this method, connect_to_stdin() or connect_to_stderr() has * previously been called in the same process, otherwise it returns * the value returned by dup2(), that is 0 if the operation succeeds, * or -1 (with errno set) if not. It does not throw. * @note Prior to version 1.0.0, this function would only return -1 in * case of error. */ int connect_to_stdout(); /** * Connect the write file descriptor of the pipe to stderr. Once * called, any write to stderr in the process which calls this method * will be written to the pipe. It should only be called in a child * or parent process after a fork() where the PipeFifo object has been * created in the parent process, and typically is called by a child * process before one of the exec() functions is invoked by the child * process. It should only be called once, and cannot be called after * connect_to_stdin(), connect_to_stdout() or make_readonly() has been * called in the same process. Once called, the read file descriptor * is no longer available to the process calling this method. * Typically it would be used in order that when the new process image * created by exec() writes to stderr, it writes to the pipe, and the * parent process (or another child process) reads from the pipe. * This function call is thread safe to the extent that all the system * calls made in its implementation are async-signal-safe, so it may * safely be called in a multi-threaded program after a fork() and * before an exec(). However, the manipulation of the file * descriptors and related variables is not protected by a mutex, so * if different threads in the same process are to manipulate the same * pipe object with this method, open(), close(), connect_to_stdin() * or connect_to_stdout() (which manipulate both descriptors), * make_readonly() or make_write_non_block() (which manipulate the * write file descriptor), or make_writeonly() (which manipulates the * read file descriptor), or read the value of the file descriptor * with get_read_fd() or read() (which access the read file * descriptor) or get_write_fd() or write() (which access the write * file descriptor) concurrently with such a manipulation, then the * user should provide appropriate synchronisation. It does not * throw. * @return -2 if the write file descriptor has previously been closed * or this method, connect_to_stdin() or connect_to_stdout() has * previously been called in the same process, otherwise it returns * the value returned by dup2(), that is 0 if the operation succeeds, * or -1 (with errno set) if not. It does not throw. * @note Prior to version 1.0.0, this function would only return -1 in * case of error. */ int connect_to_stderr(); /** * This constructor opens read and write file descriptors for the * pipe. All the system calls made in its implementation are * async-signal-safe. * @param mode The mode in which the read file descriptor of the pipe * is to be opened - either Cgu::PipeFifo::block or * Cgu::PipeFifo::non_block. * @exception Cgu::PipeError This exception is thrown if the opening * of the pipe fails. No other exceptions will be thrown. */ PipeFifo(Fifo_mode mode); /** * The default constructor does not open any descriptors. open() must * be called before the PipeFifo object can be used. It is * async-signal-safe. It does not throw. */ PipeFifo(); /** * The destructor does not throw. It is async-signal-safe. */ ~PipeFifo() {close();} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class SyncPipe pipes.h c++-gtk-utils/pipes.h * @brief A class which uses an anonymous pipe to synchronise between * processes. * @sa PipeFifo * * This class enables synchronisation between processes after * fork()ing. The process to wait on the other one calls wait() at * the point where it wishes to wait, and the other process calls * release() when it wants to enable the other process to continue. * It is one-shot only - once it has released, it cannot re-block * again. It is typically for use when a child process is setting * itself up, or has a specific task to achieve, and needs to * co-ordinate with the parent process or tell the parent process when * it has done this. In such a case, the parent would wait until the * child releases it. */ class SyncPipe { PipeFifo pipe_fifo; public: /** * Releases another process waiting on this pipe. If the other * process has not yet called wait(), when it does so wait() will * immediately return. This may safely be called after a * multi-threaded process forks() (all the system calls made in its * implementation are async-signal-safe), but only one thread should * call it. It does not throw. */ void release() {pipe_fifo.make_writeonly(); pipe_fifo.make_readonly();} /** * Blocks until another process has called release() on this pipe. If * the other process has already called release(), this function will * immediately return. This may safely be called after a * multi-threaded process forks() (all the system calls made in its * implementation are async-signal-safe), but only one thread should * call it. It does not throw. */ void wait(); /** * All the system calls made in the constructor are async-signal-safe. * @exception Cgu::PipeError This exception is thrown if the opening * of the pipe fails. No other exceptions will be thrown. */ SyncPipe(): pipe_fifo(PipeFifo::block) {} /** * The destructor does not throw. It is async-signal-safe. */ ~SyncPipe() {} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/Makefile.am0000644000175000001440000000213711536141256017106 00000000000000## Process this file with automake to produce Makefile.in noinst_LIBRARIES = libcxx-gtk-utils.a libcxx_gtk_utils_a_SOURCES = io_watch.cpp notifier.cpp \ thread.cpp reassembler.cpp \ widget.cpp window.cpp callback.cpp \ text_print_manager.cpp pipes.cpp \ timeout.cpp emitter.cpp convert.cpp \ mutex.cpp prog_present.cpp \ application.cpp noinst_HEADERS = fdstream.h fdstream.tpp gobj_handle.h \ shared_handle.h shared_ptr.h param.h \ intrusive_ptr.h async_queue.h \ gerror_handle.h mem_fun.h emitter.h \ io_watch.h notifier.h thread.h \ reassembler.h widget.h window.h \ callback.h text_print_manager.h \ pipes.h mutex.h timeout.h convert.h \ prog_present.h gvar_handle.h \ application.h lib_defs.h \ prog-presenter/prog-presenter-bindings.h \ prog-presenter/prog-presenter-glue.h AM_CXXFLAGS = -D_XOPEN_SOURCE=600 @GTK_CFLAGS@ @GTHREAD_CFLAGS@ @DBUS_GLIB_CFLAGS@ @GIO_CFLAGS@ -I.. EXTRA_DIST = LGPL.TXT cgu_config.h.in prog-presenter/make_bindings.sh prog-presenter/prog-presenter.xml efax-gtk-3.2.8/src/internal/c++-gtk-utils/thread.h0000644000175000001440000006432511536141256016501 00000000000000/* Copyright (C) 2005 to 2010 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #ifndef CGU_THREAD_H #define CGU_THREAD_H #include #include #include #include #include namespace Cgu { namespace Thread { /** * @class Cgu::Thread::Thread thread.h c++-gtk-utils/thread.h * @brief A class representing a pthread thread. * @sa Thread::Mutex Thread::Mutex::Lock Thread::Cond Thread::Future Thread::JoinableHandle * * The Thread class encapsulates a pthread thread. It can start, join * and cancel a thread. * @note The Thread class, and the associated CancelBlock class, can * be used interchangibly with (and mixed with) GThread objects and * functions, and GMutex, GStaticMutex, GStaticRecMutex and GCond, as * they all use pthreads underneath on POSIX and other unix-like OSes. * The main feature available with this thread implementation and not * GThreads is thread cancellation, the mutex scoped locking classes * Thread::Mutex::Lock and Thread::RecMutex::Lock, the joinable thread * scoped management class Thread::JoinableHandle and the * Thread::Future class (abstracting thread functions which provide a * result). There is no need from the perspective of this class to * call g_thread_init() before Thread::Thread::start() is called, but * glib itself is not thread-safe without g_thread_init(), so where * this class is used with glib g_thread_init() should be called at * program initialization. * * See @ref Threading for particulars about GTK+ thread safety. */ class Thread { pthread_t thread; // private constructor - this class can only be created with Thread::start Thread() {} // and it cannot be copied - this class has single ownership semantics Thread(const Thread&); Thread& operator=(const Thread&); public: /** * Cancels the thread represented by this Thread object. It can be * called by any thread. The effect is undefined if the thread * represented by this Thread object has both (a) already terminated * and (b) been detached or had a call to join() made for it. * Accordingly, if the user is not able to establish from the program * logic whether the thread has terminated, the thread must be created * as joinable and cancel() must not be called after a call to * detach() has been made or a call to join() has returned. A * Thread::JoinableHandle object can used to ensure this. It does not * throw. * @note Use this method with care - sometimes its use is unavoidable * but destructors for local objects may not be called if a thread * exits by virtue of a call to cancel() (that depends on the * implementation). Most modern commercial unixes, and recent * linux/BSD distributions based on NPTL, will unwind the stack and * call destructors on thread cancellation by means of a * pseudo-exception, but older distributions relying on the former * linuxthreads implementation will not. Therefore for maximum * portability only have plain data structures/built-in types in * existence in local scope when it occurs and if there is anything in * free store to be released implement some clean-ups with * pthread_cleanup_push()/pthread_cleanup_pop(). This should be * controlled with pthread_setcancelstate() and/or the CancelBlock * class to choose the cancellation point. * @sa Cgu::Thread::Exit */ void cancel() {pthread_cancel(thread);} /** * Joins the thread represented by this Thread object (that is, waits * for it to terminate). It can be called by any thread other than * the one represented by this Thread object. The result is undefined * if the thread is or was detached or join() has already been called * for the thread (a Thread::JoinableHandle object will however give a * defined result in such cases for threads originally started as * joinable). It does not throw. */ void join() {pthread_join(thread, 0);} /** * Detaches the thread represented by this Thread object where it is * joinable, so as to make it unjoinable. The effect is unspecified * if the thread is already unjoinable (a Thread::JoinableHandle * object will however give a defined result in such cases for threads * originally started as joinable). It does not throw. */ void detach() {pthread_detach(thread);} /** * Specifies whether the calling thread is the same thread as is * represented by this Thread object. The effect is undefined if the * thread represented by this Thread object has both (a) already * terminated and (b) been detached or had a call to join() made for * it. Accordingly, if the user is not able to establish from the * program logic whether the thread has terminated, the thread must be * created as joinable and is_caller() must not be called after a call * to detach() has been made or a call to join() has returned. A * Thread::JoinableHandle object can used to ensure this. This method * does not throw. * @return Returns true if the caller is in the thread represented by * this Thread object. */ bool is_caller() {return pthread_equal(thread, pthread_self());} /** * Starts a new thread. It can be called by any thread. * @param cb A callback object (created by Callback::make()) * encapsulating the function to be executed by the new thread. The * Thread object returned by this function will take ownership of the * callback: it will automatically be deleted either by the new thread * when it has finished with it, or by this method in the calling * thread if the attempt to start a new thread fails (including if * std::bad_alloc is thrown). * @param joinable Whether the join() method may be called in relation * to the new thread. * @return A Thread object representing the new thread which has been * started, held by a std::auto_ptr object as it has single ownership * semantics. The std::auto_ptr object will be empty (that is * std::auto_ptr::get() will return 0) if the * thread did not start correctly. * @exception std::bad_alloc This method might throw std::bad_alloc if * memory is exhausted and the system throws in that case. (This * exception will not be thrown if the library has been installed * using the --with-glib-memory-slices-no-compat configuration option: * instead glib will terminate the program if it is unable to obtain * memory from the operating system.) * @note 1. The thread will keep running even if the return value of * start() goes out of scope (but it will no longer be possible to * call any of the methods in this class for it, which is fine if the * thread is not started as joinable and it is not intended to cancel * it). * @note 2. If the thread is started with the joinable attribute, the * user must subsequently either call the join() or the detach() * method, as otherwise a resource leak may occur (the destructor of * this class does not call detach() automatically). Alternatively, * the return value of this method can be passed to a * Thread::JoinableHandle object which will do this automatically in * the Thread::JoinableHandle object's destructor. * @note 3. Any Thread::Exit exception thrown from the function * executed by the new thread will be caught and consumed. The thread * will safely terminate and unwind the stack in so doing. * @note 4. If any uncaught exception other than Thread::Exit is * allowed to propagate from that function, the exception is not * consumed (NPTL's forced stack unwinding on cancellation does not * permit catching with an ellipsis argument without rethrowing, and * even if it did permit it, the result would be an unreported error). * Neither POSIX nor the current C++98/03 standard specifies what is * to happen in that case. In practice, most implementations will * call std::terminate() and so terminate the entire program. * Accordingly, a user must make sure that no exceptions, other than * Thread::Exit or any cancellation pseudo-exception, can propagate * from the function executed by the new thread. */ static std::auto_ptr start(const Cgu::Callback::Callback* cb, bool joinable); #ifdef CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT CGU_GLIB_MEMORY_SLICES_FUNCS #endif }; /** * @class Cgu::Thread::JoinableHandle thread.h c++-gtk-utils/thread.h * @brief A class wrapping a Thread::Thread object representing a * joinable thread. * @sa Thread::Thread Thread::Future * * This class enables a joinable thread to be made more easily * exception safe. It can also be used to provide that a joinable * thread is not detached or joined while other methods dependent on * that might still be called, and to provide a defined result where * there are multiple calls to join() and/or detach(). When it is * destroyed, it will either detach or join the thread represented by * the wrapped Thread::Thread object unless it has previously been * detached or joined using the detach() or join() methods, so * avoiding thread resource leaks. Whether it will detach() or join() * on destruction depends on the Thread::JoinableHandle::Action * argument passed to the * Thread::JoinableHandle::JoinableHandle(std::auto_ptr, * Action) constructor. * * Passing Thread::JoinableHandle::detach_on_exit to that argument is * not always the correct choice where the thread callback has been * bound to a reference argument in local scope and an exception might * be thrown, because the thread will keep running after the * Thread::JoinableHandle object and other local variables have * (because of the exception) gone out of scope. Consider the * following trivial parallelized calculation example: * * @code * std::vector get_readings(); * void get_mean(const std::vector& v, int& result); * void get_std_deviation(const std::vector& v, int& result); // might throw * void show_result(int mean, int deviation); * * using namespace Cgu; * void do_calc() { * int i, j; * std::vector v = get_readings(); * // with bound reference arguments, Callback::make() requires explicit type instantation * std::auto_ptr t = * Thread::Thread::start(Callback::make&, int&>(&get_mean, v, i), true); * if (t.get()) { // checks whether thread started correctly * get_std_deviation(v, j); * t->join(); * show_result(i, j); * } * } * @endcode * * If get_std_deviation() throws, as well as there being a potential * thread resource leak by virtue of no join being made, the thread * executing get_mean() will continue running and attempt to access * variable v, and put its result in variable i, which may by then * both be out of scope. To deal with such a case, the thread could * be wrapped in a Thread::JoinableHandle object which joins on exit * rather than detaches, for example: * * @code * ... * using namespace Cgu; * void do_calc() { * int i, j; * std::vector v = get_readings(); * // with reference arguments, Callback::make() requires explicit type instantation * Thread::JoinableHandle t(Thread::Thread::start(Callback::make&, int&>(&get_mean, v, i), true), * Thread::JoinableHandle::join_on_exit); * if (t.is_managing()) { // checks whether thread started correctly * get_std_deviation(v, j); * t.join(); * show_result(i, j); * } * } * @endcode * * Better still, however, would be to use Cgu::Thread::Future in this * kind of usage, namely a usage where a worker thread is intended to * provide a result for inspection. * * @note These examples assume that the std::vector library * implementation permits concurrent reads of a vector object by * different threads. Whether that is the case depends on the * documentation of the library concerned (if designed for a * multi-threaded environment, most will permit this). */ class JoinableHandle { public: enum Action {detach_on_exit, join_on_exit}; private: Mutex mutex; // make this the first member so the constructors are strongly exception safe Action action; bool detached; std::auto_ptr thread_a; public: /** * Cancels the thread represented by the wrapped Thread::Thread * object. It can be called by any thread. The effect is undefined * if when called the thread represented by the wrapped Thread::Thread * object has both (a) already terminated and (b) had a call to join() * or detach() made for it. Accordingly, if the user is not able to * establish from the program logic whether the thread has terminated, * cancel() must not be called after a call to detach() has been made * or a call to join() has returned: this can be ensured by only * detaching or joining via this object's destructor (that is, by not * using the explicit detach() and join() methods). This method does * not throw. * @note Use this method with great care - see Thread::cancel() for * further information. * * Since 1.0.2 */ void cancel(); /** * Joins the thread represented by the wrapped Thread::Thread object * (that is, waits for it to terminate), unless the detach() or join() * method has previously been called in which case this call does * nothing. It can be called by any thread other than the one * represented by the wrapped Thread::Thread object, but only one * thread can wait on it: if one thread (thread A) calls it while * another thread (thread B) is already blocking on it, thread A's * call to this method will return immediately and return false. It * does not throw. * @return true if a successful join() has been accomplished (that is, * detach() or join() have not previously been called), otherwise * false. * * Since 1.0.2 */ bool join(); /** * Detaches the thread represented by this Thread::Thread object, so * as to make it unjoinable, unless the detach() or join() method has * previously been called in which case this call does nothing. It * does not throw. * * Since 1.0.2 */ void detach(); /** * Specifies whether the calling thread is the same thread as is * represented by the wrapped Thread::Thread object. It can be called * by any thread. The effect is undefined if the thread represented * by the wrapped Thread::Thread object has both (a) already * terminated and (b) had a call to join() or detach() made for it. * Accordingly, if the user is not able to establish from the program * logic whether the thread has terminated, is_caller() must not be * called after a call to detach() has been made or a call to join() * has returned: this can be ensured by only detaching or joining via * this object's destructor (that is, by not using the explicit * detach() and join() methods). This method does not throw. * @return Returns true if the caller is in the thread represented by * the wrapped Thread::Thread object. If not, or this JoinableHandle * does not wrap any Thread object, then returns false. * * Since 1.0.2 */ bool is_caller(); /** * Specifies whether this JoinableHandle object has been initialized * with a Thread::Thread object representing a correctly started * thread in respect of which neither JoinableHandle::detach() nor * JoinableHandle::join() has been called. It can be called by any * thread. It is principally intended to enable the constructor * taking a std::auto_ptr object to be directly * initialized by a call to Thread::Thread::start(), by providing a * means for the thread calling Thread::Thread::start() to check * afterwards that the new thread did, in fact, start correctly. Note * that this method will return true even after the thread has * finished, provided neither the join() nor detach() method has been * called. * @return Returns true if this object has been initialized by a * Thread::Thread object representing a correctly started thread in * respect of which neither JoinableHandle::detach() nor * JoinableHandle::join() has been called, otherwise false. * * Since 1.2.0 */ bool is_managing(); /** * Moves one JoinableHandle object to another JoinableHandle object. * This is a move operation which transfers ownership to the assignee, * as the handles store their Thread::Thread object by * std::auto_ptr<>. Any existing thread managed by the assignee prior * to the move will be detached if it has not already been detached or * joined. This method is thread safe. It will not throw. * @param h The assignor/movant, which will cease to hold a valid * Thread::Thread object after the move has taken place. * @return A reference to the assignee JoinableHandle object after * assignment. * * Since 1.0.2 */ JoinableHandle& operator=(JoinableHandle& h); /** * This constructor initializes a new JoinableHandle object with a * std::auto_ptr object, as provided by * Thread::Thread::start(). This is a move operation which transfers * ownership to the new object. * @param thread The initializing Thread::Thread object (which must * have been created as joinable) passed by a std::auto_ptr smart * pointer. The std::auto_ptr smart pointer will cease to hold a * valid Thread::Thread object after the initialization has taken * place. * @param act Either Thread::JoinableHandle::detach_on_exit (which * will cause the destructor to detach the thread if it has not * previously been detached or joined) or * Thread::JoinableHandle::join_on_exit (which will cause the * destructor to join the thread if it has not previously been * detached or joined). * @exception Cgu::Thread::MutexError Throws this exception if * initialization of the internal mutex fails. The constructor is * strongly exception safe: if Cgu::Thread::MutexError is thrown, the * initializing std::auto_ptr object will be left * unchanged. (It is often not worth checking for this exception, as * it means either memory is exhausted or pthread has run out of other * resources to create new mutexes.) * @note It is not necessary to check that the thread parameter * represents a correctly started thread (that is, that thread.get() * does not return 0) before this constructor is invoked, because that * can be done after construction by calling * JoinableHandle::is_managing() (a JoinableHangle object can safely * handle a case where thread.get() does return 0). This enables a * JoinableHandle object to be directly initialized by this * constructor from a call to Thread::Thread::start(). * @sa JoinableHandle::is_managing(). * * Since 1.0.2 */ JoinableHandle(std::auto_ptr thread, Action act): action(act), detached(false), thread_a(thread) {} /** * This constructor initializes a new JoinableHandle object with an * existing JoinableHandle object. This is a move operation which * transfers ownership to the new object. * @param h The intitializing JoinableHandle object, which will cease * to hold a valid Thread::Thread object after the initialization has * taken place. * @exception Cgu::Thread::MutexError Throws this exception if * initialization of the internal mutex fails. The constructor is * strongly exception safe: if Cgu::Thread::MutexError is thrown, the * initializing Cgu::Thread::JoinableHandle object will be left * unchanged. (It is often not worth checking for this exception, as * it means either memory is exhausted or pthread has run out of other * resources to create new mutexes.) * * Since 1.0.2 */ JoinableHandle(JoinableHandle& h): action(h.action), detached(h.detached), thread_a(h.thread_a) {} /** * The destructor will detach a managed thread (if the * Thread::JoinableHandle::detach_on_exit flag is set) or join it (if * the Thread::JoinableHandle::join_on_exit flag is set), unless it * has previously been detached or joined with the detach() or join() * methods. The destructor is thread safe (any thread may destroy the * JoinableHandle object). The destructor will not throw. * * Since 1.0.2 */ ~JoinableHandle(); /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class CancelBlock thread.h c++-gtk-utils/thread.h * @brief A class enabling the cancellation state of a thread to be * controlled. * * A class enabling the cancellation state of a thread to be * controlled, so as to provide exception safe cancellation state * changes. When the object goes out of scope, cancellation state is * returned to the state it was in prior to its construction. */ class CancelBlock { int starting_state; // CancelBlocks cannot be copied CancelBlock(const CancelBlock&); CancelBlock& operator=(const CancelBlock&); public: /** * Makes the thread uncancellable, even if the code passes through a * cancellation point, while the CancelBlock object exists (when the * CancelBlock object ceases to exist, cancellation state is returned * to the state prior to it being constructed). It should only be * called by the thread which created the CancelBlock object. This * method will not throw. * @param old_state Indicates the cancellation state of the calling * thread immediately before this call to block() was made, either * PTHREAD_CANCEL_ENABLE (if the thread was previously cancellable) or * PTHREAD_CANCEL_DISABLE (if this call did nothing because the thread * was already uncancellable). * @return 0 if successful, else a value other than 0. */ static int block(int& old_state) {return pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_state);} /** * Makes the thread uncancellable, even if the code passes through a * cancellation point, while the CancelBlock object exists (when the * CancelBlock object ceases to exist, cancellation state is returned * to the state prior to it being constructed). It should only be * called by the thread which created the CancelBlock object. This * method will not throw. * @return 0 if successful, else a value other than 0. */ static int block() {int old_state; return block(old_state);} /** * Makes the thread cancellable while the CancelBlock object exists * (when the CancelBlock object ceases to exist, cancellation state is * returned to the state prior to it being constructed). It should * only be called by the thread which created the CancelBlock object. * This method will not throw. * @param old_state Indicates the cancellation state of the calling * thread immediately before this call to unblock() was made, either * PTHREAD_CANCEL_DISABLE (if the thread was previously uncancellable) * or PTHREAD_CANCEL_ENABLE (if this call did nothing because the * thread was already cancellable). * @return 0 if successful, else a value other than 0. */ static int unblock(int& old_state) {return pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_state);} /** * Makes the thread cancellable while the CancelBlock object exists * (when the CancelBlock object ceases to exist, cancellation state is * returned to the state prior to it being constructed). It should * only be called by the thread which created the CancelBlock object. * This method will not throw. * @return 0 if successful, else a value other than 0. */ static int unblock() {int old_state; return unblock(old_state);} /** * Restores cancallation state to the state it was in immediately * before this CancelBlock object was constructed. It should only be * called by the thread which created the CancelBlock object. This * method will not throw. * @param old_state Indicates the cancellation state of the calling * thread immediately before this call to restore() was made, either * PTHREAD_CANCEL_DISABLE (if the thread was previously uncancellable) * or PTHREAD_CANCEL_ENABLE (if this thread was previously * cancellable). * @return 0 if successful, else a value other than 0. * * Since 0.9.1 */ int restore(int& old_state) {return pthread_setcancelstate(starting_state, &old_state);} /** * Restores cancallation state to the state it was in immediately * before this CancelBlock object was constructed. It should only be * called by the thread which created the CancelBlock object. This * method will not throw. * @return 0 if successful, else a value other than 0. * * Since 0.9.1 */ int restore() {int old_state; return restore(old_state);} /** * The constructor will not throw. * @param blocking Whether the CancelBlock object should start * in blocking mode. */ CancelBlock(bool blocking = true); /** * The destructor will put the thread in the cancellation state that * it was in immediately before the CancelBlock object was constructed * (which might be blocking). It will not throw. * * This behaviour is from version 0.9.1. In version 0.9.0 * cancellation state was always made non-blocking by the destructor. */ ~CancelBlock() {restore();} /* Only has effect if --with-glib-memory-slices-compat or * --with-glib-memory-slices-no-compat option picked */ CGU_GLIB_MEMORY_SLICES_FUNCS }; /** * @class Exit thread.h c++-gtk-utils/thread.h * @brief A class which can be thrown to terminate the throwing * thread. * * This class can be thrown (instead of calling pthread_exit()) when a * thread wishes to terminate itself and also ensure stack unwinding, * so that destructors of local objects are called. It is caught * automatically by the implementation of Cgu::Thread::Thread::start() * so that it will only terminate the thread throwing it and not the * whole process. See the Cgu::Thread::Thread::cancel() method above, * for use when a thread wishes to terminate another one, and the * caveats on the use of Cgu::Thread::Thread::cancel(). */ class Exit {}; } // namespace Thread } // namespace Cgu #endif efax-gtk-3.2.8/src/internal/c++-gtk-utils/application.cpp0000644000175000001440000001225111544200716020053 00000000000000/* Copyright (C) 2011 Chris Vine The library comprised in this file or of which this file is part is distributed by Chris Vine under the GNU Lesser General Public License as follows: This 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. 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 Lesser General Public License, version 2.1, for more details. You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this library (see the file LGPL.TXT which came with this source code package in the c++-gtk-utils sub-directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA, 02111-1307, USA. */ #include #include #include #include #include #include #if GTK_CHECK_VERSION(2,99,0) #define CGU_ID_PREFIX "org.cgu.applications" // the GObject callback functions with both C linkage // specification and internal linkage extern "C" { static void cgu_application_activate(GApplication*, void* data) { Cgu::Application* app = static_cast(data); // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { app->activate.emit(app); } // we can't propagate exceptions from functions with C linkage. catch (...) { g_critical("Exception thrown in cgu_application_activate()\n"); } } static void cgu_application_startup(GApplication*, void* data) { Cgu::Application* app = static_cast(data); // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { app->startup.emit(app); } // we can't propagate exceptions from functions with C linkage. catch (...) { g_critical("Exception thrown in cgu_application_startup()\n"); } } static gint cgu_application_command_line(GApplication*, GApplicationCommandLine* cl, void* data) { gint ret = 0; Cgu::Application* app = static_cast(data); // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { app->command_line.emit(app, cl, ret); } // we can't propagate exceptions from functions with C linkage. catch (...) { g_critical("Exception thrown in cgu_application_command_line()\n"); ret = -1; } return ret; } static void cgu_application_open(GApplication*, GFile** files, gint n_files, gchar* hint, void* data) { Cgu::Application* app = static_cast(data); // provide a CancelBlock here to make this function NPTL friendly, // as we have a catch-all without rethrowing Cgu::Thread::CancelBlock b; try { app->open.emit(app, std::pair(files, n_files), hint); } // we can't propagate exceptions from functions with C linkage. catch (...) { g_critical("Exception thrown in cgu_application_open()\n"); } } } // extern "C" namespace Cgu { void Application::add(Cgu::WinBase* win) { // this is superstition: I think gtk_application_add_window() and // gtk_window_set_application() do the same thing, but the // documentation is too poor to be sure if (win_list.empty()) { win_list.push_back(win); win->set_application(this); gtk_window_set_application(win->get_win(), app); } else { win_list.push_back(win); win->set_application(this); gtk_application_add_window(app, win->get_win()); } } bool Application::remove(WinBase* win) { bool ret = false; std::list::iterator iter = std::find(win_list.begin(), win_list.end(), win); if (iter != win_list.end()) { win_list.erase(iter); win->unset_application(); gtk_application_remove_window(app, win->get_win()); ret = true; } return ret; } Application::Application(const char* prog_name, GApplicationFlags flags) { GcharScopedHandle id(g_strdup_printf("%s.%s", CGU_ID_PREFIX, prog_name)); if (!g_application_id_is_valid(id)) throw ApplicationNameError(); app.reset(gtk_application_new(id, flags)); g_signal_connect(G_OBJECT(app.get()), "activate", G_CALLBACK(cgu_application_activate), this); g_signal_connect(G_OBJECT(app.get()), "startup", G_CALLBACK(cgu_application_startup), this); g_signal_connect(G_OBJECT(app.get()), "command_line", G_CALLBACK(cgu_application_command_line), this); g_signal_connect(G_OBJECT(app.get()), "open", G_CALLBACK(cgu_application_open), this); } } // namespace Cgu #endif // GTK_CHECK_VERSION(2,99,0) efax-gtk-3.2.8/src/internal/Makefile.am0000644000175000001440000000016211466007653014615 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = @COND_INTERNAL@ DIST_SUBDIRS = c++-gtk-utils efax-gtk-3.2.8/src/fax_list_manager.h0000644000175000001440000001152611466007653014427 00000000000000/* Copyright (C) 2001 to 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef FAX_LIST_MANAGER_H #define FAX_LIST_MANAGER_H #include "prog_defs.h" #include #include #include #include #include #include #include #include #include "utils/tree_row_reference_handle.h" #include "utils/selected_rows_handle.h" #include #include #include typedef std::map > FolderRowToFaxModelMap; typedef std::map PathToFolderRowMap; /* The following typedefs are in selected_rows_handle.h typedef std::list RowPathList; typedef std::list RowRefList; */ namespace FaxListEnum { enum Mode {received = 0, sent}; } class FolderNameValidator { std::set folder_set; public: void clear(void) {folder_set.clear();} void insert_folder_name(const std::string& name) {folder_set.insert(name);} void erase_folder_name(const std::string& name) {folder_set.erase(name);} std::pair validate(const std::string&); }; class FaxListManager { static bool fax_received_list_main_iteration; static bool fax_sent_list_main_iteration; static GtkSortType list_sort_type[FaxListEnum::sent + 1]; FaxListEnum::Mode mode; guint timer_tag; static const int target_size = 2; ScopedHandle target_0; ScopedHandle target_1; GtkTargetEntry target_array[target_size]; bool folder_drag_source_enabled; bool fax_drag_source_enabled; GtkTreeIter folder_drag_source_row_iter; RowRefList fax_drag_source_row_refs; bool drag_is_fax; GtkTreeView* folder_tree_view_p; GtkTreeView* fax_tree_view_p; GtkTreeViewColumn* fax_date_column_p; GobjHandle folder_tree_store_h; GobjHandle fax_base_model_h; FolderRowToFaxModelMap folder_row_to_fax_model_map; GobjHandle folder_icon_h; GobjHandle trash_icon_h; TreeRowRefSharedHandle trash_row_ref_h; FolderNameValidator folder_name_validator; std::string get_pathname_for_folder(const GtkTreeIter*); void populate_fax_list(void); bool get_folders(PathToFolderRowMap&, const std::string&); void insert_fax_on_populate(const PathToFolderRowMap&, std::ifstream&, const std::string&, const std::string&); void move_fax(const GtkTreeIter*); void move_folder(GtkTreeIter*, GtkTreeViewDropPosition); void move_child_folders_for_level(GtkTreeIter*, GtkTreeIter*); bool is_valid_drop_path(const std::string&, const std::string&); void display_faxes(void); void write_path(void); void write_paths_for_level(const GtkTreeIter*, std::ofstream&); std::string convert_faxname_to_date(const std::string&); void write_path_timer_cb(bool&) {write_path();} public: class CB; friend class CB; Emitter selection_notify; Emitter fax_double_click_notify; void insert_folder_tree_view(GtkContainer* container_p) { gtk_container_add(container_p, GTK_WIDGET(folder_tree_view_p)); } void insert_fax_tree_view(GtkContainer* container_p) { gtk_container_add(container_p, GTK_WIDGET(fax_tree_view_p)); } void delete_fax(void); void delete_folder(void); std::pair is_folder_name_valid(const std::string& folder_name) { return folder_name_validator.validate(folder_name); } void make_folder(const std::string&, bool test_valid = true); void describe_fax(const std::string&); void empty_trash_folder(void); void insert_new_fax_in_base(const std::string&, const std::string&); RowPathList::size_type is_fax_selected(void); bool is_folder_selected(void); bool is_selected_folder_empty(void); bool is_selected_folder_permanent(void); bool show_trash_folder_icon(void); bool are_selected_faxes_in_trash_folder(void); void move_selected_faxes_to_trash_folder(void); static bool is_fax_received_list_main_iteration(void) {return fax_received_list_main_iteration;} static bool is_fax_sent_list_main_iteration(void) {return fax_sent_list_main_iteration;} static GtkSortType get_received_list_sort_type(void) {return list_sort_type[FaxListEnum::received];} static GtkSortType get_sent_list_sort_type(void) {return list_sort_type[FaxListEnum::sent];} static void set_received_list_sort_type(GtkSortType val) {list_sort_type[FaxListEnum::received] = val;} static void set_sent_list_sort_type(GtkSortType val) {list_sort_type[FaxListEnum::sent] = val;} GcharSharedHandle get_fax_number(void); GcharSharedHandle get_fax_description(void); GcharSharedHandle get_folder_name(void); FaxListManager(FaxListEnum::Mode); ~FaxListManager(void); }; #endif efax-gtk-3.2.8/src/fax_list_manager.cpp0000644000175000001440000022115111512434320014742 00000000000000/* Copyright (C) 2001 to 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include #include #include #include #include #include #include "fax_list_manager.h" #include "fax_list_manager_icons.h" #include "utils/tree_path_handle.h" #if GTK_CHECK_VERSION(2,99,0) #include "utils/cairo_handle.h" #endif #include #include #ifdef ENABLE_NLS #include #endif #define PATH_DIVIDER '@' #define DRAG_KEY_STRING "xXefax-gtkXx" #define WRITE_PATH_TIMER_INTERVAL 300000 // number of milliseconds between flushing of logfile // = 5 minutes // strptime() is a POSIX rather than standard C function so it may not // be declared in : so declare it here (with C linkage) extern "C" char* strptime(const char*, const char*, struct std::tm*); bool FaxListManager::fax_received_list_main_iteration = false; bool FaxListManager::fax_sent_list_main_iteration = false; GtkSortType FaxListManager::list_sort_type[FaxListEnum::sent + 1] = {GTK_SORT_ASCENDING, GTK_SORT_ASCENDING}; namespace { namespace FolderListModelColumns { enum {icon, name, root_only, cols_num}; } namespace FaxListModelColumns { enum {fax_date, fax_description, name, cols_num}; } } // anonymous namespace std::pair FolderNameValidator::validate(const std::string& folder_name) { std::pair return_val; if (folder_name.find(PATH_DIVIDER) != std::string::npos) { return_val.first = false; return_val.second = gettext("Folder name cannot contain character: "); return_val.second += PATH_DIVIDER; } else { std::pair::iterator, bool> result = folder_set.insert(folder_name); // we only want a return value - erase the element if the insert succeeded if ((return_val.first = result.second)) folder_set.erase(folder_name); else { return_val.second = gettext("The following folder already exists: "); return_val.second += folder_name; } } return return_val; } class FaxListManager::CB { public: static void folder_tree_view_drag_begin(GdkDragContext* context_p, void* data) { FaxListManager* instance_p = static_cast(data); instance_p->drag_is_fax = false; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(instance_p->folder_tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &instance_p->folder_drag_source_row_iter)) { GtkTreeViewColumn* column_p = gtk_tree_view_get_column(instance_p->folder_tree_view_p, 0); gint x_off, y_off, cell_width, cell_height; GdkRectangle cell_area; gtk_tree_view_column_cell_get_size(column_p, &cell_area, &x_off, &y_off, &cell_width, &cell_height); if (cell_height < 0) cell_height = 0; TreePathScopedHandle path_h(gtk_tree_model_get_path(model_p, &instance_p->folder_drag_source_row_iter)); #if GTK_CHECK_VERSION(2,99,0) CairoSurfaceScopedHandle icon_h(gtk_tree_view_create_row_drag_icon(instance_p->folder_tree_view_p, path_h)); cairo_surface_set_device_offset(icon_h, -5, -cell_height/2); gtk_drag_set_icon_surface(context_p, icon_h); #else // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle icon_h(gtk_tree_view_create_row_drag_icon(instance_p->folder_tree_view_p, path_h)); GdkColormap* colormap_p = gtk_widget_get_default_colormap(); gtk_drag_set_icon_pixmap(context_p, colormap_p, icon_h, 0, 5, cell_height/2); #endif } } static void fax_tree_view_drag_begin(GdkDragContext* context_p, void* data) { FaxListManager* instance_p = static_cast(data); instance_p->drag_is_fax = true; SelectedRowsHandle rows_handle(instance_p->fax_tree_view_p); rows_handle.get_ref_list(gtk_tree_view_get_model(instance_p->fax_tree_view_p), instance_p->fax_drag_source_row_refs); // if we are dragging only one row, provide a row icon, but otherwise // use the generic GTK+ drag icon if (rows_handle.size() == 1 && gtk_tree_row_reference_valid(instance_p->fax_drag_source_row_refs.front())) { GtkTreeViewColumn* column_p = gtk_tree_view_get_column(instance_p->fax_tree_view_p, 0); gint x_off, y_off, cell_width, cell_height; GdkRectangle cell_area; gtk_tree_view_column_cell_get_size(column_p, &cell_area, &x_off, &y_off, &cell_width, &cell_height); gint x_pos; gtk_widget_get_pointer(GTK_WIDGET(instance_p->fax_tree_view_p), &x_pos, 0); if (cell_height < 0) cell_height = 0; if (x_pos < 0) x_pos = 0; #if GTK_CHECK_VERSION(2,99,0) CairoSurfaceScopedHandle icon_h(gtk_tree_view_create_row_drag_icon(instance_p->fax_tree_view_p, rows_handle.front())); cairo_surface_set_device_offset(icon_h, -x_pos, -cell_height/2); gtk_drag_set_icon_surface(context_p, icon_h); #else // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle icon_h(gtk_tree_view_create_row_drag_icon(instance_p->fax_tree_view_p, rows_handle.front())); GdkColormap* colormap_p = gtk_widget_get_default_colormap(); gtk_drag_set_icon_pixmap(context_p, colormap_p, icon_h, 0, x_pos, cell_height/2); #endif } } static gboolean drag_motion(GdkDragContext* context_p, gint x, gint y, guint time, void* data) { FaxListManager* instance_p = static_cast(data); bool return_val; GtkTreePath* path_p = 0; GtkTreeViewDropPosition drop_pos; if (gtk_tree_view_get_dest_row_at_pos(instance_p->folder_tree_view_p, x, y, &path_p, &drop_pos) && path_p) { // wrap path_p in a TreePathScopedHandle object // so we do not need to delete it by hand TreePathScopedHandle path_h(path_p); path_p = 0; // we don't need it any more if (instance_p->drag_is_fax) { gtk_tree_view_set_drag_dest_row(instance_p->folder_tree_view_p, path_h, GTK_TREE_VIEW_DROP_INTO_OR_AFTER); } else { gtk_tree_view_set_drag_dest_row(instance_p->folder_tree_view_p, path_h, drop_pos); } gdk_drag_status(context_p, GDK_ACTION_MOVE, time); return_val = true; } else { gdk_drag_status(context_p, GdkDragAction(0), time); return_val = false; } return return_val; } static gboolean folder_tree_view_motion_notify(GdkEventMotion* event_p, void* data) { FaxListManager* instance_p = static_cast(data); gint x, y; gtk_tree_view_convert_bin_window_to_widget_coords(instance_p->folder_tree_view_p, event_p->x, event_p->y, &x, &y); if (x >= 0 && y >= 0) { bool result = gtk_tree_view_get_dest_row_at_pos(instance_p->folder_tree_view_p, x, y, 0, 0); if (result && !instance_p->folder_drag_source_enabled) { gtk_drag_source_set(GTK_WIDGET(instance_p->folder_tree_view_p), GDK_MODIFIER_MASK, instance_p->target_array, instance_p->target_size, GDK_ACTION_MOVE); instance_p->folder_drag_source_enabled = true; } else if (!result && instance_p->folder_drag_source_enabled) { gtk_drag_source_unset(GTK_WIDGET(instance_p->folder_tree_view_p)); instance_p->folder_drag_source_enabled = false; } } return false; } static gboolean fax_tree_view_motion_notify(GdkEventMotion* event_p, void* data) { FaxListManager* instance_p = static_cast(data); gint x, y; gtk_tree_view_convert_bin_window_to_widget_coords(instance_p->fax_tree_view_p, event_p->x, event_p->y, &x, &y); if (x >= 0 && y >= 0) { bool result = gtk_tree_view_get_dest_row_at_pos(instance_p->fax_tree_view_p, x, y, 0, 0); if (result && !instance_p->fax_drag_source_enabled) { gtk_drag_source_set(GTK_WIDGET(instance_p->fax_tree_view_p), GDK_MODIFIER_MASK, instance_p->target_array, instance_p->target_size, GDK_ACTION_MOVE); instance_p->fax_drag_source_enabled = true; } else if (!result && instance_p->fax_drag_source_enabled) { gtk_drag_source_unset(GTK_WIDGET(instance_p->fax_tree_view_p)); instance_p->fax_drag_source_enabled = false; } } return false; } static gboolean fax_tree_view_mouse_click(GdkEventButton* event_p, void* data) { FaxListManager* instance_p = static_cast(data); // we can use fax_drag_source_enabled as a proxy for whether the pointer // is over a selectable (and so selected) row in the tree view when // a double click occurs if (event_p->type == GDK_2BUTTON_PRESS && instance_p->fax_drag_source_enabled) { instance_p->fax_double_click_notify(); } return false; } static void drag_data_get(GtkSelectionData* selection_data_p) { // all we do in this method is to set up an identification string (DRAG_KEY_STRING) // so that drags not originating in this program can be ignored. The data which // is dragged is placed in FaxListManager::folder_drag_source_row_iter in method // FaxListManager::CB::folder_tree_view_drag_begin() (for a folder drag) and in // FaxListManager::fax_drag_source_row_refs in method // FaxListManager::CB::fax_tree_view_drag_begin() (for a fax drag), rather than in // this method. We can therefore use this method for drags from both the folder tree // view and the fax tree view. The method FaxListManager::CB::drag_data_received() // tests for this identification string when a drag is received by the folder tree // view (the fax tree view does not receive drags, it only sources them, whereas the // folder tree view both receives and sources drags). const std::string message(DRAG_KEY_STRING); #if GTK_CHECK_VERSION(2,14,0) gtk_selection_data_set(selection_data_p, gtk_selection_data_get_target(selection_data_p), 8, (const guchar*)message.c_str(), message.size() + 1); #else gtk_selection_data_set(selection_data_p, selection_data_p->target, 8, (const guchar*)message.c_str(), message.size() + 1); #endif } static void drag_data_received(GdkDragContext* context_p, gint x, gint y, GtkSelectionData* selection_data_p, guint time, void* data) { FaxListManager* instance_p = static_cast(data); bool success = false; std::string message; #if GTK_CHECK_VERSION(2,14,0) if(gtk_selection_data_get_length(selection_data_p) >= 0 && gtk_selection_data_get_format(selection_data_p) == 8) { message = (const char*)gtk_selection_data_get_data(selection_data_p); } #else if(selection_data_p->length >= 0 && selection_data_p->format == 8) { message = (const char*)selection_data_p->data; } #endif if (message.find(DRAG_KEY_STRING) != std::string::npos) { GtkTreePath* path_p = 0; GtkTreeViewDropPosition drop_pos; if (gtk_tree_view_get_dest_row_at_pos(instance_p->folder_tree_view_p, x, y, &path_p, &drop_pos) && path_p) { // wrap path_p in a TreePathScopedHandle object // so we do not need to delete it by hand TreePathScopedHandle path_h(path_p); path_p = 0; // we don't need it any more GtkTreeIter iter; if (gtk_tree_model_get_iter(instance_p->folder_tree_store_h, &iter, path_h)) { if (instance_p->drag_is_fax) instance_p->move_fax(&iter); else instance_p->move_folder(&iter, drop_pos); success = true; } else write_error("Invalid iterator in FaxListManager::CB::drag_data_received()\n"); } } gtk_drag_finish(context_p, success, false, time); } static void fax_selected(void* data) { static_cast(data)->selection_notify(); } static void folder_selected(void* data) { FaxListManager* instance_p = static_cast(data); // display_faxes() needs to be called first before selection_notify // emitter is emitted so that the correct fax tree model is in // position before the functor connected to the emitter is executed instance_p->display_faxes(); instance_p->selection_notify(); } static void toggle_sort_type(void* data) { FaxListManager* instance_p = static_cast(data); if (instance_p->list_sort_type[instance_p->mode] == GTK_SORT_ASCENDING) instance_p->list_sort_type[instance_p->mode] = GTK_SORT_DESCENDING; else instance_p->list_sort_type[instance_p->mode] = GTK_SORT_ASCENDING; FolderRowToFaxModelMap::const_iterator iter; for (iter = instance_p->folder_row_to_fax_model_map.begin(); iter != instance_p->folder_row_to_fax_model_map.end(); ++iter) { gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(iter->second.get()), FaxListModelColumns::name, instance_p->list_sort_type[instance_p->mode]); } // this doesn't control the sort order (the call to gtk_tree_sortable_set_sort_column_id() // did that) - it just sets the direction that the arrow in the tree view shows! gtk_tree_view_column_set_sort_order(instance_p->fax_date_column_p, instance_p->list_sort_type[instance_p->mode]); } }; extern "C" { static void folder_tree_view_drag_begin_cb(GtkWidget*, GdkDragContext* context_p, void* data) { FaxListManager::CB::folder_tree_view_drag_begin(context_p, data); } static void fax_tree_view_drag_begin_cb(GtkWidget*, GdkDragContext* context_p, void* data) { FaxListManager::CB::fax_tree_view_drag_begin(context_p, data); } static gboolean drag_motion_cb(GtkWidget*, GdkDragContext* context_p, gint x, gint y, guint time, void* data) { return FaxListManager::CB::drag_motion(context_p, x, y, time, data); } static gboolean folder_tree_view_motion_notify_cb(GtkWidget*, GdkEventMotion* event_p, void* data) { return FaxListManager::CB::folder_tree_view_motion_notify(event_p, data); } static gboolean fax_tree_view_motion_notify_cb(GtkWidget*, GdkEventMotion* event_p, void* data) { return FaxListManager::CB::fax_tree_view_motion_notify(event_p, data); } static gboolean fax_tree_view_mouse_click_cb(GtkWidget*, GdkEventButton* event_p, void* data) { return FaxListManager::CB::fax_tree_view_mouse_click(event_p, data); } static void drag_data_get_cb(GtkWidget*, GdkDragContext*, GtkSelectionData* selection_data_p, guint, guint, void*) { FaxListManager::CB::drag_data_get(selection_data_p); } static void drag_data_received_cb(GtkWidget*, GdkDragContext* context_p, gint x, gint y, GtkSelectionData* selection_data_p, guint, guint time, void* data) { FaxListManager::CB::drag_data_received(context_p, x, y, selection_data_p, time, data); } static void fax_selected_cb(GtkTreeSelection*, void* data) { FaxListManager::CB::fax_selected(data); } static void folder_selected_cb(GtkTreeSelection*, void* data) { FaxListManager::CB::folder_selected(data); } static void toggle_sort_type_cb(GtkTreeViewColumn*, void* data) { FaxListManager::CB::toggle_sort_type(data); } } // extern "C" FaxListManager::FaxListManager(FaxListEnum::Mode mode_): mode(mode_), target_0(new char[std::strlen("STRING") + 1]), target_1(new char[std::strlen("text/plain") + 1]), folder_drag_source_enabled(false), fax_drag_source_enabled(false) { // set up target_array for drag and drop // as we set the flags member to GTK_TARGET_SAME_APP we can probably omit the key // DRAG_KEY_STRING std::strcpy(target_0.get(), "STRING"); std::strcpy(target_1.get(), "text/plain"); target_array[0].target = (gchar*)target_0.get(); target_array[0].flags = GTK_TARGET_SAME_APP; target_array[0].info = 0; target_array[1].target = (gchar*)target_1.get(); target_array[1].flags = GTK_TARGET_SAME_APP; target_array[1].info = 0; // create icons // GdkPixbufs are not owned by a GTK+ container when passed to it so use GobjHandles folder_icon_h = GobjHandle(gdk_pixbuf_new_from_xpm_data(folder_xpm)); folder_icon_h = GobjHandle(gdk_pixbuf_scale_simple(folder_icon_h, 14, 14, GDK_INTERP_BILINEAR)); trash_icon_h = GobjHandle(gdk_pixbuf_new_from_xpm_data(trash_xpm)); trash_icon_h = GobjHandle(gdk_pixbuf_scale_simple(trash_icon_h, 14, 16, GDK_INTERP_BILINEAR)); // create the tree model for the folders and put it in a GobjHandle to handle // its lifetime, because it is not owned by a GTK+ container folder_tree_store_h = GobjHandle(GTK_TREE_MODEL(gtk_tree_store_new(FolderListModelColumns::cols_num, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_BOOLEAN))); // make the folder tree view column, pack the two renderers into it // and connect them to the model columns GtkTreeViewColumn* column_p = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(column_p, gettext("Folder")); GtkCellRenderer* renderer_p = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column_p, renderer_p, false); gtk_tree_view_column_set_attributes(column_p, renderer_p, "pixbuf", FolderListModelColumns::icon, static_cast(0)); renderer_p = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column_p, renderer_p, true); gtk_tree_view_column_set_attributes(column_p, renderer_p, "text", FolderListModelColumns::name, static_cast(0)); // create the folder tree view folder_tree_view_p = GTK_TREE_VIEW(gtk_tree_view_new_with_model(folder_tree_store_h)); // add the folder tree view column to the folder tree view gtk_tree_view_append_column(folder_tree_view_p, column_p); GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); // single line selection gtk_tree_selection_set_mode(selection_p, GTK_SELECTION_SINGLE); // create the fax tree view fax_tree_view_p = GTK_TREE_VIEW(gtk_tree_view_new()); // provide renderers for fax tree view, pack into the fax tree view columns // and connect to the fax tree model columns renderer_p = gtk_cell_renderer_text_new(); fax_date_column_p = gtk_tree_view_column_new_with_attributes(gettext("Date"), renderer_p, "text", FaxListModelColumns::fax_date, static_cast(0)); // make the Date column clickable gtk_tree_view_column_set_clickable(fax_date_column_p, true); g_signal_connect(G_OBJECT(fax_date_column_p), "clicked", G_CALLBACK(toggle_sort_type_cb), this); gtk_tree_view_append_column(fax_tree_view_p, fax_date_column_p); renderer_p = gtk_cell_renderer_text_new(); column_p = gtk_tree_view_column_new_with_attributes(gettext("Description"), renderer_p, "text", FaxListModelColumns::fax_description, static_cast(0)); gtk_tree_view_append_column(fax_tree_view_p, column_p); selection_p = gtk_tree_view_get_selection(fax_tree_view_p); // multiple line selection gtk_tree_selection_set_mode(selection_p, GTK_SELECTION_MULTIPLE); // populate the fax model columns - this will also default to showing // the base folder (Inbox or Sent box) and create all the necessary // tree models for the fax tree view (one for each folder) and create // the necessary mapping populate_fax_list(); // now provide drag and drop from the fax tree view to the folder tree view // first connect slots to ensure that a drag only starts with a valid row to drag g_signal_connect(G_OBJECT(folder_tree_view_p), "motion_notify_event", G_CALLBACK(folder_tree_view_motion_notify_cb), this); g_signal_connect(G_OBJECT(fax_tree_view_p), "motion_notify_event", G_CALLBACK(fax_tree_view_motion_notify_cb), this); // connect slots to handle the drag source in the fax tree view g_signal_connect(G_OBJECT(fax_tree_view_p), "drag_data_get", G_CALLBACK(drag_data_get_cb), this); g_signal_connect(G_OBJECT(fax_tree_view_p), "drag_begin", G_CALLBACK(fax_tree_view_drag_begin_cb), this); // connect slots to handle the drag source in the folder tree view g_signal_connect(G_OBJECT(folder_tree_view_p), "drag_data_get", G_CALLBACK(drag_data_get_cb), this); g_signal_connect(G_OBJECT(folder_tree_view_p), "drag_begin", G_CALLBACK(folder_tree_view_drag_begin_cb), this); // connect slots to handle the drag destination in the folder tree view g_signal_connect(G_OBJECT(folder_tree_view_p), "drag_motion", G_CALLBACK(drag_motion_cb), this); gtk_drag_dest_set(GTK_WIDGET(folder_tree_view_p), GTK_DEST_DEFAULT_ALL, target_array, target_size, GDK_ACTION_MOVE); g_signal_connect(G_OBJECT(folder_tree_view_p), "drag_data_received", G_CALLBACK(drag_data_received_cb), this); // handle selection of a row in the tree views selection_p = gtk_tree_view_get_selection(fax_tree_view_p); g_signal_connect(G_OBJECT(selection_p), "changed", G_CALLBACK(fax_selected_cb), this); selection_p = gtk_tree_view_get_selection(folder_tree_view_p); g_signal_connect(G_OBJECT(selection_p), "changed", G_CALLBACK(folder_selected_cb), this); // capture a double click on the fax tree view for viewing a fax gtk_widget_add_events(GTK_WIDGET(fax_tree_view_p), GDK_BUTTON_PRESS_MASK); g_signal_connect(G_OBJECT(fax_tree_view_p), "button_press_event", G_CALLBACK(fax_tree_view_mouse_click_cb), this); // set a timeout to call write_path() at 5 minute intervals #if GLIB_CHECK_VERSION(2,14,0) timer_tag = start_timeout_seconds(WRITE_PATH_TIMER_INTERVAL/1000, Callback::make(*this, &FaxListManager::write_path_timer_cb)); #else timer_tag = start_timeout(WRITE_PATH_TIMER_INTERVAL, Callback::make(*this, &FaxListManager::write_path_timer_cb)); #endif } FaxListManager::~FaxListManager(void) { g_source_remove(timer_tag); write_path(); } void FaxListManager::populate_fax_list(void) { std::string dir(prog_config.working_dir); if (mode == FaxListEnum::received) dir += "/faxin"; else dir += "/faxsent"; chdir(dir.c_str()); DIR* dir_p; if ((dir_p = opendir(dir.c_str())) == 0) { std::string msg("Can't open directory "); msg += dir; msg += '\n'; write_error(msg.c_str()); } else { // before reading the faxin/faxsent directory for faxes set up the // folder items we always need /* - we don't need to do this as the program is now written gtk_tree_store_clear(GTK_TREE_STORE(folder_tree_store_h.get())); // keep the old tree stores (if any) alive, until we have reset the model // in the fax tree view later in this method, by copying the values FolderRowToFaxModelMap old_map = folder_row_to_fax_model_map; // now we can clear the fax list stores map folder_row_to_fax_model_map.clear(); folder_name_validator.clear(); */ // we always have an 'Inbox' and 'Sent box' row items GtkTreeIter base_folder_iter; gtk_tree_store_append(GTK_TREE_STORE(folder_tree_store_h.get()), &base_folder_iter, 0); std::string base_path; base_path = PATH_DIVIDER; if (mode == FaxListEnum::received) { gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &base_folder_iter, FolderListModelColumns::icon, folder_icon_h.get(), FolderListModelColumns::name, gettext("Inbox"), FolderListModelColumns::root_only, true, -1); base_path += gettext("Inbox"); folder_name_validator.insert_folder_name(gettext("Inbox")); } else { gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &base_folder_iter, FolderListModelColumns::icon, folder_icon_h.get(), FolderListModelColumns::name, gettext("Sent box"), FolderListModelColumns::root_only, true, -1); base_path += gettext("Sent box"); folder_name_validator.insert_folder_name(gettext("Sent box")); } // we also always have a 'Trash' folder GtkTreeIter trash_folder_iter; gtk_tree_store_append(GTK_TREE_STORE(folder_tree_store_h.get()), &trash_folder_iter, 0); gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &trash_folder_iter, FolderListModelColumns::icon, trash_icon_h.get(), FolderListModelColumns::name, gettext("Trash"), FolderListModelColumns::root_only, true, -1); std::string trash_path; trash_path = PATH_DIVIDER; trash_path += gettext("Trash"); folder_name_validator.insert_folder_name(gettext("Trash")); TreePathScopedHandle base_path_h(gtk_tree_model_get_path(folder_tree_store_h, &base_folder_iter)); TreeRowRefSharedHandle base_row_ref_h(gtk_tree_row_reference_new(folder_tree_store_h, base_path_h)); TreePathScopedHandle trash_path_h(gtk_tree_model_get_path(folder_tree_store_h, &trash_folder_iter)); trash_row_ref_h = TreeRowRefSharedHandle(gtk_tree_row_reference_new(folder_tree_store_h, trash_path_h)); PathToFolderRowMap path_to_row_map; path_to_row_map.insert(PathToFolderRowMap::value_type(base_path, base_row_ref_h)); path_to_row_map.insert(PathToFolderRowMap::value_type(trash_path, trash_row_ref_h)); // now create a fax tree model for the base and trash folders // put them in a GobjHandle to handle their lifetime, because they are not // owned by a GTK+ container fax_base_model_h = GobjHandle(GTK_TREE_MODEL(gtk_list_store_new(FaxListModelColumns::cols_num, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING))); GobjHandle trash_model_h(GTK_TREE_MODEL(gtk_list_store_new(FaxListModelColumns::cols_num, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING))); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(fax_base_model_h.get()), FaxListModelColumns::name, list_sort_type[mode]); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(trash_model_h.get()), FaxListModelColumns::name, list_sort_type[mode]); folder_row_to_fax_model_map.insert(FolderRowToFaxModelMap::value_type(base_row_ref_h, fax_base_model_h)); folder_row_to_fax_model_map.insert(FolderRowToFaxModelMap::value_type(trash_row_ref_h, trash_model_h)); // get the paths (folders) stored in PathList std::string line; std::ifstream file; std::string filename(dir); filename += "/PathList"; #ifdef HAVE_IOS_NOCREATE file.open(filename.c_str(), std::ios::in | std::ios::nocreate); #else // we must have Std C++ so we probably don't need a ios::nocreate // flag on a read open to ensure uniqueness file.open(filename.c_str(), std::ios::in); #endif if (file) { while (std::getline(file, line)) get_folders(path_to_row_map, line); } // now populate the tree store struct dirent* direntry; struct stat statinfo; while ((direntry = readdir(dir_p)) != 0) { stat(direntry->d_name, &statinfo); if (S_ISDIR(statinfo.st_mode) // keep the check for the "oldfax" sub-directory even though it is not used // in version 2.2.13 onwards (users may still have it lying around) && std::strcmp(direntry->d_name, "oldfax") && std::strcmp(direntry->d_name, ".") && std::strcmp(direntry->d_name, "..") && (mode == FaxListEnum::sent || std::strcmp(direntry->d_name, "current"))) { // checking for "current" will prevent double entries if completion of a received // fax occurs while we are scanning the faxin directory - it is transferred to its // own directory in the EfaxController::child_ended_cb() callback and that callback // cannot be invoked until this method has returned (note also the checks for // FaxListManager::is_fax_received_list_main_iteration() and // FaxListManager::is_fax_sent_list_main_iteration() in EfaxController::child_ended_cb()) // likewise a completed sent fax will not be stored in a directory in the faxsent // directory (if we are scanning that directory) until that is done via // EfaxController::child_ended_cb() std::string fax_name(direntry->d_name); // this while loop can be time intensive as it reads from disk // so clear any outstanding events in the main program loop if (mode == FaxListEnum::received) fax_received_list_main_iteration = true; else fax_sent_list_main_iteration = true; while (gtk_events_pending()) gtk_main_iteration(); if (mode == FaxListEnum::received) fax_received_list_main_iteration = false; else fax_sent_list_main_iteration = false; line = ""; file.close(); file.clear(); // get the fax list Path for each fax filename = dir + '/'; filename += fax_name; filename += "/Path"; #ifdef HAVE_IOS_NOCREATE file.open(filename.c_str(), std::ios::in | std::ios::nocreate); #else // we must have Std C++ so we probably don't need a ios::nocreate // flag on a read open to ensure uniqueness file.open(filename.c_str(), std::ios::in); #endif if (file) { while (std::getline(file, line) && line.empty()); } file.close(); file.clear(); // now open up a file stream to read any fax description // to pass by reference to insert_fax_on_populate() filename = dir + '/'; filename += fax_name; filename += "/Description"; #ifdef HAVE_IOS_NOCREATE file.open(filename.c_str(), std::ios::in | std::ios::nocreate); #else // we must have Std C++ so we probably don't need a ios::nocreate // flag on a read open to ensure uniqueness file.open(filename.c_str(), std::ios::in); #endif if (!Utf8::validate(line)) { // not valid UTF-8! write_error("Invalid UTF-8 string in folder path name in FaxListManager::populate_fax_list()\n"); line = ""; } // put the faxes in the relevant fax tree model for their folder if (line.size() == 1 && line[0] == PATH_DIVIDER) { insert_fax_on_populate(path_to_row_map, file, base_path, fax_name); } // include a call to get_folders() in case something has gone wrong // and the fax belongs to a folder not listed in the PathList file else if (!line.empty() && get_folders(path_to_row_map, line)) { insert_fax_on_populate(path_to_row_map, file, line, fax_name); } else { insert_fax_on_populate(path_to_row_map, file, base_path, fax_name); } } } // close the directory search while (closedir(dir_p) == -1 && errno == EINTR); // select the main folder std::string base_folder; if (mode == FaxListEnum::received) base_folder = gettext("Inbox"); else base_folder = gettext("Sent box"); GtkTreeIter row_iter; bool found_it = false; bool result = gtk_tree_model_get_iter_first(folder_tree_store_h, &row_iter); while (!found_it && result) { gchar* name_p = 0; gtk_tree_model_get(folder_tree_store_h, &row_iter, FolderListModelColumns::name, &name_p, -1); if (name_p && base_folder == std::string(name_p)) found_it = true; else result = gtk_tree_model_iter_next(folder_tree_store_h, &row_iter); // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); } if (found_it) { GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); gtk_tree_selection_select_iter(selection_p, &row_iter); display_faxes(); } } // reset current directory std::string temp(prog_config.working_dir + "/faxin"); chdir(temp.c_str()); } bool FaxListManager::get_folders(PathToFolderRowMap& path_to_row_map, const std::string& line) { bool return_val; if (!line.empty()) return_val = true; else return_val = false; std::vector child_rowlist; std::string remaining_path(line); if (!Utf8::validate(line)) { // not valid UTF-8! write_error("Invalid UTF-8 string in folder path name in FaxListManager::get_folders()\n"); remaining_path = ""; return_val = false; } // keep going until we get to the root tree store or to a parent row in existence while (!remaining_path.empty() && path_to_row_map.find(remaining_path) == path_to_row_map.end()) { std::string::size_type pos = remaining_path.rfind(PATH_DIVIDER); if (pos == std::string::npos) { // input error remaining_path = ""; child_rowlist.clear(); return_val = false; } else { child_rowlist.push_back(remaining_path.substr(pos + 1)); folder_name_validator.insert_folder_name(remaining_path.substr(pos + 1)); remaining_path.resize(pos); } } // now create the missing child level(s) stored in child_rowlist if (!child_rowlist.empty()) { std::vector::reverse_iterator r_iter = child_rowlist.rbegin(); TreeRowRefSharedHandle row_ref_h; std::string pathname(remaining_path); pathname += PATH_DIVIDER; pathname += *r_iter; if (remaining_path.empty()) { // we need to make a first level node GtkTreeIter iter; gtk_tree_store_append(GTK_TREE_STORE(folder_tree_store_h.get()), &iter, 0); // no need for a UTF8 conversion function here - we store folder // names in Path in UTF-8 gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &iter, FolderListModelColumns::icon, folder_icon_h.get(), FolderListModelColumns::name, r_iter->c_str(), FolderListModelColumns::root_only, false, -1); TreePathScopedHandle path_h(gtk_tree_model_get_path(folder_tree_store_h, &iter)); row_ref_h = TreeRowRefSharedHandle(gtk_tree_row_reference_new(folder_tree_store_h, path_h)); path_to_row_map.insert(PathToFolderRowMap::value_type(pathname, row_ref_h)); // create a fax tree model for the folder and put it in a GobjHandle to handle its // lifetime, because it is not owned by a GTK+ container GobjHandle model_h(GTK_TREE_MODEL(gtk_list_store_new(FaxListModelColumns::cols_num, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING))); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model_h.get()), FaxListModelColumns::name, list_sort_type[mode]); folder_row_to_fax_model_map.insert(FolderRowToFaxModelMap::value_type(row_ref_h, model_h)); } else { // build on the nearest ancestor already created row_ref_h = path_to_row_map[remaining_path]; GtkTreeIter parent_iter; GtkTreeIter child_iter; TreePathScopedHandle parent_path_h(gtk_tree_row_reference_get_path(row_ref_h)); if (parent_path_h.get() && gtk_tree_model_get_iter(folder_tree_store_h, &parent_iter, parent_path_h)) { gtk_tree_store_append(GTK_TREE_STORE(folder_tree_store_h.get()), &child_iter, &parent_iter); // no need for a UTF8 conversion function here - we store folder // names in Path in UTF-8 gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &child_iter, FolderListModelColumns::icon, folder_icon_h.get(), FolderListModelColumns::name, r_iter->c_str(), FolderListModelColumns::root_only, false, -1); TreePathScopedHandle child_path_h(gtk_tree_model_get_path(folder_tree_store_h, &child_iter)); row_ref_h = TreeRowRefSharedHandle(gtk_tree_row_reference_new(folder_tree_store_h, child_path_h)); path_to_row_map.insert(PathToFolderRowMap::value_type(pathname, row_ref_h)); // create a fax tree model for the folder and put it in a GobjHandle to handle its // lifetime, because it is not owned by a GTK+ container GobjHandle model_h(GTK_TREE_MODEL(gtk_list_store_new(FaxListModelColumns::cols_num, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING))); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model_h.get()), FaxListModelColumns::name, list_sort_type[mode]); folder_row_to_fax_model_map.insert(FolderRowToFaxModelMap::value_type(row_ref_h, model_h)); } else { write_error("Mapping error in FaxListManager::get_folders()\n"); return_val = false; child_rowlist.clear(); r_iter = child_rowlist.rbegin(); } } // now deal with any further children remaining to be created for (++r_iter; r_iter != child_rowlist.rend(); ++r_iter) { GtkTreeIter parent_iter; GtkTreeIter child_iter; TreePathScopedHandle parent_path_h(gtk_tree_row_reference_get_path(row_ref_h)); if (parent_path_h.get() && gtk_tree_model_get_iter(folder_tree_store_h, &parent_iter, parent_path_h)) { gtk_tree_store_append(GTK_TREE_STORE(folder_tree_store_h.get()), &child_iter, &parent_iter); // no need for a UTF8 conversion function here - we store folder // names in Path in UTF-8 gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &child_iter, FolderListModelColumns::icon, folder_icon_h.get(), FolderListModelColumns::name, r_iter->c_str(), FolderListModelColumns::root_only, false, -1); pathname += PATH_DIVIDER; pathname += *r_iter; TreePathScopedHandle child_path_h(gtk_tree_model_get_path(folder_tree_store_h, &child_iter)); row_ref_h = TreeRowRefSharedHandle(gtk_tree_row_reference_new(folder_tree_store_h, child_path_h)); path_to_row_map.insert(PathToFolderRowMap::value_type(pathname, row_ref_h)); // create a fax tree model for the folder and put it in a GobjHandle to handle its // lifetime, because it is not owned by a GTK+ container GobjHandle model_h(GTK_TREE_MODEL(gtk_list_store_new(FaxListModelColumns::cols_num, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING))); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model_h.get()), FaxListModelColumns::name, list_sort_type[mode]); folder_row_to_fax_model_map.insert(FolderRowToFaxModelMap::value_type(row_ref_h, model_h)); } else { write_error("Mapping error in FaxListManager::get_folders()\n"); return_val = false; child_rowlist.clear(); r_iter = child_rowlist.rbegin(); } } } return return_val; } void FaxListManager::insert_fax_on_populate(const PathToFolderRowMap& path_to_row_map, std::ifstream& file, const std::string& fax_path, const std::string& fax_name) { PathToFolderRowMap::const_iterator path_map_iter = path_to_row_map.find(fax_path); if (path_map_iter == path_to_row_map.end()) { write_error("Mapping error (no folder row) in FaxListManager::insert_fax_on_populate()\n"); } else { FolderRowToFaxModelMap::const_iterator row_map_iter = folder_row_to_fax_model_map.find(path_map_iter->second); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::insert_fax_on_populate()\n"); } else { GobjHandle fax_model_h(row_map_iter->second); GtkTreeIter row_iter; gtk_list_store_append(GTK_LIST_STORE(fax_model_h.get()), &row_iter); gtk_list_store_set(GTK_LIST_STORE(fax_model_h.get()), &row_iter, FaxListModelColumns::name, fax_name.c_str(), -1); // convert faxname to locale date-time format for fax date std::string date(convert_faxname_to_date(fax_name)); try { gtk_list_store_set(GTK_LIST_STORE(fax_model_h.get()), &row_iter, FaxListModelColumns::fax_date, Utf8::locale_to_utf8(date).c_str(), -1); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in FaxListManager::insert_fax_on_populate()\n"); } // now see if there is a description std::string line; if (file) { while (std::getline(file, line) && line.empty()); } if (!line.empty()) { if (Utf8::validate(line)) { // no filename to UTF-8 conversion is required as the fax description is // stored in UTF-8 (since version 3.0.7 of efax-gtk) gtk_list_store_set(GTK_LIST_STORE(fax_model_h.get()), &row_iter, FaxListModelColumns::fax_description, line.c_str(), -1); } else { //write_error("Invalid UTF-8 in fax description in FaxListManager::insert_fax_on_populate()\n"); } } } } } void FaxListManager::insert_new_fax_in_base(const std::string& fax_name, const std::string& description) { GtkTreeIter row_iter; gtk_list_store_append(GTK_LIST_STORE(fax_base_model_h.get()), &row_iter); gtk_list_store_set(GTK_LIST_STORE(fax_base_model_h.get()), &row_iter, FaxListModelColumns::name, fax_name.c_str(), -1); // convert faxname to locale date-time format for fax date std::string date(convert_faxname_to_date(fax_name)); try { gtk_list_store_set(GTK_LIST_STORE(fax_base_model_h.get()), &row_iter, FaxListModelColumns::fax_date, Utf8::locale_to_utf8(date).c_str(), -1); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in FaxListManager::insert_new_fax_in_base()\n"); } // now insert any description if (!description.empty()) { // there is no need to convert the fax description to UTF-8 as it is // already in that codeset - but let's check if (Utf8::validate(description)) { gtk_list_store_set(GTK_LIST_STORE(fax_base_model_h.get()), &row_iter, FaxListModelColumns::fax_description, description.c_str(), -1); } else { write_error("Invalid UTF-8 in fax description in FaxListManager::insert_new_fax_in_base()\n"); } } } void FaxListManager::move_fax(const GtkTreeIter* dest_folder_row_iter_p) { // check pre-conditions if (fax_drag_source_row_refs.empty()) return; // compare the destination fax tree model with the source fax tree model TreePathScopedHandle dest_folder_path_h(gtk_tree_model_get_path(folder_tree_store_h, const_cast(dest_folder_row_iter_p))); TreeRowRefSharedHandle dest_folder_row_ref_h(gtk_tree_row_reference_new(folder_tree_store_h, dest_folder_path_h)); FolderRowToFaxModelMap::const_iterator row_map_iter = folder_row_to_fax_model_map.find(dest_folder_row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::move_fax()\n"); return; } GobjHandle dest_model_h = row_map_iter->second; // the source tree model must be the one currently embedded in the fax tree view GtkTreeModel* source_model_p = gtk_tree_view_get_model(fax_tree_view_p); if (source_model_p != dest_model_h.get()) { RowRefList::iterator refs_iter; for (refs_iter = fax_drag_source_row_refs.begin(); refs_iter != fax_drag_source_row_refs.end(); ++refs_iter) { GtkTreeIter old_fax_row_iter; TreePathScopedHandle old_fax_path_h(gtk_tree_row_reference_get_path(*refs_iter)); if (old_fax_path_h.get() && gtk_tree_model_get_iter(source_model_p, &old_fax_row_iter, old_fax_path_h)) { gchar* date_p = 0; gchar* description_p = 0; gchar* name_p = 0; gtk_tree_model_get(source_model_p, &old_fax_row_iter, FaxListModelColumns::fax_date, &date_p, FaxListModelColumns::fax_description, &description_p, FaxListModelColumns::name, &name_p, -1); std::string description; if (description_p) description = description_p; std::string date; if (date_p) date = date_p; std::string faxname; if (name_p) faxname = name_p; // we have not placed the gchar* strings given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free them by hand g_free(date_p); g_free(description_p); g_free(name_p); GtkTreeIter new_fax_row_iter; gtk_list_store_append(GTK_LIST_STORE(dest_model_h.get()), &new_fax_row_iter); gtk_list_store_set(GTK_LIST_STORE(dest_model_h.get()), &new_fax_row_iter, FaxListModelColumns::fax_date, date.c_str(), FaxListModelColumns::fax_description, description.c_str(), FaxListModelColumns::name, faxname.c_str(), -1); gtk_list_store_remove(GTK_LIST_STORE(gtk_tree_view_get_model(fax_tree_view_p)), &old_fax_row_iter); } else { write_error("Database mapping error in FaxListManager::move_fax()\n"); } } fax_drag_source_row_refs.clear(); } } void FaxListManager::move_folder(GtkTreeIter* dest_folder_row_iter_p, GtkTreeViewDropPosition drop_pos) { bool dragging_trash_folder = false; { // scope block for path handles TreePathScopedHandle source_path_h(gtk_tree_model_get_path(folder_tree_store_h, &folder_drag_source_row_iter)); TreePathScopedHandle trash_path_h(gtk_tree_row_reference_get_path(trash_row_ref_h)); if (source_path_h == trash_path_h) dragging_trash_folder = true; } gboolean is_root_only = false; gchar* name_p = 0; gtk_tree_model_get(folder_tree_store_h, &folder_drag_source_row_iter, FolderListModelColumns::root_only, &is_root_only, FolderListModelColumns::name, &name_p, -1); std::string foldername; if (name_p) foldername = name_p; // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); std::string source_pathname(get_pathname_for_folder(&folder_drag_source_row_iter)); std::string drop_pathname(get_pathname_for_folder(dest_folder_row_iter_p)); if (source_pathname != drop_pathname) { // get the new pathname for the folder and put it in new_pathname std::string new_pathname(drop_pathname); std::string::size_type pos; if (drop_pos == GTK_TREE_VIEW_DROP_BEFORE || drop_pos == GTK_TREE_VIEW_DROP_AFTER) { if ((pos = new_pathname.rfind(PATH_DIVIDER)) != std::string::npos) { new_pathname.resize(pos); } else { write_error("Folder with no pathname in FaxListManager::move_folder()\n"); new_pathname = ""; } } new_pathname += PATH_DIVIDER; new_pathname += foldername; if (is_valid_drop_path(source_pathname, new_pathname) && (!is_root_only || new_pathname.rfind(PATH_DIVIDER) == 0)) { GtkTreeIter new_row_iter; switch (drop_pos) { case GTK_TREE_VIEW_DROP_BEFORE: gtk_tree_store_insert_before(GTK_TREE_STORE(folder_tree_store_h.get()), &new_row_iter, 0, dest_folder_row_iter_p); break; case GTK_TREE_VIEW_DROP_AFTER: gtk_tree_store_insert_after(GTK_TREE_STORE(folder_tree_store_h.get()), &new_row_iter, 0, dest_folder_row_iter_p); break; default: gtk_tree_store_prepend(GTK_TREE_STORE(folder_tree_store_h.get()), &new_row_iter, dest_folder_row_iter_p); break; } if (dragging_trash_folder) { // although the Trash folder is root only, it can still be dragged // within the root level (as can the Inbox/Sent faxes boxes) gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &new_row_iter, FolderListModelColumns::icon, trash_icon_h.get(), FolderListModelColumns::name, foldername.c_str(), FolderListModelColumns::root_only, true, -1); TreePathScopedHandle new_path_h(gtk_tree_model_get_path(folder_tree_store_h, &new_row_iter)); trash_row_ref_h = TreeRowRefSharedHandle(gtk_tree_row_reference_new(folder_tree_store_h, new_path_h)); } else { gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &new_row_iter, FolderListModelColumns::icon, folder_icon_h.get(), FolderListModelColumns::name, foldername.c_str(), FolderListModelColumns::root_only, is_root_only, -1); } TreePathScopedHandle source_path_h(gtk_tree_model_get_path(folder_tree_store_h, &folder_drag_source_row_iter)); TreeRowRefSharedHandle source_row_ref_h(gtk_tree_row_reference_new(folder_tree_store_h, source_path_h)); TreePathScopedHandle new_path_h(gtk_tree_model_get_path(folder_tree_store_h, &new_row_iter)); TreeRowRefSharedHandle new_row_ref_h(gtk_tree_row_reference_new(folder_tree_store_h, new_path_h)); FolderRowToFaxModelMap::iterator row_map_iter = folder_row_to_fax_model_map.find(source_row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::move_folder()\n"); return; } // assigning the tree model to a new handle will keep it alive // when we erase it from the map GobjHandle fax_model_h = row_map_iter->second; // remap folder_row_to_fax_model_map folder_row_to_fax_model_map.erase(row_map_iter); folder_row_to_fax_model_map.insert(FolderRowToFaxModelMap::value_type(new_row_ref_h, fax_model_h)); // get the moved folder to show to its dropped level (do this before the call // to move_child_folders_for_level() or it may be invalidated) if (gtk_tree_path_up(new_path_h)) { gtk_tree_view_expand_to_path(folder_tree_view_p, new_path_h); } // now move all the children of the moved folder to rejoin their parent move_child_folders_for_level(&folder_drag_source_row_iter, &new_row_iter); GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); gtk_tree_selection_select_iter(selection_p, &new_row_iter); gtk_tree_store_remove(GTK_TREE_STORE(folder_tree_store_h.get()), &folder_drag_source_row_iter); } } } bool FaxListManager::is_valid_drop_path(const std::string& old_pathname, const std::string& new_pathname) { // check that the folder is not being dropped on one of its children - // with drag and drop syncing issues this can happen if (new_pathname.find(old_pathname) == 0 && new_pathname.size() > old_pathname.size()) { // we can have the new pathname the same // as the old pathname - say if folder // is being moved at same level return false; } return true; } void FaxListManager::move_child_folders_for_level(GtkTreeIter* source_level_p, GtkTreeIter* dest_level_p) { GtkTreeIter source_child_iter; bool valid = gtk_tree_model_iter_children(folder_tree_store_h, &source_child_iter, source_level_p); while (valid) { gchar* name_p = 0; gtk_tree_model_get(folder_tree_store_h, &source_child_iter, FolderListModelColumns::name, &name_p, -1); std::string node_name; if (name_p) node_name = name_p; // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); GtkTreeIter dest_row_iter; gtk_tree_store_append(GTK_TREE_STORE(folder_tree_store_h.get()), &dest_row_iter, dest_level_p); gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &dest_row_iter, FolderListModelColumns::icon, folder_icon_h.get(), FolderListModelColumns::name, node_name.c_str(), // as we are not at the root level we know the value of // FolderListModelColumns::root_only must be false FolderListModelColumns::root_only, false, -1); TreePathScopedHandle source_path_h(gtk_tree_model_get_path(folder_tree_store_h, &source_child_iter)); TreeRowRefSharedHandle source_row_ref_h(gtk_tree_row_reference_new(folder_tree_store_h, source_path_h)); TreePathScopedHandle dest_path_h(gtk_tree_model_get_path(folder_tree_store_h, &dest_row_iter)); TreeRowRefSharedHandle dest_row_ref_h(gtk_tree_row_reference_new(folder_tree_store_h, dest_path_h)); FolderRowToFaxModelMap::iterator row_map_iter = folder_row_to_fax_model_map.find(source_row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::move_child_folders_for_level()\n"); return; } // assigning the tree model to a new handle will keep it alive // when we erase it from the map GobjHandle fax_model_h = row_map_iter->second; // remap folder_row_to_fax_model_map folder_row_to_fax_model_map.erase(row_map_iter); folder_row_to_fax_model_map.insert(FolderRowToFaxModelMap::value_type(dest_row_ref_h, fax_model_h)); // now recursively work the way up children of this node (if any) move_child_folders_for_level(&source_child_iter, &dest_row_iter); valid = gtk_tree_model_iter_next(folder_tree_store_h, &source_child_iter); } } std::string FaxListManager::get_pathname_for_folder(const GtkTreeIter* folder_iter) { GtkTreeIter child_iter = *folder_iter; GtkTreeIter parent_iter; std::string pathname; std::string temp; bool result = true; while (result) { temp = PATH_DIVIDER; gchar* name_p = 0; // we don't need a Glib conversion function here - we will use/store the Path to file // in UTF-8 - the std::string is just a transparent container for the encoding gtk_tree_model_get(folder_tree_store_h, &child_iter, FolderListModelColumns::name, &name_p, -1); if (name_p) temp += name_p; pathname.insert(0, temp); // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); result = gtk_tree_model_iter_parent(folder_tree_store_h, &parent_iter, &child_iter); child_iter = parent_iter; } return pathname; } void FaxListManager::display_faxes(void) { GtkTreeIter selected_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); if (!gtk_tree_selection_get_selected(selection_p, &model_p, &selected_iter)) { return; } TreePathScopedHandle path_h(gtk_tree_model_get_path(model_p, &selected_iter)); TreeRowRefSharedHandle folder_row_ref_h(gtk_tree_row_reference_new(model_p, path_h)); FolderRowToFaxModelMap::const_iterator row_map_iter = folder_row_to_fax_model_map.find(folder_row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::display_faxes()\n"); } else { gtk_tree_view_set_model(fax_tree_view_p, row_map_iter->second); // provide a sort indicator - we need to do it here as setting // the tree model will unset the sort indicator (a bug in GTK+?) gtk_tree_view_column_set_sort_indicator(fax_date_column_p, true); // this doesn't control the sort order (the previous calls to // gtk_tree_sortable_set_sort_column_id() on the tree models did that) // - it just sets the direction that the arrow in the tree view shows! gtk_tree_view_column_set_sort_order(fax_date_column_p, list_sort_type[mode]); } } void FaxListManager::empty_trash_folder(void) { FolderRowToFaxModelMap::iterator row_map_iter = folder_row_to_fax_model_map.find(trash_row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::empty_trash_folder()\n"); return; } GobjHandle fax_model_h = row_map_iter->second; GtkTreeIter trash_iter; if (!gtk_tree_model_get_iter_first(fax_model_h, &trash_iter)) return; // empty folder std::string dirname(prog_config.working_dir); if (mode == FaxListEnum::received) dirname += "/faxin/"; else dirname += "/faxsent/"; bool valid = true; // we have already tested for the first element above while (valid) { std::string faxdir(dirname); gchar* name_p = 0; gtk_tree_model_get(fax_model_h, &trash_iter, FaxListModelColumns::name, &name_p, -1); // we don't need to use a Glib conversion function here - we know the // fax name is just plain ASCII numbers if (name_p) faxdir += name_p; // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); struct dirent* direntry; struct stat statinfo; DIR* dir_p; if ((dir_p = opendir(faxdir.c_str())) == 0) { std::string msg("Can't open directory "); msg += faxdir; msg += '\n'; write_error(msg.c_str()); } else { chdir(faxdir.c_str()); while ((direntry = readdir(dir_p)) != 0) { stat(direntry->d_name, &statinfo); if (S_ISREG(statinfo.st_mode)) unlink(direntry->d_name); } while (closedir(dir_p) == -1 && errno == EINTR); // reset current directory std::string temp(prog_config.working_dir + "/faxin"); chdir(temp.c_str()); if (rmdir(faxdir.c_str())) { std::string msg("Can't delete directory "); msg += faxdir; msg += "\nThe contents should have been deleted\n" "and it should now be empty -- please check\n"; write_error(msg.c_str()); } } valid = gtk_tree_model_iter_next(fax_model_h, &trash_iter); } gtk_list_store_clear(GTK_LIST_STORE(fax_model_h.get())); // we don't need to write out the paths: the Path files for all the faxes // previously in the trash folder will have been deleted and the PathList // file will remain the same } RowPathList::size_type FaxListManager::is_fax_selected(void) { SelectedRowsHandle rows_handle(fax_tree_view_p); return rows_handle.size(); } bool FaxListManager::is_selected_folder_empty(void) { bool return_val = false; GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { TreePathScopedHandle path_h(gtk_tree_model_get_path(model_p, &row_iter)); if (!gtk_tree_model_iter_has_child(model_p, &row_iter)) { // check if there is a child folder TreeRowRefSharedHandle folder_row_ref_h(gtk_tree_row_reference_new(model_p, path_h)); FolderRowToFaxModelMap::const_iterator row_map_iter = folder_row_to_fax_model_map.find(folder_row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::is_selected_folder_empty()\n"); } else if (!gtk_tree_model_get_iter_first(row_map_iter->second, &row_iter)) { // empty folder return_val = true; } } } return return_val; } bool FaxListManager::is_selected_folder_permanent(void) { gboolean is_root_only = false; GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { gtk_tree_model_get(model_p, &row_iter, FolderListModelColumns::root_only, &is_root_only, -1); } return is_root_only; } bool FaxListManager::show_trash_folder_icon(void) { // we want to show the relevant button icon if the trash folder is selected // and it is not empty bool return_val = false; GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { TreePathScopedHandle row_path_h(gtk_tree_model_get_path(model_p, &row_iter)); TreePathScopedHandle trash_path_h(gtk_tree_row_reference_get_path(trash_row_ref_h)); if (trash_path_h.get() && row_path_h == trash_path_h) { // trash folder selected // now check if it has faxes in it FolderRowToFaxModelMap::iterator row_map_iter = folder_row_to_fax_model_map.find(trash_row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::show_trash_folder_icon()\n"); } else if (gtk_tree_model_get_iter_first(row_map_iter->second, &row_iter)) { // faxes in folder return_val = true; } } } return return_val; } void FaxListManager::make_folder(const std::string& folder_name, bool test_valid) { if (!test_valid || folder_name_validator.validate(folder_name).first) { GtkTreeIter iter; gtk_tree_store_append(GTK_TREE_STORE(folder_tree_store_h.get()), &iter, 0); gtk_tree_store_set(GTK_TREE_STORE(folder_tree_store_h.get()), &iter, FolderListModelColumns::icon, folder_icon_h.get(), FolderListModelColumns::name, folder_name.c_str(), // since we are creating a new folder it is not root only // (only Inbox, Sent box and Trash are root only) FolderListModelColumns::root_only, false, -1); folder_name_validator.insert_folder_name(folder_name); TreePathScopedHandle path_h(gtk_tree_model_get_path(folder_tree_store_h, &iter)); TreeRowRefSharedHandle row_ref_h = TreeRowRefSharedHandle(gtk_tree_row_reference_new(folder_tree_store_h, path_h)); // create a fax tree model for the folder and put it in a GobjHandle to handle its // lifetime, because it is not owned by a GTK+ container GobjHandle model_h(GTK_TREE_MODEL(gtk_list_store_new(FaxListModelColumns::cols_num, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING))); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model_h.get()), FaxListModelColumns::name, list_sort_type[mode]); folder_row_to_fax_model_map.insert(FolderRowToFaxModelMap::value_type(row_ref_h, model_h)); write_path(); } } void FaxListManager::delete_folder(void) { // we should have called is_folder_empty() and is_selected_folder_permanent() // before getting here, so all we need to do is to delete the row in the // folder tree store and the entry in the map GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { gchar* name_p = 0; gtk_tree_model_get(model_p, &row_iter, FolderListModelColumns::name, &name_p, -1); if (name_p) folder_name_validator.erase_folder_name(name_p); // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); TreePathScopedHandle path_h(gtk_tree_model_get_path(model_p, &row_iter)); TreeRowRefSharedHandle row_ref_h(gtk_tree_row_reference_new(model_p, path_h)); FolderRowToFaxModelMap::iterator row_map_iter = folder_row_to_fax_model_map.find(row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::delete_folder()\n"); return; } // this will also destroy the fax tree model for this folder folder_row_to_fax_model_map.erase(row_map_iter); // now remove the row in the folder tree model gtk_tree_store_remove(GTK_TREE_STORE(model_p), &row_iter); write_path(); } } void FaxListManager::delete_fax(void) { GtkTreeModel* fax_list_store_p = gtk_tree_view_get_model(fax_tree_view_p); RowRefList row_ref_list; SelectedRowsHandle rows_handle(fax_tree_view_p); rows_handle.get_ref_list(fax_list_store_p, row_ref_list); if (!row_ref_list.empty() && gtk_tree_row_reference_valid(row_ref_list.front())) { std::string dirname(prog_config.working_dir); if (mode == FaxListEnum::received) dirname += "/faxin/"; else dirname += "/faxsent/"; RowRefList::iterator refs_iter; for (refs_iter = row_ref_list.begin(); refs_iter != row_ref_list.end(); ++refs_iter) { GtkTreeIter row_iter; TreePathScopedHandle path_h(gtk_tree_row_reference_get_path(*refs_iter)); if (path_h.get() && gtk_tree_model_get_iter(fax_list_store_p, &row_iter, path_h)) { gchar* name_p = 0; // get the name of the fax to be deleted // we don't need to use a Glib conversion function here - we know the // fax name is just plain ASCII numbers gtk_tree_model_get(fax_list_store_p, &row_iter, FaxListModelColumns::name, &name_p, -1); std::string faxname; if (name_p) faxname = name_p; // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); std::string faxdir(dirname); faxdir += faxname; struct dirent* direntry; struct stat statinfo; DIR* dir_p; if ((dir_p = opendir(faxdir.c_str())) == 0) { std::string msg("Can't open directory "); msg += faxdir; msg += '\n'; write_error(msg.c_str()); } else { chdir(faxdir.c_str()); while ((direntry = readdir(dir_p)) != 0) { stat(direntry->d_name, &statinfo); if (S_ISREG(statinfo.st_mode)) unlink(direntry->d_name); } while (closedir(dir_p) == -1 && errno == EINTR); // reset current directory std::string temp(prog_config.working_dir + "/faxin"); chdir(temp.c_str()); if (rmdir(faxdir.c_str())) { std::string msg("Can't delete directory "); msg += faxdir; msg += "\nThe contents should have been deleted\n" "and it should now be empty -- please check\n"; write_error(msg.c_str()); } else { // delete the fax in the fax list gtk_list_store_remove(GTK_LIST_STORE(fax_list_store_p), &row_iter); } } } } // and write out the paths write_path(); } } void FaxListManager::write_path(void) { std::string dir(prog_config.working_dir); if (mode == FaxListEnum::received) dir += "/faxin/"; else dir += "/faxsent/"; // first write the path list file for the folders std::string filename(dir); filename += "PathList"; std::ofstream path_list_file(filename.c_str(), std::ios::out); if (path_list_file) { GtkTreeIter row_iter; if (gtk_tree_model_get_iter_first(folder_tree_store_h, &row_iter)) { write_paths_for_level(&row_iter, path_list_file); } else write_error("Tree model error in FaxListManager::write_path()\n"); } else write_error("Cannot open PathList file for writing in FaxListManager::write_path()\n"); } void FaxListManager::write_paths_for_level(const GtkTreeIter* level_iter_p, std::ofstream& path_list_file) { std::string dir(prog_config.working_dir); if (mode == FaxListEnum::received) dir += "/faxin/"; else dir += "/faxsent/"; std::ofstream fax_path_file; GtkTreeIter folder_row_iter = *level_iter_p; bool folder_valid = true; // level_iter_p must be valid when first called - we // cannot sensibly check it here while (folder_valid) { // write out PathList file std::string pathname = get_pathname_for_folder(&folder_row_iter); path_list_file << pathname << '\n'; // now write out individual fax Path files for this folder/pathname // - first get the tree model for the faxes TreePathScopedHandle folder_path_h(gtk_tree_model_get_path(folder_tree_store_h, &folder_row_iter)); TreeRowRefSharedHandle folder_row_ref_h(gtk_tree_row_reference_new(folder_tree_store_h, folder_path_h)); FolderRowToFaxModelMap::const_iterator row_map_iter = folder_row_to_fax_model_map.find(folder_row_ref_h); if (row_map_iter == folder_row_to_fax_model_map.end()) { write_error("Mapping error in FaxListManager::write_paths_for_level()\n"); } else { GobjHandle fax_model_h = row_map_iter->second; GtkTreeIter fax_row_iter; bool fax_valid = gtk_tree_model_get_iter_first(fax_model_h, &fax_row_iter); while (fax_valid) { fax_path_file.close(); fax_path_file.clear(); std::string filename(dir); gchar* name_p = 0; gtk_tree_model_get(fax_model_h, &fax_row_iter, FaxListModelColumns::name, &name_p, -1); // we don't need to use a Glib conversion function here - we know the // fax name is just plain ASCII numbers if (name_p) filename += name_p; filename += "/Path"; // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); fax_path_file.open(filename.c_str(), std::ios::out); if (fax_path_file) fax_path_file << pathname << std::endl; else { std::string message("Cannot open file "); message += filename; message += '\n'; write_error(message.c_str()); } fax_valid = gtk_tree_model_iter_next(fax_model_h, &fax_row_iter); } } // now recursively work the way up children of this node (if any) of the folder tree model GtkTreeIter child_iter; if (gtk_tree_model_iter_children(folder_tree_store_h, &child_iter, &folder_row_iter)) { write_paths_for_level(&child_iter, path_list_file); } folder_valid = gtk_tree_model_iter_next(folder_tree_store_h, &folder_row_iter); } } void FaxListManager::describe_fax(const std::string& description) { SelectedRowsHandle rows_handle(fax_tree_view_p); if (!rows_handle.is_empty()) { GtkTreeIter row_iter; GtkTreeModel* fax_list_store_p = gtk_tree_view_get_model(fax_tree_view_p); if (gtk_tree_model_get_iter(fax_list_store_p, &row_iter, rows_handle.front())) { gtk_list_store_set(GTK_LIST_STORE(fax_list_store_p), &row_iter, FaxListModelColumns::fax_description, description.c_str(), -1); std::string filename(prog_config.working_dir); if (mode == FaxListEnum::received) filename += "/faxin/"; else filename += "/faxsent/"; gchar* name_p = 0; gtk_tree_model_get(fax_list_store_p, &row_iter, FaxListModelColumns::name, &name_p, -1); // we don't need to use a Glib conversion function here - we know the // fax name is just plain ASCII numbers if (name_p) filename += name_p; // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(name_p); filename += "/Description"; std::ofstream file(filename.c_str(), std::ios::out); // do not convert the description to the locale codeset - save it in UTF-8 // (with effect from version 3.0.7) if (file) file << description; else { std::string msg("Can't open file "); msg += filename; msg += '\n'; write_error(msg.c_str()); } } } } bool FaxListManager::are_selected_faxes_in_trash_folder(void) { GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { TreePathScopedHandle row_path_h(gtk_tree_model_get_path(model_p, &row_iter)); TreePathScopedHandle trash_path_h(gtk_tree_row_reference_get_path(trash_row_ref_h)); if (trash_path_h.get() && row_path_h == trash_path_h) { return true; } } return false; } void FaxListManager::move_selected_faxes_to_trash_folder(void) { // pretend we are doing a drag and drop // get the destination of the drop GtkTreeIter trash_iter; TreePathScopedHandle trash_path_h(gtk_tree_row_reference_get_path(trash_row_ref_h)); if (trash_path_h.get() && gtk_tree_model_get_iter(folder_tree_store_h, &trash_iter, trash_path_h)) { // these are the faxes to be dropped SelectedRowsHandle rows_handle(fax_tree_view_p); rows_handle.get_ref_list(gtk_tree_view_get_model(fax_tree_view_p), fax_drag_source_row_refs); // now move the faxes using the pretend drop move_fax(&trash_iter); } else write_error("Selection error in FaxListManager::move_selected_fax_to_trash_folder()\n"); } GcharSharedHandle FaxListManager::get_fax_number(void) { gchar* number_p = 0; SelectedRowsHandle rows_handle(fax_tree_view_p); if (!rows_handle.is_empty()) { GtkTreeModel* fax_list_store_p = gtk_tree_view_get_model(fax_tree_view_p); GtkTreeIter row_iter; if (gtk_tree_model_get_iter(fax_list_store_p, &row_iter, rows_handle.front())) { gtk_tree_model_get(fax_list_store_p, &row_iter, FaxListModelColumns::name, &number_p, -1); } } return GcharSharedHandle(number_p); } GcharSharedHandle FaxListManager::get_fax_description(void) { gchar* description_p = 0; SelectedRowsHandle rows_handle(fax_tree_view_p); if (!rows_handle.is_empty()) { GtkTreeModel* fax_list_store_p = gtk_tree_view_get_model(fax_tree_view_p); GtkTreeIter row_iter; if (gtk_tree_model_get_iter(fax_list_store_p, &row_iter, rows_handle.front())) { gtk_tree_model_get(fax_list_store_p, &row_iter, FaxListModelColumns::fax_description, &description_p, -1); } } return GcharSharedHandle(description_p); } GcharSharedHandle FaxListManager::get_folder_name(void) { GtkTreeIter iter; GtkTreeModel* model_p; gchar* name_p = 0; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &iter)) { gtk_tree_model_get(model_p, &iter, FolderListModelColumns::name, &name_p, -1); } return GcharSharedHandle(name_p); } bool FaxListManager::is_folder_selected(void) { GtkTreeSelection* selection_p = gtk_tree_view_get_selection(folder_tree_view_p); return gtk_tree_selection_get_selected(selection_p, 0, 0); } std::string FaxListManager::convert_faxname_to_date(const std::string& faxname) { struct std::tm t; char str[150]; // init std::memset(&t, 0, sizeof(struct std::tm)); std::memset(str, 0, sizeof(str)); // convert date --> struct tm if (faxname.size() > 12) { // the "new" format for creating fax directories strptime(faxname.c_str(), "%Y%m%d%H%M%S", &t); } else { // the "old" format for creating fax directories strptime(faxname.c_str(), "%y%m%d%H%M%S", &t); } // convert tm to date and time in current locale std::strftime(str, sizeof(str), "%x %H:%M", &t); return std::string(str); } efax-gtk-3.2.8/src/socket_list_icons.h0000644000175000001440000002161011466007653014635 00000000000000#ifndef FAX_LIST_ICONS_H #define FAX_LIST_ICONS_H /* These icons were taken from those supplied with KDE 2.1 and 3.1 and are copyrighted accordingly */ /* XPM */ static const char* view_xpm[]={ "22 22 113 2", "Qt c None", "#S c #06afb1", "#R c #0ae1df", "#N c #0cfdfa", ".# c #121212", "#O c #141414", "#Q c #3f3f40", "#T c #404041", "#w c #409fa8", "#r c #46a3ab", "#D c #46a5ad", "#x c #46a7b5", "#h c #4bacb4", "#q c #4bb3bd", "#g c #4db5bf", "#f c #4ec3ce", "#p c #50c8d3", "#C c #56adb6", ".6 c #56b8c6", ".7 c #57b5bd", ".W c #62bfc8", ".V c #65c1ce", "#E c #66bdc8", "#s c #6abdc9", "#U c #707071", ".5 c #73d0de", "#o c #74d0de", "#e c #76d1df", ".M c #79cad5", ".N c #7acad2", ".d c #7e8180", ".l c #7f8180", ".v c #7f8281", "#A c #808382", ".U c #81d5e1", "#n c #82d9e1", "#F c #83d6de", ".E c #84ced7", "#y c #84dae2", ".4 c #85d8e2", "#K c #86d4de", "#J c #8bd4dc", "#l c #8bd5e0", "#m c #91dae5", ".L c #92d8e3", ".D c #95d5dd", "#i c #95dbe6", ".3 c #98dde7", ".a c #999b9a", "#d c #99dce8", ".T c #99dee8", "#k c #9dd5de", "#I c #9fdbe3", "#B c #a4dce5", ".s c #a4dce7", ".X c #a5e1ea", "#c c #a6e4eb", ".K c #a7e5ec", "#M c #ababab", ".F c #abe0e9", ".8 c #abe4eb", ".C c #ace4eb", ".S c #ade5ec", ".b c #aeb6b7", "#H c #aee2ea", "#b c #aee6ed", "#v c #afe6ed", ".t c #b2e5ed", ".O c #b2e7ef", "#a c #b3e0e6", "#t c #b3e7ef", ".Y c #b5d1d5", ".r c #b5e7ef", ".P c #b6bdbc", ".9 c #b8dfe3", ".c c #b9c2c4", ".2 c #baebef", ".J c #bbeaf0", "#. c #bcc3c4", "#P c #c0e0e3", ".B c #c2ecf1", ".1 c #c4e9ec", ".R c #c7ebf2", ".q c #c7eef4", ".Z c #c8cecf", "#u c #cbe2e6", ".p c #cbf1f4", ".j c #ceeef2", ".e c #d1dbdc", ".w c #d2dddc", ".i c #d2f1f5", "#j c #d3eff4", ".I c #d5f1f4", ".m c #d8e3e2", ".A c #d8f3f5", "## c #d9eff2", ".f c #dbebec", ".h c #dbf4f6", "#G c #ddf2f4", ".G c #deebed", "#L c #def3f5", "#z c #dff3f5", ".g c #dff3f7", ".u c #e0f3f5", ".k c #e1f4f6", ".0 c #e5f6f9", ".o c #e6f7f9", ".H c #e7f7f8", ".n c #e8f8f9", ".Q c #e9f7f9", ".x c #eaf9f9", ".z c #ecfbfb", ".y c #edfcfb", "QtQtQtQtQt.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQt.#.#.a.b.c.b.a.#.#QtQtQtQtQtQtQtQtQtQt", "QtQt.#.d.e.f.g.h.i.j.k.l.#QtQtQtQtQtQtQtQtQt", "Qt.#.d.m.n.o.p.q.r.s.t.u.v.#QtQtQtQtQtQtQtQt", "Qt.#.w.x.y.z.A.B.C.D.E.F.u.#QtQtQtQtQtQtQtQt", ".#.a.G.o.z.H.I.J.K.L.M.N.O.a.#QtQtQtQtQtQtQt", ".#.P.Q.p.A.I.R.S.T.U.V.W.X.Y.#QtQtQtQtQtQtQt", ".#.Z.0.1.B.2.S.3.4.5.6.7.8.9.#QtQtQtQtQtQtQt", ".##.###a#b#c#d.4#e#f#g#h#i.Y.#QtQtQtQtQtQtQt", ".#.a#j#k#l#m#n#o#p#q#r#s#t.a.#QtQtQtQtQtQtQt", "Qt.##u#v.E.M.V.6#g#w#x#y#z.#QtQtQtQtQtQtQtQt", "Qt.##A.u#B.E.W#C#D#E#F.k.a.#QtQtQtQtQtQtQtQt", "QtQt.#.d#G#H#I#J#K#H#L.a.##M#NQtQtQtQtQtQtQt", "QtQtQt.##O.a.Y#P.Y.a.#.##Q#R#M.#QtQtQtQtQtQt", "QtQtQtQtQt#O.#.#.#.#QtQt#S#T#U#M.#QtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#Qt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U.#Qt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.#QtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; static const char* remove_xpm[]={ "22 22 2 1", "# c #000000", ". c None", "......................", "......................", "......................", "......................", "......................", "....##.........##.....", "....####......##......", ".....####....##.......", ".......###..#.........", "........#####.........", ".........###..........", "........#####.........", ".......###..##........", "......###....##.......", ".....###......#.......", ".....###.......#......", "......#...............", "................#.....", "......................", "......................", "......................", "......................"}; static const char* send_fax_xpm[]={ "22 22 266 2", "Qt c None", "aJ c #222223", "bh c #2d2d2c", "bx c #2e2e2c", "bY c #2f2f2e", "a0 c #30302c", "ao c #333334", "aK c #343432", "#7 c #363537", "cd c #363633", "bZ c #383838", "b8 c #383839", "aF c #3b3b3b", "a4 c #3c3c3d", "#p c #41413f", ".d c #414142", "#P c #434244", "bA c #434343", "ca c #444443", ".X c #444445", "aZ c #454542", "bN c #454546", "bj c #48484a", "b2 c #494949", "bw c #4a4a46", ".e c #4a4a4b", "bg c #4a4a4c", ".W c #4b4b49", "#. c #4b4b4a", "cg c #4b4b4d", "aI c #4b4c4d", "#Q c #4c4c4d", "b7 c #4d4d4b", ".u c #4d4d4e", "bv c #4e4e4c", ".V c #4e4e4d", ".w c #4e4e50", "bX c #4f4f4e", ".4 c #4f4f50", "cf c #4f4f51", "bP c #50504e", "bM c #50504f", "bu c #505050", ".9 c #515150", "aE c #535254", "bL c #535350", "bW c #535351", "b6 c #535352", "bV c #535354", "#V c #545452", "a# c #545453", ".J c #545456", "b3 c #555553", "#j c #555555", "aD c #565655", "#W c #565656", ".R c #565658", "#E c #575757", "#o c #585855", "aL c #585857", "bK c #595954", ".c c #595959", "#i c #59595a", "aW c #59b556", "a3 c #5a5a5b", "cc c #5c5c5a", "aq c #5c5c5c", "bB c #5e605d", "bk c #5f5f5d", "#z c #5f5f5f", "bR c #606061", "#n c #61615f", "#F c #616160", "#D c #616161", "aj c #625a5e", "b5 c #636363", "bf c #646365", ".E c #646464", ".U c #646465", "bQ c #666664", "bT c #666665", "at c #666666", ".l c #666667", "#1 c #67656f", ".i c #676768", "bi c #686869", "cb c #68686a", "ap c #6a6a67", "#m c #6a6a68", ".8 c #6b6b69", "bH c #6b6b6b", "ac c #6b6b6c", "aa c #6b6b6d", "b4 c #6c6c6c", "aG c #6e6e6f", "bD c #6f6f6c", "bC c #6f6f6e", "a5 c #6f6f70", "#x c #717072", "bJ c #71716f", "bS c #717170", "bU c #727270", "am c #747378", "az c #74756a", "af c #747570", "b1 c #757575", "bO c #757576", ".Y c #757578", ".o c #767677", ".t c #777778", ".7 c #787874", "bE c #787877", "au c #797979", "#U c #7a7a78", "ag c #7a8a59", "aY c #7b7b77", "bz c #7b7b7c", "br c #7b7c77", "ak c #7c777b", "bt c #7c7c78", "bm c #7c7c7b", "#Y c #7d7d79", "ar c #7d7d7e", "#l c #7e7e7d", "as c #7f7f7e", "#T c #81817e", "bl c #81817f", "#C c #818184", "aV c #827672", "aM c #82827e", "a6 c #828280", "ab c #828283", "#0 c #829066", "bd c #838284", "bI c #838381", "ai c #839461", "#k c #858584", "ad c #868685", "ch c #868687", "aU c #868783", "#S c #878789", "aA c #87926a", "#H c #88878a", "aN c #888887", "a. c #89898a", "al c #8a878b", "#2 c #8a8887", "be c #8a8a8d", "b9 c #8b8b8b", "#B c #8b8b8c", "#X c #8d8d8e", "ay c #8e8b8e", "bq c #8e8e8d", "a1 c #8f8f8f", "bs c #919190", "bc c #92928f", "#A c #929292", "#G c #93938f", "ah c #93b255", "bF c #949494", "#I c #959295", "aX c #969893", "bp c #979796", ".m c #979798", "a7 c #989897", ".a c #989898", "#9 c #999997", "bn c #9a9a9a", "#Z c #9aa784", "aC c #9c7d74", ".S c #9c9c9d", ".T c #9e9e9f", "#5 c #9f9d9e", "aT c #9f9f9e", "an c #a0a0a0", "bo c #a0a1a1", "bG c #a1a1a2", "ae c #a2a29f", "a9 c #a3a3a4", "av c #a4a4a2", "aw c #a5a5a2", "#R c #a7a7a4", "#h c #a7a7a7", "## c #a8a8a5", ".6 c #a8a8a9", "a8 c #a8a8aa", "#y c #a9a9a9", "#6 c #aaa7a9", "#M c #adaca9", "ba c #adadad", "aO c #aeaeaa", "#8 c #afafad", "aQ c #b0b0af", "aR c #b1b2b1", "#g c #b3b0b1", "b# c #b4b4b3", ".H c #b5b5b6", "aS c #b6b8b5", ".f c #b7b7b7", ".F c #b7b7b8", "#e c #b8b8b7", ".M c #b8b8b9", "aP c #bababc", ".k c #bbbbba", ".0 c #bbbbbb", "b. c #bcbcba", "#q c #bcbcbb", ".# c #bcbcbc", "bb c #bdbdbb", ".1 c #bdbdc0", "aB c #be7778", "#b c #bebebe", "by c #bebebf", ".n c #bfbfbf", "#d c #c0bfc1", ".Z c #c0c0c2", "ax c #c1c0be", "#L c #c1c0c0", "c# c #c1c1c1", ".v c #c2c2c2", "#N c #c3c0bf", "#4 c #c5c2c4", "b0 c #c5c5c5", "#w c #c7c4c7", ".p c #c7c7c7", "c. c #c9c9c9", "a2 c #c9c9ca", "#s c #cac8c9", "#f c #cbcacb", "#3 c #ccc8ca", ".A c #cecdcf", ".I c #cecece", ".q c #cececf", "#O c #cfcbcc", ".2 c #cfcecd", ".h c #cfcfcf", "#J c #d0cdd1", "ce c #d1d1d1", ".G c #d2d2d3", ".b c #d3d3d3", ".s c #d5d5d3", ".g c #d5d5d5", ".5 c #d5d5d6", "#t c #d6d6d4", "aH c #d7d7d7", "#a c #d9d9d7", ".z c #d9d9db", ".N c #dbdbda", ".D c #dcd8d6", "#c c #dcdcdd", "#v c #dfdddf", ".L c #e4e4e4", ".x c #e5e5e5", "#K c #e6e4e4", ".r c #e7e7e6", ".3 c #e8e4e5", ".Q c #ecebea", ".O c #f3f3f2", ".K c #f4f4f3", ".y c #f5f5f4", ".j c #f6f6f4", "#u c #f9f7f7", ".P c #fafaf8", ".C c #fcfbf8", "#r c #fdfbfc", ".B c #fefefc", "QtQtQtQtQtQtQtQtQtQtQtQtQt.#.aQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.b.c.d.e.f.gQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.h.i.j.k.l.i.mQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt.n.o.p.q.r.s.t.u.vQt", "QtQtQtQtQtQtQtQtQtQtQtQt.w.x.y.z.A.B.C.D.E.F", "QtQtQtQtQtQtQt.G.H.H.H.I.J.K.L.M.N.O.P.Q.R.S", "QtQtQtQtQtQt.T.U.c.V.W.X.Y.L.Z.0.1.M.2.3.4Qt", "QtQtQt.5.6.4.i.7.8.c.9#.###a#b#c#d#e#f#g.eQt", "QtQt#h#i#j#k#l#m#n#o#p.4#q#r#s#t#u#v#w#x.mQt", "Qt#y#z#A#B#C.o#D#E#F#G#H#I#J#K#L#M#N#O#P.hQt", "Qt#Q#R#S#T#U#V#W.Y#X#Y#Z#0#1#2#3#4#5#6#7.hQt", "Qt.u#8#9a.a#aaabacadaeafagahaiajakalamabQtQt", "QtanaoapaqarasatauavawaxayazaAaBaCaDaEaFaGaH", ".#aIaJaKaLaMaNasaOaPaQaRaSaTaUaVaWaXaYaZa0a1", "a2a3a4a5a6a6a7a8a9b.b#babbbc#Ubdbebf.9bgbha1", "Qt.gbibjbkblbm#Tbnbobp#qbqbrbsbt#obubvbwbxa1", "QtQtQtbybzbAbBbCbDbEbFbGbHbIbJbKbLbM#.bNbxa1", "QtQtQtQtQta2bOa4bPbQbRbSbTbUbQbVbWbXbwbYbZ.F", "QtQtQtQtQtQtQtb0b1.db2#Wb3b4b5b6b7b8a4b9c.Qt", "QtQtQtQtQtQtQtQtQtc#abaJcacbcccdbYabceQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.haGcfcgchceQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.#c.QtQtQtQtQtQtQt"}; #endif efax-gtk-3.2.8/src/redial_queue.cpp0000644000175000001440000002354311466007653014125 00000000000000/* Copyright (C) 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include #include #include #include #include "redial_queue.h" #include "dialogs.h" #include "redial_queue_icons.h" #include "utils/toolbar_append_widget.h" #ifdef ENABLE_NLS #include #endif int RedialQueueDialog::is_redial_queue_dialog = 0; void RedialQueue::add(const QueueItem& item) { item_list.push_back(item); changed.emit(); } bool RedialQueue::remove(guint* id) { // we don't have lambdas in C++03, so use a struct in function scope struct Pred { // we can't pass const reference types as we bind with std::bind2nd below static bool pred(QueueItem item, guint* p) { return (item.first == p); } }; std::list::iterator iter = std::find_if(item_list.begin(), item_list.end(), std::bind2nd(std::ptr_fun(Pred::pred), id)); if (iter != item_list.end()) { item_list.erase(iter); g_source_remove(*id); delete id; changed.emit(); return true; } return false; } void RedialQueue::remove_all(void) { // we don't have lambdas in C++03, so use a struct in function scope struct RemoveItem { static void exec(const QueueItem& item) {g_source_remove(*item.first); delete item.first;} }; if (item_list.empty()) return; // we don't want to emit 'changed' unnecessarily std::for_each(item_list.begin(), item_list.end(), RemoveItem::exec); item_list.clear(); changed.emit(); } void RedialQueue::show_dialog(void) { if (!RedialQueueDialog::get_is_redial_queue_dialog()) { dialog_p = new RedialQueueDialog(standard_size, this); changed.connect(Callback::make(*dialog_p, &RedialQueueDialog::refresh), dialog_p->releaser); // there is no memory leak -- RedialQueueDialog is modeless and will delete its own memory // when it is closed } else gtk_window_present(GTK_WINDOW(dialog_p->get_win())); } void RedialQueueDialogCB::redial_queue_dialog_button_clicked(GtkWidget* widget_p, void* data) { RedialQueueDialog* instance_p = static_cast(data); if (widget_p == instance_p->remove_button_p) { instance_p->remove_prompt(); } else if (widget_p == instance_p->close_button_p) { instance_p->close(); } else { write_error("Callback error in RedialQueueDialogCB::redial_queue_dialog_button_clicked()\n"); } } void RedialQueueDialogCB::redial_queue_dialog_set_button(GtkTreeSelection*, void* data) { RedialQueueDialog* instance_p = static_cast(data); // see if anything is selected GtkTreeSelection* selection_p = gtk_tree_view_get_selection(instance_p->tree_view_p); if (gtk_tree_selection_get_selected(selection_p, 0, 0)) { gtk_widget_set_sensitive(instance_p->remove_button_p, true); gtk_button_set_relief(GTK_BUTTON(instance_p->remove_button_p), GTK_RELIEF_NORMAL); } else { gtk_widget_set_sensitive(instance_p->remove_button_p, false); gtk_button_set_relief(GTK_BUTTON(instance_p->remove_button_p), GTK_RELIEF_NONE); } } namespace { namespace ModelColumns { enum {dest_number, id, cols_num}; } // namespace ModelColumns } // anonymous namespace RedialQueueDialog::RedialQueueDialog(const int size, RedialQueue* redial_queue_p_): WinBase(gettext("efax-gtk: Redial queue"), prog_config.window_icon_h), standard_size(size), redial_queue_p(redial_queue_p_) { ++is_redial_queue_dialog; remove_button_p = gtk_button_new(); close_button_p = gtk_button_new_from_stock(GTK_STOCK_CLOSE); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkWidget* queue_dialog_box_p = gtk_vbox_new(false, 0); GtkTable* table_p = GTK_TABLE(gtk_table_new(2, 1, false)); GtkScrolledWindow* queue_dialog_scrolled_window_p = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(0, 0)); GtkToolbar* toolbar_p = (GTK_TOOLBAR(gtk_toolbar_new())); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_SPREAD); gtk_container_add(GTK_CONTAINER(button_box_p), close_button_p); gtk_scrolled_window_set_shadow_type(queue_dialog_scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(queue_dialog_scrolled_window_p, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); // create the tree model list_store_h = GobjHandle(GTK_TREE_MODEL(gtk_list_store_new(ModelColumns::cols_num, G_TYPE_STRING, G_TYPE_POINTER))); // populate the tree model populate(); // create the tree view tree_view_p = GTK_TREE_VIEW(gtk_tree_view_new_with_model(list_store_h)); gtk_container_add(GTK_CONTAINER(queue_dialog_scrolled_window_p), GTK_WIDGET(tree_view_p)); // provide renderer for tree view, pack the fax_label tree view column // and connect to the tree model column(the fax_filename model column // is hidden and just contains data (a pointer to a GSource id) to which // the first column relates GtkCellRenderer* renderer_p = gtk_cell_renderer_text_new(); GtkTreeViewColumn* column_p = gtk_tree_view_column_new_with_attributes(gettext("Number"), renderer_p, "text", ModelColumns::dest_number, static_cast(0)); gtk_tree_view_append_column(tree_view_p, column_p); // single line selection GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); gtk_tree_selection_set_mode(selection_p, GTK_SELECTION_SINGLE); // set up the tool bar #if GTK_CHECK_VERSION(2,16,0) gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar_p), GTK_ORIENTATION_HORIZONTAL); #else gtk_toolbar_set_orientation(toolbar_p, GTK_ORIENTATION_HORIZONTAL); #endif gtk_toolbar_set_style(toolbar_p, GTK_TOOLBAR_ICONS); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(remove_xpm)); GtkWidget* image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(remove_button_p), image_p); } toolbar_append_widget(toolbar_p, remove_button_p, gettext("Remove fax from redial list")); gtk_widget_set_sensitive(remove_button_p, false); gtk_table_attach(table_p, GTK_WIDGET(queue_dialog_scrolled_window_p), 0, 1, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/3, standard_size/3); gtk_table_attach(table_p, button_box_p, 0, 1, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); gtk_box_pack_start(GTK_BOX(queue_dialog_box_p), GTK_WIDGET(toolbar_p), false, false, 0); gtk_box_pack_start(GTK_BOX(queue_dialog_box_p), GTK_WIDGET(table_p), true, true, 0); g_signal_connect(G_OBJECT(remove_button_p), "clicked", G_CALLBACK(RedialQueueDialogCB::redial_queue_dialog_button_clicked), this); g_signal_connect(G_OBJECT(close_button_p), "clicked", G_CALLBACK(RedialQueueDialogCB::redial_queue_dialog_button_clicked), this); // now connect up the signal which indicates a selection has been made selection_p = gtk_tree_view_get_selection(tree_view_p); g_signal_connect(G_OBJECT(selection_p), "changed", G_CALLBACK(RedialQueueDialogCB::redial_queue_dialog_set_button), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(close_button_p, true); #else GTK_WIDGET_SET_FLAGS(close_button_p, GTK_CAN_DEFAULT); #endif gtk_container_set_border_width(GTK_CONTAINER(table_p), standard_size/3); gtk_container_add(GTK_CONTAINER(get_win()), queue_dialog_box_p); //gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER); gtk_window_set_default_size(get_win(), standard_size * 10, standard_size * 10); gtk_widget_show_all(GTK_WIDGET(get_win())); } void RedialQueueDialog::populate_item(const QueueItem& item) { GtkTreeIter row_iter; gtk_list_store_append(GTK_LIST_STORE(list_store_h.get()), &row_iter); gtk_list_store_set(GTK_LIST_STORE(list_store_h.get()), &row_iter, ModelColumns::dest_number, item.second.c_str(), ModelColumns::id, item.first, -1); } void RedialQueueDialog::populate(void) { std::for_each(redial_queue_p->item_list.begin(), redial_queue_p->item_list.end(), MemFun::make(*this, &RedialQueueDialog::populate_item)); } void RedialQueueDialog::refresh(void) { gtk_list_store_clear(GTK_LIST_STORE(list_store_h.get())); populate(); } void RedialQueueDialog::remove_prompt(void) { GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { gchar* number = 0; gtk_tree_model_get(model_p, &row_iter, ModelColumns::dest_number, &number, -1); if (number) { std::string msg(gettext("Remove fax to ")); msg += number; msg += gettext(" from the redial queue?"); // we have not placed the gchar* string given by gtk_tree_model_get() // in a GcharScopedHandle object so we need to free it by hand g_free(number); PromptDialog* dialog_p = new PromptDialog(msg.c_str(), gettext("efax-gtk: Remove fax for redialling?"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &RedialQueueDialog::remove)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } } } void RedialQueueDialog::remove(void) { GtkTreeIter row_iter; GtkTreeModel* model_p; GtkTreeSelection* selection_p = gtk_tree_view_get_selection(tree_view_p); if (gtk_tree_selection_get_selected(selection_p, &model_p, &row_iter)) { guint* id = 0; gtk_tree_model_get(model_p, &row_iter, ModelColumns::id, &id, -1); if (id) redial_queue_p->remove(id); } } efax-gtk-3.2.8/src/socket_list.h0000644000175000001440000000341611466007653013446 00000000000000/* Copyright (C) 2001 to 2005, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef SOCKET_LIST_H #define SOCKET_LIST_H #include "prog_defs.h" #include #include #include #include #include "socket_server.h" #include #include #include #include #include class SocketListDialog: public WinBase { static int is_socket_list; const int standard_size; GtkWidget* send_button_p; GtkWidget* view_button_p; GtkWidget* remove_button_p; GtkWidget* close_button_p; GobjHandle list_store_h; GtkTreeView* tree_view_p; void send_fax_impl(void); void view_file(void); void remove_file_prompt(void); void remove_file(void); std::pair get_view_file_parms(const std::string&); void delete_parms(std::pair); void set_socket_list_item(const std::pair&); public: class CB; friend class CB; Releaser releaser; // for MainWindow object EmitterArg&> selected_fax; EmitterArg remove_from_socket_server_filelist; void close_cb(void); void set_socket_list_rows(std::pair, SharedPtr >); static int get_is_socket_list(void) {return is_socket_list;} SocketListDialog(std::pair, SharedPtr > filenames_pair, const int standard_size_); ~SocketListDialog(void); }; #endif efax-gtk-3.2.8/src/fax_list.cpp0000644000175000001440000015455411525754244013302 00000000000000/* Copyright (C) 2001 to 2007, 2009, 2010 and 2011 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #include // include rather than for mkstemp #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // the key codes are here #include #include "fax_list.h" #include "dialogs.h" #include "fax_list_icons.h" #include "utils/toolbar_append_widget.h" #include "utils/mono_tiff_print_manager.h" #include "utils/icon_info_handle.h" #include #include #include #include #include #ifdef HAVE_STREAM_IMBUE #include #endif #ifdef ENABLE_NLS #include #endif // there can be certain circumstances where PIPE_BUF is not // defined in . If so, just define the minimum // required by POSIX #ifndef PIPE_BUF #define PIPE_BUF 512 #endif int FaxListDialog::is_fax_received_list = 0; int FaxListDialog::is_fax_sent_list = 0; void FaxListDialogCB::fax_list_dialog_button_clicked(GtkWidget* widget_p, void* data) { FaxListDialog* instance_p = static_cast(data); if (widget_p == instance_p->close_button_p) { instance_p->close(); } else if (widget_p == instance_p->print_button_p) { instance_p->print_fax_prompt(); } else if (widget_p == instance_p->view_button_p) { instance_p->view_fax(); } else if (widget_p == instance_p->describe_button_p) { instance_p->describe_fax_prompt(); } else if (widget_p == instance_p->delete_fax_button_p) { instance_p->delete_fax(); } else if (widget_p == instance_p->empty_trash_button_p) { instance_p->empty_trash_prompt(); } else if (widget_p == instance_p->add_folder_button_p) { instance_p->add_folder_prompt(); } else if (widget_p == instance_p->delete_folder_button_p) { instance_p->delete_folder_prompt(); } else if (widget_p == instance_p->reset_button_p) { instance_p->reset_sig(); instance_p->display_new_fax_count(); } else if (widget_p == instance_p->page_setup_button_p) { MonoTiffPrintManager::page_setup(instance_p->get_win()); } else { write_error("Callback error in FaxListDialogCB::fax_list_dialog_button_clicked()\n"); instance_p->close(); } } FaxListDialog::FaxListDialog(FaxListEnum::Mode mode_, const int standard_size_): WinBase(0, prog_config.window_icon_h, false), mode(mode_), standard_size(standard_size_), working_dir(prog_config.working_dir), fax_list_manager(mode) { // we have included a std::string working_dir member so that we can // access it in the FaxListDialog::print_fax_thread() without having // to introduce locking of accesses to prog_config.working_dir by // the main GUI thread. It is fine to initialise it in the // initialisation list of this constructor as // prog_config.working_dir is only set once, on the first call to // configure_prog() (that is, when configure_prog() is passed false // as its argument) // notify the existence of this object if (mode == FaxListEnum::received) is_fax_received_list++; else is_fax_sent_list++; close_button_p = gtk_button_new_from_stock(GTK_STOCK_CLOSE); print_button_p = gtk_button_new(); view_button_p = gtk_button_new(); describe_button_p = gtk_button_new(); delete_fax_button_p = gtk_button_new(); empty_trash_button_p = gtk_button_new(); add_folder_button_p = gtk_button_new(); delete_folder_button_p = gtk_button_new(); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkWidget* fax_list_box_p = gtk_vbox_new(false, 0); GtkWidget* list_pane_p = gtk_hpaned_new(); GtkTable* table_p = GTK_TABLE(gtk_table_new(2, 1, false)); GtkScrolledWindow* folder_list_scrolled_window_p = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(0, 0)); GtkScrolledWindow* fax_list_scrolled_window_p = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(0, 0)); GtkToolbar* toolbar_p = (GTK_TOOLBAR(gtk_toolbar_new())); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_SPREAD); gtk_scrolled_window_set_shadow_type(folder_list_scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(folder_list_scrolled_window_p, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); fax_list_manager.insert_folder_tree_view(GTK_CONTAINER(folder_list_scrolled_window_p)); gtk_scrolled_window_set_shadow_type(fax_list_scrolled_window_p, GTK_SHADOW_IN); gtk_scrolled_window_set_policy(fax_list_scrolled_window_p, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); fax_list_manager.insert_fax_tree_view(GTK_CONTAINER(fax_list_scrolled_window_p)); // set up the tool bar #if GTK_CHECK_VERSION(2,16,0) gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar_p), GTK_ORIENTATION_HORIZONTAL); #else gtk_toolbar_set_orientation(toolbar_p, GTK_ORIENTATION_HORIZONTAL); #endif gtk_toolbar_set_style(toolbar_p, GTK_TOOLBAR_ICONS); // bring up the icon size registered in MainWindow::MainWindow() GtkIconSize efax_gtk_button_size = gtk_icon_size_from_name("EFAX_GTK_BUTTON_SIZE"); GtkWidget* image_p = 0; GtkIconTheme* icon_theme_p = gtk_icon_theme_get_default(); IconInfoScopedHandle icon_info_h(gtk_icon_theme_lookup_icon(icon_theme_p, "document-page-setup", 22, GtkIconLookupFlags(0))); if (icon_info_h.get()) { const gchar* icon_path_p = gtk_icon_info_get_filename(icon_info_h.get()); if (icon_path_p) { GError* error_p = 0; GobjHandle pixbuf_h(gdk_pixbuf_new_from_file(icon_path_p, &error_p)); if (pixbuf_h.get()) { image_p = gtk_image_new_from_pixbuf(pixbuf_h); } else { write_error("Pixbuf error in FaxList::FaxList()\n"); if (error_p) { GerrorScopedHandle handle_h(error_p); write_error(error_p->message); write_error("\n"); } } } } if (!image_p) { image_p = gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, efax_gtk_button_size); } page_setup_button_p = gtk_button_new(); gtk_container_add(GTK_CONTAINER(page_setup_button_p), image_p); toolbar_append_widget(toolbar_p, page_setup_button_p, gettext("Print page setup")); set_page_setup_button(); g_signal_connect(G_OBJECT(page_setup_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); image_p = gtk_image_new_from_stock(GTK_STOCK_PRINT, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(print_button_p), image_p); toolbar_append_widget(toolbar_p, print_button_p, gettext("Print selected fax")); gtk_widget_set_sensitive(print_button_p, false); gtk_button_set_relief(GTK_BUTTON(print_button_p), GTK_RELIEF_NONE); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(view_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(view_button_p), image_p); } toolbar_append_widget(toolbar_p, view_button_p, gettext("View selected fax")); gtk_widget_set_sensitive(view_button_p, false); gtk_button_set_relief(GTK_BUTTON(view_button_p), GTK_RELIEF_NONE); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(describe_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(describe_button_p), image_p); } toolbar_append_widget(toolbar_p, describe_button_p, gettext("Add/amend description for selected fax")); gtk_widget_set_sensitive(describe_button_p, false); gtk_button_set_relief(GTK_BUTTON(describe_button_p), GTK_RELIEF_NONE); image_p = gtk_image_new_from_stock(GTK_STOCK_DELETE, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(delete_fax_button_p), image_p); toolbar_append_widget(toolbar_p, delete_fax_button_p, gettext("Delete selected fax")); gtk_widget_set_sensitive(delete_fax_button_p, false); gtk_button_set_relief(GTK_BUTTON(delete_fax_button_p), GTK_RELIEF_NONE); image_p = gtk_image_new_from_stock(GTK_STOCK_CLEAR, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(empty_trash_button_p), image_p); toolbar_append_widget(toolbar_p, empty_trash_button_p, gettext("Empty trash folder")); gtk_widget_set_sensitive(empty_trash_button_p, false); gtk_button_set_relief(GTK_BUTTON(empty_trash_button_p), GTK_RELIEF_NONE); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(add_folder_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(add_folder_button_p), image_p); } toolbar_append_widget(toolbar_p, add_folder_button_p, gettext("Add new folder")); gtk_widget_set_sensitive(add_folder_button_p, true); gtk_button_set_relief(GTK_BUTTON(add_folder_button_p), GTK_RELIEF_NORMAL); { // scope block for the GobjHandle // GdkPixbufs are not owned by a GTK+ container when passed to it so use a GobjHandle GobjHandle pixbuf_h(gdk_pixbuf_new_from_xpm_data(delete_folder_xpm)); image_p = gtk_image_new_from_pixbuf(pixbuf_h); gtk_container_add(GTK_CONTAINER(delete_folder_button_p), image_p); } toolbar_append_widget(toolbar_p, delete_folder_button_p, gettext("Delete selected folder")); gtk_widget_set_sensitive(delete_folder_button_p, false); gtk_button_set_relief(GTK_BUTTON(delete_folder_button_p), GTK_RELIEF_NONE); gtk_container_add(GTK_CONTAINER(button_box_p), close_button_p); gtk_paned_pack1(GTK_PANED(list_pane_p), GTK_WIDGET(folder_list_scrolled_window_p), false, true); gtk_paned_pack2(GTK_PANED(list_pane_p), GTK_WIDGET(fax_list_scrolled_window_p), true, true); gtk_paned_set_position(GTK_PANED(list_pane_p), standard_size * 5); gtk_table_attach(table_p, list_pane_p, 0, 1, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/3, standard_size/3); gtk_table_attach(table_p, button_box_p, 0, 1, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/3, standard_size/3); g_signal_connect(G_OBJECT(close_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(print_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(view_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(describe_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(delete_fax_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(empty_trash_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(add_folder_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); g_signal_connect(G_OBJECT(delete_folder_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); GtkWidget* toolbar_box_p = gtk_hbox_new(false, 0); gtk_box_pack_start(GTK_BOX(toolbar_box_p), GTK_WIDGET(toolbar_p), true, true, 0); GtkWidget* new_fax_frame_p = 0; // if mode == FaxListEnum::sent we don't do anything at the moment if (mode == FaxListEnum::received) { // first provide a reset button reset_button_p = gtk_button_new(); image_p = gtk_image_new_from_stock(GTK_STOCK_UNDO, efax_gtk_button_size); gtk_container_add(GTK_CONTAINER(reset_button_p), image_p); toolbar_append_widget(toolbar_p, reset_button_p, gettext("Reset new faxes count")); gtk_widget_set_sensitive(reset_button_p, true); gtk_button_set_relief(GTK_BUTTON(reset_button_p), GTK_RELIEF_NORMAL); g_signal_connect(G_OBJECT(reset_button_p), "clicked", G_CALLBACK(FaxListDialogCB::fax_list_dialog_button_clicked), this); // now provide a display for the new received fax count new_fax_frame_p = gtk_frame_new(0); gtk_container_set_border_width(GTK_CONTAINER(new_fax_frame_p), 1); new_fax_label_p = gtk_label_new(0); gtk_misc_set_padding(GTK_MISC(new_fax_label_p), 6, 2); gtk_container_add(GTK_CONTAINER(new_fax_frame_p), new_fax_label_p); gtk_label_set_justify(GTK_LABEL(new_fax_label_p), GTK_JUSTIFY_RIGHT); GtkToolItem* separator_p = gtk_separator_tool_item_new(); gtk_separator_tool_item_set_draw(GTK_SEPARATOR_TOOL_ITEM(separator_p), false); gtk_tool_item_set_expand(separator_p, true); gtk_toolbar_insert(GTK_TOOLBAR(toolbar_p), separator_p, -1); toolbar_append_widget(GTK_TOOLBAR(toolbar_p), new_fax_frame_p, ""); // as this is in the constructor, get_new_fax_count() always shows a 0 count // but this is OK as we are using it here to size the label - the user must // call display_new_fax_count() again once get_new_fax_count_sig has been // connected up display_new_fax_count(); } else reset_button_p = 0; // now put the toolbar hbox and the main table into the window vbox gtk_box_pack_start(GTK_BOX(fax_list_box_p), GTK_WIDGET(toolbar_box_p), false, false, 0); gtk_box_pack_start(GTK_BOX(fax_list_box_p), GTK_WIDGET(table_p), true, true, 0); // now connect up the signal which indicates a selection has been made fax_list_manager.selection_notify.connect(Callback::make(*this, &FaxListDialog::set_buttons_cb)); // and connect up the signal for a double click on a row in the fax tree view fax_list_manager.fax_double_click_notify.connect(Callback::make(*this, &FaxListDialog::view_fax)); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(close_button_p, true); #else GTK_WIDGET_SET_FLAGS(close_button_p, GTK_CAN_DEFAULT); #endif gtk_widget_grab_focus(close_button_p); gtk_container_set_border_width(GTK_CONTAINER(table_p), standard_size/3); if (mode == FaxListEnum::received) gtk_window_set_title(get_win(), gettext("efax-gtk: Received fax list")); else gtk_window_set_title(get_win(), gettext("efax-gtk: Sent fax list")); //gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER); gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(fax_list_box_p)); gtk_window_set_default_size(get_win(), standard_size * 18, standard_size * 16); gtk_toolbar_set_show_arrow(GTK_TOOLBAR(toolbar_p), false); gtk_widget_show_all(GTK_WIDGET(get_win())); // not needed if gtk_toolbar_set_show_arrow() has been set false /* if (mode == FaxListEnum::received) { gtk_widget_set_size_request(GTK_WIDGET(toolbar_p), print_button_p->allocation.width + view_button_p->allocation.width + describe_button_p->allocation.width + delete_fax_button_p->allocation.width + empty_trash_button_p->allocation.width + add_folder_button_p->allocation.width + delete_folder_button_p->allocation.width + reset_button_p->allocation.width + new_fax_frame_p->allocation.width + 16, print_button_p->allocation.height); } else { gtk_widget_set_size_request(GTK_WIDGET(toolbar_p), print_button_p->allocation.width + view_button_p->allocation.width + describe_button_p->allocation.width + delete_fax_button_p->allocation.width + empty_trash_button_p->allocation.width + add_folder_button_p->allocation.width + delete_folder_button_p->allocation.width + 12, print_button_p->allocation.height); } */ } FaxListDialog::~FaxListDialog(void) { std::vector >::const_iterator iter; for (iter = view_files.begin(); iter != view_files.end(); ++iter) { unlink(iter->get()); } // notify the destruction of this object if (mode == FaxListEnum::received) is_fax_received_list--; else is_fax_sent_list--; } void FaxListDialog::set_buttons_cb(void) { // see if fax is selected RowPathList::size_type fax_count = fax_list_manager.is_fax_selected(); if (fax_count) { gtk_widget_set_sensitive(delete_fax_button_p, true); gtk_button_set_relief(GTK_BUTTON(delete_fax_button_p), GTK_RELIEF_NORMAL); } else { gtk_widget_set_sensitive(delete_fax_button_p, false); gtk_button_set_relief(GTK_BUTTON(delete_fax_button_p), GTK_RELIEF_NONE); } if (fax_count == 1) { gtk_widget_set_sensitive(print_button_p, true); gtk_widget_set_sensitive(view_button_p, true); gtk_widget_set_sensitive(describe_button_p, true); gtk_button_set_relief(GTK_BUTTON(print_button_p), GTK_RELIEF_NORMAL); gtk_button_set_relief(GTK_BUTTON(view_button_p), GTK_RELIEF_NORMAL); gtk_button_set_relief(GTK_BUTTON(describe_button_p), GTK_RELIEF_NORMAL); } else { gtk_widget_set_sensitive(print_button_p, false); gtk_widget_set_sensitive(view_button_p, false); gtk_widget_set_sensitive(describe_button_p, false); gtk_button_set_relief(GTK_BUTTON(print_button_p), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(view_button_p), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(describe_button_p), GTK_RELIEF_NONE); } // see if folder is selected if (fax_list_manager.is_folder_selected()) { if (!fax_list_manager.is_selected_folder_permanent()) { gtk_widget_set_sensitive(delete_folder_button_p, true); gtk_button_set_relief(GTK_BUTTON(delete_folder_button_p), GTK_RELIEF_NORMAL); } else { gtk_widget_set_sensitive(delete_folder_button_p, false); gtk_button_set_relief(GTK_BUTTON(delete_folder_button_p), GTK_RELIEF_NONE); } if (fax_list_manager.show_trash_folder_icon()) { gtk_widget_set_sensitive(empty_trash_button_p, true); gtk_button_set_relief(GTK_BUTTON(empty_trash_button_p), GTK_RELIEF_NORMAL); } else { gtk_widget_set_sensitive(empty_trash_button_p, false); gtk_button_set_relief(GTK_BUTTON(empty_trash_button_p), GTK_RELIEF_NONE); } } } // we have this as a separate method from set_buttons_cb, as whether // the page setup button is sensitive depends on a global setting, not // on selected faxes (it depends on whether the GTK+ print system // setting has been chosen). It is called whenever the settings dialog // emits the 'accepted' signal, via MainWindow::settings_changed_cb(). void FaxListDialog::set_page_setup_button(void) { if (prog_config.gtkprint) { gtk_widget_set_sensitive(page_setup_button_p, true); gtk_button_set_relief(GTK_BUTTON(page_setup_button_p), GTK_RELIEF_NORMAL); } else { gtk_widget_set_sensitive(page_setup_button_p, false); gtk_button_set_relief(GTK_BUTTON(page_setup_button_p), GTK_RELIEF_NONE); } } void FaxListDialog::delete_fax(void) { RowPathList::size_type fax_count; if ((fax_count = fax_list_manager.is_fax_selected())) { if (fax_list_manager.are_selected_faxes_in_trash_folder()) { std::string msg; if (fax_count == 1) { msg = gettext("Permanently delete selected fax?\n"); msg += gettext("\n(NOTE: This will permanently delete the fax\n" "from the file system)"); } else { msg = gettext("Permanently delete selected faxes?\n" "\n(NOTE: This will permanently delete the faxes\n" "from the file system)"); } PromptDialog* dialog_p = new PromptDialog(msg.c_str(), gettext("efax-gtk: Delete fax"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(fax_list_manager, &FaxListManager::delete_fax)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } else fax_list_manager.move_selected_faxes_to_trash_folder(); } } void FaxListDialog::describe_fax_prompt(void) { if (fax_list_manager.is_fax_selected() == 1) { GcharSharedHandle fax_description_h(fax_list_manager.get_fax_description()); // fax_description_h will be null if there is no fax description already std::string description; if (fax_description_h.get()) description = fax_description_h.get(); DescriptionDialog* dialog_p = new DescriptionDialog(standard_size, description.c_str(), get_win()); dialog_p->accepted.connect(Callback::make(fax_list_manager, &FaxListManager::describe_fax)); // there is no memory leak -- the memory will be deleted when DescriptionDialog closes } } void FaxListDialog::empty_trash_prompt(void) { std::string msg(gettext("Empty trash folder?\n" "\n(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)")); PromptDialog* dialog_p = new PromptDialog(msg.c_str(), gettext("efax-gtk: Trash folder"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(fax_list_manager, &FaxListManager::empty_trash_folder)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } void FaxListDialog::add_folder_prompt(void) { AddFolderDialog* dialog_p = new AddFolderDialog(standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &FaxListDialog::add_folder)); // there is no memory leak -- the memory will be deleted when AddFolderDialog closes } void FaxListDialog::add_folder(const std::string& folder_name) { std::pair result = fax_list_manager.is_folder_name_valid(folder_name); if (!result.first) { new InfoDialog(result.second.c_str(), gettext("efax-gtk: Add folder"), GTK_MESSAGE_WARNING, get_win()); // there is no memory leak -- the memory will be deleted when InfoDialog closes } else fax_list_manager.make_folder(folder_name, false); } void FaxListDialog::delete_folder_prompt(void) { // the "Delete folder" button will not be sensitive if // fax_list_manager.is_selected_folder_permanent() returns true // but test it here again just in case if (fax_list_manager.is_selected_folder_permanent()) beep(); else if (fax_list_manager.is_folder_selected()) { if (!fax_list_manager.is_selected_folder_empty()) { new InfoDialog(gettext("Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder"), gettext("efax-gtk: Delete folder"), GTK_MESSAGE_WARNING, get_win()); // there is no memory leak -- the memory will be deleted when InfoDialog closes } else { GcharSharedHandle folder_name_h(fax_list_manager.get_folder_name()); std::string msg(gettext("Delete folder: ")); // as we checked for a folder selection, folder_name_h should not be // null, but check it in case if (folder_name_h.get()) msg += folder_name_h.get(); msg += gettext("?"); PromptDialog* dialog_p = new PromptDialog(msg.c_str(), gettext("efax-gtk: Delete folder"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(fax_list_manager, &FaxListManager::delete_folder)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } } } void FaxListDialog::print_fax_prompt(void) { // we do not need a mutex before reading prog_config.print_cmd // as although read in FaxListDialog::get_print_from_stdin_parms(), // the thread which executes that method cannot start until the prompt // dialog below is launched if(fax_list_manager.is_fax_selected() == 1 && !prog_config.print_cmd.empty()) { // we do not need a mutex before reading prog_config.print_popup either, even though // it is also read in FaxListDialog::print_fax_thread(), because it is of type // bool which can be safely concurrently read in different threads and in any // event it is read in FaxListDialog::print_fax_thread() in a separate process // after fork()ing so there isn't even concurrent access if (prog_config.gtkprint) print_fax(); else if (prog_config.print_popup) { std::string msg(gettext("Print selected fax?")); PromptDialog* dialog_p = new PromptDialog(msg.c_str(), gettext("efax-gtk: Print fax"), standard_size, get_win()); dialog_p->accepted.connect(Callback::make(*this, &FaxListDialog::print_fax)); // there is no memory leak -- the memory will be deleted when PromptDialog closes } else print_fax(); } } std::pair FaxListDialog::get_print_from_stdin_parms(void) { std::vector print_parms; std::string print_cmd; std::string print_name; std::string::size_type end_pos; { // scope block for mutex lock // lock the Prog_config object to stop it being modified or accessed in the initial (GUI) // thread while we are accessing it here Thread::Mutex::Lock lock(*prog_config.mutex_p); try { print_cmd = Utf8::filename_from_utf8(prog_config.print_cmd); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in FaxListDialog::print_from_stdin()\n"); return std::pair(static_cast(0), static_cast(0)); } } if ((end_pos = print_cmd.find_first_of(' ')) != std::string::npos) { // we have parms print_name.assign(print_cmd, 0, end_pos); print_parms.push_back(print_name); // find start of next parm std::string::size_type start_pos = print_cmd.find_first_not_of(' ', end_pos); while (start_pos != std::string::npos) { end_pos = print_cmd.find_first_of(' ', start_pos); if (end_pos != std::string::npos) { print_parms.push_back(print_cmd.substr(start_pos, end_pos - start_pos)); start_pos = print_cmd.find_first_not_of(' ', end_pos); // prepare for next interation } else { print_parms.push_back(print_cmd.substr(start_pos, print_cmd.size() - start_pos)); start_pos = end_pos; } } } else { // just a print command without parameters to be passed print_name = print_cmd; print_parms.push_back(print_name); } char** exec_parms = new char*[print_parms.size() + 1]; char** temp_pp = exec_parms; std::vector::const_iterator iter; for (iter = print_parms.begin(); iter != print_parms.end(); ++iter, ++temp_pp) { *temp_pp = new char[iter->size() + 1]; std::strcpy(*temp_pp, iter->c_str()); } *temp_pp = 0; char* prog_name = new char[print_name.size() + 1]; std::strcpy(prog_name, print_name.c_str()); return std::pair(prog_name, exec_parms); } std::pair FaxListDialog::get_fax_to_ps_parms (const std::string& basename, bool allow_shrink) { // set up the parms for efix std::vector efix_parms; std::string temp; { // scope block for mutex lock // lock the Prog_config object to stop it being modified or accessed in the initial (GUI) // thread while we are accessing it here Thread::Mutex::Lock lock(*prog_config.mutex_p); efix_parms.push_back("efix-0.9a"); // shut up efix (comment out next line and uncomment following one if errors to be reported) efix_parms.push_back("-v"); //efix_parms.push_back("-ve"); efix_parms.push_back("-r300"); efix_parms.push_back("-ops"); temp = "-p"; temp += prog_config.page_dim; efix_parms.push_back(temp); if (allow_shrink && prog_config.print_shrink.compare("100")) { // if print_shrink is not 100 temp = "-s0."; temp += prog_config.print_shrink; efix_parms.push_back(temp); std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE if (!prog_config.page_size.compare("a4")) { strm << "-d"; float val = 210 * (100 - std::atoi(prog_config.print_shrink.c_str()))/200.0; strm << static_cast(val + 0.5); val = 297 * (100 - std::atoi(prog_config.print_shrink.c_str()))/200.0; strm << ',' << static_cast(val + 0.5) << "mm"; efix_parms.push_back(strm.str()); } else if (!prog_config.page_size.compare("letter")) { strm << "-d"; float val = 216 * (100 - std::atoi(prog_config.print_shrink.c_str()))/200.0; strm << static_cast(val + 0.5); val = 279 * (100 - std::atoi(prog_config.print_shrink.c_str()))/200.0; strm << ',' << static_cast(val + 0.5) << "mm"; efix_parms.push_back(strm.str()); } else if (!prog_config.page_size.compare("legal")) { strm << "-d"; float val = 216 * (100 - std::atoi(prog_config.print_shrink.c_str()))/200.0; strm << static_cast(val + 0.5); val = 356 * (100 - std::atoi(prog_config.print_shrink.c_str()))/200.0; strm << ',' << static_cast(val + 0.5) << "mm"; efix_parms.push_back(strm.str()); } } int partnumber = 1; std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE strm << basename.c_str() << std::setfill('0') << std::setw(3) << partnumber; int result = access(strm.str().c_str(), R_OK); while (!result) { efix_parms.push_back(strm.str()); partnumber++; strm.str(""); strm << basename.c_str() << std::setfill('0') << std::setw(3) << partnumber; result = access(strm.str().c_str(), R_OK); } } // end of mutex lock scope block char** exec_parms = new char*[efix_parms.size() + 1]; char** temp_pp = exec_parms; std::vector::const_iterator iter; for (iter = efix_parms.begin(); iter != efix_parms.end(); ++iter, ++temp_pp) { *temp_pp = new char[iter->size() + 1]; std::strcpy(*temp_pp, iter->c_str()); } *temp_pp = 0; char* prog_name = new char[std::strlen("efix-0.9a") + 1]; std::strcpy(prog_name, "efix-0.9a"); return std::pair(prog_name, exec_parms); } void FaxListDialog::write_pipe_to_file(PipeFifo* pipe_p, int file_fd) { ssize_t read_result; ssize_t write_result; ssize_t written; char buffer[PIPE_BUF]; while ((read_result = pipe_p->read(buffer, PIPE_BUF)) > 0) { written = 0; do { write_result = write(file_fd, buffer + written, read_result); if (write_result > 0) { written += write_result; read_result -= write_result; } } while (read_result && (write_result != -1 || errno == EINTR)); } g_usleep(50000); } std::pair FaxListDialog::get_ps_viewer_parms(const char* filename) { std::vector view_parms; std::string view_cmd; std::string view_name; std::string::size_type end_pos; { // scope block for mutex lock // lock the Prog_config object to stop it being modified or accessed in the initial (GUI) // thread while we are accessing it here Thread::Mutex::Lock lock(*prog_config.mutex_p); try { view_cmd = Utf8::filename_from_utf8(prog_config.ps_view_cmd); } catch (Utf8::ConversionError&) { write_error("UTF-8 conversion error in FaxListDialog::ps_viewer()\n"); return std::pair(static_cast(0), static_cast(0)); } } if ((end_pos = view_cmd.find_first_of(' ')) != std::string::npos) { // we have parms view_name.assign(view_cmd, 0, end_pos); view_parms.push_back(view_name); // find start of next parm std::string::size_type start_pos = view_cmd.find_first_not_of(' ', end_pos); while (start_pos != std::string::npos) { end_pos = view_cmd.find_first_of(' ', start_pos); if (end_pos != std::string::npos) { view_parms.push_back(view_cmd.substr(start_pos, end_pos - start_pos)); start_pos = view_cmd.find_first_not_of(' ', end_pos); // prepare for next interation } else { view_parms.push_back(view_cmd.substr(start_pos, view_cmd.size() - start_pos)); start_pos = end_pos; } } } else { // just a print command without parameters to be passed view_name = view_cmd; view_parms.push_back(view_name); } view_parms.push_back(filename); char** exec_parms = new char*[view_parms.size() + 1]; char** temp_pp = exec_parms; std::vector::const_iterator iter; for (iter = view_parms.begin(); iter != view_parms.end(); ++iter, ++temp_pp) { *temp_pp = new char[iter->size() + 1]; std::strcpy(*temp_pp, iter->c_str()); } *temp_pp = 0; char* prog_name = new char[view_name.size() + 1]; std::strcpy(prog_name, view_name.c_str()); return std::pair(prog_name, exec_parms); } void FaxListDialog::print_fax(void) { if (fax_list_manager.is_fax_selected() == 1 && !prog_config.print_cmd.empty()) { // if c++-gtk-utils-2.0 is being used, we know we are // compiling under C++0x/C++11 #if CGU_API_VERSION>=20 std::unique_ptr fax_basename_a(new std::string(prog_config.working_dir)); #else std::auto_ptr fax_basename_a(new std::string(prog_config.working_dir)); #endif if (mode == FaxListEnum::received) *fax_basename_a += "/faxin/"; else *fax_basename_a += "/faxsent/"; // we don't need to use a Glib conversion function here - we know the // fax name is just plain ASCII numbers GcharSharedHandle fax_number_h(fax_list_manager.get_fax_number()); std::string fax_number; // as we checked for a fax selection, fax_number_h should not be // null, but check it in case if (fax_number_h.get()) fax_number = fax_number_h.get(); *fax_basename_a += fax_number; *fax_basename_a += '/'; *fax_basename_a += fax_number; *fax_basename_a += '.'; // create the print manager if (prog_config.gtkprint) async_queue.push(MonoTiffPrintManager::create_manager(get_win())); // now block off the signals for which we have set handlers so that the worker // thread does not receive the signals, otherwise we will have memory synchronisation // issues in multi-processor systems - we will unblock in the initial (GUI) thread // as soon as the socket server thread has been launched sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); pthread_sigmask(SIG_BLOCK, &sig_mask, 0); // hand ownership of fax_basename_a to the new thread - Thread::Thread::start() // could throw in the event of memory allocation failure, as could the creation of // the Callback2 object on free store, but as a matter of policy we do not deal // with that condition in this program so we can pass a raw pointer rather than // the std::auto_ptr/std::unique_ptr object - anyway passing such an object wouldn't // be enough as we would still have to catch the std::bad_alloc exception in // order to pop() off the object in async_queue std::string* arg_p = fax_basename_a.release(); if (!Thread::Thread::start(Callback::make(*this, &FaxListDialog::print_fax_thread, arg_p, prog_config.gtkprint), false).get()) { delete arg_p; write_error("Cannot start new print thread, fax will not be printed\n"); // Because another thread (for another print job) could have been // launched this may extract a different print manager object from // the one created above in this thread, but that doesn't matter as // they are all the same - the filename passed as the argument to // print_fax_thread() which in fact determines the print job printed if (prog_config.gtkprint) { try { async_queue.pop(); } catch (AsyncQueuePopError& error) { write_error(error.what()); write_error(" in FaxListDialog::print_fax()\n"); } } } // now unblock the signals so that the initial (GUI) thread can receive them pthread_sigmask(SIG_UNBLOCK, &sig_mask, 0); } } void FaxListDialog::print_fax_thread(std::string* arg_p, bool use_gtkprint) { // extract the string argument to a std::auto_ptr/unique_ptr object // if c++-gtk-utils-2.0 is being used, we know we are // compiling under C++0x/C++11 #if CGU_API_VERSION>=20 const std::unique_ptr fax_basename_a(arg_p); #else const std::auto_ptr fax_basename_a(arg_p); #endif // extract any FilePrintManager object IntrusivePtr print_manager_i; if (use_gtkprint) { try { async_queue.pop(print_manager_i); } catch (AsyncQueuePopError& error) { write_error(error.what()); write_error(" in FaxListDialog::print_fax_thread()\n"); return; } std::vector filenames; int partnumber = 1; std::ostringstream strm; #ifdef HAVE_STREAM_IMBUE strm.imbue(std::locale::classic()); #endif // HAVE_STREAM_IMBUE strm << fax_basename_a->c_str() << std::setfill('0') << std::setw(3) << partnumber; int result = access(strm.str().c_str(), R_OK); while (!result) { filenames.push_back(strm.str()); partnumber++; strm.str(""); strm << fax_basename_a->c_str() << std::setfill('0') << std::setw(3) << partnumber; result = access(strm.str().c_str(), R_OK); } print_manager_i->set_filenames(filenames); print_manager_i->print(); // this will pass ownership to the FilePrintManager object // which will control its own destiny now, via the GTK+ // print system } else { // get the arguments for the exec() calls below (because this is a // multi- threaded program, we must do this before fork()ing because // we use functions to get the arguments which are not async-signal-safe) std::pair fax_to_ps_parms(get_fax_to_ps_parms(*fax_basename_a, true)); std::pair print_from_stdin_parms(get_print_from_stdin_parms()); if (print_from_stdin_parms.first) { // this will be 0 if get_print_from_stdin_parms() // threw a Utf8::ConversionError) // now launch a new process to control the printing process // the main program process needs to continue while the printing // is going on pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); std::exit(FORK_ERROR); } if (!pid) { // child print process // make the call to connect_to_stderr() in this child process // dependent on calling a print confirmation popup dialog: if we have // elected not to bring up such a dialog, we are probably using a // print manager such as kprinter, and we can get confusing messages // from stderr from these // no mutex is required for the access to prog_config.print_popup // because we have fork()ed into a separate process if (prog_config.print_popup) connect_to_stderr(); // now create a blocking pipe which the print processes can use to // communicate PipeFifo fork_pipe; try { fork_pipe.open(PipeFifo::block); } catch (PipeError&) { write_error("Cannot open pipe in FaxListDialog::print_fax_thread()\n"); _exit(PIPE_ERROR); } pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); _exit(FORK_ERROR); } if (!pid) { // process to exec to print_from_stdin() fork_pipe.connect_to_stdin(); execvp(print_from_stdin_parms.first, print_from_stdin_parms.second); // if we reached this point, then the execvp() call must have failed // write error and then end process - use _exit(), not exit() write_error("Can't find the print program - please check your installation\n" "and the PATH environmental variable\n"); _exit(0); } // this is the process which will send postscript to stdout fork_pipe.connect_to_stdout(); execvp(fax_to_ps_parms.first, fax_to_ps_parms.second); // if we reached this point, then the execvp() call must have failed // report error and then end process - use _exit(), not exit() write_error("Can't find the efix-0.9a program - please check your installation\n" "and the PATH environmental variable\n"); _exit(0); } // release the memory allocated on the heap for // the redundant print_from_stdin_parms and fax_to_ps_parms // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(print_from_stdin_parms); } delete_parms(fax_to_ps_parms); } } void FaxListDialog::view_fax(void) { bool have_view_cmd; // lock the Prog_config object to stop it being modified or accessed in the initial (GUI) // thread while we are accessing it here { Thread::Mutex::Lock lock(*prog_config.mutex_p); have_view_cmd = !prog_config.ps_view_cmd.empty(); } if (fax_list_manager.is_fax_selected() == 1 && have_view_cmd) { // if c++-gtk-utils-2.0 is being used, we know we are // compiling under C++0x/C++11 #if CGU_API_VERSION>=20 std::unique_ptr fax_basename_a(new std::string(prog_config.working_dir)); #else std::auto_ptr fax_basename_a(new std::string(prog_config.working_dir)); #endif if (mode == FaxListEnum::received) *fax_basename_a += "/faxin/"; else *fax_basename_a += "/faxsent/"; // we don't need to use a Glib conversion function here - we know the // fax name is just plain ASCII numbers GcharSharedHandle fax_number_h(fax_list_manager.get_fax_number()); std::string fax_number; // as we checked for a fax selection, fax_number_h should not be // null, but check it in case if (fax_number_h.get()) fax_number = fax_number_h.get(); *fax_basename_a += fax_number; *fax_basename_a += '/'; *fax_basename_a += fax_number; *fax_basename_a += '.'; // get a temporary file // if c++-gtk-utils-2.0 is being used, we know we are // compiling under C++0x/C++11 #if CGU_API_VERSION>=20 std::unique_ptr filename_a(new std::string(prog_config.working_dir)); #else std::auto_ptr filename_a(new std::string(prog_config.working_dir)); #endif *filename_a += "/efax-gtk-view-XXXXXX"; std::string::size_type size = filename_a->size() + 1; SharedHandle tempfile_h(new char[size]); std::memcpy(tempfile_h.get(), filename_a->c_str(), size); // this will include the terminating '\0' in the copy int file_fd = mkstemp(tempfile_h.get()); if (file_fd == -1) { write_error("Failed to make temporary file for viewing"); return; } view_files.push_back(tempfile_h); *filename_a = tempfile_h.get(); // now block off the signals for which we have set handlers so that the socket server // thread does not receive the signals, otherwise we will have memory synchronisation // issues in multi-processor systems - we will unblock in the initial (GUI) thread // as soon as the socket server thread has been launched sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); pthread_sigmask(SIG_BLOCK, &sig_mask, 0); // hand ownership of the file_pair arguments to the new thread - Thread::Thread::start() // could throw in the event of memory allocation failure, as could the creation of // the Callback2 object on free store, but as a matter of policy we do not deal with // that condition in this program so we can pass a raw pointer rather than the // std::auto_ptr/std::unique_ptr object std::string* fax_basename_p = fax_basename_a.release(); std::pair file_pair; file_pair.first = filename_a.release(); file_pair.second = file_fd; if (!Thread::Thread::start(Callback::make(*this, &FaxListDialog::view_fax_thread, fax_basename_p, file_pair), false).get()) { delete fax_basename_p; delete file_pair.first; while (::close(file_fd) == -1 && errno == EINTR); write_error("Cannot start new view fax thread, fax cannot be viewed\n"); } // now unblock the signals so that the initial (GUI) thread can receive them pthread_sigmask(SIG_UNBLOCK, &sig_mask, 0); } } void FaxListDialog::view_fax_thread(std::string* fax_basename_p, std::pair file_pair) { // if c++-gtk-utils-2.0 is being used, we know we are // compiling under C++0x/C++11 #if CGU_API_VERSION>=20 const std::unique_ptr fax_basename_a(fax_basename_p); const std::unique_ptr filename_a(file_pair.first); #else const std::auto_ptr fax_basename_a(fax_basename_p); const std::auto_ptr filename_a(file_pair.first); #endif // now create a pipe and proceed to fork to write the postscript to temporary file PipeFifo fork_pipe(PipeFifo::block); // get the arguments for the exec() call to convert the fax files to // PS format following the next fork() call (because this is a multi- // threaded program, we must do this before fork()ing because we use // functions to get the arguments which are not async-signal-safe) std::pair fax_to_ps_parms(get_fax_to_ps_parms(*fax_basename_a, false)); // now fork to create the process which will write postscript to stdout pid_t pid = fork(); if (pid == -1) { write_error("Fork error - exiting\n"); std::exit(FORK_ERROR); } if (!pid) { // child process which will send postscript to stdout // this is the child process to write to stdin // now we have fork()ed we can connect to stderr connect_to_stderr(); fork_pipe.connect_to_stdout(); execvp(fax_to_ps_parms.first, fax_to_ps_parms.second); // if we reached this point, then the execvp() call must have failed // report error and then end process - use _exit(), not exit() write_error("Can't find the efix-0.9a program - please check your installation\n" "and the PATH environmental variable\n"); _exit(0); } // this is the parent process, // first, release the memory allocated on the heap for // the redundant fax_to_ps_parms // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(fax_to_ps_parms); // now write from the pipe (containing the generated PS text) to file fork_pipe.make_readonly(); write_pipe_to_file(&fork_pipe, file_pair.second); while (::close(file_pair.second) == -1 && errno == EINTR); // the temporary file to be viewed has now been created // so launch a new process to control the viewing process // we will reset handlers and then fork() again having done // so, so that we can wait on the child of child // first get the arguments for the exec() call to launch the fax // viewer following the next fork() call (because this is a multi- // threaded program, we must do this before fork()ing because we use // functions to get the arguments which are not async-signal-safe) std::pair ps_viewer_parms(get_ps_viewer_parms(filename_a->c_str())); if (ps_viewer_parms.first) { // this will be 0 if get_ps_viewer_parms() // threw a Utf8::ConversionError) pid = fork(); if (pid == -1) { write_error("Fork error\n"); std::exit(FORK_ERROR); } if (!pid) { // child view-control process // unblock signals as these are blocked for all worker threads // (the child process inherits the signal mask of the thread // creating it with the fork() call) sigset_t sig_mask; sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGCHLD); sigaddset(&sig_mask, SIGQUIT); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); sigaddset(&sig_mask, SIGHUP); // this child process is single threaded, so we can use sigprocmask() // rather than pthread_sigmask() (and should do so as sigprocmask() // is guaranteed to be async-signal-safe) // this process will not be receiving interrupts so we do not need // to test for EINTR on the call to sigprocmask() sigprocmask(SIG_UNBLOCK, &sig_mask, 0); connect_to_stderr(); execvp(ps_viewer_parms.first, ps_viewer_parms.second); // if we reached this point, then the execvp() call must have failed // report error and then end process - use _exit(), not exit() write_error("Can't find the ps viewer program - please check your installation\n" "and the PATH environmental variable\n"); _exit(0); } // release the memory allocated on the heap for // the redundant ps_viewer_parms // we are in the main parent process here - no worries about // only being able to use async-signal-safe functions delete_parms(ps_viewer_parms); } } void FaxListDialog::display_new_fax_count(void) { // if mode == FaxListEnum::sent we don't do anything at the moment if (mode == FaxListEnum::received) { int fax_count = 0; // make the count 0 if the emitter has not // yet been connected up get_new_fax_count_sig(fax_count); #if GTK_CHECK_VERSION(2,99,0) if (fax_count) { GdkRGBA red; red.red = 0.9; red.green = 0.0; red.blue = 0.0; red.alpha = 1.0; gtk_widget_override_color(new_fax_label_p, GTK_STATE_FLAG_NORMAL, &red); } else { gtk_widget_override_color(new_fax_label_p, GTK_STATE_FLAG_NORMAL, 0); } #else if (fax_count) { GdkColor red; red.red = static_cast(0.9 * 65535.0); red.green = 0; red.blue = 0; // we don't need to allocate the GdkColor red object before it is // used by gtk_widget_modify_fg() - that function will do it itself gtk_widget_modify_fg(new_fax_label_p, GTK_STATE_NORMAL, &red); } else { gtk_widget_modify_fg(new_fax_label_p, GTK_STATE_NORMAL, 0); } #endif std::ostringstream strm; strm << gettext("New faxes:"); strm << std::setfill(' ') << std::setw(4) << fax_count; gtk_label_set_text(GTK_LABEL(new_fax_label_p), strm.str().c_str()); } } void FaxListDialog::delete_parms(std::pair parms_pair) { delete[] parms_pair.first; char* const* temp_pp = parms_pair.second; for(; *temp_pp != 0; ++temp_pp) { delete[] *temp_pp; } delete[] parms_pair.second; } void EntryDialogCB::entry_dialog_selected(GtkWidget* widget_p, void* data) { EntryDialog* instance_p = static_cast(data); if (widget_p == instance_p->ok_button_p) { if (instance_p->selected_impl()) instance_p->close(); } else if (widget_p == instance_p->cancel_button_p) instance_p->close(); else { write_error("Callback error in EntryDialogCB::entry_dialog_selected()\n"); instance_p->close(); } } gboolean EntryDialogCB::entry_dialog_key_press_event(GtkWidget*, GdkEventKey* event_p, void* data) { EntryDialog* instance_p = static_cast(data); int keycode = event_p->keyval; #if GTK_CHECK_VERSION(2,20,0) bool cancel_focus = gtk_widget_has_focus(instance_p->cancel_button_p); #else bool cancel_focus = GTK_WIDGET_HAS_FOCUS(instance_p->cancel_button_p); #endif #if GTK_CHECK_VERSION(2,99,0) if (keycode == GDK_KEY_Return && !cancel_focus) { if (instance_p->selected_impl()) instance_p->close(); return true; // stop processing here } #else if (keycode == GDK_Return && !cancel_focus) { if (instance_p->selected_impl()) instance_p->close(); return true; // stop processing here } #endif return false; // continue processing key events } EntryDialog::EntryDialog(const int standard_size, const char* entry_text, const char* caption, const char* label_text, GtkWindow* parent_p): WinBase(caption, prog_config.window_icon_h, true, parent_p) { ok_button_p = gtk_button_new_from_stock(GTK_STOCK_OK); cancel_button_p = gtk_button_new_from_stock(GTK_STOCK_CANCEL); entry_p = gtk_entry_new(); GtkWidget* button_box_p = gtk_hbutton_box_new(); GtkWidget* label_p = gtk_label_new(label_text); GtkTable* table_p = GTK_TABLE(gtk_table_new(3, 1, false)); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box_p), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(button_box_p), standard_size/2); gtk_container_add(GTK_CONTAINER(button_box_p), cancel_button_p); gtk_container_add(GTK_CONTAINER(button_box_p), ok_button_p); gtk_table_attach(table_p, label_p, 0, 1, 0, 1, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GtkAttachOptions(GTK_FILL | GTK_EXPAND), standard_size/2, standard_size/4); gtk_table_attach(table_p, entry_p, 0, 1, 1, 2, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_EXPAND, standard_size/2, standard_size/4); gtk_table_attach(table_p, button_box_p, 0, 1, 2, 3, GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_SHRINK, standard_size/2, standard_size/4); g_signal_connect(G_OBJECT(ok_button_p), "clicked", G_CALLBACK(EntryDialogCB::entry_dialog_selected), this); g_signal_connect(G_OBJECT(cancel_button_p), "clicked", G_CALLBACK(EntryDialogCB::entry_dialog_selected), this); g_signal_connect(G_OBJECT(get_win()), "key_press_event", G_CALLBACK(EntryDialogCB::entry_dialog_key_press_event), this); #if GTK_CHECK_VERSION(2,20,0) gtk_widget_set_can_default(ok_button_p, true); gtk_widget_set_can_default(cancel_button_p, true); #else GTK_WIDGET_SET_FLAGS(ok_button_p, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(cancel_button_p, GTK_CAN_DEFAULT); #endif gtk_container_add(GTK_CONTAINER(get_win()), GTK_WIDGET(table_p)); gtk_entry_set_text(GTK_ENTRY(entry_p), entry_text); gtk_widget_set_size_request(entry_p, standard_size * 9, standard_size); gtk_widget_grab_focus(entry_p); gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_container_set_border_width(GTK_CONTAINER(get_win()), standard_size/2); gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_resizable(get_win(), false); gtk_widget_show_all(GTK_WIDGET(get_win())); // we now need to deselect what is in the entry gtk_editable_select_region(GTK_EDITABLE(entry_p), 0, 0); } bool EntryDialog::selected_impl(void) { bool return_val = false; const gchar* text = gtk_entry_get_text(GTK_ENTRY(entry_p)); if (!*text) beep(); else { accepted(text); return_val = true; } return return_val; } DescriptionDialog::DescriptionDialog(const int standard_size, const char* text, GtkWindow* parent_p): EntryDialog(standard_size, text, gettext("efax-gtk: Fax description"), gettext("Fax description?"), parent_p) {} AddFolderDialog::AddFolderDialog(const int standard_size, GtkWindow* parent_p): EntryDialog(standard_size, "", gettext("efax-gtk: Add folder"), gettext("Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)"), parent_p) {} efax-gtk-3.2.8/src/addressbook_icons.h0000644000175000001440000000172111466007653014613 00000000000000#ifndef ADDRESSBOOK_ICONS_H #define ADDRESSBOOK_ICONS_H /* This icon was taken from those supplied with KDE 2.1 and is copyrighted accordingly */ /* XPM */ static const char* add_xpm[]={ "22 22 13 1", ". c None", "e c #000000", "j c #303030", "k c #400000", "# c #800000", "h c #808080", "i c #aaaaaa", "c c #c00000", "g c #c8c8c8", "a c #ff0000", "b c #ff8080", "d c #ffc0c0", "f c #ffffff", "..................#abc", ".................#cdcc", "................#cdccc", "...............#cdccc#", "..............#cdccc##", ".............#cdccc##e", "............#cdccc##e.", "...........#cdccc##e..", "..........#cdccc##e...", ".........#cdccc##e....", "........#cdccc##e.....", ".......#cdccc##e......", "......#cdccc##e.......", ".....#cdccc##e........", ".....fgccc##e.........", ".....f.gc##e..........", "....f.ggh#e...........", "...f.gihje............", "...cgije..............", "..c#ke................", "..#k..................", "......................"}; #endif efax-gtk-3.2.8/src/Makefile.am0000644000175000001440000000267611466007653013015 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = internal utils bin_PROGRAMS = efax-gtk efax_gtk_SOURCES = main.cpp mainwindow.cpp dialogs.cpp fax_list.cpp \ fax_list_manager.cpp file_list.cpp \ efax_controller.cpp addressbook.cpp settings.cpp \ settings_help.cpp helpfile.cpp socket_server.cpp \ socket_list.cpp socket_notify.cpp logger.cpp \ tray_icon.cpp redial_queue.cpp noinst_HEADERS = mainwindow.h dialogs.h fax_list.h \ fax_list_manager.h file_list.h efax_controller.h \ addressbook.h settings.h settings_help.h \ helpfile.h socket_server.h socket_list.h \ socket_notify.h logger.h tray_icon.h \ redial_queue.h gpl.h prog_defs.h menu_icons.h \ addressbook_icons.h settings_icons.h window_icon.h \ socket_list_icons.h file_list_icons.h \ fax_list_icons.h fax_list_manager_icons.h \ redial_queue_icons.h INCLUDES = -DDATADIR=\"$(datadir)\" -DRC_DIR=\"$(sysconfdir)\" AM_CXXFLAGS = -D_XOPEN_SOURCE=600 @GTK_CFLAGS@ @GTHREAD_CFLAGS@ @X11_CFLAGS@ \ @CXX_GTK_UTILS_CFLAGS@ @COND_CXXFLAG@ -I./utils efax_gtk_LDADD = utils/libutils.a @COND_INTERNAL_LIB@ @LIBINTL@ @GTK_LIBS@ @GTHREAD_LIBS@ \ @X11_LIBS@ @DBUS_GLIB_LIBS@ @GIO_LIBS@ @CXX_GTK_UTILS_LIBS@ -ltiff efax-gtk-3.2.8/src/menu_icons.h0000644000175000001440000000760211466007653013263 00000000000000#ifndef MENU_ICONS_H #define MENU_ICONS_H /* XPM */ /* This icon is taken from those supplied with GNOME 2.6 and is copyrighted accordingly */ static const char* about_xpm[]={ "16 16 31 1", ". c None", "l c None", "n c None", "s c None", "# c None", "m c None", "r c #050501", "f c #101104", "d c #000000", "c c #151606", "p c #1f1f08", "z c #181806", "C c #161705", "B c #1e1f08", "k c #4a4c13", "a c #4c4e13", "g c #64671a", "y c #b4ba2f", "j c #cbd235", "u c #abb02d", "A c #cdd435", "b c #000000", "x c #ced636", "q c #e5ec3c", "t c #e8f03d", "o c #e9f03d", "h c #eaf13d", "v c #ecf33e", "e c #eef63e", "w c #eff73f", "i c #f0f83f", "................", "................", "................", "........#.......", ".......abc......", "......dbeb......", "...fgbbhijbbk.lm", "...nbiiiiiiob...", "....pbiiiiqbr..s", ".....btiiiub....", ".....bivbwxb....", ".....bybzbAb....", ".....Bb...bC....", "................", "................", "................"}; /* This icon was taken from those supplied with KDE 2.1 and is copyrighted accordingly */ static const char* view_xpm[]={ "22 22 113 2", "Qt c None", "#S c #06afb1", "#R c #0ae1df", "#N c #0cfdfa", ".# c #121212", "#O c #141414", "#Q c #3f3f40", "#T c #404041", "#w c #409fa8", "#r c #46a3ab", "#D c #46a5ad", "#x c #46a7b5", "#h c #4bacb4", "#q c #4bb3bd", "#g c #4db5bf", "#f c #4ec3ce", "#p c #50c8d3", "#C c #56adb6", ".6 c #56b8c6", ".7 c #57b5bd", ".W c #62bfc8", ".V c #65c1ce", "#E c #66bdc8", "#s c #6abdc9", "#U c #707071", ".5 c #73d0de", "#o c #74d0de", "#e c #76d1df", ".M c #79cad5", ".N c #7acad2", ".d c #7e8180", ".l c #7f8180", ".v c #7f8281", "#A c #808382", ".U c #81d5e1", "#n c #82d9e1", "#F c #83d6de", ".E c #84ced7", "#y c #84dae2", ".4 c #85d8e2", "#K c #86d4de", "#J c #8bd4dc", "#l c #8bd5e0", "#m c #91dae5", ".L c #92d8e3", ".D c #95d5dd", "#i c #95dbe6", ".3 c #98dde7", ".a c #999b9a", "#d c #99dce8", ".T c #99dee8", "#k c #9dd5de", "#I c #9fdbe3", "#B c #a4dce5", ".s c #a4dce7", ".X c #a5e1ea", "#c c #a6e4eb", ".K c #a7e5ec", "#M c #ababab", ".F c #abe0e9", ".8 c #abe4eb", ".C c #ace4eb", ".S c #ade5ec", ".b c #aeb6b7", "#H c #aee2ea", "#b c #aee6ed", "#v c #afe6ed", ".t c #b2e5ed", ".O c #b2e7ef", "#a c #b3e0e6", "#t c #b3e7ef", ".Y c #b5d1d5", ".r c #b5e7ef", ".P c #b6bdbc", ".9 c #b8dfe3", ".c c #b9c2c4", ".2 c #baebef", ".J c #bbeaf0", "#. c #bcc3c4", "#P c #c0e0e3", ".B c #c2ecf1", ".1 c #c4e9ec", ".R c #c7ebf2", ".q c #c7eef4", ".Z c #c8cecf", "#u c #cbe2e6", ".p c #cbf1f4", ".j c #ceeef2", ".e c #d1dbdc", ".w c #d2dddc", ".i c #d2f1f5", "#j c #d3eff4", ".I c #d5f1f4", ".m c #d8e3e2", ".A c #d8f3f5", "## c #d9eff2", ".f c #dbebec", ".h c #dbf4f6", "#G c #ddf2f4", ".G c #deebed", "#L c #def3f5", "#z c #dff3f5", ".g c #dff3f7", ".u c #e0f3f5", ".k c #e1f4f6", ".0 c #e5f6f9", ".o c #e6f7f9", ".H c #e7f7f8", ".n c #e8f8f9", ".Q c #e9f7f9", ".x c #eaf9f9", ".z c #ecfbfb", ".y c #edfcfb", "QtQtQtQtQt.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQt.#.#.a.b.c.b.a.#.#QtQtQtQtQtQtQtQtQtQt", "QtQt.#.d.e.f.g.h.i.j.k.l.#QtQtQtQtQtQtQtQtQt", "Qt.#.d.m.n.o.p.q.r.s.t.u.v.#QtQtQtQtQtQtQtQt", "Qt.#.w.x.y.z.A.B.C.D.E.F.u.#QtQtQtQtQtQtQtQt", ".#.a.G.o.z.H.I.J.K.L.M.N.O.a.#QtQtQtQtQtQtQt", ".#.P.Q.p.A.I.R.S.T.U.V.W.X.Y.#QtQtQtQtQtQtQt", ".#.Z.0.1.B.2.S.3.4.5.6.7.8.9.#QtQtQtQtQtQtQt", ".##.###a#b#c#d.4#e#f#g#h#i.Y.#QtQtQtQtQtQtQt", ".#.a#j#k#l#m#n#o#p#q#r#s#t.a.#QtQtQtQtQtQtQt", "Qt.##u#v.E.M.V.6#g#w#x#y#z.#QtQtQtQtQtQtQtQt", "Qt.##A.u#B.E.W#C#D#E#F.k.a.#QtQtQtQtQtQtQtQt", "QtQt.#.d#G#H#I#J#K#H#L.a.##M#NQtQtQtQtQtQtQt", "QtQtQt.##O.a.Y#P.Y.a.#.##Q#R#M.#QtQtQtQtQtQt", "QtQtQtQtQt#O.#.#.#.#QtQt#S#T#U#M.#QtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#QtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U#M.#Qt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##T#U.#Qt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.#QtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; #endif efax-gtk-3.2.8/src/tray_icon.h0000644000175000001440000000243111466007653013106 00000000000000/* Copyright (C) 2004, 2006, 2009 and 2010 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYING distributed with the source files. */ #ifndef TRAY_ICON_H #define TRAY_ICON_H #include "prog_defs.h" #include #include #include #include class TrayIcon { GobjHandle status_icon_h; GobjHandle menu_h; GtkMenuItem* list_received_faxes_item_p; GtkMenuItem* list_sent_faxes_item_p; GtkMenuItem* redial_queue_item_p; GtkMenuItem* receive_takeover_item_p; GtkMenuItem* receive_answer_item_p; GtkMenuItem* receive_standby_item_p; GtkMenuItem* stop_item_p; GtkMenuItem* quit_item_p; // not to be copied or assigned void operator=(const TrayIcon&); TrayIcon(const TrayIcon&); public: enum MenuItem {quit, stop, receive_standby, receive_answer, receive_takeover, list_received_faxes, list_sent_faxes, redial_queue}; class CB; friend class CB; Emitter activated; EmitterArg menu_item_chosen; EmitterArg get_state; EmitterArg get_new_fax_count; void set_tooltip_cb(const char* text); bool is_embedded(void); TrayIcon(void); }; #endif efax-gtk-3.2.8/efax-gtkrc0000644000175000001440000002641111540114203012120 00000000000000# efax-gtkrc -- configuration file for efax-gtk # Amend it as necessary and copy to $HOME/.efax-gtkrc, # $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. This file is searched # for in that order -- ie $HOME/.efax-gtkrc has priority over # $sysconfdir/efax-gtkrc and /etc/efax-gtkrc # Anything preceded by a `#' character is treated as a comment and # ignored by the program. # Put your name to appear on the fax top header on sent faxes here. # This should be in plain ASCII characters. If this is a problem, # leave it blank as the fax station number will always be given # on the top header anyway NAME: Joe Bloggs # Put your number to appear on the fax top header on sent faxes here # This will also comprise the fax station ID reported to the sending # fax machine when receiving faxes NUMBER: 0000 00000 # Put the serial device to which the modem is connected here (if none # is given or it is commented out, the program defaults to # /dev/modem). Do not include the `/dev/' part of the device name -- # ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to # COM 1, ttyS1 to COM 2, and so on DEVICE: ttyS1 # Put the lock file directory here. If none is given or it is # commented out, the program defaults to /var/lock. LOCK: /var/lock # With efax-0.9 you don't usually need to specify this, as efax will # work out the class of the modem. You should therefore usually leave # this commented out. However, with efax-0.8 the program defaults to # Class 2, so if you are using a Class 1 modem with old versions of # efax specify the Class here. Valid values are 1 for Class 1 modems # and 2.0 for Class 2.0 modems. With efax-0.9 you can also use the # value 2 to explicitly force the use of the Class 2 protocol #CLASS: 1 # Specify the page size here. Values accepted are `a4', `letter' or # `legal'. If none is specified the program defaults to a4. PAGE: a4 # This specifies the resolution to which faxes are sent. Values # accepted are `standard' (204x98) and `fine' (204x196). If none is # given the program defaults to 204x196. RES: fine # This specifies whether the destination fax number is included in the # top fax header line for sent faxes. The default is Yes. Pick 'No' # if you do not want this to be shown (say because it includes a pay # card access number) ADDR_IN_HEADER: Yes # This specifies a prefix to be prepended to any dialled number - for # example you can specify '9,' here to dial through a switchboard which # needs 9 to obtain an outside line followed by a delay. #DIAL_PREFIX: # This specifies whether the program is to redial automatically when # sending a fax if the modem is in use or the recipient is busy. The # default is No. Pick 'Yes' if you want automatic redial. REDIAL: No # This specifies the interval between redial attempts, in minutes. # Acceptable values are between 5 and 1440. This setting has no # effect if REDIAL is specified as no. REDIAL_INTERVAL: 15 # This defines the number of rings the modem allows to pass before # answering the telephone when in Standby mode. Acceptable values are # 1 to 9. If none is specified, the program defaults to 1. RINGS: 1 # Valid values for the followinga are `tone' and `pulse'. If none is # specified, the program defaults to tone dialling. DIALMODE: tone # The following specifies the initialising `AT' commands for the modem # when in fax mode. Specify as many of these as are needed, separated # by spaces for commands to be separated, without a prepended `AT'. # If none is specified, the program will default to `Z &FE&D2S7=120 # &C0 M1L0', which will be correct for practically all modems INIT: Z &FE&D2S7=120 &C0 M1L0 # The following specifies the `AT' commands to reset the modem. # Specify as many of these as are needed, separated by spaces for # commands to be separated, without a prepended `AT'. If none is # specified, the program will default to `Z', which will be correct # for practically all modems RESET: Z # The following setting specifies the capabilities of the modem. To # see what these mean do `man efax', and look at the operation of the # `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't # need to specify this and should leave it commented out, as the # program will interrogate the modem. If using an older version of # efax or a different class of modem, values which will work with # practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or # 1,3,0,2,0,0,0,0 for slower ones. #CAPABILITIES: 1,5,0,2,0,0,0,0 # The following is the command which prints and takes postscript input # on standard input. If none is specified, the program will default # to `lpr'. With lpr, you can specify a particular printer to be used # with the -P option. It is not necessary to specify this if # USE_GTKPRINT is set to `yes'. PRINT_CMD: lpr # If set to `yes', the following will cause the program to use the # GTK+ print system rather than the command line argument specified in # PRINT_CMD in order to print faxes. USE_GTKPRINT: yes # The following will determine the extent to which a printed page will # be reduced to fit within a printer's print area. It is a percentage # -- eg 98 will shrink the page to 98% of its size. If none is # specified no shrink will take place (ie, there is no need to specify # `PRINT_SHRINK: 100'). Valid values are 50 to 100. This setting has # no effect if USE_GTKPRINT is specified as yes (the GTK+ print dialog # will be displayed instead). PRINT_SHRINK: 98 # The following determines whether a confirmatory dialog will appear # before printing when the "Print selected fax" icon is pressed in the # Received Faxes or Sent Faxes lists. The default is Yes. Enter No # if you don't want a dialog (if you have specfied an external print # manager such as 'kprinter' in PRINT_CMD then you will want to say # No). This setting has no effect if USE_GTKPRINT is specified as yes # (the GTK+ print dialog will be displayed instead). PRINT_POPUP: Yes # A postscript viewer is used to view sent and received faxes via the # fax lists, and also to view faxes to be sent identified via the # "Files to fax" file selector dialog. Specify here the command to be # used to view postscript files. If none is specified, the program # will default to 'gv'. Other possibilities you may want to specify # are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE # postscript viewer). If using gv, you may need to use the '-media A4' # or '-media Letter' option to select correct paper size. evince and # kghostview do this automatically PS_VIEWER: gv # This specifies whether a socket server is to be run to receive faxes # from the print system. Specify 'Yes' if it is to run. The default # is No. SOCK_SERVER: Yes # This specifies whether a pop-up dialog is to appear whenever a fax # is received by the socket server from the print system. Specify # 'yes' if you want a dialog. The default is No, and Yes has no # effect unless SOCK_SERVER is also specified as Yes. SOCK_POPUP: Yes # This specifies the port number on which the socket server is to # listen. It should be between 1024 and 65535. SOCK_SERVER_PORT: 9900 # This specifies the addresses from which a connection to the socket # will be accepted. The options are "other" and "localhost". Unless # you are behind a firewall or an appropriate router, choose # "localhost" (which will be fine in the usual case where efax-gtk and # the CUPS/lpd daemons are running on the same machine). SOCK_CLIENT_ADDRESS: localhost # This specifies the other addresses permitted to connect to the # socket when "other" is picked. localhost and your machine's # hostname are always permitted, so you don't need to specify these. # Hostnames may be specified as an ordinary host name or in numeric # notation. Numeric notation may have * as a trailing wildcard, so # for example 10.1.* will permit access for addresses 10.1.0.0 to # 10.1.255.255. IPv6 numeric addresses may also have a trailing # wildcard, but if so '::' may not be used in the address (but other # forms of 0 suppression are acceptable). #SOCK_OTHER_ADDRESSES: # This specifies the IP family to be used by the socket server. Valid # values are ipv4 and ipv6. If none is specified, the program # defaults to ipv4. IP_FAMILY: ipv4 # The following parameter specifies a log file to which progress on # negotiations and fax status, and errors and warnings, are logged. # If LOG_FILE is left commented out, or is given no value, then no log # file will be maintained. (A log file can also be kept by # redirecting stdout and stderr -- see the README file for further # details). If the log file is not specified with an absolute path # name, it will be maintained in the $HOME directory (as supplemented # by any WORK_SUBDIR parameter mentioned below). #LOG_FILE: # This parameter specifies whether a pop-up dialog will appear when a # fax is received from a modem. The default is No. Specify Yes if # you want a pop-up. FAX_RECEIVED_POPUP: No # This specifies whether a program or script is to be executed when a # fax is received from a modem. The default is No. Specify Yes, and # provide the program name via the FAX_RECEIVED_PROG parameter, if a # program is to be executed. efax-gtk comes with two scripts, # print_fax and mail_fax, which can be used automatically to print a # received fax or to mail it to a user (so to mail a fax you can enter # `mail_fax' for the FAX_RECEIVED_PROG parameter below). See the README # file for further details. FAX_RECEIVED_EXEC: No # This parameter specifies the program to be executed if # FAX_RECEIVED_EXEC is set to Yes. Uncomment the line and insert the # program or script to be executed. #FAX_RECEIVED_PROG: # The following can be used to pass any other parameter to efax (do # `man efax' to see what is available). Specify as many of these as # are needed, separated by spaces for different parameters -- eg # include `-or' to do a bit reversal during receive for Multitech # modems which require it. Unless you have an unusual modem, leave # this blank or commented out #PARMS: # A working sub-directory for the storage of .efax-gtk_addressbook, # .efax-gtk_mainwin_save and .efax-gtk_queued_server_files and the # faxin, faxout, faxsent and efax-gtk-server directories can be # specified with the WORK_SUBDIR: parameter. This working # subdirectory will appear as a subdirectory of $HOME (so if # WORK_SUBDIR: is specified as efax-gtk, $HOME/efax-gtk will be the # working directory). If none is specified then these # files/directories will be stored directly in $HOME (which was what # happened before this option was available, so past efax-gtk # installations will not be broken if this option is left blank). If # a WORK_SUBDIR: parameter is specified, only .efax-gtkrc will appear # directly in $HOME. Note that if you specify a value for # WORK_SUBDIR:, you will need to shift old versions of the files and # directories mentioned above into the new working directory or # efax-gtk will not be able to find them, so use this option with # caution. In addition, if you wish to use the 'print_fax' or # 'mail_fax' scripts, you will need to set the WORK_SUBDIR option in # the relevant script. Note also that if a log file is specified in # LOG_FILE above without an absolute path name, the file will be # placed in the working subdirectory, or if WORK_SUBDIR is left blank, # in the $HOME directory. #WORK_SUBDIR: ## end of efax-gtkrc ## efax-gtk-3.2.8/efax-gtk-faxfilter/0000755000175000001440000000000011544574533013732 500000000000000efax-gtk-3.2.8/efax-gtk-faxfilter/Makefile.in0000644000175000001440000004512111544566736015730 00000000000000# 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@ spool_PROGRAMS = efax-gtk-socket-client$(EXEEXT) subdir = efax-gtk-faxfilter DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(spooldir)" "$(DESTDIR)$(spooldir)" PROGRAMS = $(spool_PROGRAMS) am_efax_gtk_socket_client_OBJECTS = efax-gtk-socket-client.$(OBJEXT) efax_gtk_socket_client_OBJECTS = $(am_efax_gtk_socket_client_OBJECTS) efax_gtk_socket_client_LDADD = $(LDADD) 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' SCRIPTS = $(spool_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(efax_gtk_socket_client_SOURCES) DIST_SOURCES = $(efax_gtk_socket_client_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AC_HAVE_RECURSIVE_MUTEX_RUNTIME = @AC_HAVE_RECURSIVE_MUTEX_RUNTIME@ AC_USE_GLIB_MEMORY_SLICES_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_COMPAT@ AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT = @AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT@ AC_USE_SCHED_YIELD = @AC_USE_SCHED_YIELD@ AC_USE_SMART_PTR_COMPARISON = @AC_USE_SMART_PTR_COMPARISON@ AC_USE_TYPE_TUPLE_ARGS = @AC_USE_TYPE_TUPLE_ARGS@ AC_USING_NAMESPACE = @AC_USING_NAMESPACE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COND_CXXFLAG = @COND_CXXFLAG@ COND_INTERNAL = @COND_INTERNAL@ COND_INTERNAL_LIB = @COND_INTERNAL_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_GTK_UTILS_CFLAGS = @CXX_GTK_UTILS_CFLAGS@ CXX_GTK_UTILS_LIBS = @CXX_GTK_UTILS_LIBS@ CYGPATH_W = @CYGPATH_W@ DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ 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@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPOOLDIR = @SPOOLDIR@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ X11_CFLAGS = @X11_CFLAGS@ X11_LIBS = @X11_LIBS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ spooldir = @SPOOLDIR@ spool_SCRIPTS = efax-gtk-faxfilter efax_gtk_socket_client_SOURCES = efax-gtk-socket-client.cpp EXTRA_DIST = efax-gtk-faxfilter all: all-am .SUFFIXES: .SUFFIXES: .cpp .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 efax-gtk-faxfilter/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu efax-gtk-faxfilter/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-spoolPROGRAMS: $(spool_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(spooldir)" || $(MKDIR_P) "$(DESTDIR)$(spooldir)" @list='$(spool_PROGRAMS)'; test -n "$(spooldir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ 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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(spooldir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(spooldir)$$dir" || exit $$?; \ } \ ; done uninstall-spoolPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(spool_PROGRAMS)'; test -n "$(spooldir)" || 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)$(spooldir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(spooldir)" && rm -f $$files clean-spoolPROGRAMS: -test -z "$(spool_PROGRAMS)" || rm -f $(spool_PROGRAMS) efax-gtk-socket-client$(EXEEXT): $(efax_gtk_socket_client_OBJECTS) $(efax_gtk_socket_client_DEPENDENCIES) @rm -f efax-gtk-socket-client$(EXEEXT) $(CXXLINK) $(efax_gtk_socket_client_OBJECTS) $(efax_gtk_socket_client_LDADD) $(LIBS) install-spoolSCRIPTS: $(spool_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(spooldir)" || $(MKDIR_P) "$(DESTDIR)$(spooldir)" @list='$(spool_SCRIPTS)'; test -n "$(spooldir)" || 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"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | 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; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(spooldir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(spooldir)$$dir" || exit $$?; \ } \ ; done uninstall-spoolSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(spool_SCRIPTS)'; test -n "$(spooldir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(spooldir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(spooldir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efax-gtk-socket-client.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 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) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(spooldir)" "$(DESTDIR)$(spooldir)"; 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-spoolPROGRAMS 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-spoolPROGRAMS install-spoolSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-spoolPROGRAMS uninstall-spoolSCRIPTS .MAKE: install-am install-data-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-spoolPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook 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-spoolPROGRAMS \ install-spoolSCRIPTS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-spoolPROGRAMS uninstall-spoolSCRIPTS install-data-hook: -chown lp $(spooldir) 2> /dev/null -chgrp lp $(spooldir) 2> /dev/null # 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: efax-gtk-3.2.8/efax-gtk-faxfilter/efax-gtk-socket-client.cpp0000644000175000001440000000427611466007653020634 00000000000000/* Copyright (C) 2003 Chris Vine This program is distributed under the General Public Licence, version 2. For particulars of this and relevant disclaimers see the file COPYRIGHT distributed with the source files. */ #include #include #include #include #include #include #include #include #include #include #include #include #define BUFFER_LENGTH 1024 void error_msg(const char*); int main(int argc, char* argv[]) { if (argc < 3) { error_msg("Insufficient arguments\n" "Usage efax-gtk-socket-client [hostname] [port]\n"); return 1; } struct hostent* hostname_info; if ((hostname_info = gethostbyname(argv[1])) == 0) { std::string message("Cannot get address for hostname "); message += argv[1]; message += '\n'; error_msg(message.c_str()); return 1; } int sock_fd = socket(AF_INET, SOCK_STREAM, 0); if (sock_fd < 0) { error_msg("Cannot create socket for socket server\n"); return 1; } sockaddr_in address; std::memset(&address, 0, sizeof(address)); address.sin_family = AF_INET; address.sin_addr = *(in_addr*)hostname_info->h_addr_list[0]; address.sin_port = htons(std::atoi(argv[2])); if (connect(sock_fd, (sockaddr*)&address, sizeof(address)) < 0) { error_msg("Cannot connect to efax-gtk server socket\n"); close(sock_fd); return 1; } char buffer[BUFFER_LENGTH]; ssize_t read_result; ssize_t write_result = 0; ssize_t written; while ((read_result = read(0, buffer, BUFFER_LENGTH)) > 0 && write_result != -1) { written = 0; do { write_result = write(sock_fd, buffer + written, read_result); written += write_result; // it doesn't matter if write_result is -1 as // then the while test will fail read_result -= write_result; } while (read_result && write_result != -1); } if (write_result == -1) error_msg("Write error to socket\n"); close(sock_fd); return 0; } void error_msg(const char* message) { std::cerr << "efax-gtk-socket-client: " << message << std::flush; syslog(LOG_ERR | LOG_USER, message); } efax-gtk-3.2.8/efax-gtk-faxfilter/efax-gtk-faxfilter0000755000175000001440000000037411466007653017271 00000000000000#!/bin/sh # usage of efax-gtk-socket-client: # efax-gtk-socket-client [hostname] [port] # you will almost certainly want hostname to be localhost - don't # change it unless you know what you are doing ./efax-gtk-socket-client localhost 9900 exit 0 efax-gtk-3.2.8/efax-gtk-faxfilter/Makefile.am0000644000175000001440000000052611466007653015706 00000000000000## Process this file with automake to produce Makefile.in spooldir = @SPOOLDIR@ spool_SCRIPTS = efax-gtk-faxfilter spool_PROGRAMS = efax-gtk-socket-client efax_gtk_socket_client_SOURCES = efax-gtk-socket-client.cpp install-data-hook: -chown lp $(spooldir) 2> /dev/null -chgrp lp $(spooldir) 2> /dev/null EXTRA_DIST = efax-gtk-faxfilter efax-gtk-3.2.8/config.rpath0000755000175000001440000004364711466007655012507 00000000000000#! /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-2007 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* | cygwin* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) 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,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; 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 ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) 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 : 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* | 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*) if test -f /usr/libexec/ld.so; then 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 else ld_shlibs=no 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* | sco3.2v5.0.[024]*) ;; 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. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix4* | aix5*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' 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* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; 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_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` 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=/' <044 68;jlޗkOxʽiLM8dvS-v;M_+^ (vRS,6%+[p8TH$"ϟO*.Q%//Q E@,^VM|caa!VRf3mmmdffBHimm%`PN:%oߖ~RC7(Qln$++ o2,H@uUaـ_>)'OgX?M%x/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. 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" 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. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$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 about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script 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 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=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&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'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, 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='efax-gtk' PACKAGE_TARNAME='efax-gtk' PACKAGE_VERSION='3.2.8' PACKAGE_STRING='efax-gtk 3.2.8' PACKAGE_BUGREPORT='' PACKAGE_URL='' # 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" gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS RANLIB SPOOLDIR POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS host_os host_vendor host_cpu host build_os build_vendor build_cpu build XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS AC_USE_SMART_PTR_COMPARISON AC_USE_TYPE_TUPLE_ARGS AC_USE_GLIB_MEMORY_SLICES_COMPAT AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT AC_USING_NAMESPACE AC_HAVE_RECURSIVE_MUTEX_RUNTIME AC_USE_SCHED_YIELD COND_CXXFLAG COND_INTERNAL_LIB COND_INTERNAL CXX_GTK_UTILS_LIBS CXX_GTK_UTILS_CFLAGS X11_LIBS X11_CFLAGS EGREP GREP DBUS_GLIB_LIBS DBUS_GLIB_CFLAGS GIO_LIBS GIO_CFLAGS GTHREAD_LIBS GTHREAD_CFLAGS GLIB_LIBS GLIB_CFLAGS GTK_LIBS GTK_CFLAGS PKG_CONFIG CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC 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 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_debug enable_dependency_tracking with_gtk_version with_cgu_version_2 enable_nls with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix with_spooldir ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP' # 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=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 efax-gtk 3.2.8 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/efax-gtk] --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 System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of efax-gtk 3.2.8:";; 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] --enable-debug creates debugging code default=no --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 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gtk-version whether to use gtk2 or gtk3 (gtk3, gtk2, auto) [default=auto] --with-cgu-version-2 whether to search for c++-gtk-utils-2.0 to compile efax-gtk [default=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-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-spooldir=DIR Where fax printer filter is installed (default is /var/spool/fax) 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 CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor 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 the package provider. _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 efax-gtk configure 3.2.8 generated by GNU Autoconf 2.65 Copyright (C) 2009 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; test "x$as_lineno_stack" = x && { as_lineno=; 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; } >/dev/null && { 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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; } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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.$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;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; 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; test "x$as_lineno_stack" = x && { as_lineno=; 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_cxx_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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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_cxx_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_cxx_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_type # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES # ---------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_cxx_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : echo >>conftest.val; read $3 &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_cxx_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # 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; test "x$as_lineno_stack" = x && { as_lineno=; 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_cxx_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_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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_cxx_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_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err 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_cxx_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;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_header_mongrel 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 efax-gtk $as_me 3.2.8, which was generated by GNU Autoconf 2.65. 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 cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX 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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX 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 cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX 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 cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX 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 ac_site_file1=$CONFIG_SITE 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" 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 gt_needs="$gt_needs " # 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 am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done 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. # 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 test "${ac_cv_path_install+set}" = set; 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 test "${ac_cv_prog_STRIP+set}" = set; 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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; 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 test "${ac_cv_path_mkdir+set}" = set; 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 test "${ac_cv_prog_AWK+set}" = set; 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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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 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=efax-gtk VERSION=3.2.8 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 -' ac_config_headers="$ac_config_headers config.h" 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 # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; if test $enableval = "no"; then ac_use_debug_code="no" else ac_use_debug_code="yes" fi else ac_use_debug_code="no" fi c_flags_in=$CFLAGS 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 test "${ac_cv_prog_CC+set}" = set; 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 test "${ac_cv_prog_CC+set}" = set; 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 test "${ac_cv_prog_CC+set}" = set; 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 test "${ac_cv_prog_CC+set}" = set; 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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_set_status 77 as_fn_error "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 test "${ac_cv_objext+set}" = set; 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 test "${ac_cv_c_compiler_gnu+set}" = set; 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 test "${ac_cv_prog_cc_g+set}" = set; 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 test "${ac_cv_prog_cc_c89+set}" = set; 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 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 test "${am_cv_CC_dependencies_compiler_type+set}" = set; 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 { $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 test "${ac_cv_prog_CPP+set}" = set; 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.$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.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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.$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.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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 CFLAGS=$c_flags_in if test -z "$CFLAGS"; then if test "$GCC" = "yes"; then if test "$ac_use_debug_code" = "yes"; then CFLAGS="-g $CFLAGS" else CFLAGS="-O2 $CFLAGS" fi else if test "$ac_use_debug_code" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5 $as_echo_n "checking whether $CC supports -g... " >&6; } flag_cache=`echo g | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_c_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main(void) { return 0; }' >conftest.c eval "ac_cv_prog_c_$flag_cache=no" if test -z "`$CC -g -c conftest.c 2>&1`"; then if test -z "`$CC -g -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_c_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_c_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CFLAGS="-g $CFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5 $as_echo_n "checking whether $CC supports -O2... " >&6; } flag_cache=`echo O2 | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_c_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main(void) { return 0; }' >conftest.c eval "ac_cv_prog_c_$flag_cache=no" if test -z "`$CC -O2 -c conftest.c 2>&1`"; then if test -z "`$CC -O2 -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_c_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_c_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CFLAGS="-O2 $CFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pthread" >&5 $as_echo_n "checking whether $CC supports -pthread... " >&6; } flag_cache=`echo pthread | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_c_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main(void) { return 0; }' >conftest.c eval "ac_cv_prog_c_$flag_cache=no" if test -z "`$CC -pthread -c conftest.c 2>&1`"; then if test -z "`$CC -pthread -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_c_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_c_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CFLAGS="$CFLAGS -pthread" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall" fi fi cxx_flags_in=$CXXFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" 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 CXX=$ac_ct_CXX fi fi fi fi # 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 test "${ac_cv_cxx_compiler_gnu+set}" = set; 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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= 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 depcc="$CXX" 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 test "${am_cv_CXX_dependencies_compiler_type+set}" = set; 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_CXX_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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_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_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err 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_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_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_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err 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_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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 \"$CXXCPP\" 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 CXXFLAGS=$cxx_flags_in if test -z "$CXXFLAGS"; then if test "$GXX" = "yes"; then if test "$ac_use_debug_code" = "yes"; then CXXFLAGS="-g $CXXFLAGS" else CXXFLAGS="-O2 $CXXFLAGS" if test -z "$LDFLAGS"; then LDFLAGS="-s" fi fi else if test "$ac_use_debug_code" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -g" >&5 $as_echo_n "checking whether $CXX supports -g... " >&6; } flag_cache=`echo g | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -g -c conftest.cc 2>&1`"; then if test -z "`$CXX -g -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="-g $CXXFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -O2" >&5 $as_echo_n "checking whether $CXX supports -O2... " >&6; } flag_cache=`echo O2 | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -O2 -c conftest.cc 2>&1`"; then if test -z "`$CXX -O2 -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="-O2 $CXXFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -fexceptions" >&5 $as_echo_n "checking whether $CXX supports -fexceptions... " >&6; } flag_cache=`echo fexceptions | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -fexceptions -c conftest.cc 2>&1`"; then if test -z "`$CXX -fexceptions -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -fexceptions" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -fsigned-char" >&5 $as_echo_n "checking whether $CXX supports -fsigned-char... " >&6; } flag_cache=`echo fsigned-char | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -fsigned-char -c conftest.cc 2>&1`"; then if test -z "`$CXX -fsigned-char -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -fsigned-char" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -fno-check-new" >&5 $as_echo_n "checking whether $CXX supports -fno-check-new... " >&6; } flag_cache=`echo fno-check-new | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -fno-check-new -c conftest.cc 2>&1`"; then if test -z "`$CXX -fno-check-new -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -fno-check-new" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -Wno-deprecated" >&5 $as_echo_n "checking whether $CXX supports -Wno-deprecated... " >&6; } flag_cache=`echo Wno-deprecated | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -Wno-deprecated -c conftest.cc 2>&1`"; then if test -z "`$CXX -Wno-deprecated -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -Wno-deprecated" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -pthread" >&5 $as_echo_n "checking whether $CXX supports -pthread... " >&6; } flag_cache=`echo pthread | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -pthread -c conftest.cc 2>&1`"; then if test -z "`$CXX -pthread -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -pthread" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi if test "$GXX" = "yes"; then CXXFLAGS="$CXXFLAGS -Wall" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking which version of gtk+ to compile against" >&5 $as_echo_n "checking which version of gtk+ to compile against... " >&6; } # Check whether --with-gtk-version was given. if test "${with_gtk_version+set}" = set; then : withval=$with_gtk_version; if test "x$withval" = "xgtk2" || test "x$withval" = "xgtk+2"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk2" >&5 $as_echo "gtk2" >&6; } CGU_GTK_VERSION=2 succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0 >= 2.12.0" >&5 $as_echo_n "checking for gtk+-2.0 >= 2.12.0... " >&6; } if $PKG_CONFIG --exists "gtk+-2.0 >= 2.12.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 $as_echo_n "checking GTK_CFLAGS... " >&6; } GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.12.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 $as_echo "$GTK_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 $as_echo_n "checking GTK_LIBS... " >&6; } GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.12.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 $as_echo "$GTK_LIBS" >&6; } else GTK_CFLAGS="" GTK_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else as_fn_error "Library requirements (gtk+-2.0 >= 2.12.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi elif test "x$withval" = "xgtk3" || test "x$withval" = "xgtk+3"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk3" >&5 $as_echo "gtk3" >&6; } CGU_GTK_VERSION=3 succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-3.0 >= 2.99.0" >&5 $as_echo_n "checking for gtk+-3.0 >= 2.99.0... " >&6; } if $PKG_CONFIG --exists "gtk+-3.0 >= 2.99.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 $as_echo_n "checking GTK_CFLAGS... " >&6; } GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= 2.99.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 $as_echo "$GTK_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 $as_echo_n "checking GTK_LIBS... " >&6; } GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= 2.99.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 $as_echo "$GTK_LIBS" >&6; } else GTK_CFLAGS="" GTK_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else as_fn_error "Library requirements (gtk+-3.0 >= 2.99.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi elif test "x$withval" = "xauto"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5 $as_echo "auto" >&6; } succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-3.0 >= 2.99.0" >&5 $as_echo_n "checking for gtk+-3.0 >= 2.99.0... " >&6; } if $PKG_CONFIG --exists "gtk+-3.0 >= 2.99.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 $as_echo_n "checking GTK_CFLAGS... " >&6; } GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= 2.99.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 $as_echo "$GTK_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 $as_echo_n "checking GTK_LIBS... " >&6; } GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= 2.99.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 $as_echo "$GTK_LIBS" >&6; } else GTK_CFLAGS="" GTK_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then CGU_GTK_VERSION=3 else succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0 >= 2.12.0" >&5 $as_echo_n "checking for gtk+-2.0 >= 2.12.0... " >&6; } if $PKG_CONFIG --exists "gtk+-2.0 >= 2.12.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 $as_echo_n "checking GTK_CFLAGS... " >&6; } GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.12.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 $as_echo "$GTK_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 $as_echo_n "checking GTK_LIBS... " >&6; } GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.12.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 $as_echo "$GTK_LIBS" >&6; } else GTK_CFLAGS="" GTK_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else as_fn_error "Library requirements (gtk+-2.0 >= 2.12.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi CGU_GTK_VERSION=2 fi else as_fn_error "incorrect gtk+ version specified - should be gtk2, gtk3 or auto" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5 $as_echo "auto" >&6; } succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-3.0 >= 2.99.0" >&5 $as_echo_n "checking for gtk+-3.0 >= 2.99.0... " >&6; } if $PKG_CONFIG --exists "gtk+-3.0 >= 2.99.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 $as_echo_n "checking GTK_CFLAGS... " >&6; } GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= 2.99.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 $as_echo "$GTK_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 $as_echo_n "checking GTK_LIBS... " >&6; } GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= 2.99.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 $as_echo "$GTK_LIBS" >&6; } else GTK_CFLAGS="" GTK_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then CGU_GTK_VERSION=3 else succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0 >= 2.12.0" >&5 $as_echo_n "checking for gtk+-2.0 >= 2.12.0... " >&6; } if $PKG_CONFIG --exists "gtk+-2.0 >= 2.12.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 $as_echo_n "checking GTK_CFLAGS... " >&6; } GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.12.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 $as_echo "$GTK_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 $as_echo_n "checking GTK_LIBS... " >&6; } GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.12.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 $as_echo "$GTK_LIBS" >&6; } else GTK_CFLAGS="" GTK_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else as_fn_error "Library requirements (gtk+-2.0 >= 2.12.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi CGU_GTK_VERSION=2 fi fi succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib-2.0 >= 2.10.0" >&5 $as_echo_n "checking for glib-2.0 >= 2.10.0... " >&6; } if $PKG_CONFIG --exists "glib-2.0 >= 2.10.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GLIB_CFLAGS" >&5 $as_echo_n "checking GLIB_CFLAGS... " >&6; } GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_CFLAGS" >&5 $as_echo "$GLIB_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GLIB_LIBS" >&5 $as_echo_n "checking GLIB_LIBS... " >&6; } GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_LIBS" >&5 $as_echo "$GLIB_LIBS" >&6; } else GLIB_CFLAGS="" GLIB_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else as_fn_error "Library requirements (glib-2.0 >= 2.10.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gthread-2.0 >= 2.0.0" >&5 $as_echo_n "checking for gthread-2.0 >= 2.0.0... " >&6; } if $PKG_CONFIG --exists "gthread-2.0 >= 2.0.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTHREAD_CFLAGS" >&5 $as_echo_n "checking GTHREAD_CFLAGS... " >&6; } GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0 >= 2.0.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTHREAD_CFLAGS" >&5 $as_echo "$GTHREAD_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTHREAD_LIBS" >&5 $as_echo_n "checking GTHREAD_LIBS... " >&6; } GTHREAD_LIBS=`$PKG_CONFIG --libs "gthread-2.0 >= 2.0.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTHREAD_LIBS" >&5 $as_echo "$GTHREAD_LIBS" >&6; } else GTHREAD_CFLAGS="" GTHREAD_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else as_fn_error "Library requirements (gthread-2.0 >= 2.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26.0" >&5 $as_echo_n "checking for gio-2.0 >= 2.26.0... " >&6; } if $PKG_CONFIG --exists "gio-2.0 >= 2.26.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking GIO_CFLAGS" >&5 $as_echo_n "checking GIO_CFLAGS... " >&6; } GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIO_CFLAGS" >&5 $as_echo "$GIO_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking GIO_LIBS" >&5 $as_echo_n "checking GIO_LIBS... " >&6; } GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIO_LIBS" >&5 $as_echo "$GIO_LIBS" >&6; } else GIO_CFLAGS="" GIO_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then $as_echo "#define HAVE_GIO_DBUS 1" >>confdefs.h DBUS_GLIB_CFLAGS="" DBUS_GLIB_LIBS="" else succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-glib-1 >= 0.70" >&5 $as_echo_n "checking for dbus-glib-1 >= 0.70... " >&6; } if $PKG_CONFIG --exists "dbus-glib-1 >= 0.70" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_GLIB_CFLAGS" >&5 $as_echo_n "checking DBUS_GLIB_CFLAGS... " >&6; } DBUS_GLIB_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.70"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_GLIB_CFLAGS" >&5 $as_echo "$DBUS_GLIB_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_GLIB_LIBS" >&5 $as_echo_n "checking DBUS_GLIB_LIBS... " >&6; } DBUS_GLIB_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.70"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_GLIB_LIBS" >&5 $as_echo "$DBUS_GLIB_LIBS" >&6; } else DBUS_GLIB_CFLAGS="" DBUS_GLIB_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then $as_echo "#define HAVE_DBUS_GLIB 1" >>confdefs.h else as_fn_error "either glib >= 2.26.0 or dbus-glib >= 0.70 required; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them" "$LINENO" 5 fi fi { $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 test "${ac_cv_path_GREP+set}" = set; 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 test "${ac_cv_path_EGREP+set}" = set; 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 test "${ac_cv_header_stdc+set}" = set; 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 " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF else { as_fn_set_status 1 as_fn_error "pthread.h not found" "$LINENO" 5; } fi done ac_cflags_safe=$CFLAGS if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then if $PKG_CONFIG --exists gdk-2.0; then CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gdk-2.0`" fi if $PKG_CONFIG --exists x11; then CFLAGS="$CFLAGS `$PKG_CONFIG --cflags x11`" succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x11" >&5 $as_echo_n "checking for x11... " >&6; } if $PKG_CONFIG --exists "x11" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11_CFLAGS" >&5 $as_echo_n "checking X11_CFLAGS... " >&6; } X11_CFLAGS=`$PKG_CONFIG --cflags "x11"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $X11_CFLAGS" >&5 $as_echo "$X11_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11_LIBS" >&5 $as_echo_n "checking X11_LIBS... " >&6; } X11_LIBS=`$PKG_CONFIG --libs "x11"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $X11_LIBS" >&5 $as_echo "$X11_LIBS" >&6; } else X11_CFLAGS="" X11_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else : fi fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi for ac_header in X11/Xlib.h X11/XKBlib.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" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done CFLAGS=$ac_cflags_safe COND_INTERNAL="" COND_INTERNAL_LIB="" COND_CXXFLAG="" SEARCH_FOR_CGU_2="no" # Check whether --with-cgu-version-2 was given. if test "${with_cgu_version_2+set}" = set; then : withval=$with_cgu_version_2; if test "x$withval" = "xyes"; then SEARCH_FOR_CGU_2="yes" fi fi if test $CGU_GTK_VERSION -eq 2; then if test "$SEARCH_FOR_CGU_2" = "yes"; then succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++-gtk-utils-2-2.0 >= 2.0.0" >&5 $as_echo_n "checking for c++-gtk-utils-2-2.0 >= 2.0.0... " >&6; } if $PKG_CONFIG --exists "c++-gtk-utils-2-2.0 >= 2.0.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_CFLAGS" >&5 $as_echo_n "checking CXX_GTK_UTILS_CFLAGS... " >&6; } CXX_GTK_UTILS_CFLAGS=`$PKG_CONFIG --cflags "c++-gtk-utils-2-2.0 >= 2.0.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_CFLAGS" >&5 $as_echo "$CXX_GTK_UTILS_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_LIBS" >&5 $as_echo_n "checking CXX_GTK_UTILS_LIBS... " >&6; } CXX_GTK_UTILS_LIBS=`$PKG_CONFIG --libs "c++-gtk-utils-2-2.0 >= 2.0.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_LIBS" >&5 $as_echo "$CXX_GTK_UTILS_LIBS" >&6; } else CXX_GTK_UTILS_CFLAGS="" CXX_GTK_UTILS_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then $as_echo "#define HAVE_CXX_GTK_UTILS_2 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -std=c++11" >&5 $as_echo_n "checking whether $CXX supports -std=c++11... " >&6; } flag_cache=`echo std=c++11 | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -std=c++11 -c conftest.cc 2>&1`"; then if test -z "`$CXX -std=c++11 -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -std=c++11" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -std=c++0x" >&5 $as_echo_n "checking whether $CXX supports -std=c++0x... " >&6; } flag_cache=`echo std=c++0x | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -std=c++0x -c conftest.cc 2>&1`"; then if test -z "`$CXX -std=c++0x -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -std=c++0x" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi fi else succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++-gtk-utils-1.2 >= 1.2.7" >&5 $as_echo_n "checking for c++-gtk-utils-1.2 >= 1.2.7... " >&6; } if $PKG_CONFIG --exists "c++-gtk-utils-1.2 >= 1.2.7" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_CFLAGS" >&5 $as_echo_n "checking CXX_GTK_UTILS_CFLAGS... " >&6; } CXX_GTK_UTILS_CFLAGS=`$PKG_CONFIG --cflags "c++-gtk-utils-1.2 >= 1.2.7"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_CFLAGS" >&5 $as_echo "$CXX_GTK_UTILS_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_LIBS" >&5 $as_echo_n "checking CXX_GTK_UTILS_LIBS... " >&6; } CXX_GTK_UTILS_LIBS=`$PKG_CONFIG --libs "c++-gtk-utils-1.2 >= 1.2.7"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_LIBS" >&5 $as_echo "$CXX_GTK_UTILS_LIBS" >&6; } else CXX_GTK_UTILS_CFLAGS="" CXX_GTK_UTILS_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then $as_echo "#define HAVE_CXX_GTK_UTILS 1" >>confdefs.h else COND_INTERNAL=c++-gtk-utils COND_INTERNAL_LIB=internal/c++-gtk-utils/libcxx-gtk-utils.a COND_CXXFLAG="-I./internal -I../internal" fi fi else succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++-gtk-utils-1.2 >= 1.2.7" >&5 $as_echo_n "checking for c++-gtk-utils-1.2 >= 1.2.7... " >&6; } if $PKG_CONFIG --exists "c++-gtk-utils-1.2 >= 1.2.7" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_CFLAGS" >&5 $as_echo_n "checking CXX_GTK_UTILS_CFLAGS... " >&6; } CXX_GTK_UTILS_CFLAGS=`$PKG_CONFIG --cflags "c++-gtk-utils-1.2 >= 1.2.7"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_CFLAGS" >&5 $as_echo "$CXX_GTK_UTILS_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_LIBS" >&5 $as_echo_n "checking CXX_GTK_UTILS_LIBS... " >&6; } CXX_GTK_UTILS_LIBS=`$PKG_CONFIG --libs "c++-gtk-utils-1.2 >= 1.2.7"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_LIBS" >&5 $as_echo "$CXX_GTK_UTILS_LIBS" >&6; } else CXX_GTK_UTILS_CFLAGS="" CXX_GTK_UTILS_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then $as_echo "#define HAVE_CXX_GTK_UTILS 1" >>confdefs.h else COND_INTERNAL=c++-gtk-utils COND_INTERNAL_LIB=internal/c++-gtk-utils/libcxx-gtk-utils.a COND_CXXFLAG="-I./internal -I../internal" fi fi elif test $CGU_GTK_VERSION -eq 3; then if test "$SEARCH_FOR_CGU_2" = "yes"; then succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++-gtk-utils-3-2.0 >= 2.0.0" >&5 $as_echo_n "checking for c++-gtk-utils-3-2.0 >= 2.0.0... " >&6; } if $PKG_CONFIG --exists "c++-gtk-utils-3-2.0 >= 2.0.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_CFLAGS" >&5 $as_echo_n "checking CXX_GTK_UTILS_CFLAGS... " >&6; } CXX_GTK_UTILS_CFLAGS=`$PKG_CONFIG --cflags "c++-gtk-utils-3-2.0 >= 2.0.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_CFLAGS" >&5 $as_echo "$CXX_GTK_UTILS_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_LIBS" >&5 $as_echo_n "checking CXX_GTK_UTILS_LIBS... " >&6; } CXX_GTK_UTILS_LIBS=`$PKG_CONFIG --libs "c++-gtk-utils-3-2.0 >= 2.0.0"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_LIBS" >&5 $as_echo "$CXX_GTK_UTILS_LIBS" >&6; } else CXX_GTK_UTILS_CFLAGS="" CXX_GTK_UTILS_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then $as_echo "#define HAVE_CXX_GTK_UTILS_2 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -std=c++11" >&5 $as_echo_n "checking whether $CXX supports -std=c++11... " >&6; } flag_cache=`echo std=c++11 | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -std=c++11 -c conftest.cc 2>&1`"; then if test -z "`$CXX -std=c++11 -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -std=c++11" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -std=c++0x" >&5 $as_echo_n "checking whether $CXX supports -std=c++0x... " >&6; } flag_cache=`echo std=c++0x | sed 'y%.=/+-%___p_%'` if { as_var=ac_cv_prog_cxx_$flag_cache; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -std=c++0x -c conftest.cc 2>&1`"; then if test -z "`$CXX -std=c++0x -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : CXXFLAGS="$CXXFLAGS -std=c++0x" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi fi else succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++-gtk-utils-1.3 >= 1.2.7" >&5 $as_echo_n "checking for c++-gtk-utils-1.3 >= 1.2.7... " >&6; } if $PKG_CONFIG --exists "c++-gtk-utils-1.3 >= 1.2.7" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_CFLAGS" >&5 $as_echo_n "checking CXX_GTK_UTILS_CFLAGS... " >&6; } CXX_GTK_UTILS_CFLAGS=`$PKG_CONFIG --cflags "c++-gtk-utils-1.3 >= 1.2.7"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_CFLAGS" >&5 $as_echo "$CXX_GTK_UTILS_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_LIBS" >&5 $as_echo_n "checking CXX_GTK_UTILS_LIBS... " >&6; } CXX_GTK_UTILS_LIBS=`$PKG_CONFIG --libs "c++-gtk-utils-1.3 >= 1.2.7"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_LIBS" >&5 $as_echo "$CXX_GTK_UTILS_LIBS" >&6; } else CXX_GTK_UTILS_CFLAGS="" CXX_GTK_UTILS_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then $as_echo "#define HAVE_CXX_GTK_UTILS 1" >>confdefs.h else COND_INTERNAL=c++-gtk-utils COND_INTERNAL_LIB=internal/c++-gtk-utils/libcxx-gtk-utils.a COND_CXXFLAG="-I./internal -I../internal" fi fi else succeeded=no if test -z "$PKG_CONFIG"; then # 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; 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 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; 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 "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++-gtk-utils-1.3 >= 1.2.7" >&5 $as_echo_n "checking for c++-gtk-utils-1.3 >= 1.2.7... " >&6; } if $PKG_CONFIG --exists "c++-gtk-utils-1.3 >= 1.2.7" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_CFLAGS" >&5 $as_echo_n "checking CXX_GTK_UTILS_CFLAGS... " >&6; } CXX_GTK_UTILS_CFLAGS=`$PKG_CONFIG --cflags "c++-gtk-utils-1.3 >= 1.2.7"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_CFLAGS" >&5 $as_echo "$CXX_GTK_UTILS_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX_GTK_UTILS_LIBS" >&5 $as_echo_n "checking CXX_GTK_UTILS_LIBS... " >&6; } CXX_GTK_UTILS_LIBS=`$PKG_CONFIG --libs "c++-gtk-utils-1.3 >= 1.2.7"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_GTK_UTILS_LIBS" >&5 $as_echo "$CXX_GTK_UTILS_LIBS" >&6; } else CXX_GTK_UTILS_CFLAGS="" CXX_GTK_UTILS_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then $as_echo "#define HAVE_CXX_GTK_UTILS 1" >>confdefs.h else COND_INTERNAL=c++-gtk-utils COND_INTERNAL_LIB=internal/c++-gtk-utils/libcxx-gtk-utils.a COND_CXXFLAG="-I./internal -I../internal" fi fi else as_fn_error "incorrect gtk+ version specified" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the system supports monotonic clocks" >&5 $as_echo_n "checking whether the system supports monotonic clocks... " >&6; } if test "${ac_cv_have_monotonic_clock+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling: " >&5 $as_echo "cross-compiling: " >&6; } ac_cv_have_monotonic_clock="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { if (_POSIX_MONOTONIC_CLOCK > 0 && _POSIX_CLOCK_SELECTION > 0) return 0; if (_POSIX_MONOTONIC_CLOCK == -1 || _POSIX_CLOCK_SELECTION == -1) return -1; if (sysconf(_SC_MONOTONIC_CLOCK) > 0 && sysconf(_SC_CLOCK_SELECTION) > 0) return 0; return -1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_have_monotonic_clock="yes" else ac_cv_have_monotonic_clock="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_have_monotonic_clock" >&5 $as_echo "$ac_cv_have_monotonic_clock" >&6; } if test "$ac_cv_have_monotonic_clock" = "yes" ; then $as_echo "#define HAVE_MONOTONIC_CLOCK 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield" >&5 $as_echo_n "checking for sched_yield... " >&6; } if test "${ac_cv_have_sched_yield+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { sched_yield(); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sched_yield="yes" else ac_cv_have_sched_yield="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_sched_yield" >&5 $as_echo "$ac_cv_have_sched_yield" >&6; } if test "$ac_cv_have_sched_yield" = "yes" ; then AC_USE_SCHED_YIELD="define CGU_USE_SCHED_YIELD 1" else AC_USE_SCHED_YIELD="undef CGU_USE_SCHED_YIELD" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether headers include provision for recursive mutexes" >&5 $as_echo_n "checking whether headers include provision for recursive mutexes... " >&6; } if test "${ac_cv_have_recursive_mutex_headers+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 600 #include int main () { pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutexattr_destroy(&attr); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_recursive_mutex_headers="yes" else ac_cv_have_recursive_mutex_headers="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_recursive_mutex_headers" >&5 $as_echo "$ac_cv_have_recursive_mutex_headers" >&6; } if test "$ac_cv_have_recursive_mutex_headers" = "yes" ; then $as_echo "#define HAVE_RECURSIVE_MUTEX_HEADERS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the runtime provides working recursive mutexes" >&5 $as_echo_n "checking whether the runtime provides working recursive mutexes... " >&6; } if test "${ac_cv_have_recursive_mutex_runtime+set}" = set; then : $as_echo_n "(cached) " >&6 else lib_save=$LIBS echo 'int main(void) { return 0; }' >conftest.c cgu_pthread_flag=no if test -z "`$CC -pthread -c conftest.c 2>&1`"; then if test -z "`$CC -pthread -o conftest conftest.o 2>&1`"; then cgu_pthread_flag=yes fi fi rm -f conftest* if test "$cgu_pthread_flag" = "yes" ; then LIBS="-pthread" echo -n "using -pthread: " else LIBS="-lpthread" fi if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling: " >&5 $as_echo "cross-compiling: " >&6; } ac_cv_have_recursive_mutex_runtime="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 600 #include int main () { pthread_mutexattr_t attr; if (pthread_mutexattr_init(&attr)) return -1; if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) { pthread_mutexattr_destroy(&attr); return -1; } pthread_mutexattr_destroy(&attr); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_have_recursive_mutex_runtime="yes" else ac_cv_have_recursive_mutex_runtime="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=$lib_save fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_recursive_mutex_runtime" >&5 $as_echo "$ac_cv_have_recursive_mutex_runtime" >&6; } if test "$ac_cv_have_recursive_mutex_runtime" = "yes" ; then AC_HAVE_RECURSIVE_MUTEX_RUNTIME="define CGU_HAVE_RECURSIVE_MUTEX 1" else AC_HAVE_RECURSIVE_MUTEX_RUNTIME="undef CGU_HAVE_RECURSIVE_MUTEX" fi else AC_HAVE_RECURSIVE_MUTEX_RUNTIME="undef CGU_HAVE_RECURSIVE_MUTEX" fi AC_USING_NAMESPACE="// do not include using directive" AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT="define CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT 1" AC_USE_GLIB_MEMORY_SLICES_COMPAT="undef CGU_USE_GLIB_MEMORY_SLICES_COMPAT" AC_USE_TYPE_TUPLE_ARGS="define CGU_USE_TYPE_TUPLE_ARGS 1" AC_USE_SMART_PTR_COMPARISON="undef CGU_USE_SMART_PTR_COMPARISON" for ac_header in tiffio.h do : ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" if test "x$ac_cv_header_tiffio_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TIFFIO_H 1 _ACEOF else { as_fn_set_status 1 as_fn_error "tiffio.h in libtiff not found" "$LINENO" 5; } fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = x""yes; then : : else as_fn_error "POSIX ssize_t not available" "$LINENO" 5 fi ac_fn_cxx_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " #include #include #include #include " if test "x$ac_cv_type_socklen_t" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SOCKLEN_T 1 _ACEOF fi ac_fn_cxx_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" " #include #include #include #include " if test "x$ac_cv_type_in_addr_t" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IN_ADDR_T 1 _ACEOF fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 $as_echo_n "checking size of wchar_t... " >&6; } if test "${ac_cv_sizeof_wchar_t+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then : else if test "$ac_cv_type_wchar_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (wchar_t) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_wchar_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 $as_echo "$ac_cv_sizeof_wchar_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t _ACEOF { $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; } GETTEXT_MACRO_VERSION=0.17 # 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 # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # 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 test "${ac_cv_path_MSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$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 test "${ac_cv_path_GMSGFMT+set}" = set; 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 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # 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 # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # 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 test "${ac_cv_path_XGETTEXT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done 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 rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # 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 # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # 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 test "${ac_cv_path_MSGMERGE+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$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 test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" 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" # 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 test "${ac_cv_build+set}" = set; 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 test "${ac_cv_host+set}" = set; 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 # 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 test "${acl_cv_path_LD+set}" = set; 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 test "${acl_cv_prog_gnu_ld+set}" = set; 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 test "${acl_cv_rpath+set}" = set; 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 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 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi 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" fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= 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"; 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/"'*$,,'` LIBICONV_PREFIX="$basedir" 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"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then 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 test "${am_cv_func_iconv+set}" = set; 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_cxx_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_cxx_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 test "${am_cv_func_iconv_works+set}" = set; 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; } } #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_cxx_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 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-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_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" fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' 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" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$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 $LTLIBINTL; 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 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-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"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$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 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$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 $LIBINTL; 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 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-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/"'*$,,'` LIBINTL_PREFIX="$basedir" 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 $INCINTL; 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 INCINTL="${INCINTL}${INCINTL:+ }-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"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; 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 $LIBINTL; 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 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; 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 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-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$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-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" LIBINTL="${LIBINTL}${LIBINTL:+ }$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" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; 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 fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" 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_cflags_safe=$CFLAGS ac_ldflags_safe=$LDFLAGS ac_libs_safe=$LIBS CFLAGS="" LDFLAGS="" LIBS="" for ac_func in mkstemp do : ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" if test "x$ac_cv_func_mkstemp" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MKSTEMP 1 _ACEOF else as_fn_error "Library function mkstemp is required and cannot be found" "$LINENO" 5 fi done CFLAGS=$ac_cflags_safe LDFLAGS=$ac_ldflags_safe LIBS=$ac_libs_safe { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fstream ios::nocreate flag" >&5 $as_echo_n "checking for fstream ios::nocreate flag... " >&6; } if test "${ac_cv_have_ios_nocreate+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { std::fstream strm("dummy.txt", std::ios::in | std::ios::nocreate); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_have_ios_nocreate="yes" else ac_cv_have_ios_nocreate="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_ios_nocreate" >&5 $as_echo "$ac_cv_have_ios_nocreate" >&6; } if test "$ac_cv_have_ios_nocreate" = "yes" ; then $as_echo "#define HAVE_IOS_NOCREATE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether streams may have a locale imbued" >&5 $as_echo_n "checking whether streams may have a locale imbued... " >&6; } if test "${ac_cv_have_stream_imbue+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { std::cout.imbue(std::locale::classic()); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_have_stream_imbue="yes" else ac_cv_have_stream_imbue="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_stream_imbue" >&5 $as_echo "$ac_cv_have_stream_imbue" >&6; } if test "$ac_cv_have_stream_imbue" = "yes" ; then $as_echo "#define HAVE_STREAM_IMBUE 1" >>confdefs.h fi for ac_header in ostream istream sstream do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { as_fn_set_status 1 as_fn_error "ostream, istream or sstream header not found" "$LINENO" 5; } fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking the fax spool directory" >&5 $as_echo_n "checking the fax spool directory... " >&6; } SPOOLDIR="/var/spool/fax" # Check whether --with-spooldir was given. if test "${with_spooldir+set}" = set; then : withval=$with_spooldir; if test "$withval" != "no"; then SPOOLDIR="$withval" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: SPOOLDIR is $SPOOLDIR" >&5 $as_echo "SPOOLDIR is $SPOOLDIR" >&6; } 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 test "${ac_cv_prog_RANLIB+set}" = set; 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 test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; 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 { $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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 ac_config_files="$ac_config_files Makefile src/Makefile efax/Makefile po/Makefile.in efax-gtk-faxfilter/Makefile src/utils/Makefile efax-gtk.spec src/internal/Makefile src/internal/c++-gtk-utils/Makefile src/internal/c++-gtk-utils/cgu_config.h" 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 test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file 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= 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 -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi 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 -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error "conditional \"am__fastdepCXX\" 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. 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 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=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&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 efax-gtk $as_me 3.2.8, which was generated by GNU Autoconf 2.65. 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 the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ efax-gtk config.status 3.2.8 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 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=$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"` ;; 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" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _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 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "efax/Makefile") CONFIG_FILES="$CONFIG_FILES efax/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "efax-gtk-faxfilter/Makefile") CONFIG_FILES="$CONFIG_FILES efax-gtk-faxfilter/Makefile" ;; "src/utils/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/Makefile" ;; "efax-gtk.spec") CONFIG_FILES="$CONFIG_FILES efax-gtk.spec" ;; "src/internal/Makefile") CONFIG_FILES="$CONFIG_FILES src/internal/Makefile" ;; "src/internal/c++-gtk-utils/Makefile") CONFIG_FILES="$CONFIG_FILES src/internal/c++-gtk-utils/Makefile" ;; "src/internal/c++-gtk-utils/cgu_config.h") CONFIG_FILES="$CONFIG_FILES src/internal/c++-gtk-utils/cgu_config.h" ;; *) 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= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # 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 {' >"$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 >>"\$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 >>"\$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 < "$tmp/subs1.awk" > "$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 $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// 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 >"$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_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; 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="$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 "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 >"$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 "$tmp/subs.awk" >$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' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$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 "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$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 "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$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 "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$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 } ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; 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 INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; 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 $? 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 echo " Configuration complete." echo echo " To compile, enter \`make', and then enter \`make install'" echo " -- \`make install' must be run as root." echo echo " To reconfigure, enter \`make clean' and then run \`./configure' again." echo efax-gtk-3.2.8/config.h.in0000644000175000001440000000731011544567007012204 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have c++-gtk-utils-1.2. */ #undef HAVE_CXX_GTK_UTILS /* Define to 1 if you have c++-gtk-utils-2.0. */ #undef HAVE_CXX_GTK_UTILS_2 /* Define to 1 if you do not have gio dbus but do have dbus-glib. */ #undef HAVE_DBUS_GLIB /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the gio dbus implementation. */ #undef HAVE_GIO_DBUS /* 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 the system has the type `in_addr_t'. */ #undef HAVE_IN_ADDR_T /* Define if the C++ fstream object has ios::nocreate */ #undef HAVE_IOS_NOCREATE /* Define to 1 if you have the header file. */ #undef HAVE_ISTREAM /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* Define if the system supports monotonic clocks */ #undef HAVE_MONOTONIC_CLOCK /* Define to 1 if you have the header file. */ #undef HAVE_OSTREAM /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define if headers include provision for recursive mutexes */ #undef HAVE_RECURSIVE_MUTEX_HEADERS /* Define to 1 if the system has the type `socklen_t'. */ #undef HAVE_SOCKLEN_T /* Define to 1 if you have the header file. */ #undef HAVE_SSTREAM /* 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 if the C++ library can imbue stream objects with a locale */ #undef HAVE_STREAM_IMBUE /* 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 header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_TIFFIO_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_X11_XKBLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_X11_XLIB_H /* 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 /* The size of `wchar_t', as computed by sizeof. */ #undef SIZEOF_WCHAR_T /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to `unsigned int' if does not define. */ #undef size_t efax-gtk-3.2.8/missing0000755000175000001440000002557711466007655011600 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # 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, 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. 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] 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 # 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). 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 $1 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 1 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-end: "$" # End: efax-gtk-3.2.8/print_fax0000755000175000001440000000352011466007655012101 00000000000000#!/bin/sh # This script is for use with efax-gtk. It can be used automatically # to print a fax when a fax is received. Edit the user options below # as necessary. ########### start of user options ########### PAGE=a4 # ISO A4 #PAGE=letter # US letter #PAGE=legal # US legal PRINT_CMD="lpr" #PRINT_CMD="lpr -Plp" # PRINT_SHRINK reduces the size of the fax image to fit within printer # margins. It is a percentage, so if you comment it out, or specify # 100, then the image will be printed full size. It cannot be set to # a size larger than 100, or less than 50. PRINT_SHRINK=98 # if you have specified a sub-directory WORK_SUBDIR: in the efax-gtkrc # configuration file then you will need to amend the following line # accordingly WORK_SUBDIR="" ############ end of user options ############ if [ -z "$PRINT_SHRINK" ] ; then PRINT_SHRINK=100 fi PAGE_a4="210x297mm" PAGE_letter="216x279mm" PAGE_legal="216x356mm" case $PAGE in a4) PAGE_DIM="$PAGE_a4" H_OFFSET=$((210*(100-$PRINT_SHRINK)/200)) V_OFFSET=$((297*(100-$PRINT_SHRINK)/200)) ;; letter) PAGE_DIM="$PAGE_letter" H_OFFSET=$((216*(100-$PRINT_SHRINK)/200)) V_OFFSET=$((279*(100-$PRINT_SHRINK)/200)) ;; legal) PAGE_DIM="$PAGE_legal" H_OFFSET=$((216*(100-$PRINT_SHRINK)/200)) V_OFFSET=$((356*(100-$PRINT_SHRINK)/200)) ;; *) echo "Incorrect page size specified" exit 2 ;; esac if [ $PRINT_SHRINK -gt 100 ]; then echo "PRINT_SHRINK is too large" exit 1 elif [ $PRINT_SHRINK -lt 50 ]; then echo "PRINT_SHRINK is too small" exit 1 elif [ $PRINT_SHRINK -eq 100 ]; then SIZE="1" else SIZE="0."$PRINT_SHRINK fi DISPLACE=$H_OFFSET","$V_OFFSET"mm" FILES=$HOME/$WORK_SUBDIR/faxin/$1/$1.* efix-0.9a -ve -r300 -ops -p$PAGE_DIM -s$SIZE -d$DISPLACE $FILES | $PRINT_CMD efax-gtk-3.2.8/efax-gtk.desktop0000644000175000001440000000062611466007655013266 00000000000000[Desktop Entry] Version=1.0 Encoding=UTF-8 Name=Efax-gtk Name[zh_TW]=傳真 Name[he_IL]=תוכנת פקסים efax-gtk Comment=GUI front end for the efax fax program Comment[zh_TW]=efax 傳真軟體的 GUI 前端程式 Comment[he_IL]=ממשק גרפי עבור תוכנת הפקסים efax TryExec=efax-gtk Exec=efax-gtk Icon=efax-gtk.png Terminal=false Type=Application Categories=Application;Office;GTK; efax-gtk-3.2.8/ABOUT-NLS0000644000175000001440000022532611466007655011422 000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. 1.1 Quick configuration advice ============================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. 1.2 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.3 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.4 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of November 2007. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo +----------------------------------------------------+ Compendium | [] [] [] [] | a2ps | [] [] [] [] [] | aegis | () | ant-phone | () | anubis | [] | ap-utils | | aspell | [] [] [] [] [] | bash | [] | bfd | | bibshelf | [] | binutils | | bison | [] [] | bison-runtime | [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | | cpplib | [] [] [] | cryptonit | [] | dialog | | diffutils | [] [] [] [] [] [] | doodle | [] | e2fsprogs | [] [] | enscript | [] [] [] [] | fetchmail | [] [] () [] [] | findutils | [] | findutils_stable | [] [] [] | flex | [] [] [] | fslint | | gas | | gawk | [] [] [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] | gip | [] | gliv | [] [] | glunarclock | [] | gmult | [] [] | gnubiff | () | gnucash | [] [] () () [] | gnuedu | | gnulib | [] | gnunet | | gnunet-gtk | | gnutls | [] | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | | gpe-edit | [] | gpe-filemanager | | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-package | | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | | gphoto2 | [] [] [] [] | gprof | [] [] | gpsdrive | | gramadoir | [] [] | grep | [] [] | gretl | () | gsasl | | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] [] | gst-plugins-ugly | [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | () | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] [] | indent | [] [] [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | [] | jtag | | jwhois | | kbd | [] [] [] [] | keytouch | [] [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | () | ld | [] | leafpad | [] [] [] [] [] | libc | [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] | libgpg-error | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | | libiconv | [] [] | libidn | [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] | man-db | [] [] [] | minicom | [] [] [] | nano | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | popt | [] [] [] | psmisc | [] | pwdutils | | qof | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] | shared-mime-info | [] [] [] [] () [] [] [] | sharutils | [] [] [] [] [] [] | shishi | | skencil | [] () | solfege | | soundtracker | [] [] | sp | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] | texinfo | [] [] [] | tin | () () | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | util-linux-ng | [] [] [] [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] | xpad | [] [] [] | +----------------------------------------------------+ af am ar az be bg bs ca cs cy da de el en en_GB eo 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18 es et eu fa fi fr ga gl gu he hi hr hu id is it +--------------------------------------------------+ Compendium | [] [] [] [] [] | a2ps | [] [] [] () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] [] | aspell | [] [] [] | bash | [] | bfd | [] [] | bibshelf | [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cpplib | [] [] | cryptonit | [] | dialog | [] [] [] | diffutils | [] [] [] [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] | fetchmail | [] | findutils | [] [] [] | findutils_stable | [] [] [] [] | flex | [] [] [] | fslint | | gas | [] [] | gawk | [] [] [] [] () | gcal | [] [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] | gliv | () | glunarclock | [] [] [] | gmult | [] [] [] | gnubiff | () () | gnucash | () () () | gnuedu | [] | gnulib | [] [] [] | gnunet | | gnunet-gtk | | gnutls | | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] [] [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] [] [] | gpe-filemanager | [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] [] | gpsdrive | [] | gramadoir | [] [] | grep | [] [] [] | gretl | [] [] [] () | gsasl | [] [] | gss | [] [] | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] | gstreamer | [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] [] [] | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] | jpilot | [] [] | jtag | [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] | keytouch-editor | [] | keytouch-keyboa... | [] [] | latrine | [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] [] [] | libgpg-error | [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] | libgsasl | [] [] | libiconv | [] [] [] | libidn | [] [] | lifelines | () | lilypond | [] [] [] | lingoteach | [] [] [] | lprng | | lynx | [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] | man-db | [] | minicom | [] [] [] [] | nano | [] [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] | pilot-qof | | popt | [] [] [] [] | psmisc | [] [] | pwdutils | | qof | [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] | sed | [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] | soundtracker | [] [] [] | sp | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | tin | [] () | tuxpaint | [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] [] [] [] | util-linux-ng | [] [] [] [] [] [] [] | vorbis-tools | | wastesedge | () | wdiff | [] [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ es et eu fa fi fr ga gl gu he hi hr hu id is it 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52 ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn +--------------------------------------------------+ Compendium | [] | a2ps | () [] [] | aegis | () | ant-phone | [] | anubis | [] [] [] | ap-utils | [] | aspell | [] [] | bash | [] | bfd | | bibshelf | [] | binutils | | bison | [] [] [] | bison-runtime | [] [] [] | bluez-pin | [] [] [] | cflow | | clisp | [] | console-tools | | coreutils | [] | cpio | [] | cpplib | [] | cryptonit | [] | dialog | [] [] | diffutils | [] [] [] | doodle | | e2fsprogs | [] | enscript | [] | fetchmail | [] [] | findutils | [] | findutils_stable | [] | flex | [] [] | fslint | | gas | | gawk | [] [] | gcal | | gcc | | gettext-examples | [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gip | [] [] | gliv | [] | glunarclock | [] [] | gmult | [] [] [] | gnubiff | | gnucash | () () () | gnuedu | | gnulib | [] [] | gnunet | | gnunet-gtk | | gnutls | [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] | gpe-clock | [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] | gphoto2 | [] [] | gprof | [] | gpsdrive | [] | gramadoir | () | grep | [] [] | gretl | | gsasl | [] | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] | gtick | [] | gtkam | [] [] | gtkorphan | [] | gtkspell | [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] | indent | [] [] | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | () () | jtag | | jwhois | [] | kbd | [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | | latrine | [] | ld | | leafpad | [] [] | libc | [] [] [] | libexif | | libextractor | | libgpewidget | [] | libgpg-error | | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | [] | libidn | [] [] | lifelines | [] | lilypond | [] | lingoteach | [] | lprng | | lynx | [] [] | m4 | [] [] | mailfromd | | mailutils | | make | [] [] [] | man-db | | minicom | [] | nano | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | popt | [] [] [] | psmisc | [] [] [] | pwdutils | | qof | | radius | | recode | [] | rpm | [] [] | screem | [] | scrollkeeper | [] [] [] [] | sed | [] [] | shared-mime-info | [] [] [] [] [] [] [] | sharutils | [] [] | shishi | | skencil | | solfege | () () | soundtracker | | sp | () | system-tools-ba... | [] [] [] [] | tar | [] [] [] | texinfo | [] [] | tin | | tuxpaint | () [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] | util-linux-ng | [] [] | vorbis-tools | | wastesedge | [] | wdiff | [] [] | wget | [] [] | xchat | [] [] [] [] | xkeyboard-config | [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta +--------------------------------------------------+ Compendium | [] [] [] [] [] | a2ps | () [] [] [] [] [] [] | aegis | () () | ant-phone | [] [] | anubis | [] [] [] | ap-utils | () | aspell | [] [] [] | bash | [] [] | bfd | | bibshelf | [] | binutils | [] [] | bison | [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] [] | cflow | [] | clisp | [] | console-tools | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cpplib | [] | cryptonit | [] [] | dialog | [] | diffutils | [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] | findutils_stable | [] [] [] [] [] [] | flex | [] [] [] [] [] | fslint | [] | gas | | gawk | [] [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gip | [] [] [] [] | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] [] | gmult | [] [] [] [] | gnubiff | () [] | gnucash | () [] | gnuedu | | gnulib | [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] [] [] [] [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] [] [] [] [] [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | gretl | [] [] [] | gsasl | [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] | gstreamer | [] [] [] [] | gtick | [] | gtkam | [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] | herrie | [] [] [] | hylafax | | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] | jpilot | | jtag | [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | | ld | [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] | libextractor | [] [] | libgpewidget | [] [] [] [] [] [] [] [] | libgpg-error | [] [] [] | libgphoto2 | [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] | libidn | [] [] () | lifelines | [] [] | lilypond | | lingoteach | [] | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] [] [] [] | minicom | [] [] [] [] [] | nano | [] [] [] [] | opcodes | [] [] | parted | [] | pilot-qof | | popt | [] [] [] [] | psmisc | [] [] | pwdutils | [] [] | qof | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | rpm | [] [] [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] [] | solfege | [] | soundtracker | [] [] | sp | | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | () | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | util-linux-ng | [] [] [] [] | vorbis-tools | [] | wastesedge | | wdiff | [] [] [] [] [] [] [] | wget | [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3 tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu +---------------------------------------------------+ Compendium | [] [] [] [] | 19 a2ps | [] [] [] | 19 aegis | [] | 1 ant-phone | [] [] | 6 anubis | [] [] [] | 11 ap-utils | () [] | 4 aspell | [] [] [] | 16 bash | [] | 6 bfd | | 2 bibshelf | [] | 7 binutils | [] [] [] [] | 9 bison | [] [] [] [] | 20 bison-runtime | [] [] [] [] | 18 bluez-pin | [] [] [] [] [] [] | 28 cflow | [] [] | 5 clisp | | 9 console-tools | [] [] | 5 coreutils | [] [] [] | 18 cpio | [] [] [] [] | 11 cpplib | [] [] [] [] [] | 12 cryptonit | [] | 6 dialog | [] [] [] | 9 diffutils | [] [] [] [] [] | 29 doodle | [] | 6 e2fsprogs | [] [] | 10 enscript | [] [] [] | 16 fetchmail | [] [] | 12 findutils | [] [] [] | 11 findutils_stable | [] [] [] [] | 18 flex | [] [] | 15 fslint | [] | 2 gas | [] | 3 gawk | [] [] [] | 16 gcal | [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] | 29 gettext-runtime | [] [] [] [] [] [] | 28 gettext-tools | [] [] [] [] [] | 20 gip | [] [] | 13 gliv | [] [] | 11 glunarclock | [] [] [] | 15 gmult | [] [] [] [] | 16 gnubiff | [] | 2 gnucash | () [] | 5 gnuedu | [] | 2 gnulib | [] | 10 gnunet | | 0 gnunet-gtk | [] [] | 3 gnutls | | 4 gpe-aerial | [] [] | 14 gpe-beam | [] [] | 14 gpe-calendar | [] [] | 7 gpe-clock | [] [] [] [] | 21 gpe-conf | [] [] [] | 16 gpe-contacts | [] [] | 10 gpe-edit | [] [] [] [] [] | 22 gpe-filemanager | [] [] | 7 gpe-go | [] [] [] [] | 19 gpe-login | [] [] [] [] [] | 21 gpe-ownerinfo | [] [] [] [] | 21 gpe-package | [] | 6 gpe-sketchbook | [] [] | 16 gpe-su | [] [] [] [] | 21 gpe-taskmanager | [] [] [] [] | 21 gpe-timesheet | [] [] [] [] | 18 gpe-today | [] [] [] [] [] | 21 gpe-todo | [] [] | 8 gphoto2 | [] [] [] [] | 21 gprof | [] [] | 13 gpsdrive | [] | 5 gramadoir | [] | 7 grep | [] | 12 gretl | | 6 gsasl | [] [] [] | 9 gss | [] | 7 gst-plugins-bad | [] [] [] | 13 gst-plugins-base | [] [] | 11 gst-plugins-good | [] [] [] [] [] | 16 gst-plugins-ugly | [] [] [] | 13 gstreamer | [] [] [] | 18 gtick | [] [] | 7 gtkam | [] | 16 gtkorphan | [] | 7 gtkspell | [] [] [] [] [] [] | 27 gutenprint | | 4 hello | [] [] [] [] [] | 38 herrie | [] [] | 8 hylafax | | 0 idutils | [] [] | 15 indent | [] [] [] [] [] | 28 iso_15924 | [] [] | 4 iso_3166 | [] [] [] [] [] [] [] [] [] | 54 iso_3166_2 | [] [] | 4 iso_4217 | [] [] [] [] [] | 24 iso_639 | [] [] [] [] [] | 26 jpilot | [] [] [] [] | 7 jtag | [] | 3 jwhois | [] [] [] | 13 kbd | [] [] [] | 13 keytouch | [] | 8 keytouch-editor | [] | 5 keytouch-keyboa... | [] | 5 latrine | [] [] | 5 ld | [] [] [] [] | 10 leafpad | [] [] [] [] [] | 24 libc | [] [] [] | 19 libexif | [] | 5 libextractor | [] | 5 libgpewidget | [] [] [] | 20 libgpg-error | [] | 6 libgphoto2 | [] [] | 9 libgphoto2_port | [] [] [] | 11 libgsasl | [] | 8 libiconv | [] [] | 11 libidn | [] [] | 11 lifelines | | 4 lilypond | [] | 6 lingoteach | [] | 6 lprng | [] | 2 lynx | [] [] [] | 15 m4 | [] [] [] | 18 mailfromd | [] [] | 3 mailutils | [] [] | 8 make | [] [] [] | 20 man-db | [] | 9 minicom | [] | 14 nano | [] [] [] | 20 opcodes | [] [] | 10 parted | [] [] [] | 11 pilot-qof | [] | 1 popt | [] [] [] [] | 18 psmisc | [] [] | 10 pwdutils | [] | 3 qof | [] | 4 radius | [] [] | 7 recode | [] [] [] | 25 rpm | [] [] [] [] | 13 screem | [] | 2 scrollkeeper | [] [] [] [] | 26 sed | [] [] [] [] | 23 shared-mime-info | [] [] [] | 29 sharutils | [] [] [] | 23 shishi | [] | 3 skencil | [] | 7 solfege | [] | 3 soundtracker | [] [] | 9 sp | [] | 3 system-tools-ba... | [] [] [] [] [] [] [] | 38 tar | [] [] [] | 17 texinfo | [] [] [] | 15 tin | | 1 tuxpaint | [] [] [] | 19 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] [] | 20 util-linux-ng | [] [] [] | 20 vorbis-tools | [] [] | 4 wastesedge | | 1 wdiff | [] [] | 23 wget | [] [] [] | 20 xchat | [] [] [] [] | 29 xkeyboard-config | [] [] [] | 14 xpad | [] [] [] | 15 +---------------------------------------------------+ 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If November 2007 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.6 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. efax-gtk-3.2.8/po/0000755000175000001440000000000011544574533010660 500000000000000efax-gtk-3.2.8/po/he.gmo0000644000175000001440000017733711544574532011721 00000000000000z B([ _ y'4P8@A;@ @@0@@@@#@6A'UC }C CCCCC%CCD&D 8DED+bD!D1DD DEEE^8E*EEE#EFF #F-F AFnNFFFFFFG %G 1GB=G{GGpHHHH6H HII +I7I>I SI`IeI&lIgII#J8JXJ,oJJJ)K2K:8KsK8K:KGKFL=bLLLL: MFMeM=MM(AN>jN9NN%OG(OpO>PPQ,Q@Q PQ \QgQoQ uQQQQ QQQQQ QLQT:R#RRR;R#S*S2S;S JS TS`S eSqS!xSgST)T'ET*mTTTTTTTU0UCUWUZ]UUV/W ?XIXcXuXzXX XXX X XXXXXY Y+Y=Y_XY_Y[ZUtZcZ.[7[ ?[K[`[i[y[[ [[[ [[$[\\\3\8\S\ b\o\%\M\\]G]a^ _!_aa(bGcPemafhf8gdhFjxkTlM%mcsmn#noooo/o-p2pDpSWp4q qqrr rr $r .rO_t :,%R/hF9ߪLf!ܫBì&Ҭ,&/ 8C[q $8Xo hw!'ʰ\BXk  ұ ߱,Jڲ,%R1p tSACIo&\$}&K&7r*dշ:3d[|.ع/d7"%Ǽ$"5K_hq̽!'.gEU-1(NYwѿ ڿ  # :EY:h&3EQy>. 09j */0FW5  !*@PW^n'%.Ls -;M%] #')5E{ /3Yc &I}^'`B<}3T)j 0v< 5 @W s }# ;%2GX-%,!2?*r2+  &$4 Y'zD</$+T*' 3)E7o"B- -;>i/&,<,4iA :2Z7J(d. , ##;5_!$!%5[ q>}$#'#C3g,#! )B9lA.E62| /2HHHMH([q`.FO `k&,%!!*C.n.4# %F/a:-2I)|8Ds/KBw5dOa2cp$ FMzl_ Z<7!uV3Jm3&g)xC^k6yFm:`'to] bd1 >b#v[$ Er,%]Uw&AX ?KEH=[XBq9W!0I}q;iHn-GOSWj"rj4?.U\| {v(`6R.+fPa8c*)QNRM"*0e=@9s4N_y,-u\ Y~P@eg7>;ko+%hT5 L(JSp^<C:z i# AGx2'hQfVL/ YltZn1DIT8 (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. Error: Warning: from the list? has been received on socket. Send or queue fax? or %s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Albanian - Besnik Bleta Answer callAnswering callAutoBulgarian - Zdravko Nikolov Can't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Catalan - Jordi Sayol Salomo Choose the selected fax for sendingClass 1Class 2Class 2.0Closing the socket Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?Empty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)German - Steffen Wagner Greek - Hellenic Linux Users Group HDLC frame missing initial 0xffHebrew - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentityIf this is checked, the program will use the GTK+ print system rather than the command line argument specified below to print faxesInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Invalid Utf8 received in EfaxController::read_pipe_cb() Invalid Utf8 received in MainWindow::read_error_pipe_cb() Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Invalid user name specified - it must be in plain ASCII characters. No user name will be shown on the fax top header line, but don't worry as the fax station number will always be given on the top header Invalid user name specified in "Identity" tab - it must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerItalian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingModemModem Class: Move address downMove address upMove file downMove file upMultiple filesNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the name to appear on the fax top header on sent faxes here. It must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! Send faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSimplified Chinese - Kite Lau Single fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopSwedish - Daniel Nylander Take over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether the destination fax number is included in the top fax header line for sent faxes. Uncheck the box if you do not want this to be shown (say because it includes a pay card access number)This specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTraditional Chinese - Wei-Lun Chao TrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details Use GTK+ Print SystemUser does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class hereYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsactivity detectedcalledcan't answer: can't lock devicecan't delete file %s:can't determine fax modem class supportcan't get format of file %scan't open file %s:can't open output file %s:can't open pagecan't rewind file %s:channel not usable at %d bpschannel not usable at lowest speedcharacters received while sendingconnecteddial command faileddialing %sefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk help: Use GTK+ print systemefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingsexec() call failed:fax call answeredfax device write error:file write:finished - %sflow control did not workframe errorheader:incompatible local and remote capabilitiesinternal errorinterrupt request ignoredinvalid modem responseinvalid post-page responseinvalid response to DCSlast byte of frame is NULLlocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxno answer from remote faxno command or response from remoteno getty command defined for data callno response after frame datano response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceivedreceived %d lines with %d errorsreception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremoved file: %ssentsent page %ssuccesssync: dropping DTRsync: modem not respondingsync: sending escapesterminated by signaltimed out after command: %stimed out after waitingtimed out during training check datatimed out reading frame datatimed out waiting for commandtoo many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing line buffering of stdoutvoice call answeredwaiting for activitywrong carrierwrong response after command: %swrong response after frame datawrong response after waitingwrong response to command to receive a frameProject-Id-Version: efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2006-09-16 16:31+0200 Last-Translator: Assaf Gillat Language-Team: HEBREW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.9.1 (הערה: זה ימחק לצמיתות את הפקס מהדיסק) *** עוצר שליחה/קבלה *** קבלת פקסים ---------- ישנן שלוש דרכים לקבל פקסים. הראשונה, כאשר נשלח פקס אפשר לענות לפקס על ידי לחיצה על "ענה לטלפון". השנייה, התכנית יכולה להשתלט על שיחה שכבר נענתה (למשל על ידי שפורפרת הטלפון) על ידי לחיצה על "השתלט על השיחה". השלישית, אפשר לשים את התכנית על המתן לקבלת שיחות על ידי לחיצה על "המתן לקבלת שיחות". התכנית תענה אוטומטית לשיחות לאחר מספר מוגדר של צלצולים המצוין בקובץ efax-gtkrc, וקבלת הפקס. התכנית תמשיך לקבל פקסים עד שילחץ לחצן ה"עצור". פקסים שהתקבלו יכולים להיות מודפסים, מוצגים, מתוארים ומנוהלים על ידי רשימת הפקסים הפנימית. אפשר להעלות אותה דרך התפריט 'קובץ/רשימת קבצים שהתקבלו'.ראה "שימוש ברשימת פקסים" בהמשך. כאשר פקס מתקבל, אפשר לכוון שתיבת דו שיח תופיע (לכו להגדרות לעשות זאת). במסך ההגדרות אפשר לציין אפילו תכנית שתבוצע כאשר מתקבל פקס. מספר הפקס מועבר לפרמטר הראשון (ורק אליו) של התכנית, וזה מאפשר לתכנית למצוא את הפקס ב $HOME/faxin. ההפצה מכילה 2 קבצי אצווה mail_fax ו print_fax, אשר יכולים לשמש לשלוח את הפקס בדואר אלקטרוני או להדפיסו בצורה אוטומטית. (קבצי אצווה אלו לא מותקנים כברירת מחדל, על מנת להשתמש בהם יש לבצע 'chmod +x' ולהעתיקם לתיקיה שמופיעה בנתיב המערכת כגון /usr/local/bin, ואז לציין את שם הקובץ במסך ההגדרות). שליחת פקסים ----------- לפני ששולחים פקס, הוא חייב להיות מצוין בתיבה "פקס לשליחה". הוא חייב להיות בפורמט של פוסקריפט (פורמט זה נוצר על ידי מעבדי תמלילים של יוניקס/לינוקס). והוא יומר על ידי התכנית לפורמט הפקס tiffg3. יש שתי דרכים עיקריות להכנסת פקסים. הראשונה, הפקס יכול להיות קובץ שנשמר על מערכת הקבצים. אפשר להכניסו ידנית לתיבת "פקס לשליחה", או הכנסה באמצעות תיבת הדו שיח של הבחירה. אם הקובץ מורכב מקובץ פוסקריפט אחד תוכל למצוא אותו על ידי לחיצה על "קובץ בודד". הוא יכול להימצא ביתר קלות על ידי מיקומו בתיקיה $HOME/faxout. כאשר יותר מקובץ אחד מוצג בתיבת "פקס לשליחה", הם ישלחו כפקס אחד מוצמד בסדר שבו הקבצים הוכנסו לתיבה. בחירת קבצים מרובים בצורה כזו יכולה להיעשות בקלות על ידי שימוש בלחצן "קבצים מרובים". לחיצה על "קבצים מרובים" מאפשרת לקבצים להימצא ולהסתדר על ידי שימוש בחיצים למעלה ולמטה, או על ידי גרירה ושחרור בעכבר. כאלטרנטיבה, פקסים יכולים להתקבל ישירות ממערכת ההדפסות על ידי שימוש בשרת שקע המסופק על ידי התכנית. Efax-gtk שומרת תור של פקסים שהתקבלו מהשקע ויכולים להתקבל על ידי בחירת "שקע" בדרך קבלת הפקסים, ואז לחיצה על הלחצן "רשימת פקסים בשרת השקע". זוהי דרך יותר נוחה לשליחת פקסים ממעבד תמלילים. בזמן שיש פקס מחכה בתור יופיע עיגול אדום קטן בחלון התכנית בצד הימני של תיבת "שליחת פקס". לפרטים נוספים כיצד להגדיר את CUPS או lpr/lprng לשלוח פקסים לefax-gtk, ראה קובץ README שבא ביחד עם ההפצה. מספר הטלפון שאליו הפקס ישלח מוכנס לתוך תיבת "מספר טלפון". הוא יכול להיות מוכנס ידנית או על ידי שימוש בפנקס הכתובות המובנה. פנקס הכתובות יכול להיות מופעל על ידי לחיצה על "מספר טלפון" או על ידי התפריט קובץ/פנקס כתובות. למרות זאת, אם נוצר כבר חיבור טלפוני עם פקס מרוחק, הפקס יכול להישלח ללא הכנסת מספר טלפון בתיבה (תופיע תיבת דו שיח שתשאל האם לשלוח פקס ללא חיוג). כאשר פקס מתקבל ממערכת ההדפסה דרך שרת השקע, אפשר להגדיר את התכנית להעלות תיבת דו שיח אוטומטית. אם התכנית במצב לא פעיל או מחכה לקבל פקסים, הפקס יכול להישלח ישירות מתיבת הדו שיח בלי צורך להשתמש בתור הפקסים הממתינים מהשקע. פקסים שנשלחו בצורה תקינה מועתקים לתיקיה $HOME/faxsent, ששמה מורכב מהשנה, החודש, היום, השעה והשניות שבהם הסתיימה שליחת הפקס, והם יופיעו ברשימת הפקסים הנשלחים. אפשר לפתוח רשימה זו על ידי התפריט 'קובץ/רשימת פקסים שנשלחו'. ראה "שימוש ברשימות פקסים" בהמשך. הגדרות ------ אפשר לשנות את ההגדרות של התכנית על ידי שינוי ידני של הקבצים $HOME/.efax-gtkrc , $sysconfdir/efax-gtkrc או /etc/efax-gtkrc. מנגנון החיפוש של התכנית מחפש את הקובץ בסדר זה, כך ש $HOME/.efax-gtkrc לוקח עדיפות על שני האחרים. אפשר לשנות כמוכן את קובץ התצורה על ידי שימוש במסך ההגדרות שמועלה דרך התפריט 'קובץ/הגדרות'. ההגדרות שמוכנסות בשימוש במסך זה נשמרות תמיד ב $HOME/.efax-gtkrc. לפי כך, אם שיניתם משהו במסך ההגדרות ואתם רוצים להחזיר את המצב להגדרות הגלובליות, זה ניתן להיעשות בקלות על ידי מחיקת הקובץ $HOME/.efax-gtkrc , או על ידי לחצן ה'איפוס' במסך ההגדרות, שיטען את ההגדרות מהקובץ הגלובלי ($sysconfdir/efax-gtkrc או /etc/efax-gtkrc). אפשר להשיג עזרה בשעת מילוי ההגדרות על ידי החזקת העכבר מעל לחצן העזרה הרצויה (?), אשר יעלה את חלון ה"טיפ", או ללחוץ על הכפתור, שיעלה בתורו מידע עזרה. שימוש בפנקס כתובות ------------------ על מנת לבחור מספר טלפון מפנקס הכתובות, הדגישו את הכתובת הרצויה על ידי לחיצה על לחצן העכבר השמאלי מעליה, ואז לחצו על "אישור". כתובות מוספות לרשימה על ידי לחיצה על כפתור ההוספה, ואז השלמת הפרטים התיבה שתפתח לפניכם. בכדי למחוק כתובת מפנקס הכתובות, הדגישו את הכתובת הרלוונטית ולחצו מחק (סל אשפה). אפשר למיין את פנקס הכתובות בעזרת שימוש בלחצני החצים למעלה ולמטה על כתובת מודגשת, או על ידי גרירה ושחרור של העכבר. שימוש ברשימות פקסים ------------------- על מנת להעלות את רשימות הפקסים, לכו אל תפריט 'קובץ' ובחרו את 'רשימת פקסים שנשלחו' או את 'רשימת פקסים שהתקבלו'. הדגישו את הפקס שברצונכם להדפיס או להציג על ידי לחיצה על הלחצן השמאלי של העכבר. התכניות שמציגות ומדפיסות את הפקס מצוינות בקובץ התצורה efax-gtkrc, או אם לא מצוינות ההדפסה תעשה על ידי lpr (יעבוד ברוב מכונות היוניקס) וההצגה תעשה על ידי gv. על מנת להדפיס פקס, פרמטר בשם PRINT_SHRINK יכול להיות מצוין בefax-gtkrc על מנת לאפשר לעמוד פקס להתאים להדפסה בגלל מגבלות השוליים של המדפסות. פרמטר של 98 יעבוד ברוב המדפסות. אפשר לשנות את פרמטר זה במסך ההגדרות ,הכנסת ערך חדש ב'הדפסה/שיעור כיווץ הדפסה' אפשר להוסיף תיאור לפקס שהתקבל כאשר הוא מופיע ברשימה (כמוכן ניתן לתקן את התיאור) על ידי לחיצה על הכפתור הרלוונטי -- זה יאפשר לכם למצוא את פקסים ביתר קלות. שגיאה: תקלה: מהרשימה? התקבל משקע. שלח פקס או הכנס לתור? או התקן %s נעול או תפוס - מחכה?פקס התקבל על ידי efax-gtkמציג הפוסקריפט נועד כדי להציג את הפקסים ברשימות הקבלה והשליחה. כמוכן לראות פקסים שמוצגים דרך תיבת דו שיח של "קבצים לשליחה". ציין כאן את התכנית שבה יעשה שימוש להצגת קבצי פוסקריפט. אם לא מצוינת אחת, יעשה שימוש בתכנית 'gv' כברירת המחדל. אפשרויות נוספות שיכולות להיות שימושיות הן 'evince' (מציג פוסקריפט של גנום) או 'kghostview' (מציג פוסקריפט של KDE). אם יעשה שימוש ב 'gv' , רצוי להשתמש ב '-media A4' או ב '-media Letter' על מנת לבחור את גודל העמוד הנכון. evince ו kghostview עושים את זה אוטומטי.עבודה הדפסה התקבלה בשקעאודות _efaxאודות efaxאודות efax-_gtkאודות efax-gtkקבלהוסף קבצים לרשימההוסף קבצים לרשימת הקבצים לשליחההוסף כתובת חדשההוסף תיקיה חדשההוסף/תקן תיאור לפקס נבחרפנקס כתובותכתובות שאליהן מותר להתחברמאמץ רזולוציית פקס של 204x196 כברירת מחדל מאמץ גודל עמוד של a4 כברירת מחדל מאמץ הצגת קבצי פוסקריפט ב - 'gv' כברירת מחדל אלבנית - Besnik Bleta ענה לטלפוןעונה לשיחהאוטומטיבולגרית - Zdravko Nikolov אפשר לשנות הגדרות רק שהתכנית במצב לא פעיל לחץ על כפתור ה"עצור" להביא את התכנית למצה לא פעילאי אפשר לשלוח פקס - פקס מתקבל ברגע זה יכולות: קאטאלנית - Jordi Sayol Salomo סמן את הפקס הנבחר לשליחהסוג 1סוג 2סוג 2.0סוגר את השקע תצורה שגויהכל הזכויות שמורות © 2001 - 2011 כריס וין תכנית זו מופצת תחת רישיון GNU General Public License, version 2 תאריךמחק כתובתמחק תיקיה: מחק כתובת מסומנת?מחק פקס נבחרמחק תיקיה מסומנתתיאורמצב חיוג: האם אתה מקבל את התנאים, ההתראות והוויתורים המוצגים למעלה?רוקן את התיקייה על ידי מחיקת כל תיקיות המשנה, או העברתם על ידי גרירה ושחרור. או מחיקת כל הפקסים המוכלים לפני מחיקת התיקייהרוקן סל אשפהרוקן סל אשפה? (הערה: זה ימחק לצמיתות את כל הפקסים בסל האשפה מהדיסק)הכנס קבצים _מרוביםהכנס פקס מסומן לשליחההכנס הגדרות מ..הרץ תכנית או קובץ אצווה כאשר מתקבל פקס על ידי המודםרשימת פקסיםתיאור פקס?דרך קבלת פקס: פקס לשליחה קובץקובץ לא קיים קבצים לשליחהאיכותיתיקיהאסור לשם תיקיה להכיל תו: שם התיקייה? (שימו לב שהיא תמוקם בתיקיית השורש ואפשר לגרור ולשחרר אותה אל תוך תיקיות אחרות)גרמנית - Steffen Wagner יוונית - הקבוצה היוונית של משתמשי לינוקס למסגרת HDLC חסרה תחילית 0xffעברית - אסף גילת הונגרית - Gergely Szakats, Laszlo Csordas הזדהותאם זה יסומן, התוכנית תשתמש במערכת ההדפסה של GTK+ במקום בפרמטרי שורת הפקודה המצויינים למטה על מנת להדפיס פקסים.לא פעילפקסים נכנסיםכלול מספר פקס של פקס היעד בשורת הכותרת של הפקספרמטרי אתחול:התקבל Utf8 לא תקין ב- EfaxController::read_pipe_cb() התקבל Utf8 לא תקין ב- MainWindow::read_error_pipe_cb() צוינה תיקיה לא תקינה עבור תיקיית העבודה. מתעלם מתיקיה העבודה צוין סוג חיוג לא תקיןצוין סוג חיוג לא תקין מאמץ חיוג צלילים כברירת מחדל רזולוציית פקס שצוינה לא תקינה מאמץ רזולוציית פקס של 204x196 כברירת מחדל מצוין סוג פקס לא תקיןסוג פקס לא תקין מאמץ ברירת מחדל של קבוצה 2 אפשרות לא חוקית. האפשרויות הן: מצוין גודל עמוד לא תקיןמצוין גודל עמוד לא תקין מאמץ גודל עמוד של a4 כברירת מחדל צוין ערך לא תקין של פיתחה עבור שרת השקע, לכן השרת לא יאותחל. ערך הפיתחה צריך להיות בין 1024 ל 65535 צוין ערך כיווץ הדפסה לא תקיןמצוין ערך כיווץ הדפסה לא תקין: מאמץ ערך ברירת מחדל של 100 צוין מספר צלצולים שגוי הטלפון יענה לאחר צלצול אחד צוין מספר צלצולים לא תקיןצוינה רזולוציית פקס שגויהצוינה ערך פיתחה שקע לא תקינה. הוא חייב להיות בין 1024 ל 65535צויין שם משתמש לא תקין - הוא חייב להיות באותיות ASCII. לא יופיע שם משתמש על ראש הדף אבל לא לדאוג כי מספר הטלפון של הפקס יופיע בראש הדף צויין שם משתמש לא תקין בסימניית "זיהוי" - המשתמש חייב להיות בעל תווי ASCII פשוטים. אם זאת בעיה, השאר את השדה ריק, כי מספר הטלפון של הפקס תמיד מופיע בכותרת העליונה.איטלקית - Luca De Rugeriis רשימת פקסים שהת_קבלורשימת פקסים שהתקבלורשימת פקסים שנשלחוקובץ נעילה: קובץ יומן: יומןמודםסוג פקודות מודם: העבר כתובת למטההעבר כתובת למעלההעבר קובץ למטההעבר קובץ למעלהקבצים מרוביםשםשם:שם: פקסים חדשים:לא צוין מספר פקס. האם ברצונכם לשלוח את הפקס על חיבור פתוח?לא צוינה פיתחה עבור שרת השקע, לכן השרת לא יופעל לא צוינה יציאת התקן טורי שם קובץ לא תקין קובץ פוסקריפט לא תקין הערה: לחיצה על לחצן האישור תשמור את ההגדרות לקובץמספרמספר:מספר: פרמטרים נוספים: עבודת הדפסהעבודת הדפסה:עימודגודל עמוד: פרמטריםמחק לצמיתות את הפקסים המסומנים? מחק לצמיתות את הפקסים המסומנים? (הערה: זה ימחק לצמיתות את הפקסים מהדיסק)פולנית - Pawel Suwinski תיבת דו שיח קופצת לפני הדפסהתיבת דו שיח קופצת כאשר מתקבל פקס על ידי המודםתיבת דו שיח קופצת כאשר מתקבל מהשקעפיתחה שאליה הפקסים ישלחו:תכנית להצגת קבצי פוסקריפט:לחץ F1 לעזרההדפסהתכנית הדפסה: שיעור כיווץ הדפסה (50-100):עבודה הדפסה התקבלה על שקע הדפס פקס נבחר?הדפס פקס נבחרחיוג מתקפיםכתוב כאן את נתיב תיקיית הנעילה. אם לא מוגדרת אחת, התכנית תשתמש ב- '/var/lock' כברירת מחדלהכנס כאן את השם שברצונך שיופיע על הכותרת העליונה של הפקסים הנשלחים. זה חייב להיות תווי ASCII פשוטים. אם זאת בעיה, השאר את שדה זה ריק, כי בכל מקרה מספר הטלפון של הפקס יופיע בכותרת העליונה של הפקס.כתוב כאן את מספר הטלפון שיופיע בקצה העליון של הפקסים הנשלחים. מספר זה יהיה גם המספר שבו יזדהה הפקס למכונות פקסימיליה בקבלת פקסים.כתוב כאן את שם ההתקן הטורי שאליו מחובר המודם (אם לא מצוין שום ערך, התכנית תשתמש ב '/dev/modem/' כברירת מחדל). אל תכלול את החלק שמתחיל ב- '/dev/' בשם ההתקן -- כלומר ציין אותו כ- 'ttyS1' או 'cua2' וכדומה. בלינוקס, 'ttyS0' זהה ל- COM 1 ו 'ttyS1' זהה ל- COM 2, וכך הלאה.הכנס פקס לתור _פקסים בתור משקעעבודות הדפסה בתוריציאהקבלהממתין לקבלהקבלת פקסדחההסרהסר קובץהסר קובץ הסר קובץ נבחר מהרשימהאפספרמטרי איפוס: אפס מונה פקסים חדשיםאפס הגדרותצלצולים (1-9): הרץ שרת שקערוסית - Pavel Vainerman בעיית מערכת חמורה: לא יכול ליצור תיקייה לשמירת פקסים מתקבלים. הפקס הנוכחי לא ישמר! בעיית מערכת חמורה: לא יכול ליצור תיקייה לשמירת פקסים מתקבלים. הפקסים לא יתקבלו! בעיית מערכת חמורה: לא יכול ליצור תיקייה לשמירת פקסים נשלחים. הפקס הנוכחי לא ישמר! בעיית מערכת חמורה: לא יכול לפתוח תיקיית פקסים מתקבלים. הפקס הנוכחי לא ישמר! בעיית מערכת חמורה: לא יכול לשמור את כל הפקסים המתקבלים. כל או חלק מן הפקסים יהיו חסרים! שלח פקסשליחת פקסשולח פקסרזולוציית שליחת פקס:פקסים יוצאיםהתקן טורי: הגדרותסינית מופשטת - Kite Lau קובץ בודדשקעשקע רשימת פקסים בשרת השקעשקע רץ על פיתחהציין כאן את גודל העמוד לפקסיםרגילהמתן לקבלת שיחותממתין לקבלת שיחותעצורשוודית - Daniel Nylander השתלט על השיחהמספר טלפון: מספר טלפון:התיקייה העוקבת כבר קיימת: התוכנית הורצה עם האופציה -s אבל אין שום מגש מערכת! המזהה המרוחק הואהמזהה המרוחק הוא%sאופציה זו יכולה לשמש להעביר כל פרמטר רצוי ל-efax (רשמו 'man efax' על מנת לראות אלו פרמטרים זמינים). ציינו כמה פרמטרים שדרושים, מופרדים על ידי רווחים לכל פרמטר.לדוגמה כללו '-or' לביצוע היפוך סיביות בזמן קבלה עבור מודמים של Multitech אשר דורשים זאת. השאירו שדה זה ריק, אלא אם כן יש לכם מודם מיוחד.אופציה זו מציינת את מספר הצלצולים שהמודם יאפשר לפני שהוא יענה לטלפון במצב המתן לקבלת שיחות .ערכים שיתקבלו הם 1 עד 9. אם לא יצוין ערך, התכנית תשתמש בערך 1 כברירת מחדל.זוהי הפקודה שמדפיסה ולוקחת קבצי פוסקריפט לצינור הקלט הסטנדרטי. אם לא מצוינת תכנית, התכנית 'lpr' תבחר כברירת מחדלפרמטר זה מציין את שמו של קובץ היומן שאליו כל התהליך העבודה של המודם ינוטר, כל השגיאות והאזהרות יכתבו אליו. אם לא יצוין אחד, לא ייווצר קובץ יומן. (קובץ יומן יכול להיווצר על ידי הפניית הפלט הסטנדרטי ופלט השגיאה. (לפרטים נוספים ראה קובץ README)אופציה זו מציינת אם תיבת דו שיח תופיע כאשר מתקבל פקס מהמודם. סמנו תיבה זו אם ברצונכם שתופיע תיבת דו שיח.תכנית זו היא תכנית חזית הבנויה מעל efax. התכנית efax היא תכנית המופצת תחת רישיון: GNU General Public License, version 2אופציה זו מציינת את פקודות ה-'AT' שיאפסו את המודם. ציינו את כל הפקודות שצריך, מופרדות על ידי רווחים עבור פקודות שאמורות להיות מופרדות, אבל בלי התחילית 'AT'. אם לא יצוין, התכנית תשתמש כברירת מחדל ב-'Z', שהיא תתאים למעשה לרוב המודמים.אופציה זו מציינת את היכולות של המודם. על מנת לראות את משמעות העניין פנה לתיעוד על ידי 'man efax' , וחפש אחר דגלון האופציה '-c'. עם efax גרסה 0.9 ומודם סוג 2, בדרך כלל לא תצטרך לציין את אופציה זו ולהשאירה ריקה, והתכנית תבדוק את המודם. במידה ומשתמשים בגרסה ישנה של efax או סוג מודם אחר, הערכים שיעבדו מעשית עם כל מודם בקצב 14,400 ס"ש הם 1,5,0,2,0,0,0,0 או 1,3,0,2,0,0,0,0 למודמים אטיים יותר.אופציה זו מציינת את מחרוזת האתחול של המודם על ידי פקודות 'AT' למצב פקס. ציינו את כל הפקודות הנחוצות, מופרדות על ידי רווחים, אבל ללא התחילית 'AT'. אם לא תצוין שום מחרוזת, התכנית תשתמש ב 'Z &FE&D2S7=120 &C0 M1L0' כברירת מחדל, אשר למעשה תהיה נכונה כמעט עבור כל מודם.אופציה זו מציינת את ערך הפיתחה שאליה מאזין שרת השקע.אופציה זו מציינת את הרזולוציה שבה פקסים ישלחו."רגיל" ייתן ערך של 204x98 ו"איכותי" ייתן ערך של 204x196אופציה זו מציינת האם להראות תיבת דו שיח קופצת לפני הדפסה כאשר לחצן "הדפס פקס נבחר" נלחץ ברשימת הפקסים שנשלחו או ברשימת הפקסים שהתקבלו. בטלו סימון תיבת זו אם לא תרצו תיבת דו שיח (אם ציינתם תכנית הדפסה חיצונית כגון 'kprinter' בתור תכנית הדפסה, אז אתם בטח לא תרצו לסמן אופציה זו)אופציה זו מציינת אם תיבת דו שיח תופיע כאשר מתקבל פקס על ידי שרת השקע ממערכת ההדפסה. סמנו את התיבה אם תרצו בתיבת דו שיח (לאופציה זו תהיה השפעה רק כאשר תסומן גם התיבה 'הרץ שרת שקע'). אם התכנית לא פעילה הפקס יוכל להישלח ישירות מתיבת דו שיח זו.אופציה זו מציינת אם תבוצע תכנית או קובץ אצווה כאשר מתקבל פקס מהמודם. סמנו את התיבה אם תרצו להריץ תכנית, והכניסו את שם התכנית.אופציה זו מציינת האם שרת השקע ירוץ עבור CUPS או עבור תכנית הדפסה אחרת. סמנו את התיבה אם הוא ירוץ או לא.אפשרות זו מציינת האם מספר פקס היעד ייכלל בשורת הכותרת של הפקסים הנשלחים. בטל סימון של תיבת סימון זו אם אין ברצונך לרות מספר זה (למשל, בגלל שמספר זה מכיל מספר גישה של כרטיס חיוג)אופציה זו מציינת האם להשתמש בחיוג מתקפים או צלילים כאשר שולחים פקסיםאופציה זו תקבע את המידה שבה העמוד המודפס יוקטן כדי להיכנס לתוך קטע העמוד הנראה של המדפסת שלכם. המספר מסמל אחוז -- לדוגמה 98 יכווץ את העמוד ל 98 אחוז מגודלו. אם לא מצוין דבר, שום כיווץ לא יבוצע (אפשר לציין 100 אם תרצו אבל אין לזה משמעות רבה)חיוג צליליםסינית מסורתית - Wei-Lun Chao סל אשפהלא ידועUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details אופציות: -r התחל את התוכנית במצב קבלה לפקס -s התחל את התוכנית מוחבאת במגש המערכת ראה קובץ README שמגיע ביחד עם ההפצה לאפשרויות נוספות השתמש במערכת ההדפסות של GTK+אין למשתמש זכויות קריאה לקובץ זה תצוגההצג פקס נבחרהצג קובץ נבחרעם efax-0.9 או גבוה יותר רצוי בדרך כלל להשתמש ב"אוטומטי", כך efax ינסה למצוא את סוג הפקס בעצמו, אבל אפשר גם לכפות סוג על ידי בחירה באחת מהאפשרויות הרצויות. למרות זאת, עם efax-0.8 התכנית תשתמש כברירת מחדל בסוג 2, אז אם רוצים להשתמש במודם מסוג 1 עם גרסאות ישנות של efax ציינו את הסוג המבוקש.משתנה הסביבה HOME$ שלך לא מוגדר _פנקס כתובותהכנס קובץ _בודד_קובץ_עזרהרשימת פקסים ש_נשלחו_יציאה_הגדרות_תרגומיםפעילות זוהתהחייגלא יכול לענות: אי אפשר לנעול התקןלא יכול למחוק קובץ %s:לא יכול לקבוע מחלקת (class) תמיכת מודם־פקסלא יכול לקבל תבנית קובץ %sלא יכול לפתוח קובץ %s:לא יכול לפתוח קובץ פלט %s:לא יכול לפתוח דףלא יכול להחזיר קובץ לאחור %s:הערוץ לא שמיש במהירות %dהערוץ לא שמיש במהירות נמוכההתקבלו תווים בעת השליחההתחברפעולת חיוג נכשלהמחייג %sעזרה של efax-gtk: יכולותעזרה של efax-gtk: התקןעזרה של efax-gtk: סוג חיוגעזרה של efax-gtk: הרץ תכנית כאשר מתקבל פקסעזרה של efax-gtk : שורת הכותרת של הפקסעזרה של efax-gtk: פרמטרי אתחולעזרה של efax-gtk: קובץ נעילהעזרה של efax-gtk : קובץ יומןעזרה של efax-gtk: סוג מודםעזרה של efax-gtk: שםעזרה של efax-gtk: מספרעזרה של efax-gtk: פרמטרים נוספיםעזרה של efax-gtk: גודל עמודעזרה של efax-gtk: תיבת דו שיח קופצתעזרה של efax-gtk: פיתחהעזרה של efax-gtk: תכנית לצפייה בפוסקריפטעזרה של efax-gtk: תכנית הדפסהעזרה של efax-gtk: כיווץ הדפסהעזרה של efax-gtk: קבל תיבת דו שיח קופצתעזרה של efax-gtk: פרמטרי איפוסעזרה של efax-gtk: צלצוליםעזרה של efax-gtk: הרץ שרת שקעעזרה של efax-gtk: רזולוציית שליחת פקסעזרה של efax-gtk: חיבור שקע מאושרעזרת efax-gtk: השתמש במערכת ההדפסה של GTK+efax-gtk: שקעefax-gtk: efax-gtk: הוסף כתובתefax-gtk: הוסף תיקייהefax-gtk: פנקס כתובותefax-gtk: תנאים התראות וויתוריםefax-gtk: מחק כתובתefax-gtk: מחק פקסefax-gtk: מחק תיקיהefax-gtk: תיאור פקסefax-gtk: רשימת קבציםefax-gtk: קובץ לפקססefax-gtk: עזרהefax-gtk: הדפס פקסefax-gtk: פקסים בתור מהשקעefax-gtk: רשימת פקסים שהתקבלוefax-gtk: הסר פקס מתורefax-gtk: רשימת פקסים שנשלחוefax-gtk: תרגומיםefax-gtk: סל אשפהefax-gtk: פקסים שהתקבלוefax-gtk: עבודה הדפסה התקבלה בשקעefax-gtk: הגדרותקריאה ל- exec() נכשלה:שיחת פקס נענתהתקלת שגיאה התקן פקס:קובץ נכתב:הסתיימה - %sבקרת זרימה לא הצליחהשגיאת מסגרתכותרת:יכולות מרוחקות ומקומיות לא תואמותתקלה פנימיתהתעלמות מבקשת פסיקהתגובת מודם לא תקינהתגובת קדם־דף לא תקינהתגובה לא תקינה אל DCSהבית האחרון של המסגרת הוא NULLמחשב מקומי פקודת מודם "%s" ארוכה מידיפקודת מודם (%s) נכשלהפקודת מודם נכשלההמודם לא תומך בפקסאין תשובה מהפקס המרוחקאין פקודה או תגובה ממכשיר מרוחקלא הוגדרה פקודת getty עבור שיחת נתוניםאין תגובה לאחר מידע מסגרתאין תגובה מהמודםלא הוגדרה פקודת שיחת קול עבור שיחת קולהמספר תפוס או שהמודם בשימושהמספר תפוסהתקן %s נפתחאחרהדף נשמר אל %sהתקבלהתקבלו %d שורות עם %d שגיאותשגיאות קבלההמכשיר המרוחק לא יכול לקבל, מנסה בכל זאתלמכשיר המרוחק אין מסמך לשלוח ויכול לקבללמכשיר המרוחק אין מסמך לשלוח ולא יכול לקבללמכשיר המרוחק אין מה לשלוח, מנסה בכל זאתלמכשיר המרוחק יש מסמך אחד או יותר לשלוח ויכול לקבללמכשיר המרוחק יש מסמך אחד או יותר לשלוח ולא יכול לקבלהקובץ הוסר: %sנשלחנשלח דף %sהצלחהסנכרון: מוריד DTRסנכרון: המודם לא מגיבסנכרון: שולח escapesהסתיים על ידי אות (סיגנל)פסק זמן אחרי פקודה: %sפסק זמן אחרי המתנהפסק זמן בזמן מידע בדיקהפסק זמן בקריאת מידע מסגרתפסק זמן בזמן המתנה לפקודהיותר מידי נסיונות שליחת דפיםלא יכול לענות לשיחהתגובה לא צפוייה "%sפקודה לא מוכרתשגיאה ללא אפשרות התאוששותמשתמש בחוצץ שורות לפלט הסטנדרטישיחת קול נענתהמחכה לפעילותנושא (carrier) שגויתגובה שגויה אחרי פקודה: %sתגובה שגויה אחרי מידע מסגרתתגובה שגויה אחרי המתנהתגובה שגויה לפקודה לקבלת מסגרתefax-gtk-3.2.8/po/en_GB.po0000644000175000001440000016054111544574526012123 00000000000000# British english translation file # Copyright (C) 2001 to 2005 Chris Vine # This file is distributed under the same license as the efax-gtk package. # Chris Vine , 2001-2005. # # msgid "" msgstr "" "Project-Id-Version: efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2003-04-13 01:21+0100\n" "Last-Translator: Chris Vine \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "" #: src/addressbook.cpp:122 msgid "Name" msgstr "" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "" #: src/addressbook.cpp:574 msgid "Name:" msgstr "" #: src/addressbook.cpp:575 msgid "Number:" msgstr "" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "" #: src/dialogs.cpp:298 msgid "Accept" msgstr "" #: src/dialogs.cpp:299 msgid "Reject" msgstr "" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "" #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "" #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "" #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "" #: src/file_list.cpp:205 msgid "Move file up" msgstr "" #: src/file_list.cpp:206 msgid "Move file down" msgstr "" #: src/file_list.cpp:593 msgid "Remove file " msgstr "" #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr "" #: src/file_list.cpp:601 msgid "Remove file" msgstr "" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "" #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "" #: src/mainwindow.cpp:297 msgid "Socket " msgstr "" #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "" #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "" #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "" #: src/mainwindow.cpp:658 msgid "_File" msgstr "" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "" #: src/settings.cpp:68 msgid "Name: " msgstr "" #: src/settings.cpp:69 msgid "Number: " msgstr "" #: src/settings.cpp:190 msgid "Serial Device: " msgstr "" #: src/settings.cpp:191 msgid "Lock File: " msgstr "" #: src/settings.cpp:192 msgid "Capabilities: " msgstr "" #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "" #: src/settings.cpp:194 msgid "Modem Class: " msgstr "" #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "" #: src/settings.cpp:211 msgid "Auto" msgstr "" #: src/settings.cpp:213 msgid "Class 1" msgstr "" #: src/settings.cpp:215 msgid "Class 2" msgstr "" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "" #: src/settings.cpp:233 msgid "Tone" msgstr "" #: src/settings.cpp:235 msgid "Pulse" msgstr "" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Initialisation Params:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "" #: src/settings.cpp:510 msgid "Other Params: " msgstr "" #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "" #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" #: src/settings.cpp:976 msgid "Run socket server" msgstr "" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "" #: src/settings.cpp:1016 msgid "other" msgstr "" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "" #: src/settings.cpp:1514 msgid "Fine" msgstr "" #: src/settings.cpp:1767 msgid "Log File: " msgstr "" #: src/settings.cpp:1830 msgid "Page Size: " msgstr "" #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "" #: src/settings.cpp:1979 msgid "Reset" msgstr "" #: src/settings.cpp:2012 msgid "Identity" msgstr "" #: src/settings.cpp:2015 msgid "Modem" msgstr "" #: src/settings.cpp:2018 msgid "Params" msgstr "" #: src/settings.cpp:2021 msgid "Print" msgstr "" #: src/settings.cpp:2027 msgid "Socket" msgstr "" #: src/settings.cpp:2030 msgid "Receive" msgstr "" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "" #: src/settings.cpp:2039 msgid "Page" msgstr "" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "" #: src/settings.cpp:3102 msgid " or\n" msgstr "" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "This specifies the initialising `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk help: Initialisation Parameters" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "" #: src/settings_help.cpp:176 msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "" #: src/helpfile.cpp:73 msgid "Sending" msgstr "" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "Auto redialling" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "" #: src/helpfile.cpp:108 msgid "Settings" msgstr "" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" "\n" "Automatic redialling\n" "-------------------\n" "\n" "The program settings have an option for automatic redialling of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for " "redialling can be brought up from the 'File' pull-down menu or from the icon " "in the system tray.\n" "\n" "If the program settings have been set to provide for automatic redialling, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialling, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialling.\n" "\n" "A fax queued for redialling will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialling is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "" #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "" #: src/socket_list.cpp:501 msgid "Remove " msgstr "" #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "" #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "" #: efax/efax.c:382 msgid "invalid modem response" msgstr "" #: efax/efax.c:383 msgid "no response from modem" msgstr "" #: efax/efax.c:385 msgid "internal error" msgstr "" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "" #: efax/efax.c:419 msgid "DCS - session format" msgstr "" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "" #: efax/efax.c:430 msgid "MPS - not done" msgstr "" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "" #: efax/efax.c:436 msgid "EOP - done" msgstr "" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "" #: efax/efax.c:784 msgid "header:" msgstr "" #: efax/efax.c:868 msgid "characters received while sending" msgstr "" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "" #: efax/efax.c:915 msgid "flow control did not work" msgstr "" #: efax/efax.c:954 msgid "modem response in data" msgstr "" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "" #: efax/efax.c:1036 msgid "file write:" msgstr "" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "" #: efax/efax.c:1222 msgid "sent" msgstr "" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "" #: efax/efax.c:1291 msgid "frame error" msgstr "" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "" #: efax/efax.c:1391 msgid "received" msgstr "" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "dialling %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "" #: efax/efax.c:2216 msgid "called" msgstr "" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "" #: efax/efax.c:2224 msgid "number is busy" msgstr "" #: efax/efax.c:2226 msgid "dial command failed" msgstr "" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "" #: efax/efax.c:2306 msgid "activity detected" msgstr "" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "" #: efax/efax.c:2353 msgid "fax call answered" msgstr "" #: efax/efax.c:2356 msgid "voice call answered" msgstr "" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "" #: efax/efaxmsg.c:215 msgid " Error: " msgstr "" #: efax/efaxmsg.c:216 msgid " Warning: " msgstr "" #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "" efax-gtk-3.2.8/po/en_GB.gmo0000644000175000001440000001177011544574531012262 00000000000000T LP, } ( D T K[Pr ( Automatic redialing ------------------- The program settings have an option for automatic redialing of a fax to be sent if the modem was in use or the receiving station was busy when the first attempt to send it was made. A list of the faxes queued for redialing can be brought up from the 'File' pull-down menu or from the icon in the system tray. If the program settings have been set to provide for automatic redialing, the program will keep trying to send the fax at the intervals chosen in the settings until either (a) the sending of the fax is successful, (b) there has been a failure arising from something other than the modem being in use or the recipient station being busy (such as a modem error, or the remote number ringing out without answering), (c) the fax is removed by the user from the list of faxes queued for redialing, (d) if the fax to be sent is a print job received from the print system, the print job is removed by the user from the dialog showing the list of queued faxes from the print socket, (e) if the fax to be sent comprises file(s) on the file system, the file(s) are deleted or moved (or their permissions changed to make them unreadable), or (f) the 'Stop' button is pressed while an attempt is being made to send the fax concerned which is queued for redialing. A fax queued for redialing will not be sent while the Settings dialog is open. Instead, if the interval for resending such a fax has passed, a further sending attempt will take place once the Settings dialog has been closed. The list of queued faxes for redialing is not preserved when the program is terminated. However, if any unsent faxes are print jobs received from the print system, they can still be found in the dialog showing the list of queued faxes from the print socket (assuming they have not been explicitly removed from that list by the user). Auto redialingInitialization Params:This specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsdialing %sefax-gtk help: Initialization ParametersProject-Id-Version: efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2003-04-13 01:21+0100 Last-Translator: Chris Vine Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic redialling ------------------- The program settings have an option for automatic redialling of a fax to be sent if the modem was in use or the receiving station was busy when the first attempt to send it was made. A list of the faxes queued for redialling can be brought up from the 'File' pull-down menu or from the icon in the system tray. If the program settings have been set to provide for automatic redialling, the program will keep trying to send the fax at the intervals chosen in the settings until either (a) the sending of the fax is successful, (b) there has been a failure arising from something other than the modem being in use or the recipient station being busy (such as a modem error, or the remote number ringing out without answering), (c) the fax is removed by the user from the list of faxes queued for redialling, (d) if the fax to be sent is a print job received from the print system, the print job is removed by the user from the dialog showing the list of queued faxes from the print socket, (e) if the fax to be sent comprises file(s) on the file system, the file(s) are deleted or moved (or their permissions changed to make them unreadable), or (f) the 'Stop' button is pressed while an attempt is being made to send the fax concerned which is queued for redialling. A fax queued for redialling will not be sent while the Settings dialog is open. Instead, if the interval for resending such a fax has passed, a further sending attempt will take place once the Settings dialog has been closed. The list of queued faxes for redialling is not preserved when the program is terminated. However, if any unsent faxes are print jobs received from the print system, they can still be found in the dialog showing the list of queued faxes from the print socket (assuming they have not been explicitly removed from that list by the user). Auto rediallingInitialisation Params:This specifies the initialising `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsdialling %sefax-gtk help: Initialisation Parametersefax-gtk-3.2.8/po/ca.gmo0000644000175000001440000020350411544574532011672 00000000000000$W,%B%(%[%_ Q-:P>@AZF cFnF0~FF,FFF#F6#G'ZI I IIIII%IIJ&J =JJJ+gJ!J1JJ K KK K4KQKoKKKK^K L 8L*YLLL#LLL LL M$Mn5MMMMMNNN%N>NRN iN uN NBNN N{NsOpOOPP9P6NPP PPP PPP PPQ& Qg0Q QQQ#QQR,RLRURRR:R#S8:S:sSGSS=TLPTT:TTU=1UoU(U>V9YVV%VGV WWXXXX Y YY Y-Yaj s~$ͺViûӻ&+ KWj>r ʼԼ]co ӽ# 7JX̾ +>C.Khz"#Ae,| NVEg=? QJ%Ti'G$$P;9 XGG&4LDYA]u '9J[{#&# Z+s]0. GCh )&,-Z!x11-2'G%o $ 6.(eg4&( 2O)T&~* !,Ee|ef&h`XW    7AHPb6} *;!OSqoO9`#DjkAjy_O6'^"c )|- c+w  & 5!BdA6 69)p'")4"^  $$%@<\'2''%Dj''9(*b+*.104b2? %=U)r !'IY%p ! ! B.V(+ *@)X* 2)8 b$o&#+)Bl#~ H)^!1,&.@o  A DO/03(8\7:+49H</ %<V)q$:+"'%J!p B Nfy+1&0$xD PBqs JGEcO)n_2j;-+ez !lky#56`MKbd?F(1d9 ?'B~Z {ot=A9+eNsHX(LR<  F# jY"C2]uw|_,fmi JU%1WkZz0TE7w! rH;y7a}"<LQ>[Mv[*^I=5Yo]O:t\8.3nIQ b$*p g3@h'/-Al%4.&puh8DXr`6>PqW,)x&}4VNagS^U0GvKfSi{@\Tc:R~V|Cm/ (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. Error: Warning: from the list? has been received on socket. Send or queue fax? or %d characters received while waiting to send%s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Albanian - Besnik Bleta Answer callAnswering callAutoBeginning fax log: Bulgarian - Zdravko Nikolov CAN: data reception cancelledCFR - channel OKCIG - poller IDCRP - repeat commandCSI - answering IDCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot open log file for readingCannot open log file for viewingCannot send fax - a fax is being received Capabilities: Catalan - Jordi Sayol Salomo Choose the selected fax for sendingClass 1Class 2Class 2.0Closing the socket Config ErrorCopyright (C) 2001 - 2011 Chris VineCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DCN - disconnectDCS - session formatDIS - answering capabilitiesDTC - poller capabilitiesDateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Dial Prefix:Do you accept the Conditions, Notices and Disclaimers shown above?EOM - not done, new formatEOP - doneEmpty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Ending fax log: Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFTT - channel not OKFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)Font size: Font: German - Steffen Wagner Greek - Hellenic Linux Users Group HDLC frame missing initial 0xffHebrew - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentityIf this is checked, the program will use the GTK+ print system rather than the command line argument specified below to print faxesInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Invalid Utf8 received in EfaxController::read_pipe_cb() Invalid Utf8 received in MainWindow::read_error_pipe_cb() Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Invalid user name specified - it must be in plain ASCII characters. No user name will be shown on the fax top header line, but don't worry as the fax station number will always be given on the top header Invalid user name specified in "Identity" tab - it must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerItalian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingMCF - page OKMPS - not doneModemModem Class: Move address downMove address upMove file downMove file upMulti-Tech bit order setMultiple filesNSC - poller featuresNSF - answering featuresNSS - caller featuresNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No file to print specifiedNo port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PIN - page not OK, call operatorPIP - page OK, call operatorPRI-EOM - not done, new format, call operatorPRI-EOP - done, call operatorPRI-MPS - not done, call operatorPRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print fontPrint job received on socket Print logfile page _setupPrint page setupPrint selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the name to appear on the fax top header on sent faxes here. It must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitRTN - page not OK, check channelRTP - page OK, check channelReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! SendSend faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSimplified Chinese - Kite Lau Single fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopSwedish - Daniel Nylander TSI - caller IDTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis program was written by Chris Vine and is released under the GNU General Public License, version 2. It is a front end for efax. efax was written by Ed CasasThis specifies a prefix to be prepended to any dialed number - for example you can specify '9,' here to dial through a switchboard which needs 9 to obtain an outside line followed by a delay.This specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether the destination fax number is included in the top fax header line for sent faxes. Uncheck the box if you do not want this to be shown (say because it includes a pay card access number)This specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTraditional Chinese - Wei-Lun Chao TrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details Use GTK+ Print SystemUser does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class hereYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Log_Print logfile_Quit_Settings_Translations_View logfileabnormal termination (code %d)activity detectedbit-reversed HDLC frame, reversing bit ordercalledcan't answer: can't lock devicecan't delete file %s:can't determine fax modem class supportcan't get format of file %scan't open file %s:can't open output file %s:can't open pagecan't rewind file %s:channel not usable at %d bpschannel not usable at lowest speedcharacters received while sendingconnecteddial command faileddialing %sefax is copyright (C) 1999 Ed Casasefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Dial Prefixefax-gtk help: Execute program when fax receivedefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk help: Use GTK+ print systemefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: View logefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: print logfileefax-gtk: settingsefax-gtk: view logfileexec() call failed:executing command /bin/sh -c %sfailed page %sfax call answeredfax device write error:file write:finished - %sflow control did not workframe errorframe too long (%d, > %d max bytes)header:incompatible local and remote capabilitiesincorrect quality (-q) argument (%s)internal errorinterrupt request ignoredinvalid modem responseinvalid post-page responseinvalid response to DCSlast byte of frame is NULLlocal ID (%s) has non-standard characterslocal ID (%s) truncated to %d characterslocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxmodem response in datano +FPTS response obtained, it is assumed that fax was receivedno XON/DC2 received after CONNECTno answer from remote faxno command or response from remoteno getty command defined for data callno response after frame datano response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceive (+FDR) command failedreceivedreceived %d lines with %d errorsreceived TCF - channel check (OK: run of %d in %d)received TCF - channel check (not OK: run of %d in %d)received short frame (%d bytes)reception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremote has one or more documents to send.removed file: %srun length buffer overflowsentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent TCF - channel check of %d bytessent page %ssuccesssync: dropping DTRsync: modem not respondingsync: sending escapesterminated by signaltimed out after command: %stimed out after waitingtimed out during training check datatimed out reading frame datatimed out waiting for commandtoo many %%d escapes in command (%s)too many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing %s in class %susing line buffering of stdoutvoice call answeredwaiting for activitywrong carrierwrong response after command: %swrong response after frame datawrong response after waitingwrong response to command to receive a frameProject-Id-Version: Efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2010-04-04 14:17+0100 Last-Translator: Jordi Sayol Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Catalan Plural-Forms: nplurals=2; plural=n != 1; (NOTA: Això esborrarà de forma permanent el fax del sistema de fitxers) *** S'està aturant la sessió d'enviament/recepció *** Recepció de faxos ----------------- Hi ha tres mètodes per rebre faxos. El primer, el programa pot respondre una trucada que està sonant i que no ha estat resposta, prement el botó «Respon la trucada». El segon, el programa pot agafar una trucada que ja ha estat resposta (com per exemple, per mitjà d'un telèfon de mà) prement el botó «Agafa la trucada». El tercer, el programa es pot posar en mode d'espera prement el botó «En espera». Això farà que respongui qualsevol trucada després del nombre de timbres que s'hagi especificat al fitxer efax-gtkrc, i rebrà el fax. El programa es mantindrà a l'espera de rebre trucades fins que es premi el botó «Atura». Els faxos rebuts, en format tiffg3 (un fitxer cada pàgina) son copiats a un directori dins el directori $HOME/faxin i que el nom que rep deriva de l'any, el mes, el dia, l'hora i els segons en que la recepció del fax es va completar, i és el número ID del fax. Els faxos rebuts poden ser impresos, vistos, descrits i manipulats fent servir l'utilitat per a la llista de faxos inclosa. S'hi pot accedir des del menú 'Fixer/Llista de faxos rebuts'. Mireu l'etiqueta «Llista de Faxos» en aquesta finestra d'ajuda. Quan un fax s'ha rebut, un diàleg emergent pot ser ajustat per que aparegui (aneu al diàleg de les preferències per fer això). Al diàleg de preferències també podeu especificar que un programa s'executi quan es rebi un fax. El número d'ID del fax li és transmès com primer (i únic) argument al programa, i que permet al programa trobar el fax a $HOME/faxin. La distribució conté dos scripts executables, mail fax i print fax, i que poden ser utilitzats per a enviar per correu electrònic o imprimir un fax a un usuari automàticament quan és rebut. (Aquests scripts no son instal·lats amb 'make install' - si els voleu utilitzar, feu-los executables amb 'chmod +x' i els copieu a un directori que estigui inclòs al camí del sistema com per exemple /usr/local/bin, després especifiqueu el nom del fitxer de seqüència al diàleg de preferències.) Enviant Faxos ------------- Abans d'enviar un fax, s'ha d'especificar al camp «Fax per enviar». Ha de ser en format postscript o PDF (un format produït per tots el editors i processador de documents de Unix/Linux), i aquest serà convertit pel programa al format correcte de fax tiffg3. Hi ha dos mètodes d'entrada de fax. El primer, el fax per enviar pot ser un fitxer desat al sistema de fitxers. Pot ser escrit manualment al camp «Fax per enviar», o introduït mitjançant el diàleg de selecció de fitxers. Si el fax compren un sol fitxer, llavors el podeu buscar prement el botó «Un fitxer». Es pot trobar més fàcilment amb aquest diàleg si és al directori $HOME/faxout. Quan s'especifiquen més d'un fitxer al camp «Fax per enviar», seran enviats com un sol fax ajuntant-los en l'ordre en que han estat inclosos al camp. Per seleccionar varis fitxers és més fàcil fer-ho prement el botó «Múltiples fitxers». Prement el botó «Múltiples fitxers» et permet trobar i afegir fitxers a la llista de fitxers i amés amés poden ser reordenats fent servir els botons amb les fletxes amunt i avall, o arrossegant i deixant amb el ratolí. Com a alternativa, els faxos poden ser rebuts directament des del sistema d'impressió mitjançant el servidor de sòcol proveït pel programa. Efax-gtk manté una llista dels faxos rebuts des del sòcol i que son accessibles seleccionant «Sòcol» com a mètode d'entrada de fax i accedir a la llista de faxos en cua prement el botó «Llista del sòcol». Aquesta és la forma més recomanable d'enviar faxos des de un processador de textos ja que permet enviar un fax a efax-gtk imprimint des del processador de textos. Quan un fax és posat a la cua de la llista del sòcol per ser enviat, un petit punt vermell apareixerà a la finestra principal del programa, a la dreta del camp «Fax per enviar». Per més informació de com ajustar CUPS o lpr/lprng per a enviar a efax-gtk, mireu el fitxer README que ve amb la distribució. El número de telèfon al que el fax serà enviat és al camp «Núm. telèfon». Pot ser escrit directament en aquest camp o utilitzant la llibreta d'adreces inclosa. La llibreta d'adreces es pot invocar prement el botó «Núm. telèfon» o des del menú 'Fitxer/Llibreta d'adreces'(mireu l'etiqueta «Llibreta d'Adreces» en aquesta finestra d'ajuda). Tant mateix, si ja s'ha establert una connexió amb el fax remot, llavors el fax pot ser enviat sense marcar tot deixant el camp «Núm. telèfon» en blanc (un diàleg apareixerà preguntant si voleu enviar el fax sense marcar). Quan un fax és rebut pel servidor de sòcol des del sistema d'impressió, les preferències del programa poden ser configurades per oferir un diàleg automàticament. Si el programa és inactiu o és en espera de rebre faxos, el fax pot ser enviat directament des d'aquest diàleg sense la necessitat d'invocar la llista de fax en cua rebuts del sòcol. Els faxos enviats correctament son copiats a un directori dins el directori $HOME/faxsent i que el nom que rep deriva de l'any, el mes, el dia, l'hora i els segons en que l'enviament del fax es va completar, i apareixerà a la Llista de faxos enviats. Només son inclosos en aquesta llista si s'han enviat sense cap error. La finestra de missatges de l'efax informarà del progrés del fax que s'està enviant. Es pot accedir a la llista de faxos des del menú 'Fitxer/Llista de faxos enviats'. Mireu l'etiqueta «Llista de Faxos» en aquesta finestra d'ajuda. Preferències ------------ Les preferències del programa poden ser canviades manualment editant el fitxer de configuració de l'efax-gtk que consta de $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc o /etc/efax-gtkrc. Els fitxers son buscats en aquest ordre, per tant $HOME/.efax-gtkrc te preferència sobre els altres dos. El fitxer de configuració es pot modificar també fent servir el diàleg de preferències des de el menú 'Fitxer/Preferències'. Les preferències introduïdes en aquest diàleg son sempre guardades a $HOME/.efax-gtkrc. Per tant, si el diàleg de preferències s'ha fet servir i voleu retornar a les preferències globals, això es pot fer tant esborrant el fitxer $HOME/.efax-gtkrc com prement el botó Restablir del diàleg de preferències, el qual rellegirà les preferències des del fitxer de configuració global ($sysconfdir/efax-gtkrc o /etc/efax-gtkrc). L'ajuda es pot obtenir metre omples els camps del diàleg de preferències mantenint el cursó del ratolí sobre el pertinent botó d'ajuda (?), el qual et mostrarà un «rètol indicador» o prement el botó que et mostrarà una finestra d'informació. Utilitzant la llibreta d'adreces -------------------------------- Per agafar un número de telèfon de la llibreta d'adreces, ressalta l'adreça pertinent fent clic amb el botó esquerra del ratolí, i després prem el botó «D'acord». Es poden afegir adreces a la llibreta d'adreces prement el botó 'Crear nova adreça' i omplint el pertinent diàleg que apareixerà. Per esborrar una adreça de la llibreta d'adreces, ressalta l'adreça pertinent i prem el botó 'Esborra adreça' (escombraries). La llibreta d'adreces es pot ordenar tot fent servir els botons amb fletxa amunt i avall a una adreça ressaltada o arrossegant i deixant amb el ratolí. Utilitzant les llistes de faxos ------------------------------- Per accedir a les llites de faxos, aneu al menú 'Fitxer' i trieu 'Llista de faxos rebuts' o 'Llista de faxos enviats'. Ressalteu el fax a imprimir o visualitzar feny clic amb el boto esquerra del ratolí. Els programes utilitzats per imprimir i visualitzar els faxos estan especificats al fitxer de configuració efax-gtkrc, i si no ni ha cap d'especificat, el programa imprimirà fent servir lpr (que funcionarà en la majoria de sistemes Unix) i visualitzar amb gv. Per imprimir faxos, el paràmetre PRINT_SHRINK pot ser especificat a efax-gtkrc per permetre ajusta la pàgina del fax dins dels marges de l'impressora. Un valor de 98 anirà be per a la majoria d'impressores. Això es pot modificar mentre el programa és en marxa, accedint al diàleg de preferències i entrant al camp 'Impr./Reducció d'impressió'. Es pot afegir una descripció a un fax rebut quan apareix a la llista de faxos (o posteriorment corregir) prement el botó pertinent -- això permetrà que els faxos siguin més fàcilment identificables. La llista de faxos rebuts mostrarà, a la dreta de la barra d'eines, el nombre de faxos rebuts des de que el programa es va iniciar per última vegada. Si efax-gtk és en espera de recepció de faxos, el rètol indicador de l'icona del programa a l'àrea de notificació també mostrarà aquest nombre. El comptador es pot reajustar a 0 sense re-iniciar el programa prement el botó 'Esborrar comptador de faxos nous' a la llista de faxos rebuts. Error: Atenció: de la llista? s'ha rebut al sòcol. Enviar el fax o posar a la cua? o %d caràcters rebuts mentre esperava per enviar%s bloquejat o ocupat - esperant?S'ha rebut un fax amb efax-gtkEl visualitzador postscript s'utilitza per veure els faxos enviats i rebuts, i també per veure i identificar els faxos per enviar a través del diàleg selector de fitxers «Fitxers per enviar». Especifiqueu aquí l'ordre per visualitzar fitxers postscript. Si no n'especifiqueu cap, el programa farà servir per defecte 'gv'. Una altra opció que us podria interessar és 'evince' (el visualitzador postscript de Gnome) o 'kghostview' (el visualitzador postscript de KDE). Si feu servir gv, necessitareu afegir-hi les opcions '-media A4' o '-media Letter' per seleccionar correctament la mida del paper. ggv i kghostview ho fan automàticamentUn treball d'impressió s'ha rebut al sòcolQuan a l'_efaxQuan a efaxQuan a l'efax-_gtkQuan a efax-gtkAcceptaAfegeix fitxers a la llistaAfegeix fitxers a la llista de fitxers per enviarCrea una nova adreçaCrea una carpetaAfegeix/esmena la descripció del fax seleccionatLlibreta d'adrecesAdreces permeses per connectarAdoptant la resolució de fax per defecte de 204x196 Adoptant el mida de la pàgina de A4 Adoptant ordre de visualitzador postscript per defecte de 'gv' Albanès - Besnik Bleta Respon la trucadaResponent a la trucadaAutomàticIniciant registre del fax:Búlgar - Zdravko Nikolov CAN: recepció de dades cancel·ladaCFR - canal correcteCIG - id del sondeigCRP - repetir ordreCSI - id de la respostaNo es poden canviar les preferències fins que el programa estigui inactiu premeu el botó Atura per posar-lo inactiuNo es pot llegir el fitxer de registreNo es pot visualitzar el fitxer de registreNo és possible enviar el fax - s'està rebent un fax Compatibilitats: Català - Jordi Sayol Salomó Tria el fax seleccionat per enviarClasse 1Classe 2Classe 2.0Tancant el sòcol Error de configuracióCopyright (C) 2001 - 2011 Chris VineCopyright (C) 2001 - 2011 Chris Vine Aquest programa es distribueix sota els termes de la Llicència Pública General de GNU, versió 2 DCN - desconnexióDCS - format de sessióDIS - capacitats de la respostaDTC - capacitats del sondeigDataEsborra adreçaEsborrar la carpeta: Voleu esborrar l'adreça seleccionada?Esborra el fax seleccionatEsborra la carpeta seleccionadaDescripcióMode de marcatge: Prefix:Accepteu les condicions, avisos i renúncies mostrades a dalt?EOM - no fet, format nouEOP - fetBuideu la carpeta esborrant-ne les carpetes filles i arrossegueu a fora o suprimiu qualsevol fax que hi hagi abans d'esborrar la carpetaBuida la papereraVoleu buidar la paperera? (Nota: això esborrarà de forma permanent tots els faxos de la papereraFinalitzant el registre del fax:Introduïu _múltiples fitxersEntra el fax seleccionat per enviarIntrodueix preferències des de Executa un programa o fitxer de seqüència quan es rebi un fax pel mòdemFTT - canal no correcteLlistes de faxosDescripció del fax?Mètode d'entrada de fax: Fax per enviarFitxer El fitxer no existeix Fitxers per enviarFinaCarpetaEl nom de carpeta no pot tindre el caràcter: Nom de la carpeta? (Nota: això serà col·locat a dalt de tot i pot ser arrossegat a una altra carpeta)Mida de lletra:Tipus de lletra:Alemany - Steffen Wagner Grec - Hellenic Linux Users Group HDLC 0xff inicial manca a la trama Hebreu - Assaf Gillat Hongarès - Gergely Szakats, Laszlo Csordas Identitatsi s'activa, el programa farà servir el sistema d'impressió del GTK+ en lloc de l'argument de la línia d'ordres especificat a sota per a imprimir faxosInactiuSafata d'entradaIncloure número de fax del destinatari a la capçalera de la pàginaParàmetres d'inicialització:S'ha rebut un Utf8 invàlid a EfaxController::read_pipe_cb() S'ha rebut un Utf8 invàlid a MainWindow::read_error_pipe_cb() El directori especificat a WORK_SUBDIR: és invàlid. WORK_SUBDIR: serà ignorat Mode de marcatge especificat invàlidMode de marcatge especificat invàlid Adoptant mode de marcatge per defecte de tons La resolució de fax especificada és invàlida. S'adoptarà la resolució de fax per defecte de 204x196 Classe de mòdem especificada invàlidaClasse de mòdem especificat invàlid Adoptant per defecte de Classe 2 Opció invàlida. Les opcions son: Mida de pàgina especificat invàlidMida de pàgina especificat invàlid Adoptant mida de pàgina per defecte de A4 El port especificat per al servidor de sòcol és invàlid, per tant el servidor no serà iniciat. Ha de ser ente 1024 i 65535 Paràmetre de reducció d'impressió especificat invàlidLa reducció d'impressió especificada és invàlida: adoptant valor per defecte de 100 Nombre de timbres especificat invàlid Respondrà després d'un timbre Nombre de timbres especificat invàlidResolució d'enviament de fax especificada invàlidaNúmero de port de sòcol especificat invàlid. Ha de ser entre 1024 i 65535El nom d'usuari especificat és invàlid (ha de contenir només caràcters ASCII simples). No es mostrarà el nom d'usuari a la capçalera del fax, però el número de fax de l'estació si hi serà. Nom d'usuari invàlid especificat a la pestanya «Identitat» (ha de contenir només caràcters ASCII simples). Si això és un problema, deixeu-lo en blanc ja que el número de l'estació de fax sempre apareixerà a la capçaleraItalià - Luca De Rugeriis Llista de faxos _rebutsLlista de faxos rebutsLlista de faxos enviatsFitxer de bloqueig: Fitxer de registre: RegistreMCF - pàgina correctaMPS - no fetMòdemClasse de mòdem: Mou adreça avallMou adreça amuntMou fitxer avallMou fitxer amuntMulti-Tech ordre de bit activatMúltiples fitxersNSC - característiques del sondeigNSF - característiques de la respostaNSS - característiques del trucantNomNom:Nom: Faxos nous:No s'ha especificat cap número de fax. Voleu enviar el fax amb una connexió establerta?No s'ha especificat cap fitxer per imprimirNo s'ha especificat el port per al servidor de sòcol, per tant el servidor no serà iniciat No s'ha especificat dispositiu de port sèrie a Nom de fitxer no vàlid Fitxer postscript/PDF no vàlid Nota: prement el botó d'acord salvarà les preferències al fitxerNúmeroNúmero:Número: Altres paràmetres: PIN - pàgina no correcta, crida operadorPIP - pàgina correcta, crida operadorPRI-EOM - no fet, nou format, crida operadorPRI-EOP - fet, crida operadorPRI-MPS - no fet, cridar operadorTREBALL D'IMPRESSIÓTREBALL D'IMPRESSIÖ: PàginaMida de pàgina: Paràm.Voleu esborrar permanentment el fax seleccionat? Esborrar de forma permanent els faxos seleccionats? (NOTA: Això esborrarà de forma permanent els faxos del sistema de fitxers)Polac - Pawel Suwinski Diàleg emergent de confirmació abans d'imprimirDiàleg emergent quan rebis un fax pel mòdemDiàleg emergent quan es rep un fax des del sòcolPort a on han de ser enviats els faxos:Programa visualitzador de postscript:Premeu F1 per a l'ajudaImpr.Programa d'impressió: Reducció d'impressió (50-100):Tipus de lletra per imprimirTrebal d'impressió rebut al sòcol _Configuració de la pàgina d'impressió del registreConfiguració de la pàgina d'impressióImprimeix fax seleccionatImprimir el fax seleccionat?PulsosPoseu aquí el directori del fitxer de bloqueig. Si no hi poseu res, el programa farà servir /var/lockPoseu aquí el nom que ha d'aparèixer a la capçalera dels faxos enviats. Ha de contenir només caràcters ASCII simples. Si això és un problema, deixeu-lo en blanc ja que el número de fax de l'estació sempre apareixerà a la capçaleraPoseu aquí el número que ha d'aparèixer a la capçalera dels faxos enviats. Això també serà enviat com a identificador d'estació de fax a l'aparell de fax remot quan es rebin faxosPoseu aquí el dispositiu sèrie al que està connectat el mòdem (si no hi poses res, el programa l'assumirà com a /dev/modem) No hi incloguis la part '/dev/' del nom de dispositiu -- per exemple 'ttyS1' o 'cua2', etc. A Linux, ttyS0 s'equipara amb COM 1, ttyS1 amb COM 2 i així successivamentFax a la cuaCua de _faxos del sòcol Treballs d'impressió en cuaSurtRTN - pàgina no correcta, verifica canalRTP - pàgina correcta, verifica canalRebreRecepció en esperaRebentRebutjaEsborra Esborra fitxerEsborra fitxer Esborra el fitxer seleccionat de la llistaRestableixParàmetres de reinici: Esborra comptador de faxos nousReinicia preferènciesTimbres (1-9): Inicia el servidor de sòcolRus - Pavel Vainerman Error del sistema greu: No es pot crear el directori o desar el fax rebut. Aquest fax no serà desat Error del sistema greu: no es pot crear el directori on desar els faxos rebuts. No podreu rebre faxos Error del sistema greu: No es pot crear el directori per desar el fax enviat. Aquest fax no serà desat Error del sistema greu: No es pot obrir el directori de faxos rebuts. Aquest fax no serà desat Error del sistema greu: No es pot desar tot el fax rebut. Tot o part del fax es perdrà EnviantEnviar faxEnviantEnviant faxResolució enviant fax:EnviatDispositiu sèrie: PreferènciesXinès simplificat - Kite Lau Un fitxerSòcolSòcol Llista del sòcolSòcol funcionant al port Especifiqueu aquí la mida de la pàgina per als faxosEstàndardEn esperaA l'espera de rebre trucadesAturaSuec - Daniel Nylander TSI - id del trucantAgafa la trucadaNúm. telèfon: Número de telèfonLa següent carpeta ja existeix: El programa ha esta iniciat amb la opció -s però no hi ha àrea de notificació! l'ID remot ésl'ID del remot és %sAixò és per passar-li qualsevol altre paràmetre a efax (feu 'man efax' per veure que hi teniu disponible). Especifiqueu-ne tants com siguin necessaris, separant amb espais els diferents paràmetres. Per exemple inclogueu-hi '-or' per a fer una inversió de bit durant la recepció per als mòdems Multitech que ho necessitin. A no ser que tingueu un mòdem poc comú, deixe-ho en blancAixò defineix el nombre de timbres que el mòdem deixa passar abans de respondre el telèfon quan és en mode 'En espera'. Els valors acceptats son de 1 a 9. Si no n'especifiqueu cap el programa utilitzarà per defecte l'1Aquesta és l'ordre per a imprimir i que també accepta ordres postscript a l'entrada estàndard. Si no s'hi especifica res, el programa farà servir per defecte 'lpr'. Això no tindrà efecte si està seleccionat el botó de «Utilitzeu el sistema d'impressió del GTK+»Aquest paràmetre especifica un fitxer de registre que segueix les negociacions i l'estat del fax, errors i advertiments son enregistrats. Si no s'en especifica cap, no es crearà cap registre (També es pot mantenir un fitxer de registre redireccionant stdout i stderr -- veure el fitxer README per més detalls)Aquest paràmetre especifica si voleu un diàleg emergent quan es rebi un fax des del mòdem. Marqueu el camp si voleu un avis emergent.Aquest programa (efax-gtk) és una interfície per a l'efax l'efax és un programa que es distribueix sota els termes de la Llicència Pública General de GNU, versió 2 per Ed Casas.Aquest programa l'ha escrit en Chis Vine i es distribueix sota els termes de la Llicència Pública General de GNU, versió 2. Aquest programa és una interfície per a l'efax. L'efax l'ha escrit en Ed Casas.Això especifica el prefix que s'anteposarà a qualsevol número marcat - per exemple, podeu especificar '9,' aquí per marcar a través d'un panell de control que necessita 9 per obtenir una línia exterior seguit d'un retard.Això especifica l'ordre 'AT' que reinicialitzarà el mòdem. Especifiqueu tantes ordres com sigui necessari, separades per espais les que necessitin estar-ho, però sense estar precedides per un 'AT'. Si no n'especifiqueu cap, el programa utilitzarà per defecte `Z', que serà correcte per a pràcticament tots els mòdemsAixò especifica les compatibilitats del mòdem. Per veure que significa això feu un 'man efax' i mireu els operadors de la opció '-c'. Amb efax-0.9 i un mòdem classe 2, normalment no es necessitarà especificar res i es pot deixar en blanc, ja que el programa ho preguntarà al mòdem. Si esteu fent servir una versió vella d'efax o un mòdem de classe diferent, els valors que funcionaran amb pràcticament qualsevol mòdem de 14.400 bps son 1,5,0,2,0,0,0,0, o 1,3,0,2,0,0,0,0 per a els que son més lentsAixò especifica l'ordre AT d'inicialització per al mòdem quan és en mode fax. Especifiqueu-ne tantes com sigui necessari, separades per espais les que necessitin estar-ho, però sense estar precedides per un 'AT'. Si no n'especifiqueu cap, el programa utilitzarà per defecte `Z &FE&D2S7=120 &C0 M1L0', que serà correcte per a pràcticament tots els mòdemsAixò especifica el número de port a on el servidor de sòcol ha d'escoltar. Ha de ser entre 1024 i 65535.Això especifica la resolució dels faxos que s'envien. «Estàndard» dona 204x98 i «Fina» dona 204x196Això especifica si un diàleg emergent de confirmació ha d'aparèixer abans d'imprimir quan premeu el botó de «Imprimeix fax seleccionat» a la llista de faxos rebuts o la de faxos enviats. Desmarque-ho si no voleu un diàleg (si teniu especificat un administrador d'impressió extern com per exemple 'kprinter' al camp de Programa d'Impressió, llavors preferireu no tindre aquest camp activat). Això no tindrà efecte si està seleccionat el botó de «Utilitzeu el sistema d'impressió del GTK+»Això especifica si un diàleg emergent ha d'aparèixer quan un fax és rebut per el servidor de sòcol des de el sistema d'impressió. Marqueu el camp si voleu un diàleg (això no te efecte si no teniu marcat el camp d'iniciar el servidor de sòcol) Si el programa està inactiu o està en mode d'espera per rebre faxos, el fax pot ser enviat directament des d'aquest diàlegAixò especifica si un programa o fitxer de seqüència s'ha d'executar quan des del mòdem es rebi un fax. Marqueu el camp si voleu executar un programa, i escrigueu-hi el nom. efax-gtk ve amb dos fitxers se seqüència, print_fax i mail_fax, els quals es poden fer servir per imprimir els faxos quan es reben ò enviar-los per correu a un usuari (per tant per enviar un correu amb un fax podeu escriure aquí 'mail_fax'). Llegiu el fitxer README per a més detalls.Això especifica si el servidor de sòcol s'ha de posar en marxa per a CUPS o per a algun altre sistema d'impressió. Marqueu el camp si voleu que s'iniciïAixò especifica si el número de fax del destinatari s'ha d'incloure a la capçalera dels faxos enviats. Desmarqueu el camp si no voleu que això es vegi (diguem que inclou un número d'accés d'una tarja de pagament)Això especifica si s'utilitzarà tons o pulsos per trucar quan s'enviïn faxosAixò determinarà quan s'ha de reduir una pàgina per que càpiga dins de l'àrea d'impressió de la impressora. És en tant per cent -- o sigui, 98 reduirà la pàgina al 98 per cent de la seva mida. Si no s'especifica res, no es farà cap reducció (per exemple podeu, tot i que no caldria, especificar 100)TonsXinès tradicional - Wei-Lun Chao PapereraDESCONEGUTÚs: efax-gtk [opcions] [nom de fitxer] Opcions: -r inicia el programa en mode d'espera de trucada -s inicia el programa amagat a l'area de notificació Mira el fitxer README que ve amb la distribució per a més detalls Utilitza el sistema d'impressió del GTK+L'usuari no té permís per llegir el fitxer VisualitzaVisualitza fax seleccionatVeure fitxer seleccionatAmb el efax-0.9 o superior podeu triar tranquilament «Auto», i llavors efax buscarà la classe de mòdem ell mateix, però si voleu, també en podeu forçar la classe triant-ne una. Tant mateix, efax-0.8 utilitza per defecte la classe 2, per tant, si esteu utilitzant un mòdem de classe 1 amb una versió vella d'efax, heu d'especificar la classe aquíNo teniu la variable d'entorn $HOME fixada Llibreta d'_adreces_Introduïu un fitxer_Fitxer_Ajuda_Llista de faxos enviats_Registre_Imprimeix el fitxer de registre_Surt_Preferències_Traduccions_Visualitza el fitxer de registrefinalització anormal (codi %d)activitat detectadatrama HDLC amb marc invertit; s'està invertint l'ordre dels bitscridatno es pot respondre: no es pot bloquejar el dispositiuno es pot esborrar el fitxer %s:no es pot determinar la classe de fax mòdem suportadano es pot obtenir el format del fitxer %sno es pot obrir el fitxer %s:no es pot obrir el fitxer de sortida %sno puc obrir la pàginano es pot rebobinar el fitxer %s:canal no usable a %d bpscanal no usable a la velocitat més baixacaràcters rebuts mentre s'enviavaconnectatordre de marcatge fallidamarcant %sefax és copyright (C) 1999 Ed CasasAjuda de l'efax-gtk: CompatibilitatsAjuda de l'efax-gtk: dispositiuAjuda de l'efax-gtk: mode de marcatgeajuda de l'efax-gtk: PrefixAjuda de l'efax-gtk: executa un programa quan es rebi un faxAjuda de l'efax-gtk: capçalera del faxAjuda de l'efax-gtk: paràmetres d'inicialitzacióAjuda de l'efax-gtk: fitxer de bloqueigAjuda de l'efax-gtk: fitxer de registreAjuda de l'efax-gtk: classe de mòdemAjuda de l'efax-gtk: nomAjuda de l'efax-gtk: númeroAjuda de l'efax-gtk: altres paràmetresAjuda de l'efax-gtk: mida de la pàginaAjuda de l'efax-gtk: emergentAjuda de l'efax-gtk: portAjuda de l'efax-gtk: programa visualitzador de postscriptAjuda de l'efax-gtk: programa d'impressióAjuda de l'efax-gtk: reducció d'impressióAjuda de l'efax-gtk: emergent de recepcióAjuda de l'efax-gtk: reinicialitza paràmetresAjuda de l'efax-gtk: timbresAjuda de l'efax-gtk: inicia el servidor de sòcolAjuda de l'efax-gtk: resolució d'enviament de faxosAjuda de l'efax-gtk: connexions permeses al sòcolAjuda de l'efax-gtk: Utilitzeu el sistema d'impressió del GTK+efax-gtk sòcolefax-gtk: efax-gtk: crear adreçaefax-gtk: crear carpetaefax-gtk: Llibreta d'adrecesefax-gtk: condicions, avisos i renúnciesefax-gtk: esborrar l'adreçaefax-gtk: esborrar faxefax-gtk: esborrar la carpetaefax-gtk: descripció de faxefax-gtk: llista de fitxersefax-gtk: fitxer a enviar per faxefax-gtk: ajudaefax-gtk: imprimir faxefax-gtk: Faxos en cua des del sòcolefax-gtk: Llista de faxos rebutsefax-gtk: esborrar fax en cuaefax-gtk: Llista de faxos enviatsefax-gtk: Traduccionsefax-gtk: papereraefax-gtk: visualitzar el registreefax-gtk: fax rebutefax-gtk: treball d'impressió rebut al sòcolefax-gtk: imprimir el fitxer de registreefax-gtk: Preferènciesefax-gtk: visualitzar el fitxer de registrecrida a exec() fallida:executant l'ordre /bin/sh -c %sla pàgina %s fallidatrucada de fax respostaerror d'escriptura del dispositiu de fax:fitxer escrit:finalitzat _ %scontrol de flux no funcionaerror a la tramatrama massa llarga (%d, > %d màx. octets)capçalera:les capacitats locals i remotes són incompatiblesargument de qualitat (-q) incorrecte (%s)error internignorada sol·licitud d'interrupcióresposta del mòdem invàlidaresposta després de pàgina invàlidaresposta invàlida a DCSl'últim octet de la trama és NULLl'ID local (%s) te caràcters no estàndardl'ID local (%s) retallada a %d caràctersmàquina local ordre del mòdem «%s» massa llargordre de mòdem (%s) fallidaordre de mòdem fallidael mòdem no te suport per a faxresposta del mòdem en dadesno s'ha obtingut la resposta +FPTS, s'assumeix que aquell fax l'ha rebutno s'ha rebut XON/DC2 després de CONNECTsense resposta del fax remotsense ordre ni resposta del remotordre 'getty' no definida per la trucada de dadessense resposta després de dades de la tramasense resposta del mòdemordre de veu no definida per la trucada de veuNúmero ocupat o mòdem en úsel número comunicas'ha obert %saltrespàgina desada a %srebre (+FDR) ordre fallidarebutrebudes %d línies amb %d errorsrebut TCF - verificació de canal (correcte: corrent de %d en %d)rebut TCF - verificació de canal (no correcte: corrent de %d en %d)rebuda trama curta (%d octets)errors de recepcióel remot no pot rebre, provant de totes maneresel remot no té documents per enviar i pot rebreel remot no té documents per enviar i no pot rebreel remot no té res per enviar, provant de totes maneresel remot té un o més documents per enviar i pot rebreel remot té un o més documents per enviar i no pot rebreel remot te un o més documents per enviar.fitxer suprimit: %scorren sobreeiximent de memòria intermèdia longitudinalenviatenviades %d+%d línies i %d+%d octets, en %d segons a %d bpsenviat TCF - verificació de canal de %d octetsenviada pàgina %samb èxitsync: deixant DTRsync: mòdem no responsync: enviant escapamentsinterromput per una senyaltemps sobrepassat després de l'ordre: %stemps sobrepassat després d'esperartemps sobrepassat mentre es provava de verificar les dadestemps sobrepassat llegint dades de la tramatemps sobrepassat esperant l'ordremasses %%d escapaments a l'ordre (%s)masses intens d'enviar la pàginaincapaç de respondre la trucadaresposta inesperada «%s»ordre no reconegudaerror irrecuperableusan %s en classe %susan la línia d'emplenament de la memòria intermèdia del stdouttrucada de veu respostaesperant activitatportadora incorrectaresposta incorrecta després de l'ordre: %sresposta incorrecta després de dades de la tramaresposta incorrecta després d'esperarresposta incorrecta a l'ordre de rebre una tramaefax-gtk-3.2.8/po/quot.sed0000644000175000001440000000023111466007654012257 00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g efax-gtk-3.2.8/po/POTFILES.in0000644000175000001440000000072611466007654012360 00000000000000src/addressbook.cpp src/dialogs.cpp src/efax_controller.cpp src/fax_list.cpp src/fax_list_manager.cpp src/file_list.cpp src/main.cpp src/mainwindow.cpp src/settings.cpp src/settings_help.cpp src/helpfile.cpp src/socket_server.cpp src/socket_list.cpp src/socket_notify.cpp src/logger.cpp src/tray_icon.cpp src/redial_queue.cpp src/internal/c++-gtk-utils/text_print_manager.cpp src/utils/mono_tiff_print_manager.cpp efax/efax.c efax/efaxmsg.c efax/efaxlib.c efax/efaxio.c efax-gtk-3.2.8/po/it.po0000644000175000001440000023160211544574526011562 00000000000000# Italian translation of Efax-gtk. # Copyright (C) 2001-2005 Chris Vine # This file is distributed under the same license as the efax-gtk package # Luca De Rugeriis , 2003-2005. # # msgid "" msgstr "" "Project-Id-Version: efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2005-02-20 14:50+0100\n" "Last-Translator: Luca De Rugeriis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Rubrica" #: src/addressbook.cpp:122 msgid "Name" msgstr "Nome" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Numero" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Aggiungi un nuovo indirizzo" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Elimina indirizzo" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Muovi l'indirizzo in su" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Muovi l'indirizzo in giù" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Elimina indirizzo selezionato?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: Elimina indirizzo" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: Aggiungi indirizzo" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Nome:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Numero:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: File da inviare" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Visualizza" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: Condizioni, Note e Disclaimers" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Accetta" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Rifiuta" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "Accetti le Condizioni, le Note e i Disclaimers mostrati sopra?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "Informazioni su efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "Informazioni su efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Questo programma (efax-gtk) è un frontend per efax. efax è un programma " "rilasciato sotto la GNU General Public License, versione 2 da Ed Casas." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Inattivo" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Sto inviando il fax" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Sto rispondendo alla chiamata" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "In attesa di ricevere chiamate" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "Non è possibile inviare fax - ricezione fax in corso\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Nome di file non valido\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "Il file non esiste\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "L' utente non ha permessi di lettura sul file\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "File postscript/PDF non valido\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** Sessione di invio/ricezione terminata***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "CODA DI STAMPA" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Stampa il fax selezionato" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Visualizza il file selezionato" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Aggiungi/correggi la descrizione per il fax selezionato" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Elimina il fax selezionato" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Svuotare il cestino" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Aggiungi una nuova cartella" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Elimina cartella selezionata" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Elenco fax ricevuti " #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: Elenco fax inviati" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Eliminare permanentemente il fax?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(NOTA: Ciò eliminerà permanentemente il fax\n" "dal filesystem)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Eliminare permanentemente i fax selezionati?\n" "(NOTA: Ciò eliminerà permanentemente i fax\n" " dal filesystem)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: Elimina fax" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Svuotare il cestino?\n" "(NOTA: Tutti i fax nel cestino verranno eliminati\n" " in maniera permanente)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: Cestino" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: Aggiungi cartella" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Svuota la cartella eliminando tutte le sottocartelle\n" "e trascinando o eliminando ogni fax in essa contentuto\n" "prima di eliminare la cartella" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: Elimina cartella" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Elimina cartella" #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Stampa il fax selezionato?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: Stampa fax" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: Descrizione fax" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Descrizione fax?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Nome cartella?(NOTA: la cartella verrà creata al livello più alto\n" "e potrà essere trascinata dentro altre cartelle)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "Il nome della cartella non può contenere il carattere:" #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "La seguente cartella è già esistente:" #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Cartella" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Descrizione" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Fax ricevuti" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Fax inviati" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Cestino" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: Lista file" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "File da inviare" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Visualizza il file selezionato" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Elimina il file selezionato dalla lista" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Aggiungi i file alla lista" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Aggiungi i file da inviare alla lista" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Muovi il file in su" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Muovi il file in giù" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Elimino il file" #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " dalla lista?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Elimina file" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Copyright (C) 2001 - 2011 Chris Vine\n" "Questo programma è rilasciato sotto la GNU General Public License, versione " "2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Uso:·efax-gtk·[opzioni]·[nomefile]\n" "Opzioni:\n" "\t-r··Lancia il programma in modalità di ricezione attesa\n" "\t-s··Lancia il programma minimizzato nell'area di notifica\n" "Leggi il file README distribuito con il programma\n" "per ulteriori dettagli\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Opzione non valida. Le opzioni sono:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "La classe del modem specificata è ivalida\n" "Utilizzo la Classe 2 come predefinita\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "Nessuna porta seriale specificata" #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "Utilizzo una risoluzione per i fax di 204x196 come predefinita \n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "La risoluzione per i fax specificata è invalida\n" "Utilizzo una risoluzione per i fax di 204x196 come predefinita \n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "Il numero di squilli specificato non è valido\n" "Risponderò dopo uno squillo\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "Utilizzo il formato pagina a4 come predefinito\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "Il formato pagina specificato è invalidoUtilizzo il formato pagina a4 come " "predefinito\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "La modalità di composizione specificata non è valida\n" "Utilizzo la composizione a toni come predefinita\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" "La riduzione della pagina specificata non è valida: utilizzo il valore 100 " "come predefinito\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "Utilizzo il visualizzatore postscript 'gv' come predefinito\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" "Non è stata specificata nessuna porta per il socket server, quindi il server " "non verrà avviato\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "E' stata specificata una porta invalida per il socket server, quindi il " "server non verrà avviato. Il numero della porta deve essere compreso tra " "1024 e 65535\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" "La directory WORK_SUBDIR: specificata non è valida. WORK_SUBDIR: verrà " "ignorata\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "Da file" #: src/mainwindow.cpp:297 msgid "Socket " msgstr "Da socket " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Metodo di inserimento fax: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "File singolo" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "File multipli" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Lista socket" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Numero di tel:" #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Invia fax" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Rispondi chiamata" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Rileva chiamata" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "In attesa" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Ferma" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Fax da inviare" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "_Mostra i fax ricevuti" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "Mostra i _fax inviati" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "Fax in _coda dal socket" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "_Aggiungi file singolo" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "Aggiungi file m_ultipli" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_Rubrica" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Impostazioni" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_Esci" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "Informazioni su efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "Informazioni su _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Traduzioni" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Aiuto" #: src/mainwindow.cpp:658 msgid "_File" msgstr "" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "" "Il programma è stato lanciato con l'opzione -s ma non c'è nessuna area di " "notifica!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "" "Non è stato specificato nessun numero per il fax. Si vuole inviare il fax su " "una chiamata già esistente?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Numero di telefono" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "Coda di stampa ricevuta sul socket" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "Efax-gtk ha ricevuto un fax" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: fax ricevuto" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "Non è possibile cambiare le impostazioni se il programma è attivo\n" "Premi il pulsante Ferma per renderlo inattivo" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "Italiano - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "Polacco - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "Bulgaro - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "Russo - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "Ebraico - Assaf Gillat\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "Greco - Hellenic Linux Users Group\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Traduzioni" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Premi F1 per l' aiuto" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "" #: src/settings.cpp:68 msgid "Name: " msgstr "Nome: " #: src/settings.cpp:69 msgid "Number: " msgstr "Numero: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Dispositivo: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "File di Lock: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "" #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Squilli (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Classe Modem: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Composizione: " #: src/settings.cpp:211 msgid "Auto" msgstr "" #: src/settings.cpp:213 msgid "Class 1" msgstr "Classe 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Classe 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Classe 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Toni" #: src/settings.cpp:235 msgid "Pulse" msgstr "Pulsazioni" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Parametri di Inizializzazione: " #: src/settings.cpp:509 msgid "Reset Params: " msgstr "Parametri di Reset: " #: src/settings.cpp:510 msgid "Other Params: " msgstr "Altri Parametri: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Programma per la Stampa: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Restringimento Stampa (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "Apri una finestra di conferma\n" "prima di stampare" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Visualizzatore Postscript\n" "Programma:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Avvia il socket server" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Apri una finestra di dialogo\n" "quando si riceve un fax dal socket" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "Porta alla quale \n" "inviare i fax:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Indirizzi autorizzati\n" "alla connessione" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "computer locale" #: src/settings.cpp:1016 msgid "other" msgstr "altri" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "Apre una finestra di dialogo\n" "quando il modem riceve un fax" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "Esegue un programma o uno script\n" "quando il modem riceve un fax" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "Risoluzione Fax Inviati:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "" #: src/settings.cpp:1514 msgid "Fine" msgstr "" #: src/settings.cpp:1767 msgid "Log File: " msgstr "File di Log: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Formato Pagina: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: opzioni" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Nota: premendo il tasto OK le impostazioni verranno salvate nel file" #: src/settings.cpp:1979 msgid "Reset" msgstr "Ripristina" #: src/settings.cpp:2012 msgid "Identity" msgstr "Identità" #: src/settings.cpp:2015 msgid "Modem" msgstr "" #: src/settings.cpp:2018 msgid "Params" msgstr "Parametri" #: src/settings.cpp:2021 msgid "Print" msgstr "Stampa" #: src/settings.cpp:2027 msgid "Socket" msgstr "Socket" #: src/settings.cpp:2030 msgid "Receive" msgstr "Ricezione" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "Log" #: src/settings.cpp:2039 msgid "Page" msgstr "Pagina" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Errore di configurazione" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "La classe del modem specificata è invalida" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "Il formato pagina specificato è invalido" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "La risoluzione del fax spedito è invalida" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "Il numero di squilli specificato è invalido" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "Il tipo di composizione specificato è invalido" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "Il parametro di riduzione specificato è invalido" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" "La porta del socket specificata è invalida. Deve essere compresa tra 1024 e " "65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "Inserisci opzioni da " #: src/settings.cpp:3102 msgid " or\n" msgstr " o\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Resetta le impostazioni" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk aiuto: Nome" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "Inserisci qui il numero che apparirà sull' intestazione dei fax inviati. " "Questo comprenderà anche l' identificativo di stazione riportato alla " "macchina che spedisce i fax quando si stanno ricevendo dei fax" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk aiuto: Numero" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "Inserisci qui il nome del dispositivo seriale al quale è connesso il modem " "(se non viene inserito, il programma utilizzerà /dev/modem). Non includere " "la parte `/dev' del nome del dispositivo -- cioè specificalo come `ttyS1' " "oppure `cua2', ecc. Con Linux ttyS0 equivale a COM1, ttyS1 a COM2, e così via" #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk aiuto: Dispositivo" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "Inserisci qui la directory del file lock. Se non viene specificata, il " "programma utilizzerà /var/lock come predefinito" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk aiuto: File Lock" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "Con efax-0.9 o superiore dovresti solitamente scegliere \"Auto\", in questo " "modo efax troverà la classe del modem da solo, ma se vuoi puoi forzare una " "classe scegliendone una tra quelle specificate. Comunque, con efax-0.8 il " "programma utilizzerà la Classe 2 come predefinita, quindi se stai usando un " "modem Classe 1 con una vecchia versione di efax, specifica la Classe qui" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk aiuto: Classe del Modem" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" "Specifica qui se verrà utilizzata la chiamata a toni o a frequenza per " "spedire i fax" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk aiuto: Modalità di Composizione" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "Specifica qui le capabilities del modem. Per capire cosa significa digita " "`man efax', e guarda come opera il parametro `-c'. Con efax-0.9 ed un modem " "Classe 2, solitamente non avrai bisogno di specificarle e dovresti lasciare " "il campo vuoto, poiché il programma interrogherà il modem. Se stai usando " "una vecchia versione di efax o una classe del modem differente, i valori che " "funzionano praticamente con qualsiasi modem 14.400 bps sono 1,5,0,2,0,0,0,0 " "oppure 1,3,0,2,0,0,0,0 per i più lenti" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk aiuto: Capabilities" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "Specifica qui il numero di squilli che il modem farà passare prima di " "rispondere quando si trova in modalità In attesa. Valori possibili sono da 1 " "a 9. Se non viene specificato il programma utilizzerà 1 come predefinito" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk aiuto: Squilli" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "Specifica qui i comandi `AT' di inizializzazione del modem quando si trova " "in modalità fax. Specifica quanti comandi vuoi, separati da spazi per i " "comandi che lo necessitano, ma senza anteporre `AT'. Se non vengono " "specificati, il programma utilizzerà come predefinito `Z &FE&D2S7=120 &C0 " "M1L0', che è corretto praticamente per tutti i modem" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk aiuto: Parametri di Inizializzazione" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "Specifica qui i comandi `AT' che resetteranno il modem. Specifica quanti " "comandi vuoi, separati da spazi per i comandi che lo necessitano, ma senza " "anteporre `AT'. Se non vengono specificati, il programma utilizzerà come " "predefinito `Z', che è corretto praticamente per tutti i modem" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk aiuto: Parametri di Reset" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "Questo campo può essere usato per passare qualsiasi altro parametro ad efax " "(digita `man efax' per vedere quelli disponibili). Specifica quanti comandi " "vuoi, separati da spazi per parametri diversi -- cioè aggiungi `-or' per " "eseguire un' inversione di bit in ricezione per i modem Multitech che lo " "richiedono. A meno che non usi un modem insolito, lascia questo campo vuoto" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk aiuto: Altri Parametri" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Questo è il comando per la stampa che accetta un input postscript sullo " "standard input. Se non viene specificato, il programma utilizzerà `lpr' come " "predefinito" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk aiuto: Programma per la Stampa" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Questo determinerà di quanto una pagina stampata verrà ridotta per adattarsi " "all' area di stampa della stampante. E' una percentuale -- cioè 98 ridurrà " "la pagina al 98 percento della sua grandezza. Se non viene specificata non " "avverrà nessuna riduzione (cioè puoi specificare 100, ma non ce n' è bisogno)" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk aiuto: Riduzione Stampa" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Specifica qui se dovrà apparire una finestra di pop-up di conferma primadi " "stampare quando viene premuto il tasto \"Stampa i fax selezionati\" " "nellalista dei Fax Ricevuti o dei Fax Inviati. Deseleziona la casella se non " "vuoila finestra di dialogo (se hai specificato un programma esterno per " "gestirele stampe come 'kprinter' nella casella Programma per la Stampa, " "alloranon selezionare la casella)" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk aiuto: Popup" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "Un visualizzatore postscript è utilizzato per vedere, tramite la lista dei " "fax, i fax ricevuti ed inviati, ed anche per vedere i fax da inviare " "individuati tramite la finestra di dialogo \"File da inviare\". Specifica " "qui i comandi che dovranno essere usati per visualizzare i file postscript. " "Se non vengono specificati il programma utilizzerà 'gv' come predefinito. " "Altre possibilità che potresti voler usare sono 'evince' (il visualizzatore " "postscript di Gnome) oppure 'kghostview' (il visualizzatore postscript di " "KDE). Se usi gv, potresti aver bisogno di usare l' opzione '-media A4' " "oppure '-media Letter' per selezionare il formato corretto della pagina. " "evince e kghostview lo fanno automaticamente" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk aiuto: Visualizzatore Postscript" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "Specifica qui se il socket server deve essere eseguito per CUPS o per " "qualche altro sistema di stampa. Spunta la casella se deve essere avviato" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "efax-gtk aiuto: Avviare il socket server" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "Specifica qui se dovrà apparire una finestra di pop-up quando il socket " "server riceve un fax dal sistema di stampa. Spunta la casella se vuoi che " "appaia la finestra. (Questa impostazione non ha effetto se la casella per " "avviare il socket server non è spuntata.)" #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" "Specifica qui il numero della porta sulla quale il socket server sarà in " "ascolto" #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk aiuto: Porta" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "Questo determinerà se indirizzi diversi da localhost o dal nome proprio " "dell' host della tua macchina saranno autorizzati a connettersi al socket. " "Se non hai requisiti particolari (cioè, a meno che i demoni CUPS o lpd siano " "eseguiti su altre macchine), dovresti scegliere computer locale. Se vuoi che " "anche altre macchine abbiano la capacità di connettersi, scegli \"altri\" e " "specifica il nome completo dell' host dei computer che si dovranno " "connettere (separando nomi di host diversi con spazi, ma non hai bisogno di " "specificare localhost e il nome dell' host della tua macchina, poiché essi " "sono sempre autorizzati.) Se hai scelto \"altri\", dovresti eseguire efax-" "gtk dietro un firewall" #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "efax-gtk aiuto: Connessioni al socket consentite" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "Questo parametro specifica se una finestra di pop-up dovrà apparire quando " "il modem riceve un fax. Seleziona la casella se vuoi la finestra di pop-up." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "efax-gtk aiuto: Pop-up in ricezione" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "Specifica qui se bisogna eseguire un programma o uno script quando il " "modemriceve un fax. Seleziona la casella se vuoi che sia eseguito un " "programma, edinserisci il nome del programma." #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "efax-gtk aiuto: Eseguire un programma quando si riceve un fax" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "Specifica qui la risoluzione per i fax inviati. \"Standard\" è 204x98 e " "\"Fine\" è 204x196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk aiuto: Risoluzione Fax Inviati" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "Questo parametro specifica un file di log nel quale verranno memorizzati i " "progressi sulle negoziazioni e sullo stato del fax, gli errori e gli " "avvertimenti. Se non viene specificato, allora non sarà mantenuto nessun " "file di log. (Un file di log può anche essere creato reindirizzando stdout e " "stderr -- vedi il file README per ulteriori dettagli)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "efax-gtk aiuto: File Log" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "Specifica qui il formato della pagina per i fax" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk aiuto: Formato Pagina" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: Aiuto" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Invio" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Ricezione" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Rubrica" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Lista Fax" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Impostazioni" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "Inviare i fax\n" "-------------\n" "\n" "Per inviare un fax, questo deve essere specificato nella casella \"Fax da " "inviare\". Il file deve essere in formato postscript/PDF (un formato " "prodotto da qualunque word processor su Unix/Linux), esso sarà poi " "convertito dal programma nel formato fax corretto tiffg3.\n" "\n" "Ci sono due metodi per inserire i fax. Primo, il fax da inviare può essere " "un file salvato sul filesystem. Può essere inserito manualmente nella " "casella \"Fax da inviare\" oppure tramite la finestra di selezione file. Se " "il file consiste in un singolo file postscript/PDF, allora lo si può " "selezionare premendo il tasto \"File singolo\". Il file sarà trovato più " "facilmente tramite questa finestra di dialogo se esso è salvato nella " "directory $HOME/faxout.\n" "\n" "Se nella casella \"Fax da inviare\" viene specificato più di un file, essi " "saranno inviati come un fax singolo, con i file concatenati nell'ordine in " "cui sono stati inseriti nella casella. Questi file multipli possono essere " "selezionati più facilmente usando la lista dei file invocata premendo il " "tasto \"File multipli\". Premendo il tasto \"File multipli\" si possono " "aggiungere i file trovati alla lista, essi potranno essere riordinati usando " "i tasti a freccia Su e Giù, oppure trascinandoli con il mouse.\n" "\n" "Come alternativa, i fax possono essere ricevuti direttamente dal sistema di " "stampa tramite un socket server fornito dal programma. Efax-gtk mantiene una " "lista dei fax in coda ricevuti dal socket alla quale si può accedere " "scegliendo \"Socket\" come metodo di inserimento dei fax, e successivamente " "premendo il tasto \"lista socket\" che invocherà la lista dei fax in coda. " "Questo è un metodo conveniente per inviare i fax da un programma di " "videoscrittura, poichè permette di inviare un fax, tramite efax-gtk, " "stampando dal programma di video scrittura. Per altri particolari su come " "configurare CUPS o lpr/lprng per spedire fax tramite efax-gtk, consultare il " "file README incluso nella distribuzione.\n" "\n" "Il numero di telefono al quale il fax dovrà essere inviato, deve essere " "inserito nella casella \"Numero di tel\". Esso può essere inserito " "direttamente nella casella, oppure usando la rubrica integrata. La rubrica " "può essere invocata premendo il tasto \"Numero di tel\", o dall'elemento del " "menù a tendina `File/Rubrica'. Vedi \"Utilizzare la rubrica\" più avanti.\n" "Comunque se è stata già stabilita una connessione telefonica in " "precedenzacon la macchina che dovrà ricevere i fax, allora i fax possono " "essere inviati senza comporre il numero di telefono, lasciando la casella " "\"Numero di tel.\" in bianco. (verrà presentata una finestra di dialogo che " "chiederà se si vuoleinviare il fax senza prima comporre il numero di " "telefono)\n" "\n" "Quando un fax viene ricevuto dal sottosistema di stampa tramite il socket " "server,il programma può essere configurato in modo da visualizzare una " "finestra di dialogo automaticamente.Se il programma è inattivo o è in " "modalità stand-by in ricezione, il fax può esserespedito direttamente " "tramite questo dialogo senza bisogno di utilizzare la lista dei fax ricevuti " "dal socket.\n" "\n" "I fax inviati con successo vengono copiati in una directory sotto la " "diretory $HOME/faxsent, il cui nome sarà derivato dall'anno, mese, giorno, " "ora e secondi in cui l'invio del fax è stato completato e appariranno nella " "lista dei fax inviati. Essi saranno inclusi in questa lista solo se sono " "stati inviati senza errori. La casella di visualizzazione dei messaggi di " "efax darà delle indicazioni sul progresso dell'invio dei fax. La lista dei " "fax inviati può essere invocata dall'elemento del menù a tendina `File/" "Mostra i fax inviati'. Vedi \"Utilizzare la lista dei fax\" più avanti.\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "Ricevere i fax\n" "--------------\n" "\n" "Sono forniti tre modi per ricevere i fax.\n" "Primo, il programma può essere impostato in modo da rispondere ad una " "chiamata che sta squillando ma alla quale non è stato ancora risposto, " "premendo il tasto \"Rispondi chiamata\".\n" "\n" "Secondo, il programma può prendere una chiamata alla quale è stato già " "risposto (per es. alzando la cornetta) premendo il tasto \"Rileva chiamata" "\".\n" "\n" "Terzo, il programma può essere lasciato in modalità in attesa premendo il " "tasto \"In attesa\". Così risponderà automaticamente a qualsiasi chiamata " "dopo il numero di squilli specificato nel file efax-gtkrc, ricevendo il " "fax. Il programma continuerà a ricevere fax finché non verra premuto il " "tasto \"Ferma\".\n" "\n" "I fax ricevuti in formato tiffg3 (un file per pagina) vengono copiati in una " "directory sotto la directory $HOME/faxin, il cui nome è derivato dall' anno, " "mese, giorno, ora e secondi in cui la ricezione del fax è stato completato.\n" "\n" "I fax ricevuti possono essere visualizzati, descritti e gestiti tramite l' " "utilità lista fax inclusa. Questa può essere invocata dall' elemento del " "menù a tendina `File/Mostra fax ricevuti'. Vedi \"Utilizzare la lista dei fax" "\" più avanti.\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "Utilizzare la rubrica\n" "---------------------\n" "\n" "Per utilizzare un numero telefonico dalla rubrica, selezionare l' indirizzo " "interessato premendo il tasto sinistro del mouse sopra di esso, e quindi " "premere il tasto \"OK\".\n" "\n" "Gli indirizzi possono essere aggiunti alla rubrica premendo il tasto " "aggiungi, e poi completando i campi della finestra di dialogo che apparirà. " "Per cancellare un indirizzo dalla rubrica, selezionare l' indirizzo " "interessato e premere il tasto cancella (cestino). La rubrica può essere " "ordinata usando i tasti freccia in su e freccia in giù su di un indirizzo " "selezionato.\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "Utilizzare la lista dei fax\n" "---------------------------\n" "\n" "Per richiamare la lista dei fax, vai sul menù `File' e scegli gli elementi " "`Mostra fax ricevuti' o `Mostra fax inviati'. Seleziona il fax da stampare o " "da visualizzare premendo il tasto sinistro del mouse. I programmi che " "verrano utilizzati per stampare o visualizzare i fax sono specificati nel " "file di configurazione efax-gtkrc, o, se non vengono specificati, il " "programma stamperà con lpr (che funzionerà per la maggioranza dei sistemi " "Unix) e visualizzerà con gv.\n" "\n" "Per stampare i fax, un parametro PRINT_SHRINK può essere specificato in efax-" "gtkrc, in modo da far rientrare la pagina del fax nei margini della " "stampante. Un valore del parametro pari a 98 funzionerà con la maggioranza " "delle stampanti. Questo può essere cambiato mentre il programma sta girando, " "invocando il dialogo `Impostazioni' ed inserendolo nella casella `Stampa/" "Riduzione Stampa'.\n" "\n" "Una descrizione può essere aggiunta (o successivamente modificata) ad un fax " "ricevuto, quando questo appare nella lista dei fax, premendo il tasto " "pertinente -- ciò renderà più facile il riconoscimento dei fax.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "Impostazioni\n" "------------\n" "\n" "Le impostazioni del programma possono essere modificate editando il file di " "configurazione di efax-gtk che comprende $HOME/.efax-gtkrc, $sysconfdir/efax-" "gtkrc o /etc/efax-gtkrc. Il file viene cercato in questo ordine, quindi " "$HOME/.efax-gtkrc ha la precedenza sugli altri due.\n" "\n" "Il file di configurazione può anche essere impostato usando il dialogo " "Impostazioni lanciato dall' elemento del menù a tendina `File/" "Impostazioni'. Le impostazioni inserite usando questo dialogo verranno " "salvate sempre in $HOME/.efax-gtkrc. Allo stesso modo, se è stato usato il " "dialogo Impostazioni, e vuoi ritornare alle impostazioni globali, ciò può " "essere fatto sia cancellando il file $HOME/.efax-gtkrc, sia premendo il " "tasto `Reset' nel dialogo Impostazioni, il quale ricaricherà le impostazioni " "dal file di configurazione globale (da $sysconfdir/efax-gtkrc o da /etc/efax-" "gtkrc).\n" "\n" "Un aiuto mentre si inseriscono le Impostazioni può essere ottenuto " "mantenendo il mouse sopra il tasto di aiuto (?) pertinente, il quale " "mostrerà un suggerimento, o premendo il tasto, il quale mostrerà una " "finestra di informazioni\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "Socket avviato sulla porta " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "Coda di stampa ricevuta sul socket\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: Fax in coda dal socket" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "Code di stampa" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "Inserisci il fax selezionato" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Scegli il fax selezionato per inviarlo" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "CODA DI STAMPA: " #: src/socket_list.cpp:501 msgid "Remove " msgstr "Elimina" #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: Elimina fax in coda" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: coda di stampa ricevuta sul socket" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Coda fax" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" " è stato ricevuto dal socket.\n" "Si vuole spedire il fax o metterlo in coda?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Mostra i fax ricevuti" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Mostra i fax inviati" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "In attesa" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Esci" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "" #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "" #: efax/efax.c:382 msgid "invalid modem response" msgstr "" #: efax/efax.c:383 msgid "no response from modem" msgstr "" #: efax/efax.c:385 msgid "internal error" msgstr "" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "" #: efax/efax.c:419 msgid "DCS - session format" msgstr "" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "" #: efax/efax.c:430 msgid "MPS - not done" msgstr "" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "" #: efax/efax.c:436 msgid "EOP - done" msgstr "" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "" #: efax/efax.c:784 msgid "header:" msgstr "" #: efax/efax.c:868 msgid "characters received while sending" msgstr "" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "" #: efax/efax.c:915 msgid "flow control did not work" msgstr "" #: efax/efax.c:954 msgid "modem response in data" msgstr "" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "" #: efax/efax.c:1036 msgid "file write:" msgstr "" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "" #: efax/efax.c:1222 msgid "sent" msgstr "" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "" #: efax/efax.c:1291 msgid "frame error" msgstr "" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "" #: efax/efax.c:1391 msgid "received" msgstr "" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "" #: efax/efax.c:2216 msgid "called" msgstr "" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "" #: efax/efax.c:2224 msgid "number is busy" msgstr "" #: efax/efax.c:2226 msgid "dial command failed" msgstr "" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "" #: efax/efax.c:2306 msgid "activity detected" msgstr "" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "" #: efax/efax.c:2353 msgid "fax call answered" msgstr "" #: efax/efax.c:2356 msgid "voice call answered" msgstr "" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "" #: efax/efaxmsg.c:215 msgid " Error: " msgstr "" #: efax/efaxmsg.c:216 msgid " Warning: " msgstr "" #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "" #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Copyright (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ "Questo programma è rilasciato sotto la GNU General Public License, " #~ "versione 2" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " il file di configurazione\n" #~ "e /dev/modem non esistono\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " file di configurazione\n" #~ "Uso /dev/modem come predefinito\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "Utilizzo il programma per la stampa 'lpr' come predefinito\n" #~ msgid "Put the name to appear on the fax top header on sent faxes here" #~ msgstr "" #~ "Inserisci qui il nome che apparirà sull' intestazione dei fax inviati" #~ msgid "From" #~ msgstr "Da" #~ msgid "Refresh fax list" #~ msgstr "Aggiorna l' elenco dei fax" efax-gtk-3.2.8/po/zh_CN.po0000644000175000001440000021374011544574530012145 00000000000000# Simplified Chinese translation file # Copyright (C) 2001 to 2005 Chris Vine # This file is distributed under the same license as the efax-gtk package. # Chris Vine , 2001-2005. # # msgid "" msgstr "" "Project-Id-Version: efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2005-09-21 20:01+0800\n" "Last-Translator: Kite Lau \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: 地址簿" #: src/addressbook.cpp:122 msgid "Name" msgstr "名字" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "号码" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "添加新地址" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "删除地址" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "上移地址" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "下移地址" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "删除所选地址吗?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: 删除地址" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: 添加地址" #: src/addressbook.cpp:574 msgid "Name:" msgstr "名字:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "号码:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: 待传文件" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "查看" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: 条件,注意和免责条款" #: src/dialogs.cpp:298 msgid "Accept" msgstr "接受" #: src/dialogs.cpp:299 msgid "Reject" msgstr "拒绝" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "你接受以上的条件,注意和免责条款吗?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "关于efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "关于 efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "未激活" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "发送传真中" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "应答传真中" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "接收待机中" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "不能发送传真-已经在接收传真中\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "无效文件名 \n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "文件不存在 \n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "用户对此文件不可读 \n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "无效的postscript/PDF文件 \n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "你没有设置$HOME环境变量 \n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" "严重系统错误:不能新建目录来保存已收传真。\n" "不能接收传真! \n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** 停止发送/接收传真会话中 ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" "严重系统错误:不能新建目录来保存已收传真。\n" "不能保存此传真! \n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" "严重系统错误:不能打开已收传真目录。\n" "不能保存此传真! \n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" "系统严重错误:不嫩保存已收的所有传真。\n" "所有或部分传真将丢失!\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" "严重系统错误:不能新建目录来保存已收传真。\n" "不能保存传真! \n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "打印任务" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "打印所选传真" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "查看所选传真" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "添加/修改所选传真的描述" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "删除所选传真" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "清空废件箱" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "添加新文件夹" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "删除所选文件夹" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "重置新传真数" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: 已收传真列表" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: 已发传真列表" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "永久性删除传真?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(注意:这将永久从系统删除此传真)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "永久性删除此传真吗?\n" "\n" "\n" "(注意:这将永久从系统删除此传真)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: 删除" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "清空废件箱吗?\n" "\n" "(注意:这将永久性从系统\n" "删除所有废件箱里的传真)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: 废件箱" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: 添加文件夹" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "删除所有子文件夹来清空文件夹\n" "并且在删除文件夹前\n" "拖放或者删除里面的传真" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: 删除文件夹" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "删除文件夹:" #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "打印所选传真?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: 打印传真" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "新传真" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: 传真描述" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "传真描述?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "文件夹名字?\n" "(注意:这个将被置于顶部\n" "而且可以被拖放\n" "到其他文件夹)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "文件夹名字不能包含字符:" #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "下面文件夹已经存在:" #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "文件夹" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "日期" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "描述" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "收件箱" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "已发箱" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "废件箱" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: 文件列表" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "待发文件" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "查看所选文件" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "从列表中删除所选文件" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "添加文件到列表" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "添加文件到文件列表来发送" #: src/file_list.cpp:205 msgid "Move file up" msgstr "上移文件" #: src/file_list.cpp:206 msgid "Move file down" msgstr "下移文件" #: src/file_list.cpp:593 msgid "Remove file " msgstr "删除文件" #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr "从列表中?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "删除文件" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "版权 (C) 2001 - 2011 Chris Vine\n" "这个程序以GNU 公共版权, 版本2发布\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r 启动程序到接收待机状态\n" "\t-s 启动程序并隐藏于系统托盘\n" "查看程序附带的自述文件来了解更多细节\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "未知选项。选项是:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "设定了无效调制解调器的级别\n" "采用默认级别Class 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "没有指定串口设备于" #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "采用默认传真分辨率204X196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "指定了无效的传真分辨率\n" "采用默认传真分辨率204X196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "指定了无效的拨号号码\n" "响铃一声后将应答\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "采用默认页面尺寸A4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "指定了无效的页面尺寸\n" "采用默认页面尺寸A4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "指定了无效的拨号模式\n" "采用默认的拨号模式\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "指定了无效的打印页面收缩值:采用默认的值100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "采用默认的postscript文件查看命令'gv'\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "没有指定套接服务器的端口号,所以服务器将不被启动。\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "指定的套接服务器端口号无效,所以服务器将不被启动。端口号必须介于1024和65535之" "间\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "指定了无效的工作子目录:WORK_SUBDIR: , WORK_SUBDIR: 将被忽略\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "文件" #: src/mainwindow.cpp:297 msgid "Socket " msgstr "套接口" #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "输入传真方式:" #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "单个文件" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "多个文件" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "套接口列表" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "电话号码:" #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "发送传真" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "应答传真" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "接过电话" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "待机" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "停止" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "待发传真" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "_R 列出已收传真" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "_L 列出已发传真" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "_F 从套接口列队传真" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "_E 输入单个文件" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "_M 输入多个文件" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_A 地址簿" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_S 设置" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_Q 退出" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "_G 关于efax-gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "_E 关于efax " #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_T 翻译" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_H 帮助" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_F 文件" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "这个程序以-s的选项启动,但没有系统托盘可用\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "没有指定传真号码。你要发传真到开放的连接吗?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "电话号码" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "套接口接收到打印任务" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk 套接口" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "efax-gtk 刚刚接收到一个传真" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: 传真收到" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "不能更改设置,除非程序处于非激活状态\n" "按停止键来反激活" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "意大利文 - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "波兰文 - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "保加利亚文 - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "俄文 - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "希伯来文 - Assaf Gillat\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "希腊文 - Hellenic Linux Users Group\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "阿尔巴尼亚文 - Besnik Bleta\n" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "匈牙利文 - Gergely Szakats, Laszlo Csordas\n" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "简体中文 - Kite Lau\n" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: 翻译" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "需帮助请按F1键" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "被信号终止" #: src/settings.cpp:68 msgid "Name: " msgstr "名字:" #: src/settings.cpp:69 msgid "Number: " msgstr "号码:" #: src/settings.cpp:190 msgid "Serial Device: " msgstr "串口设备:" #: src/settings.cpp:191 msgid "Lock File: " msgstr "锁文件:" #: src/settings.cpp:192 msgid "Capabilities: " msgstr "能力:" #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "铃声(1-9):" #: src/settings.cpp:194 msgid "Modem Class: " msgstr "调制解调器级别:" #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "拨号模式:" #: src/settings.cpp:211 msgid "Auto" msgstr "自动" #: src/settings.cpp:213 msgid "Class 1" msgstr "Class 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Class 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Class 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "音频" #: src/settings.cpp:235 msgid "Pulse" msgstr "脉冲" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "初始参数:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "重置参数:" #: src/settings.cpp:510 msgid "Other Params: " msgstr "其他参数:" #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "打印程序:" #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "打印收缩(50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "打印前\n" "弹出确认对话窗" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Postscript查看器\n" "程序:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "运行套接服务器" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "当套接口转来传真\n" "弹出对话窗口" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "传真套接至的\n" "的端口号" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "允许连接的\n" "地址" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "本机" #: src/settings.cpp:1016 msgid "other" msgstr "其他" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "调制解调器收到传真时\n" "弹出窗口" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "当调制解调器收到传真时\n" "执行一个程序或脚本" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "已发传真分辨率:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" "在页眉\n" "包括目的地\n" "的传真号码" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "标准" #: src/settings.cpp:1514 msgid "Fine" msgstr "好" #: src/settings.cpp:1767 msgid "Log File: " msgstr "日记文件:" #: src/settings.cpp:1830 msgid "Page Size: " msgstr "页面尺寸:" #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: 设置" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "注意:按OK键将保存设置到文件" #: src/settings.cpp:1979 msgid "Reset" msgstr "重置" #: src/settings.cpp:2012 msgid "Identity" msgstr "身份" #: src/settings.cpp:2015 msgid "Modem" msgstr "调制解调器" #: src/settings.cpp:2018 msgid "Params" msgstr "参数" #: src/settings.cpp:2021 msgid "Print" msgstr "打印" #: src/settings.cpp:2027 msgid "Socket" msgstr "套接口" #: src/settings.cpp:2030 msgid "Receive" msgstr "接收" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "日记" #: src/settings.cpp:2039 msgid "Page" msgstr "页面" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "设置错误" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "指定了无效的调制解调器级别" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "指定了无效的页面尺寸" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "指定了无效的已发传真的分辨率" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "指定了无效的铃声号码" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "指定了无效的拨号模式" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "指定了无效的打印收缩参数" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "指定了无效的套接端口号。它必须介于1024与65535之间" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "输入设置于" #: src/settings.cpp:3102 msgid " or\n" msgstr "或者\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "重置设置" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk help: 名字" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "在这里输入要在已发传真页眉上显示的号码。这也将包括应答传真机显示给对方的身" "份。" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk help: 号码" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "在此指定调制解调器连接到的串口设备(如果留白,程序将默认使用/dev/modem)。不" "要在此包括设备名的\"/dev/\"部分,也就是只声明\"ttyS1\", 或者\"cua2\",等等。在" "Linux下,ttyS0等同于COM 1, ttyS1等同于COM 2, 以此类推。" #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk help: 设备" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "在此指定锁文件的目录。如果留白,程序默认使用/var/lock" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk help: 锁文件" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "efax-0.9或以上版本,你一般需选择\"自动\",efax会自动判断调制解调器的级别,但" "你也可以强制使用自己指定的级别。然而efax-0.8会默认Class 2,所以如果你在旧版本" "的efax里使用Class 1的调制解调器,请在这里指定级别。" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk help: 调制解调器的级别" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "这里指定用音频或脉冲来拨号发送传真" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk help: 拨号模式" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "这个设定调制解调器的能力。要想知道什么意思,请运行\"man efax\",查看\"-c\"选" "项。在efax-0.9和一个Class 2调制解调器之下,你通常不用指定这个,留白即可,因为" "陈需会询问调制解调器。如果使用老版本的efax或者一个不同级别的调制解调器,和典" "型的任何较慢的14,400 bps的调制解调器能工作的值是 1,5,0,2,0,0,0,0, or " "1,3,0,2,0,0,0,0。" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk help: 能力" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "这里设定了在接收待机模式下调制解调器应答前的响铃次数。允许的值为1到9。如果没" "有指定,程序默认为1。" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk help: 响铃" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "这里指定了将重置调制解调器的\"AT\"命令。可以指定多个命令,不同命令用空格隔" "开,但不加“AT”前缀。如果没有指定,程序将默认用\"Z\",这个将适用于大部分调制解" "调器。" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk help: 起始参数" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "这里指定了将重置调制解调器的\"AT\"命令。可以指定多个命令,不同命令用空格隔" "开,但不加“AT”前缀。如果没有指定,程序将默认用\"Z\",这个将适用于大部分调制解" "调器。" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk help: 重置参数" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "这里可以用来传递任何其他的参数给efax(用“man efax“来查看可用参数)。可以指定" "多个参数,用空格隔开不同参数--例如包含”-or“来做一些在接收传真时Multitech调" "制解调器所需要的翻转。除非你有一个不一般的调制解调器,留白即可。" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk help: 其他参数" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "这个指定了接收并打印来自标准输入的postscript文件的命令。如果留白,程序默认为" "\"lpr\"" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk help: 打印程序" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "这里决定了适应打印机的打印范围所作的收缩范围。这是个百分数--例如98将把页面" "收缩至实际尺寸的98%。如果留白,将不做任何收缩(也就是说你可以,但不必指定" "100)" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk help: 打印收缩" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "这里指定了,在已收传真或已发传真列表里,当按\"打印所选传真\"按钮时是否在打印" "前弹出确认对话窗口。去勾选如果你不想要弹出窗口(如果你指定了一个外部打印管理" "器,例如在打印程序选框里指定了'kprinter',那么你将不需要此勾选)。" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk help: 弹出窗口" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "一个postscript查看器是用来从传真列表里查看已收或已发传真,而且也用来查看在" "\"要传真的文件\"选择窗口里的待发传真。在这里指定用来查看postscript文件的命" "令。如果没有指定,程序将默认用“gv“。或者你可能需要指定”evince“(Gnome " "postscript查看器)或者”kghostview“(KDEpostscript查看器)。如果你使用gv,你可" "能需要用'-media A4' 或者'-media Letter' 的选项来选择正确的页面尺寸。evince和" "kghostview可以自动识别的。" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk help: Postscript文件查看器" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "这里指定了是否需要为CUPS或其他打印系统运行一个套接服务器。如果需要就勾选。" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "efax-gtk help: 运行套接口服务器" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "这里指定了当经过套接服务器接收到来自打印系统的传真任务时是否弹出对话窗口。如" "果是就勾选(如果你也勾选了运行套接服务器,这里将不生效)。如果程序没激活传真" "可以从这个窗口直接发送。" #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "这里指定了套接服务器监听的端口号" #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk help: 端口" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "这里指定了是否本机和你机器自己的主机名之外的地址被允许连接到套接服务器。除非" "你有不寻常的需要(也就是,除了CUPS或lpd守护程序运行在另外一台机器),你应该选" "择本机。如果你想其他机器也可以连接,请选\"其它\"而且指定被允许连接的电脑的主" "机名全称(用空格隔开不同主机名,但你不需在这指定本机和你的机器主机名,因为它" "们总是被允许连接的)。如果你选择\"其它\",你应该在防火墙之后运行efax-gtk。" #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "efax-gtk help: 套接口允许的连接数" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "这个参数指定当调制解调器收到传真时是否弹出对话窗口。如果是,请勾选。" #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "efax-gtk help: 接收弹出窗口" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "这里指定当调制解调器收到传真时程序是否执行一个程序或脚本" #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "efax-gtk help: 传真收到时执行程序" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "这里指定了已发传真的分辨率。\"标准\"赋予204X98,而\"好\"赋予204X196的分辨率" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk help: 已发传真分辨率" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" "这里指定了是否在已发传真的页眉包含目的地的传真号码。去勾选如果你不想要这个被" "显示(例如因为它包含了一个付费卡的先拨号码)。" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "efax-gtk help: 传真页眉" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "这个参数指定了记录传真交涉,状态,错误和警告的日记文件。如果没有指定,那么将" "没有日志记录。(一个日记文件也可以通过重定向到stdout和stderr--更多细节请看" "README文件)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "efax-gtk help: 锁文件" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "在此指定传真的页面尺寸" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk help: 页面尺寸" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: Help" #: src/helpfile.cpp:73 msgid "Sending" msgstr "发送中" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "接收中" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "地址簿" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "传真列表" #: src/helpfile.cpp:108 msgid "Settings" msgstr "设置" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "套接服务器运行在端口号" #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "套接口所接收的打印任务\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: 从套接口列队传真任务" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "列队打印任务" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "输入已选传真来发送" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "选择所选传真来发送" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "打印任务:" #: src/socket_list.cpp:501 msgid "Remove " msgstr "删除" #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: 删除已排队传真任务" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: 套接口接收到打印任务" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "排队传真" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" "已经在套接口接收到。\n" "发送还是列队?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "列出已接收传真" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "列出已发送传真" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "进入接收待机状态" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "退出" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "成功" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "号码正忙或调制解调器占用中" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "不可恢复的错误" #: efax/efax.c:382 msgid "invalid modem response" msgstr "无效的调制解调器反应" #: efax/efax.c:383 msgid "no response from modem" msgstr "调制解调器没有反应" #: efax/efax.c:385 msgid "internal error" msgstr "内部错误" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "NSC - 轮询特点" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "CIG - 轮询身份" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "DTC - 轮询能力" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "NSF - 应答特点" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "CSI - 应答身份" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "DIS - 应答能力" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "Nss - 来电特点" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "TSI - 来电身份" #: efax/efax.c:419 msgid "DCS - session format" msgstr "DCS - 会话格式" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "CFR - 信道 OK" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "FTT - 信道不 OK" #: efax/efax.c:430 msgid "MPS - not done" msgstr "MPS - 未完成" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "EOM - 未完成,新格式" #: efax/efax.c:436 msgid "EOP - done" msgstr "EOP - 完成" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "PRI-MPS - 未完成,呼叫总机" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "PRI-EOM - 未完成,新格式,呼叫总机" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "PRI-EOP - 完成,呼叫总机" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "MCF - 页 OK" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "RTP - 页 OK,检测信道" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "PIP - 页 OK,呼叫总机" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "RTN - 页不 OK,检测信道" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "PIN - 页不 OK, 呼叫总机" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "CRP - 重复命令" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "DCN - 断开连接" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "未知" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "不兼容的本地和远程能力" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "不能删除文件 %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "已删除文件:%s" #: efax/efax.c:784 msgid "header:" msgstr "页眉:" #: efax/efax.c:868 msgid "characters received while sending" msgstr "发送时收到的字符" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "以 %d 字节每秒的速度,耗时 %d 秒,发送了 %d+%d 行和 %d+%d 字节" #: efax/efax.c:915 msgid "flow control did not work" msgstr "流控制没起作用" #: efax/efax.c:954 msgid "modem response in data" msgstr "调制解调器数据反应" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "运行长度溢出" #: efax/efax.c:1036 msgid "file write:" msgstr "文件写入:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "CAN: 数据接收被取消" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "接收错误" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "接收了 %d 行,并有 %d 个错误" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "已发 TCF - 信道检测 %d 字节" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "检测数据过程超时" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "已收 TCF - 信道检测 (OK: 在 %d 里 运行了 %d)" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "已收 TCF - 信道检测 (不 OK:在 %d 里 运行了 %d)" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "帧的最后一个字节为NULL" #: efax/efax.c:1222 msgid "sent" msgstr "已发" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "HDLC 帧" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "比特反转的 HDLC 帧,反转比特顺序中" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "读取帧数据超时" #: efax/efax.c:1291 msgid "frame error" msgstr "帧错误" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "帧数据后没有反应" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "帧数据后反应错误" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "帧太长 (%d, > %d 最大字节) " #: efax/efax.c:1371 msgid "wrong carrier" msgstr "错误的载体" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "对接收帧的命令反应错误" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "已收短帧 (%d 字节)" #: efax/efax.c:1391 msgid "received" msgstr "已收" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "远程的身份是" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "远程传真没有应答" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "不能打开页" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "远程有一个或更多文件发送而且能接收" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "远程有一个或更多文件发送而不能接收" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "远程没有文件发送而且能接收" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "远程没有文件发送而且能接收" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "远程无法接收,但尝试中" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "远程没有任何东西发送,但尝试中" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "信道速度 %d 字节不可用" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "信道速度最低,不可用" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "给 DCS 的反应无效" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "已发页 %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "无效页后反应" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "中断请求被忽略" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "等待命令超时" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "页保存到 %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "未知命令" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "远程没有命令或反应" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "不正常终止 (代号 %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "连接之后没有收到 XON/DC2" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "当等待发送时收到 %d 字符" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "远程有一个或多个文件要发送" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "没有获得 +FPTS 反应,就当传真被收到了" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "太多页发送重试" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "接收 (+FDR) 命令失败" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "拨 %s 中" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "远程身份是 %s" #: efax/efax.c:2216 msgid "called" msgstr "已呼叫" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "已连接" #: efax/efax.c:2224 msgid "number is busy" msgstr "号码忙" #: efax/efax.c:2226 msgid "dial command failed" msgstr "拨号命令失败" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "等待活动" #: efax/efax.c:2306 msgid "activity detected" msgstr "检测到活动" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "不能应答:不能锁定设备" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "在命令 (%s) 里太多 %%d 逃逸" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "执行命令 /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "exec() 呼叫失败" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "数据呼叫没有设定 getty 命令" #: efax/efax.c:2353 msgid "fax call answered" msgstr "应答了传真呼叫" #: efax/efax.c:2356 msgid "voice call answered" msgstr "应答了语音呼叫" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "语音呼叫里没有设定语音命令" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "无法应答呼叫" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "调制解调器不支持传真" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "不能确定传真调制解调器的支持级别" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "Multi-Tech 比特顺序组" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "使用 %s 调制解调器于级别 %s 上" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "失败页 %s" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "已完成 - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "本地身份 (%s) 被缩成 %d 个字符" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "本地身份 (%s) 有非标准的字符" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "使用标准输出的行缓冲" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "不正确的质量 (-q) 参数 (%s)" #: efax/efaxmsg.c:215 msgid " Error: " msgstr " 错误: " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " 警告: " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "传真设备写错误:" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "未预知的反应 \"%s\"" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "调制解调器命令 \"%s\" 太长" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "命令:%s 后超时" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "等待超时" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "命令:%s 后错误反应" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "等待后错误反应" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "同步:抛弃 DTR" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "同步:发送逃逸" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "同步:调制解调器不反应" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "调制解调器命令 (%s) 失败" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "调制解调器命令失败" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "%s 锁定了或者繁忙 - 等待中" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "已打开 %s" #~ msgid "New faxes: " #~ msgstr "新传真" #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Copyright (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " 配置文件\n" #~ "而且 /dev/modem 不存在\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ "配置文件\n" #~ "使用默认设备/dev/modem\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "采用默认的打印命令'lpr'\n" #~ msgid "Put the name to appear on the fax top header on sent faxes here" #~ msgstr "在这里输入要在已发传真页眉上显示的名字" #~ msgid "From" #~ msgstr "来自" #~ msgid "Refresh fax list" #~ msgstr "刷新传真列表" #~ msgid "?\n" #~ msgstr "?\n" efax-gtk-3.2.8/po/el.gmo0000644000175000001440000021647111544574532011716 00000000000000V |B([ _ i$1P5@18r= {==0==,==>#>6;>'r@ @ @@@@@%@AA&.A UAbA+A!A1A A BB^B*~BB#BBB BB CnCCCCCC C CBD{DDDpDDEZEuE6E EEE EEF F$F)F&0FgWFFFFFGF6G=RGLGG:G6HUH=qHH(1I>ZI9II%IGJ`JuJJ J JJJ JJJJ J KKK$KL+KTxK#KKL;%LaLhLpLyL L LL LL!LgL)@M'jM*MMMM NN N7NUNhN|NZNNO PPPPPP PPP Q QQ9Q?QNQ ]QkQ}QQ QQQQQ QQQ QQ$R5R>RFRcRhR wRR%RMR SSG.SvT5U!V%WW(3X\YP%[mv\h\M]d^[`xaMibcbd d&d.d/e7eZx.ӷ,T/#LYeOp&DbsYD- "1Q%+%QCw.:%8gV4ݿ-D%+j{,*G r (& m}FYj0l>^ :De@a|zP 8q-7,e2R#< O\@v@::3n Cl,_.s/>N!_!# I S] risPP/; '1FIx./!0KB15 ?L3U UL+_%"8 %68N!#82Ok:*F!_-K<NEU.sNjJBBu:  ^,42g$) 3 $2FB^1 u6VY?kU4G6V~+%-S*qO>C+0o&.,.4[=46KR8)GAIV / -9 -g  / ! - #5 +Y 0  ! A 63 8j <  3 5 RS  , - , &K ;r !  8 #x5V;%samC>[3.6E4Kz[Z"6}Z`3p 2 98;t)fy #+f#Sw5&><$Va7,%9'_S0E FRKS *)VGS943J co;P-m,N @5Zb$0hATI\z*+t#UAWMfC0 ?=HEF j7R_DR26O7/>98a(1 $Eg/evk(Ln<5#6 LT-Nr'uX!4,YxS.F|: !)HO+"yC><PQK1l;~3G8=M%IK&}U]wQDp? '`d 2qJ%B^V{ ":.& i@B (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. Error: Warning: from the list? has been received on socket. Send or queue fax? or %d characters received while waiting to send%s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Answer callAnswering callAutoCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Choose the selected fax for sendingClass 1Class 2Class 2.0Closing the socket Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 Delete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?Empty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)IdentityInactiveInboxInitialization Params:Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535List _received faxesList received faxesList sent faxesLock File: Log File: LoggingModemModem Class: Move address downMove address upMove file downMove file upMultiple filesNameName:Name: No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset settingsRings (1-9): Run socket serverSend faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSingle fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class here_Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsabnormal termination (code %d)activity detectedcalledcan't answer: can't lock devicecan't delete file %s:can't determine fax modem class supportcan't get format of file %scan't open file %s:can't open output file %s:can't open pagecan't rewind file %s:characters received while sendingconnecteddial command faileddialing %sefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingsexec() call failed:executing command /bin/sh -c %sfailed page %sfax call answeredfax device write error:file write:finished - %sflow control did not workheader:incompatible local and remote capabilitiesincorrect quality (-q) argument (%s)internal errorinvalid modem responselocal ID (%s) has non-standard characterslocal ID (%s) truncated to %d characterslocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxmodem response in datano answer from remote faxno command or response from remoteno getty command defined for data callno response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceivedreceived %d lines with %d errorsreceived short frame (%d bytes)reception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremote has one or more documents to send.removed file: %srun length buffer overflowsentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent page %ssuccesssync: modem not respondingterminated by signaltimed out after command: %stimed out after waitingtoo many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing %s in class %susing line buffering of stdoutvoice call answeredwaiting for activitywrong response after command: %swrong response after waitingwrong response to command to receive a frameProject-Id-Version: efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2007-03-11 01:00+0200 Last-Translator: ta_panta_rei Language-Team: Greek MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Προσοχή: Με αυτό το φαξ θα διαγραφεί μόνιμα από το σύστημα) *** Διακοπή διαδικασίας αποστολής/λήψης *** Λήψη φαξ -------- Υποστηρίζονται τρείς τρόποι λήψης φαξ. Πρώτος, το πρόγραμμα μπορεί να απαντήσει σε μία εισερχόμενη κλήση φαξ, όσο το τηλέφωνο κουδουνίζει, πατώντας το πλήκτρο "Απάντηση κλήσης". Δεύτερος, το πρόγραμμα μπορεί να αναλάβει μία κλήση που έχει ήδη απαντηθεί, δηλαδή κάποιος έχει ήδη σηκώσει το ακουστικό, πατώντας το πλήκτρο "Ανάληψη κλήσης". Τρίτος, το πρόγραμμα μπορεί να τεθεί σε κατάσταση αναμονής, πατώντας το πλήκτρο "Σε αναμονή". Με αυτόν τον τρόπο, το πρόγραμμα θα απαντήσει αυτόματα σε εισερχόμενες κλήσεις μετά από ένα αριθμό κουδουνισμάτων που έχει καθοριστεί. (Δείτε και την επιλογή `Αρχείο/Ρυθμίσεις' στο μενού). Το πρόγραμμα θα συνεχίσει να περιμένει και να λαμβάνει φαξ, μέχρι να πατηθεί το πλήκτρο "Διακοπή". Τα ληφθέντα φαξ μπορούν να τυπωθούν, προβληθούν, περιγραφούν και διαχειριστούν με την ενσωματωμένη λειτουργία καταλόγου φαξ. Αυτή εμφανίζεται επιλέγοντας `Αρχείο/Κατάλογος ληφθέντων φαξ' στο μενού. Δείτε επίσης το κεφάλαιο "Χρήση του βιβλίου διευθύνσεων" παρακάτω. Όταν λαμβάνεται ένα φαξ, μπορεί από την επιλογή `Ρυθμίσεις' του μενού να ρυθμισθεί το πρόγραμμα, ώστε να εμφανίζεται ένα αναδυόμενο παράθυρο. Επίσης από την επιλογή `Ρυθμίσεις' του μενού μπορεί να ρυθμισθεί το πρόγραμμα, ώστε να εκτελείται κάποιο πρόγραμμα (π.χ.. αναπαραγωγή κάποιου μουσικού αρχείου, ή αποστολή μηνύματος ηλ. ταχυδρομείου σε κάποιον χρήστη) όταν λαμβάνεται ένα φαξ. Στο εκτελούμενο πρόγραμμα περνιέται ως πρώτο (και μοναδικό) όρισμα το όνομα του υποκαταλόγου στον κατάλογο $HOME/faxin, στον οποίο αποθηκεύθηκε το ληφθέν φαξ. (Η διανομή του πηγαίου κώδικα του προγράμματος περιέχει δύο τέτοια προγράμματα - που δεν εγκαθίστανται αυτόματα - τα οποία μπορούν να χρησιμοποιηθούν για την αυτόματη εκτύπωση ή αποστολή με ηλ. ταχυδρομείο του ληφθέντος φαξ.) Αποστολή φαξ ------------ Για να αποστείλετε ένα φαξ, εισάγετε το όνομα του αρχείου στο πεδίο "Φαξ προς αποστολή". Πρέπει να είναι σε μορφοποίηση PostScript/PDF (που μπορούν να παράγουν όλα τα προγράμματα επεξεργασίας κειμένου και εικόνας στο Linux/Unix), και θα μετατραπεί αυτόματα από το πρόγραμμα σε μορφοποίηση tiffg3 που είναι κατάλληλη για φαξ. Υπάρχουν δύο τρόποι εισαγωγής αρχείων φαξ: Πρώτος, το φαξ είναι σε ένα αρχείο του συστήματος. Τότε απλά εισάγετε το όνομά του στο πεδίο "Φαξ προς αποστολή", ή επιλέξτε το με τον επιλογέα αρχείων. (Για ευκολία στο ψάξιμο, μπορείτε να βάζετε τα προς αποστολή αρχεία PostScript/PDF στον κατάλογο $HOME/faxout σας) Εάν το προς αποστολή φαξ αποτελείται από ένα αρχείο μόνο, μπορείτε να το βρείτε με την πλήκτρο "Ένα αρχείο". Αν αποτελείται από περισσότερα αρχεία, πατήστε το πλήκτρο "Πολλά αρχεία", και προσθέστε στο πεδίο τα αρχεία, ένα ένα, με τη σειρά που θέλετε να εμφανιστούν στο φαξ που θα λάβει ο παραλήπτης. Μπορείτε να αλλάξετε τη σχετική σειρά των προς αποστολή αρχείων με τα πλήκτρα Πάνω και Κάτω στο πληκτρολόγιο, ή με τη διαδικασία Σύρε-Άφησε του ποντικιού. Δεύτερος, το φαξ να ληφθεί απ' ευθείας από το πρόγραμμα εκτύπωσης μέσω ενός εξυπηρετητή υποδοχέα που παρέχει το πρόγραμμα efax-gtk. Το efax-gtk διατηρεί έναν κατάλογο των φαξ που βρίσκονται στην ουρά του εξυπηρετητή υποδοχέα, ο οποίος μπορεί να ελεγχθεί επιλέγοντας "Υποδοχέας" σαν μέθοδο εισαγωγής φαξ, και μετά πιέζοντας το πλήκτρο "Κατάλογος υποδοχέα". Αυτός ο τρόπος είναι περισσότερο βολικός για την αποστολή φαξ, απ' ευθείας από μέσα από προγράμματα επεξεργασίας κειμένου επιλέγοντας τον κατάλληλο (ψευδο)εκτυπωτή. Αν υπάρχουν φαξ στην ουρά του εξυπηρετητή, ένας μικρός κόκκινος κύκλος εμφανίζεται στο κύριο παράθυρο του προγράμματος δεξιά από το πεδίο "Φαξ προς αποστολή". Για λεπτομέρειες σχετικά με τη ρύθμιση των προγραμμάτων CUPS ή lpr/lprng για να στέλνουν στο efax-gtk, δέστε το αρχείο README που διανέμεται μαζί με το πρόγραμμα Ο αριθμός του τηλεφώνου προς το οποίο θα σταλεί το φαξ εισάγεται στο πεδίο "Τηλ. αριθμός". Μπορείτε είτε να εισάγετε το νούμερο απ' ευθείας ή να συμβουλευτείτε το ενσωματωμένο βιβλίο διευθύνσεων. Το βιβλίο διευθύνσεων εμφανίζεται πατώντας το πλήκτρο "Τηλ. αριθμός", ή επιλέγοντας `Αρχείο/Βιβλίο Διευθύνσεων' από το πτυσσόμενο μενού (δείτε επίσης και το κεφάλαιο Βιβλίο Διευθύνσεων στη Βοήθεια). Αν η τηλεφωνική κλήση έχει ήδη γίνει από σας και η γραμμή έχει ήδη συνδεθεί με το άλλο μόντεμ (χειρωνακτική κλήση) μπορείτε να αφήσετε το πεδίο "Τηλ. αριθμός" κενό (κι ένα παράθυρο διαλόγου θα σας ζητήσει να το επιβεβαιώσετε) Όταν κάποιο φαξ ληφθεί από το σύστημα εκτύπωσης μέσω του εξυπηρετητή υποδοχέα προς αποστολή, το πρόγραμμα μπορεί να ρυθμιστεί ώστε να εμφανίζει ένα αναδυόμενο παράθυρο αυτόματα. Αν το πρόγραμμα είναι ανενεργό ή σε κατάσταση αναμονής λήψης, το φαξ που έστειλε το σύστημα εκτύπωσης μπορεί να σταλεί απ' ευθείας, χωρίς να χρειάζεται να πάτε στον κατάλογο φαξ στην ουρά του εξυπηρετητή και να το στείλετε από εκεί. Όσα φαξ σταλούν επιτυχώς αντιγράφονται στον κατάλογο $HOME/faxsent σας, με όνομα που προκύπτει από το έτος, μήνα, μέρα, ώρα, λεπτά και δευτερόλεπτα της ώρας ολοκλήρωσης αποστολής, και εμφανίζονται στο κατάλογο απεσταλμένων φαξ. Σε αυτό τον κατάλογο βρίσκονται μόνο όσα φαξ έχουν σταλεί χωρίς σφάλματα. Το πεδίο εμφάνισης μηνυμάτων από το efax δείχνει την πρόοδο της αποστολής του φαξ. Ο κατάλογος φαξ μπορεί να εμφανιστεί επιλέγοντας `Αρχείο/Κατάλογος' από το πτυσσόμενο μενού. (Δείτε επίσης και το κεφάλαιο Χρήση των καταλόγων φαξ στη Βοήθεια) Ρυθμίσεις --------- Οι ρυθμίσεις του προγράμματος μπορούν να αλλαχθούν με διόρθωση των αρχείων ρυθμίσεων του προγράμματος efax-gtk. Τα αρχεία αυτά, κατά σειρά προτεραιότητας από το πρόγραμμα, είναι τα $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc και /etc/efax-gtkrc. Επομένως το αρχείο $HOME/.efax-gtkrc έχει προτεραιότητα έναντι των άλλων δύο. Το αρχείο ρυθμίσεων μπορεί επίσης να αλλαχθεί επιλέγοντας `Ρυθμίσεις' στο μενού `Αρχείο/Ρυθμίσεις' του πτυσσόμενου μενού. Οι όποιες ρυθμίσεις αλλάξουν με αυτό τον τρόπο σώζονται πάντα στο αρχείο $HOME/.efax-gtkrc. Επομένως, μπορείτε αν έχετε αλλάξει κάποιες ρυθμίσεις να επανέλθετε στις αρχικές ρυθμίσεις είτε διαγράφοντας το αρχείο $HOME/.efax-gtkrc, είτε πατώντας το πλήκτρο `Επαναφορά' (στην δεύτερη περίπτωση οι ρυθμίσεις είναι αυτές που θα φορτωθούν εκ νέου από τα αρχεία $sysconfdir/efax-gtkrc και /etc/efax-gtkrc. Βοήθεια για τις ρυθμίσεις παρέχεται στο παράθυρο `Ρυθμίσεις' διατηρώντας το ποντίκι πάνω από το αντίστοιχο πλήκτρο βοηθείας (;) για να εμφανιστεί μία σύντομη περιγραφή, ή πατώντας το αντίστοιχο πλήκτρο βοηθείας για να εμφανιστεί το κείμενο βοηθείας. Χρήση του βιβλίου διευθύνσεων ----------------------------- Για να χρησιμοποιήσετε έναν αριθμό τηλεφώνου από το βιβλίο διευθύνσεων, επιλέξτε την αντίστοιχη διεύθυνση πατώντας το αριστερό πλήκτρο του ποντικιού πάνω της, και μετά πατήστε το πλήκτρο "OK". Μπορείτε να προσθέσετε διευθύνσεις στο βιβλίο διευθύνσεων πατώντας το πλήκτρο προσθήκη και μετά συμπληρώνοντας τα πεδία που θα εμφανιστούν. Για να διαγράψετε μία διεύθυνση από το βιβλίο διευθύνσεων επιλέξτε την αντίστοιχη διεύθυνση πατώντας το αριστερό πλήκτρο του ποντικιού πάνω της, και μετά πατήστε το πλήκτρο διαγραφή (κάδος απορριμμάτων). Το βιβλίο διευθύνσεων μπορεί να ταξινομηθεί χρησιμοποιώντας τα πλήκτρα Πάνω και Κάτω στο πληκτρολόγιο, αφού έχετε επιλέξει κάποια διεύθυνση, ή με τη διαδικασία Σύρε-Άφησε του ποντικιού. Χρήση των καταλόγων φαξ ----------------------- Για να χρησιμοποιήσετε τη λειτουργία καταλόγων φαξ, από την επιλογή `Αρχείο' του μενού, επιλέξτε `Κατάλογος ληφθέντων φαξ' ή `Κατάλογος απεσταλμένων φαξ'. Επιλέξτε στη συνέχεια το φαξ που θέλετε να δείτε ή να τυπώσετε πατώντας πάνω του το αριστερό πλήκτρο του ποντικιού. Τα προγράμματα που χρησιμοποιούνται για την εκτύπωση και προβολή των φαξ περιέχονται στο αρχείο ρυθμίσεων του προγράμματος και ορίζονται συμπληρώνοντας τα αντίστοιχα πεδία στην επιλογή `Ρυθμίσεις' του μενού. Αν αφεθούν κενά, χρησιμοποιούνται προκαθορισμένες τιμές, που δουλεύουν για τα περισσότερα Linux/Unix συστήματα. Για την εκτύπωση φαξ, η παράμετρος Συρρίκνωση Εκτύπωσης που περιέχεται στο αρχείο ρυθμίσεων του προγράμματος και ορίζεται συμπληρώνοντας το αντίστοιχο πεδίο στην επιλογή `Ρυθμίσεις/Εκτύπωση' του μενού, επιτρέπει τη σμίκρυνση του φαξ ώστε αυτό να χωρά στην εκτυπούμενη επιφάνεια της σελίδας του εκτυπωτή. Η τιμή 98 δουλεύει για τους περισσότερους εκτυπωτές. Στο ληφθέν φαξ μπορεί να προστεθεί κάποια περιγραφή (ή σχόλιο) όταν το φαξ επιλέγεται στη λειτουργία καταλόγων φαξ. Η περιγραφή αυτή (η οποία μπορεί να διορθωθεί αργότερα πατώντας το πλήκτρο "Διόρθωση") κάνει την ταυτοποίηση των ληφθέντων φαξ ευκολότερη. Σφάλμα: Προειδοποίηση: από τον κατάλογο; ελήφθη στον υποδοχέα. Να αποσταλεί το φαξ ή να μπει στην ουρά; ή ελήφθηκαν %d χαρακτήρες αναμένοντας για αποστολή%s κλειδωμένο ή κατειλημμένο - αναμονή;Ένα φαξ ελήφθη από το efax-gtkΤο πρόγραμμα προβολής PostScript χρησιμοποιείται για την προβολή φαξ από τους καταλόγους απεσταλμένων και ληφθέντων φαξ, καθώς και για την προβολή φαξ μέσω του επιλογέα αρχείων στην εντολή "Αρχεία προς αποστολή". Εισάγετε εδώ την εντολή που απαιτείται για την προβολή αρχείων PostScript. Αν αφεθεί κενό, θα χρησιμοποιηθεί το 'gv'. Μπορείτε για το 'gv' να προσθέσετε την επιλογή '-media A4', για σελίδες μεγέθους A4. Άλλα προγράμματα που πιθανόν να υπάρχουν στο σύστημά σας και μπορούν να χρησιμοποιηθούν είναι το 'evince' (για Gnome) ή 'kghostview' (για KDE)Μία εργασία εκτύπωσης ελήφθη επιτυχώς στον υποδοχέαΣχετικά με το _efaxΣχετικά με το efax_Σχετικά με το efax-gtkΣχετικά με το efax-gtkΑποδοχήΠροσθήκη αρχείων στον κατάλογοΠροσθήκη αρχείων στον κατάλογο φαξ προς αποστολήΠροσθήκη νέας διεύθυνσηςΠροσθήκη νέου καταλόγουΠροσθήκη/διόρθωση περιγραφής επιλεγμένου φαξΒιβλίο ΔιευθύνσεωνΔιευθύνσεις που επιτρέπεται να συνδεθούνΘα χρησιμοποιηθεί η προκαθορισμένη ανάλυση 204x196 Θα χρησιμοποιηθεί το προκαθορισμένο μέγεθος σελίδας a4 Θα χρησιμοποιηθεί η προκαθορισμένη εντολή προβολής PostScript 'gv' Απάντηση κλήσηςΑπάντηση κλήσηςΑυτόματαΑδυναμία αλλαγής ρυθμίσεων όταν το πρόγραμμα δεν είναι ανενεργό Πατήστε το πλήκτρο Διακοπή για να γίνει ανενεργόΑδυναμία αποστολής φαξ - ένα άλλο φαξ λαμβάνεται Δυνατότητες: Επιλογή φαξ για αποστολήΚλάση 1Κλάση 2Κλάση 2.0Κλείσιμο υποδοχέα Σφάλμα ΡυθμίσεωνΠνευματική ιδιοκτησία (C) 2001 - 2011 Chris Vine Αυτό το πρόγραμμα διανέμεται σύμφωνα με την άδεια χρήσης GNU General Public License, έκδοση 2 Διαγραφή διεύθυνσηςΔιαγραφή καταλόγου: Να διαγραφεί η επιλεγμένη διεύθυνση;Διαγραφή επιλεγμένου φαξΔιαγραφή επιλεγμένου καταλόγουΠεριγραφήΣύστημα Κλήσης: Αποδέχεστε τους Όρους Χρήσης που εμφανίζονται παραπάνω;Αδειάστε τον κατάλογο διαγράφοντας όλους τους υποκαταλόγους και μεταφέροντας ή διαγράφοντας όλα τα φαξ που αυτός περιέχει, πριν να διαγράψετε τον κατάλογοΆδειασμα κάδου απορριμμάτωνΝα αδειάσει ο κάδος απορριμμάτων; (Προσοχή: Με αυτό όλα τα φαξ στον κατάλογο Απορρίμματα θα διαγραφούν μόνιμα από το σύστημα)Εισαγωγή _Πολλών αρχείωνΕισάγετε επιλεγμένο φαξ για αποστολήΕισαγωγή ρυθμίσεων από Εκτέλεση προγράμματος ή σεναρίου όταν λαμβάνεται φαξ από το μόντεμΚατάλογοι ΦαξΠεριγραφή φαξ;Μέθοδος εισαγωγής φαξ: Φαξ προς αποστολήΑρχείο Το αρχείο δεν υπάρχει Αρχεία προς αποστολήΥψηλήΚατάλογοςΤο όνομα του καταλόγου δεν μπορεί να περιέχει το χαρακτήρα: Όνομα καταλόγου; (Προσοχή: θα τοποθετηθεί στο κορυφαίο επίπεδο και μπορεί να μεταφερθεί σε άλλους καταλόγους)ΤαυτότηταΑνενεργόΕισερχόμεναΠαράμετροι Αρχικοποίησης:Ορίστηκε μη έγκυρος κατάλογος εργασίας WORK_SUBDIR. Θα αγνοηθεί Ορίστηκε μη έγκυρο σύστημα κλήσηςΟρίστηκε μη έγκυροo σύστημα κλήσης Θα χρησιμοποιηθεί το προκαθορισμένο τονικό σύστημα κλήσης Ορίστηκε μη έγκυρη ανάλυση φαξ Θα χρησιμοποιηθεί η προκαθορισμένη ανάλυση 204x196 Ορίστηκε μη έγκυρη κλάση μόντεμΟρίστηκε μη έγκυρη κλάση μόντεμ Θα χρησιμοποιηθεί η προκαθορισμένη κλάση 2 Μη έγκυρη επιλογή. Οι επιλογές είναι: Ορίστηκε μη έγκυρο μέγεθος σελίδαςΟρίστηκε μη έγκυρο μέγεθος σελίδας Θα χρησιμοποιηθεί το προκαθορισμένο μέγεθος σελίδας a4 Μη έγκυρος αριθμός πόρτας για τον εξυπηρετητή υποδοχέα (πρέπει να είναι μεταξύ 1024 και 65535). Έτσι ο εξυπηρετητής δεν θα εκκινηθεί Ορίστηκε μη έγκυρη παράμετρος συρρίκνωσης εκτύπωσηςΟρίστηκε μη έγκυρη συρρίκνωση εκτύπωσης. Θα χρησιμοποιηθεί η προκαθορισμένη τιμή 100 Ορίστηκε μη έγκυρος αριθμός κουδουνισμάτων Θα απαντηθεί η κλήση μετά από ένα κουδούνισμα Ορίστηκε μη έγκυρος αριθμός κουδουνισμάτωνΟρίστηκε μη έγκυρη ανάλυση φαξΟρίστηκε μη έγκυρος αριθμός θύρας υποδοχέα. Πρέπει να είναι μεταξύ 1024 και 65535Κατάλογος _Ληφθέντων φαξΚατάλογος ληφθέντων φαξΚατάλογος απεσταλμένων φαξΑρχείο για εξασφάλιση αποκλειστικής χρήσης: Αρχείο Καταγραφής: ΚαταγραφήΜόντεμΚλάση Μόντεμ: Μετακίνηση διεύθυνσης προς τα κάτωΜετακίνηση διεύθυνσης προς τα πάνωΜετακίνηση αρχείου προς τα κάτωΜετακίνηση αρχείου προς τα πάνωΠολλά αρχείαΌνομαΌνομα:Όνομα: Δεν ορίστηκε αριθμός τηλεφώνου. Επιθυμείτε να σταλεί το φαξ σε ήδη ανοιχτή σύνδεση;Δεν ορίστηκε αριθμός πόρτας για τον εξυπηρετητή υποδοχέα Έτσι ο εξυπηρετητής δεν θα εκκινηθεί Δεν ορίστηκε συσκευή σειριακής θύρας στο αρχείο ρυθμίσεων Μη έγκυρο όνομα αρχείου Μη έγκυρο αρχείο PostScript/PDF Προσοχή: πατώντας το πλήκτρο OK θα σωθούν οι ρυθμίσεις σε αρχείοΑριθμόςΑριθμός:Αριθμός: Άλλες Παράμετροι: Εργασία ΕκτύπωσηςΕργασία Εκτύπωσης: ΣελίδαΜέγεθος Σελίδας: ΠαράμετροιΝα διαγραφούν μόνιμα τα επιλεγμένα φαξ; Να διαγραφούν μόνιμα τα επιλεγμένα φαξ; (Προσοχή: Με αυτό τα φαξ θα διαγραφούν μόνιμα από το σύστημα)Εμφάνιση παραθύρου επιβεβαίωσης πριν την εκτύπωσηΕμφάνιση παραθύρου διαλόγου όταν λαμβάνεται φαξ από το μόντεμΕμφάνιση παραθύρου διαλόγου όταν λαμβάνεται φαξ στον υποδοχέαΘύρα προς την οποία να αποστέλλονται τα φαξ:Πρόγραμμα προβολής PostScript:Πατήστε το πλήκτρο F1 για βοήθειαΕκτύπωσηΠρόγραμμα Εκτύπωσης: Συρρίκνωση Εκτύπωσης (50-100):Εργασία εκτύπωσης ελήφθη στον υποδοχέα Εκτύπωση επιλεγμένου φαξΕκτύπωση επιλεγμένου φαξ;ΠαλμικόΕισάγετε τον κατάλογο δημιουργίας αρχείων αποκλειστικής χρήσης (αν αφεθεί κενό, θα χρησιμοποιηθεί το /var/lock)Εισάγετε τον αριθμό που θέλετε να εμφανίζεται στην επικεφαλίδα των αποστελλόμενων φαξ. Αυτός ο αριθμός θα δηλώνεται και ως αναγνωριστικό προς την άλλη συσκευή όταν λαμβάνονται φαξΕισάγετε τη σειριακή συσκευή στην οποία είναι συνδεμένο το μόντεμ χωρίς το /dev (αν αφεθεί κενό, θα χρησιμοποιηθεί το /dev/modem). Στο λίνουξ η πρώτη σειριακή συσκευή (COM1) ονομάζεται ttyS0, η δεύτερη (COM2) ονομάζεται ttyS1, κ.ο.κ.)Ουρά φαξΦαξ στην _Ουρά από υποδοχέαΕργασίες εκτύπωσης στην ουράΈξοδοςΛήψηΣε κατάσταση αναμονής λήψηςΛήψηΑπόρριψηΑφαίρεση Διαγραφή αρχείουΔιαγραφή αρχείου Διαγραφή επιλεγμένου αρχείου από τον κατάλογοΕπαναφοράΠαράμετροι Επαναφοράς: Επαναφορά ρυθμίσεωνΚουδουνίσματα (1-9): Εκτέλεση εξυπηρετητή υποδοχέαΑποστολή φαξΑποστολήΑποστολή φαξΑνάλυση για αποστελλόμενα φαξ:ΑπεσταλμέναΣειριακή Συσκευή: ΡυθμίσειςΈνα αρχείοΥποδοχέαςΥποδοχέας Κατάλογος υποδοχέαΥποδοχέας εκτελείται στη θύρα Καθορίστε εδώ το μέγεθος σελίδας για τα φαξΚανονικήΣε αναμονήΣε αναμονή για απάντηση κλήσεωνΔιακοπήΑνάληψη κλήσηςΤηλ. αριθμός: Αριθμός τηλεφώνουΟ κατάλογος υπάρχει ήδη: Το πρόγραμμα εκκινήθηκε με την επιλογή -s, αλλά δεν υπάρχει γραμμή εργαλείων! Η ταυτότητα του απομακρυσμένου φαξ είναιΗ ταυτότητα του απομακρυσμένου φαξ είναι %sΜπορεί να χρησιμοποιηθεί για την προώθηση ορισμάτων στο πρόγραμμα efax. Δείτε και τη σελίδα οδηγιών του προγράμματος efax (με την εντολή man efax) για να μάθετε τι δυνατότητες υπάρχουν και για περισσότερες λεπτομέρειες. Εισάγετε όσες χρειάζονται, χωρίζοντάς τες με κενά. Για τα περισσότερα συνήθη μόντεμ μπορεί να αφεθεί κενόΚαθορίζει τον αριθμό κουδουνισμάτων πριν το μόντεμ απαντήσει σε μία κλήση όταν το πρόγραμμα είναι σε κατάσταση αναμονής. Επιτρεπτές τιμές από 1 έως 9. Αν αφεθεί κενό θα χρησιμοποιηθεί το 1Αυτό το πρόγραμμα θα χρησιμοποιηθεί για την εκτύπωση, και πρέπει να μπορεί να δέχεται εντολές PostScript στην κανονική είσοδό του. Αν αφεθεί κενό, θα χρησιμοποιηθεί το `lpr'Καθορίζει ένα αρχείο καταγραφής για τα μηνύματα προόδου κλήσης, χειραψίας με το άλλο μόντεμ, κατάστασης μόντεμ, διαγνωστικών και σφαλμάτων. Αν αφεθεί κενό δεν τηρείται κανένα αρχείο καταγραφής. (Αρχείο καταγραφής μπορεί επίσης να τηρείται με αναδρομολόγηση της κανονικής εξόδου και κανονικού σφάλματος του προγράμματος. Δείτε το αρχείο README για περισσότερες λεπτομέρειες)Καθορίζει αν θα εμφανίζεται αναδυόμενο παράθυρο διαλόγου όταν λαμβάνει φαξ το μόντεμ. Βάλτε x στο τετραγωνίδιο αν θέλετε τέτοιο παράθυροΤο πρόγραμμα αυτό είναι ένα αλληλεπιδραστικό περιβάλλον για το πρόγραμμα efax. Το πρόγραμμα efax είναι πνευματική ιδιοκτησία του Ed Casas και διανέμεται σύμφωνα με την άδεια χρήσης GNU General Public License, έκδοση 2.Καθορίζει τις εντολές `AT' για επαναφορά του μόντεμ στην αρχική κατάσταση. Εισάγετε όσες χρειάζονται, χωρίζοντάς τες με κενά, για εντολές που πρέπει να χωρίζονται, χωρίς την πρόθεση του `AT'. Αν αφεθεί κενό Θα χρησιμοποιηθεί το `Z', το οποίο δουλεύει πρακτικά με όλα τα μόντεμΚαθορίζει τις δυνατότητες του μόντεμ. Δείτε και τη σελίδα οδηγιών του προγράμματος efax (με την εντολή man efax) για περισσότερες επεξηγήσεις. Για εκδόσεις του προγράμματος efax 0.9 και άνω, μπορεί να αφεθεί κενό και οι δυνατότητες δηλώνονται από το ίδιο το μόντεμ. Για προηγούμενες εκδόσεις και για μόντεμ ταχύτητας 14.400 δοκιμάστε 1,5,0,2,0,0,0,0 ή για χαμηλότερης ταχύτητας 1,3,0,2,0,0,0,0Καθορίζει τις εντολές `AT' για αρχικοποίηση του μόντεμ σε κατάσταση φαξ. Εισάγετε όσες χρειάζονται, χωρίζοντάς τες με κενά, για εντολές που πρέπει να χωρίζονται, χωρίς την πρόθεση του `AT'. Αν αφεθεί κενό Θα χρησιμοποιηθεί το `Z &FE&D2S7=120 &C0 M1L0', το οποίο δουλεύει πρακτικά με όλα τα μόντεμΚαθορίζει τον αριθμό θύρας στην οποία θα ακούει ο εξυπηρετητής υποδοχέα.Καθορίζει την ανάλυση των αποστελλομένων φαξ. "Κανονική" σημαίνει 204x98 και "Υψηλή" σημαίνει 204x196Καθορίζει αν θα εμφανίζεται αναδυόμενο παράθυρο διαλόγου για επιβεβαίωση πριν την εκτύπωση όταν πατηθεί το πλήκτρο "Εκτύπωση επιλεγμένου φαξ" στον κατάλογο Ληφθέντων ή Απεσταλμένων φαξ. Αφαιρέστε το x από το τετραγωνίδιο αν δεν επιθυμείτε ερώτηση επιβεβαίωσης (π.χ.. αν έχετε ορίσει κάποιο πρόγραμμα διαχείρισης εκτυπώσεων, όπως το 'kprinter', στο πεδίο Πρόγραμμα Εκτύπωσης)Καθορίζει αν θα εμφανίζεται αναδυόμενο παράθυρο διαλόγου όταν λαμβάνει φαξ ο εξυπηρετητής υποδοχέα από το σύστημα εκτύπωσης. Βάλτε x στο τετραγωνίδιο αν θέλετε τέτοιο παράθυρο (πρέπει προφανώς να έχετε επιλέξει και την Εκτέλεση Εξυπηρετητή Υποδοχέα). Αν το πρόγραμμα είναι ανενεργό, το φαξ μπορεί να σταλεί απ' ευθείας από αυτό το αναδυόμενο παράθυροΚαθορίζει αν κάποιο πρόγραμμα ή σενάριο θα εκτελείται όταν λαμβάνει φαξ το μόντεμ. Βάλτε x στο τετραγωνίδιο αν θέλετε να εκτελείται, και εισάγετε το όνομα του προγράμματοςΚαθορίζει αν θα εκτελεστεί ένας εξυπηρετητής υποδοχέα για σύστημα εκτυπώσεων CUPS ή άλλο αντίστοιχο. Βάλτε x στο τετραγωνίδιο θέλετε να εκτελεστείΚαθορίζει αν θα χρησιμοποιηθεί τονικό ή παλμικό σύστημα κλήση κατά την αποστολή φαξΚαθορίζει το ποσοστό στο οποίο θα συρρικνωθεί η προς εκτύπωση σελίδα για να χωρά στην εκτυπώσιμη επιφάνεια του εκτυπωτή. Είναι ποσοστό επί τοις 100 -- π.χ. η τιμή 98 σημαίνει ότι η σελίδα θα συρρικνωθεί στο 98% του αρχικού της μεγέθους. Αν αφεθεί κενό θα χρησιμοποιηθεί το 100, δηλαδή καμμία συρρίκνωσηΤονικόΑπορρίμματαΑΓΝΩΣΤΟΧρήση: efax-gtk [επιλογές] [όνομα_αρχείου] Επιλογές: -r Εκκίνηση προγράμματος σε κατάσταση αναμονής κλήσης -s Εκκίνηση προγράμματος κρυμμένου στη γραμμή εργασιών Δείτε το αρχείο README το οποίο διανέμεται μαζί με το πρόγραμμα για περισσότερες λεπτομέρειες Ο χρήστης δεν έχει άδεια να διαβάσει αυτό το αρχείο ΠροβολήΠροβολή επιλεγμένου φαξΠροβολή επιλεγμένου αρχείουΕπιλέξτε "Αυτόματα" και το efax (από την έκδοση 0.9 και πάνω) θα βρει μόνο του την κλάση του μόντεμ. Αν δεν δουλέψει, επιλέξτε αυτό που αντιστοιχεί στο μόντεμ σας_Βιβλίο διευθύνσεωνΕισαγωγή _Ενός αρχείου_Αρχείο_ΒοήθειαΚατάλογος _Απεσταλμένων φαξΈ_ξοδος_Ρυθμίσεις_Μεταφράσειςμη κανονικός τερματισμός (κωδικός %d)ανιχνεύθηκε δραστηριότηταεκλήθηαδυναμία απάντησης: αδυναμία αποκλειστικής χρήσης της συσκευήςαδυναμία διαγραφής αρχείου %s:αδυναμία προσδιορισμού ποιά(ποιές) κλάση(εις) φαξ υποστηρίζει το μόντεμαδυναμία εύρεσης της μορφοποίησης του αρχείου %s:αδυναμία ανοίγματος του αρχείου %s:αδυναμία ανοίγματος για εγγραφή του αρχείου %s:αδυναμία ανοίγματος σελίδαςαδυναμία ξανατυλίγματος του αρχείου %s:λήψη χαρακτήρων κατά τη διάρκεια της αποστολήςσυνδέθηκεη εντολή κλήσης απέτυχεκαλείται το %sefax-gtk help: Δυνατότητεςefax-gtk help: Συσκευήefax-gtk help: Σύστημα Κλήσηςefax-gtk help: Εκτέλεση προγράμματος κατά τη λήψηefax-gtk help: Παράμετροι Αρχικοποίησηςefax-gtk help: Αρχείο Αποκλειστικής Χρήσηςefax-gtk help: Αρχείο Καταγραφήςefax-gtk help: Κλάση Μόντεμefax-gtk help: Όνομαefax-gtk help: Αριθμόςefax-gtk help: Άλλες Παράμετροιefax-gtk help: Μέγεθος Σελίδαςefax-gtk help: Αναδυόμενα Παράθυραefax-gtk help: Θύραefax-gtk help: Πρόγραμμα Προβολής PostScriptefax-gtk help: Πρόγραμμα Εκτύπωσηςefax-gtk help: Συρρίκνωση Εκτύπωσηςefax-gtk help: Αναδυόμενο παράθυρο κατά τη λήψηefax-gtk help: Παράμετροι Επαναφοράςefax-gtk help: Κουδουνίσματαefax-gtk help: Εκτέλεση Εξυπηρετητή Υποδοχέαefax-gtk help: Ανάλυση Αποστελλόμενων Φαξefax-gtk help: Επιτρεπόμενες συνδέσεις στον υποδοχέαefax-gtk υποδοχέαςefax-gtk: efax-gtk: Προσθήκη διεύθυνσηςefax-gtk: Προσθήκη καταλόγουefax-gtk: Βιβλίο διευθύνσεωνefax-gtk: Όροι Χρήσηςefax-gtk: Διαγραφή διεύθυνσηςefax-gtk: Διαγραφή φαξefax-gtk: Διαγραφή καταλόγουefax-gtk: Περιγραφή φαξefax-gtk: Κατάλογος Αρχείωνefax-gtk: Αρχείο προς αποστολήefax-gtk: Βοήθειαefax-gtk: Εκτύπωση φαξefax-gtk: Φαξ στην ουρά από τον υποδοχέαefax-gtk: Κατάλογος ληφθέντων φαξefax-gtk: Αφαίρεση φαξ από την ουράefax-gtk: Κατάλογος απεσταλμένων φαξefax-gtk: Μεταφράσειςefax-gtk: Κατάλογος Απορρίμματαefax-gtk: φαξ ελήφθηefax-gtk: εργασία εκτύπωσης ελήφθη στον υποδοχέαefax-gtk: ρυθμίσειςαποτυχία κλήσης της exec():εκτέλεση εντολής /bin/sh -c %sαποτυχία για τη σελίδα %sκλήση φαξ απαντήθηκεσφάλμα εγγραφής στη συσκευή φαξ:εγγραφή σε αρχείο:ολοκλήρωση - %sο έλεγχος ροής δεν λειτούργησεκεφαλίδα:έλλειψη συμβατότητας δυνατοτήτων τοπικού και απομακρυσμένου φαξεσφαλμένο όρισμα (%s) για παράμετρο ποιότητας (-q)εσωτερικό σφάλμαμη έγκυρη απόκριση από το μόντεμΗ ταυτότητα του τοπικού φαξ (%s) περιέχει μη έγκυρους χαρακτήρεςΗ ταυτότητα του τοπικού φαξ (%s) αποκόπηκε στους %d χαρακτήρεςτοπικός η/υ υπερβολικά μακρά εντολή μόντεμ "%s"αποτυχίας εντολής μόντεμ (%s)αποτυχίας εντολής μόντεμτο μόντεμ δεν υποστηρίζει φαξαπόκριση του μόντεμ μέσα στα δεδομένακαμμία απάντηση από το απομακρυσμένο φαξκαμμία εντολή ή απόκριση από το απομακρυσμένο φαξδεν έχει ορισθεί εντολή getty για κλήσεις δεδομένωνκαμμία απόκριση από το μόντεμδεν έχει ορισθεί εντολή getty για φωνητικές κλήσειςΚατειλημμένη γραμμή ή το μόντεμ ήδη χρησιμοποιείταιη γραμμή είναι κατειλημμένηάνοιγμα %sάλλοιη σελίδα αποθηκεύθηκε στο %sελήφθηλήφθηκαν %d αράδες με %d σφάλματαελήφθη μη πλήρες πλαίσιο (%d bytes)σφάλματα λήψηςΤο απομακρυσμένο φαξ δεν μπορεί να λάβει, αλλά θα προσπαθήσω έτσι κι αλλιώςΤο απομακρυσμένο φαξ δεν έχει έγγραφα προς αποστολή και μπορεί να λάβειΤο απομακρυσμένο φαξ δεν έχει έγγραφα προς αποστολή και δεν μπορεί να λάβειΤο απομακρυσμένο φαξ δεν έχει έγγραφα προς αποστολή, αλλά θα προσπαθήσω έτσι κι αλλιώςΤο απομακρυσμένο φαξ έχει ένα ή περισσότερα έγγραφα προς αποστολή και μπορεί να λάβειΤο απομακρυσμένο φαξ έχει ένα ή περισσότερα έγγραφα προς αποστολή και δεν μπορεί να λάβειΤο απομακρυσμένο φαξ έχει ένα ή περισσότερα έγγραφα προς αποστολήδιαγραφή αρχείου: %sυπερχείλιση ενταμιευτήαπεσταλμέναστάλθηκαν %d+%d αράδες και %d+%d bytes, σε %d δευτερόλεπτα με %d bpsστάλθηκε η σελίδα %sεπιτυχίαsync: το μόντεμ δεν αποκρίνεταιτερματισμός από σήμαλήξη προθεσμίας μετά από εντολή: %sλήξη προθεσμίας κατά την αναμονήπάρα πολλές προσπάθειες επαναποστολής σελίδαςαδυναμία απάντησης της κλήσηςαπροσδόκητη απόκριση "%s"άγνωστη εντολήανεπανόρθωτο σφάλμαχρήση του %s σε κλάση %sχρήση ενταμιευτή γραμμής στην κανονική έξοδοφωνητική κλήση απαντήθηκεαναμονή για ανίχνευση δραστηριότηταςλανθασμένη απόκριση μετά από εντολή: %sλανθασμένη απόκριση μετά από την αναμονήλανθασμένη απόκριση σε εντολή λήψης πλαισίουefax-gtk-3.2.8/po/bg.po0000644000175000001440000026314211544574527011543 00000000000000# Bulgarian translation of Efax-gtk. # Copyright (C) 2001 Chris Vine # This file is distributed under the same license as the PACKAGE package. # Zdravko Nikolov , 2004. # # msgid "" msgstr "" "Project-Id-Version: efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2005-05-10 01:21+0100\n" "Last-Translator: Zdravko Nikolov \n" "Language-Team: Bulgarian Gnome Project\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Адресник" #: src/addressbook.cpp:122 msgid "Name" msgstr "Име" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Номер" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Добавяне на адрес" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Изтриване на адрес" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Преместване на адреса нагоре" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Преместване на адреса надолу" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Изтриване на избрания адрес?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: Изтриване на адрес" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: Добавяне на адрес" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Име:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Номер:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: Файл за факсиране" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Преглед" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: Условия, Забележки и Отказване от Права" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Приемам" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Отхвърлям" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "" "Приемате ли Условията, Забележките и Отказване от Права посочени по-горе?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "За efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "За efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Тази програма е графичен интерфейс на efax. efax е програма разпространявана " "под GNU General Public License, версия 2 от Ed Casas." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Неактивен" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Изпращане на факс" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Отговаряне на повикване" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "В очакване на повикване" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "Факсът не може да бъде изпратен - в момента се получава факс\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Невалидно име на файл\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "Файлът не съществува\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "Потребителят няма права за четене над файла\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "Невалиден Postscipt/PDF файл\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** Прекратяване на изпращаща/получаваща сесия ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "Разпечатваща задача" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Разпечатване на избрания факс" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Преглед на избрания факс" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Добавяне/изменение описанието на избрания факс" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Изтриване на избрания факс" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Изпразване на папката кошче" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Добавяне на нова директория" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Изтриване на избраната директория" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Листа получени факсове" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "Листа изпратени факсове" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Перманентно изтриване на факс?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(Внимание: факсът ще баде перманентно изтрит\n" "от файл системата)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Перманентно изтриване на избраните факсове?\n" "\n" "(Внимание: факсът ще баде перманентно изтрит\n" "от файл системата)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: Изтриване на факс" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Изпразване на папката кошче?\n" "\n" "(Внимание: Всички факсове в папката кошче\n" "ще бъдат перманентно изтрити от файл системата)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: Папка кошче" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: Добавяне на папка" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Изпразване на директория чрез изтриване на коя да е поддиректория\n" "и чрез drag-and-dropping или изтривайки факсовете\n" "съдържащи се в нея" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: Изтриване на директория" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Изтриване на директория:" #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Разпечатване на избрания факс?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: Разпечатване на факс" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: Факс описание" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Факс описание?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Име на директория?\n" "(Ще бъде сложена в топ\n" "нивото и може да бъде drag-and-dropped\n" "в други директории" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "Името на папката не може да съдържа букви" #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "Такава папка вече съществува" #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Директория" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Описание" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Кутия получени" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Кутия изпратени" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Кошче" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: Файл листа" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "Файлове за факсиране" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Преглед на избрания файл" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Отстраняване на избраня файл от листата" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Добавяне на файлове към листата за факсиране" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Добавяне на файлове към листата за факсиране" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Преместване на файла нагоре" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Преместване на файла надолу" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Отстраняване на файла " #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " от листата?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Отстраняване на файла" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Copyright (C) 2001 - 2011 Chris Vine\n" "Тази програма се разпространява под GNU General Public License, версия 2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Начин на използване: efax-gtk [опции] [име на файл]\n" "Опции:\n" "\t-r Стартиране на програмата в режим в очакване на получаване\n" "\t-s Стартиране на програмата в системния трей\n" "Виж фаила README който идва с дистрибуцията\n" "за допалнителна информация\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Невалидна опция. Опциите са:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "Избран е невалиден клас модем\n" "Възприемане на стандарт за клас 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "Не е посочено сериен порт устройство в " #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "Възприемане на стандартна факс резолюция 204x196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "Посочена е невалидна факс резолюция\n" "Възприемане на стандартна факс резолюция 204x196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "Посочен е невалиден брой позвънявания\n" "Отговорянето ще е след едно позвъняване\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "Използване на стандарт формат А4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "Посочен е невалиден формат на страница\n" "Ще използвам стандарт формат А4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "Избран е невалиден режим на избиране\n" "Ще използвам стандартен режим на избиране тон\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" "Посочена е невалидна стойност за умалителя не разпечатката: Ще използвам " "стандартната стойност 100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "Ще използвам стандартната команда за Postscipt гледане 'gv'\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "Не е посочен порт сокет сървър, сървърът няма да бъде стартиран\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "Посочен е невалиден порт сокет сървър, сървърът няма да бъде стартиран. " "Стойността трябва де е между 1024 и 65535\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "Избрана е невалидна WORK_SUBDIR:, WORK_SUBDIR: ще бъде игнорирана\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "Файл " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "Сокет " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Метод за въвеждане на факс: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "Единичен файл" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "Множество файлове" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Сокет листа" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Тел номер: " #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Изпращане на факс" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Отговаряне на повикване" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Приемане на повикване" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "В готовност" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Стоп" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Факс за изпращане" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "Листа _получени факсове" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "_Листа изпратени факсове" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "Наредени от сокета _факсове чакащи ред" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "_Въведи единичен файл" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "Въведи _множество файлове" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_Адресник" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Настройки" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_Изход" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "_За efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "За _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Language" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Помощ" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_Файл" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "Програмата е стартирана с -s опцията но нямя систем трей!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "Не е посочен факс номер. Да изпратя ли факса по отворена вразка?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Телефонен номер" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "Разпечатваща задача е получена от сокета" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk сокет" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "Получен е факс от efax-gtk" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: получен факс" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "Настройките не могат да се променят докато програмата е активна\n" "Натисни Стоп бутона за деактивиране на програмата" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Languages" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Натисни F1 за помощ" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "" #: src/settings.cpp:68 msgid "Name: " msgstr "Име: " #: src/settings.cpp:69 msgid "Number: " msgstr "Номер: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Серийно устроиство: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "Заключване на Файл: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "Възможности: " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Позвънявания (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Модем Клас: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Режим на избиране: " #: src/settings.cpp:211 msgid "Auto" msgstr "Автоматично" #: src/settings.cpp:213 msgid "Class 1" msgstr "Клас 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Клас 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Клас 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Тон" #: src/settings.cpp:235 msgid "Pulse" msgstr "Пулс" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Инициализиращи параметри:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "Първоначални параметри: " #: src/settings.cpp:510 msgid "Other Params: " msgstr "Други параметри: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Разпечатваща програма: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Разпечатващ умалител (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "Показване на потвърждаващ диалог преди разпечатка" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Програма за преглед на\n" "Postscript:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Задействане на сокет сървър" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Показване на диалог когато факс\n" "е получен от сокета" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "Порт на който факсовете\n" "да бъдат изпращани:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Адреси с позволена\n" "връзка" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "localhost " #: src/settings.cpp:1016 msgid "other" msgstr "други" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "Показване на диалог при получаване на факс от модема" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "Изпълнение на програма или скрипт при получаване на факс от модема" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "Резолюция на изпратените факсове:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "Стандартна" #: src/settings.cpp:1514 msgid "Fine" msgstr "Финна" #: src/settings.cpp:1767 msgid "Log File: " msgstr "Лог файл: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Рaзмер на страница: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: настройки" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Забележка: натискането на бутона ОК ще запази настройките вав файл" #: src/settings.cpp:1979 msgid "Reset" msgstr "Първоначални стойности" #: src/settings.cpp:2012 msgid "Identity" msgstr "Самоличност" #: src/settings.cpp:2015 msgid "Modem" msgstr "Модем" #: src/settings.cpp:2018 msgid "Params" msgstr "Параметри" #: src/settings.cpp:2021 msgid "Print" msgstr "Разпечатване" #: src/settings.cpp:2027 msgid "Socket" msgstr "Сокет" #: src/settings.cpp:2030 msgid "Receive" msgstr "Получи" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "Логин" #: src/settings.cpp:2039 msgid "Page" msgstr "Страница" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Конфигурационна грешка" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "Посочен е невалиден клас модем" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "Посочен е невалиден размер страница" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "Посочена е невалидна резолюция за изпратени факсове" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "Посочен е невалиден брой позвънявания" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "Посочен е невалиден режим на избиране" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "Посочен е невалиден параметър за разпечатващия умалител" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "Посочен е невалиден сокет порт номер. Трябва да е между 1024 и 65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "Задаване на настройки от " #: src/settings.cpp:3102 msgid " or\n" msgstr "или\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Задаване на първоначални настройки" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk помощ: Име" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "Постави тук номера който да се появи в заглавието на изпратените факсове. " "Това също така ще включи и оповестяването на ID-то на факс станцията на " "изпращащата факс машина при получаване на факс" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk помощ: Номер" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "Постави серийното устройство за което модемът е свързан тук (ако не е " "посочено такова, програмата използва /dev/modem). Не включвайте `/dev/' " "частав името на устойството -- примерно, посочете го като 'ttyS1' или " "`cua2', итн. В Линукс, ttyS0 е COM 1, ttyS1 е COM 2, итн." #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk помощ: Устройство" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "Постави тук директорията със заключени файлове. Ако не е посочена такава, " "програмата използва /var/lock" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk помощ: Заключи файл" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "С версия на efax-0.9 или по-висока, обикновено избери \"Auto\", като в този " "случай efax ще избере сам класа модем, но класа може да бъде ръчно избран " "като посочите някой от опоменатите в листсата. С версия efax-0.8 програмата " "избира стандартно клас 2, така че ако използвате модем клас 1 със стара " "версия на efax, посочете класа тук" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk помощ: Клас модем" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" "Определя дали тон или пулс избиране ще бъде използвано при изпращане на " "факове" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk помощ: Режим на избиране" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "Определя способностите на модема. За по-подробна информация задайте команда " "man efax', и вижте операциите на флага `-c'. С версия на efax-0.9 и модем " "клас 2, не се налага да посочвате стойности тъй като програмата получава " "нужната информация от модема. Ако използвате по-стара версия на efax или " "различен клас модем, тези стойности работят с почти всички 14,400 bps модеми " "- 1,5,0,2,0,0,0,0, или 1,3,0,2,0,0,0,0 за по-бавните" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk помощ: Способности" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "Определя броя на позвъняванията преди модема да отговори при режим - в " "готовност Валидните Стойности са между 1 и 9. Ако не е посочена стойност " "програмата използва 1" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk помощ: Позвънявания" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "Определя инициализиращите `AT' команди за модема при режим - факс Посочете " "толкова колкото са необходими, разделени със разтояние за команди които " "трябва да са разграничени, но без представка `AT'. Ако не са посочени " "такива, програмата използва `Z &FE&D2S7=120 &C0 M1L0', което е вярно за " "почти всички модеми" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk помощ: Инициализиращи параметри" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "Определя инициализиращите `AT' команди за възприемане на първоначалните " "параметри на модема. Посочете толкова колкото са необходими, разделени със " "разтояние, за команди които трябва да са разграничени, но без представка " "`AT'. Ако не са посочени такива, програмата използва`Z', което е вярно за " "почти всички модеми" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk помощ: Първоначални параметри" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "Тези могат да се използват за задаване на различни параметри на efax (задай " "команда `man efax' за да видиш опциите). Посочете толкова колкото са " "необходими, разделени с разтояние за различните параметри -- eg include `-" "or' за обръщане на бит по време на получаване за Multitech модеми. Оставете " "го празно ако нямате необичаен модем" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk помощ: Други параметри" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Това е командата която разпечатва и приема Postscipt данни като стандартни " "Ако такава не е посочена, програмата използва `lpr'" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk помощ: Разпечатваща програма" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Използва се за определяне на фактора за смаляване на страницата за " "разпечатка и се изразява в процент -- например 98 ще смали страницата до 98 " "процената от големината и. Ако не е посочена стойност, смаляването няма да " "се oсъществи" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk помощ: Разпечатващ умалител" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Определя дали да се появи потвърждаващ диалог преди разпечатване когато бъде " "натиснат бутона \"Разпечатване на избрания факс\". Оставете кутийката празна " "ако не желаете този диалог" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk помощ: Информационен диалог" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "Postscript viеwer Програмата се използва за преглед на получени и изпратни " "факс листи, и също така за преглед на факсове готови за изпращане достъпни " "чрез диалога за избор \"Фаилове за изпращане\". Посочи тук комадата за " "преглед на Postscript файлове Ако такава не е посочена, програмата ще " "използва 'gv'. Други вазможни са 'evince' (the Gnome image viewer) или " "'kghostview' (the KDE postscript viewer). Ако използвате gv, възможно е да " "трябва да посочите '-media A4' или '-media Letter' ggv и kghostview правят " "това автоматично" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk помощ: Postscript viеwer програма" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "Определя дали да включи сокет сървър за CUPS или друга разпечатваща " "система. Маркирай кутийката за да се включи" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "efax-gtk помощ: Включи Сокет сървър" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "Определя дали да се появи известие на екрана когато сокет сървъра получи " "факс от разпечатващата система. Маркирайте кутийката ако желаете известие " "(но само при положение че е маркирана и кутийката за пускане на сокет " "сървъра). Ако програмата е неактивна можете да изпратите факс директно чрез " "диалога на известието." #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "Определя номера на порта на който сокет сървъра приема данни." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk помощ: Порт" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "Определя дали и други адреси освен localhost и host името на компютара ви " "могат да се свързват със сокета. Освен ако нямате необичайни изисквания (в " "случай че CUPS или lpd демоните са на друга машина) , изберете localhost. " "Ако желаете други машини да се свързват, изберете \"други\" и посочете " "валидните hostnames на компютрите които ще имат достъп (резграничавайки " "различните hostnames с разтояние - не се налага да посочвате localhost " "иhostname на вашата машина, тъй като те винаги имат разрешен достъп). В " "случай че efax-gtk е зад защита/firewall използвайте \"други\"." #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "efax-gtk помощ: Позволени сокет връзки" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "Този параметър определя дали да се появи информационнен диалог когато факс е " "получен от модема. Тикнете кутийката ако желаете този диалог." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "efax-gtk помощ: Получи информационно известе" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "Определя дали да бъде изпълнена програма или скрипт когато факс е получен от " "модема. Тикнете кутийката ако искате да изпълните програма и въведете името и" #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "efax-gtk помощ: Изпълни програма при получаване на факс" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "Определя резолюцията на факсовете. \"Стандартна\" определя 204x98 и \"Финна" "\" определя 204x196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk помощ: Резолюция на изпратените факсове" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "Този параметър определя лог файл в който се завеждат всички процеси на " "преговори, факс статус, грешки и предупреждения. Ако такъв не е посочен, " "лог файл няма да бъде заведен. (лог файл може да бъде заведен чрез " "пренасочване на stdout и stderr -- виж README файла за повече информация)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "efax-gtk помощ: Лог файл" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "Посочете тук размера на факс страницата" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk помощ: Размер на страница" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: Помощ" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Изпращане" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Получаване" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Адресник" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Факс листи" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Настройки" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "Изпращане на факсове\n" "----------------\n" "\n" "Преди изпращане на факс, трябва да бъде посочено в \"Факс за изпращане\" " "прозореца. Трябява да е в postscript/PDF формат (форматът е продукт на " "всички Unix/Linux текстообработващи програми) и ще бъде преобразуван от " "програмата в правилния tiffg3 факс формат.\n" "\n" "Съществуват два начина за въвеждане на факс. При първият, факса за изпращане " "може да е файл запазен във файл системата. Може да бъде ръчно въведен във " "\"Факс за изпращане\" прозореца, или чрез диалога за избор на файл. Ако " "фаила е единичен postscript/PDF файл, то може да бъде намерен натискайки " "\"Единичен Файл\" бутона. Улеснение тук е ако файла се намира в $HOME/" "faxout директорията.\n" "\n" "Когато са посочени повече от един факс във \"Факс за изпращане\" прозореца, " "те ще бъдат изпратени като един факс по реда по който са въведени. Такива " "множество файлове могат лесно да бъдат въведени използвайки файл листа " "получена при натискане на \"Множество Файлове\"бутона. Натискането на бутона" "\"Множество Файлове\" позволява откриването и добавянето на файлове към файл " "листата, и пренареждането им чрез бутоните Нагоре и Надолу, или чрез " "dragging и dropping с мишката.\n" "\n" "Алтернативно, факсовете могат да бъдат получени директо от разпечатващата " "система чрез сокет сървъра на програмата. Efax-gtk поддържа листа на " "опашката от факсове получени от сокета, и достъпна чрез избиране на \"Сокет" "\" като метод за факс въжвждане, и после можете да видите опашката от " "факсове натискайки бутона \"Сокет Листа\" Това е по-удобния начин за " "изпращане на факс от текстообработваща програма, и позволява факса да бъде " "изпратен към efax-gtk чрез принтиране от текстообработващата програма. Факс " "който чака на опашка за изпращане в сокет листата се обозначава с червено " "кръгче от дясно на \"Факс за изпращане\" в главния прозорец на програмата. " "За специфичности на как да настроите CUPS или lpr/lprng да изпращат към " "efax-gtk, вижте файла README който идва с дистрибуцията.\n" "\n" "Телефонният номер на който искате де изпратите факс, трябва да бъде въвден в " "кутийката \"Teл номер\". Въвеждането може да стане директно, с помоща на " "вградения адресник. Адресника може да бъде повиканчрез натискане на бутона " "\"Teл номер\" , или от менюто 'Файл/Адресник'.Вижте \"Използване на адресника" "\" по-долу.\n" "\n" "Когато факс е получен от разпечатващата система чрез сокет сървъра," "настойките на програмата могат да бъдат конфигурирани така че автоматично да " "извикват диалога. Ако програмата е неактивна (не е в ражим очакване да " "получи факс) факса може да бъде изпратен директно чрез този диалог, без да " "се налага извикване на листата от факсове получени от сокета и чакащи на " "опашка.\n" "\n" "Успешно изпратените факсове биват копирани в директорията $HOME/faxsent, " "която получава име съобразно годината, месеца, деня, часа и секундите в " "които е приключило изпращането на факса, и се появяват в листста на " "изпратените факсове. Включването им в тази листа става само при условие че " "са изпратени без грешка. Информационният диалог на efax ще ви докладва за " "прогреса на изпращания факс. Факс листсата може да бъде извикана от менюто " "`Файл/Листа на изпратените факсове'. Вижте \"Използване на факс листите\" " "по-долу.\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "Получаване на факсове\n" "-------------------\n" "\n" "Съществуват три начина за получаване на факсове.\n" "\n" "В първият, програмата може да бъде настроена да отговаря на факс повикване " "чрез натискане на бутона \"Отговори на повикване\".\n" "\n" "Във вторият, програмата може да поеме контрол над повикване на което е " "отговорено (да речем, чрез телефонна слушалка) чрез натискане на бутона " "\"Поеми контрол над повикване\".\n" "\n" "В третият, програмата може да бъде поставена в режим на очакване чрез " "натискане на бутона \"В очакване\". Така програмата автоматично ще отговаря " "на повикване след посочения във файла efax-gtkrc брой позвънявания и ще " "получи факса. Програмата ще продължи да получава факсове докато не бъде " "натиснат бутона \"Стоп\".\n" "\n" "Получените факсове могат да бъдат разпечатвани, разглеждани и подреждани " "чрез вграденото факс лист ютилити. То може да бъде извикано от менюто `Файл/" "Листа получени факсове`. Виж по-долу.\n" "\n" "Възможно е да настроите програмата да извиква информационния диалог при " "получаване на факс (чрез диалога настройки). В диалога настройки можесъщо " "така да посочите програма която да бъде изпълнявана при получаване на факс. " "Номера на факса се задава като първи (и единствен) аргумент за програмата, " "което и позволява да го открие в $HOME/faxin. Дистрибуцията съдържа два " "изпълнителни скрипта, mail_fax и print_fax, които могат да се използват за " "автоматично изпращане или разпечатване на факса по e-mail, при неговото " "получаване. (Тези скриптове не биват инсталирани от 'make install' - ако " "желаете да ги използвате, направете ги изпълними с 'chmod +x' и ги копирайте " "в системна директория като /usr/local/bin, и след това посочете името на " "скрипта в диалога настройки.)\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "Използване на адресника\n" "--------------------------\n" "\n" "За да извикате номер от адресника, подчертайте желания адрес чрез натискане " "на левия бутон на мишката докато сте над него, и натиснете \"ОК\" бутона.\n" "Добавянето на адреси става чрез натискане на бутона добави, след което " "попълнете желаната информация в диалога. За да изтриете адрес го " "подчертайте, и натиснете бутона изтривам. Адресника може да бъде сортиран " "използвйки бутоните нагоре/надолу при подчертан адрес или чрез мишката (grag " "and drop).\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "Използване на факс листата\n" "----------------------\n" "\n" "За да извикате факс листата, изберете менюто `Файл' и посочете меню `Листа " "получени факсове' или `Листа изпратени факсове'. Изберете факса който " "искате да изпратите или видите като натиснете левия бутон на мишката. " "Програмите за разпечатване и гледане на факс се посочват в конфигурационния " "файл efax-gtkrc, или ако няма такива посочени, програмата ще разпечати " "използвайки lpr (което работи за повечето Unix системи) и гледа с gv.\n" "\n" "За разпечатване на факс, РАЗПЕЧАТВАЩ_УМАЛИТЕЛ параметър може да бъде посочен " "в efax-gtkrc,който позволява на факса да се вмести в принт маржина. " "Параметър от 98 е добре за повечето принтери. Параметъра може да бъде " "променян чрез извикване на диалога `Настройки' и въвеждайки го в кутийката " "`Разпечатване/Разпечатващ умалител'.\n" "\n" "Описание може да бъде добавено към получен факс чрез натискане на " "необходимия бутон -- с цел по-лесната им идентификация.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "Настройки\n" "-----------\n" "\n" "Настройките на програмата могат да бъдат променени ръчно чрез " "конфигурационния файл efax-gtk състоящ се от $HOME/.efax-gtkrc, $sysconfdir/" "efax-gtkrc или /etc/efax-gtkrc. Файла бива търсен в тази последователност, " "така че $HOME/.efax-gtkrc омаловажава другите два.\n" "\n" "Настройката на конфигурационния файл може да се извърши чрез диалога " "Настойки извикан от менюто 'Файл/Настройки'. Стойностите въведени чрез този " "диалог се запазват в $HOME/.efax-gtkrc. Ако сте използвали диалога Настойки " "и искате да върнете глобалните стойности, lизтрийте файла $HOME/.efax-gtkrc " "или натиснете бутона 'Първоначални Параметри' в диалога Настройки, което ще " "зареди параметрите от глобалния конфигурационнен файл ($sysconfdir/efax-" "gtkrc или /etc/efax-gtkrc).\n" "\n" "За да извикате помощ информация при попълване на настройките в диалога, " "задръжте курсора над желания бутон помощ (?), или го натиснете.\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "Сокет активен на порт " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "Разпечатваща задача получена на сокет\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: Факсове наредени на опашка от сокета" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "Разпечатващи задачи на опашка" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "Въвеждане на избрания факс за изпращане" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Посочване на избрания факс за изпращане" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "Разпечатваща задача: " #: src/socket_list.cpp:501 msgid "Remove " msgstr "Отстраняване" #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: Отстраняване на чакащ факс" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: разпечатваща задача е получена от сокета" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Нареждане на факс на опашка" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" " е получен от сокета.\n" "Да изпратя или наредя на опашка факса?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Листа получени факсове" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Листа изпратени факсове" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "В готовност" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Изход" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "" #: efax/efax.c:382 msgid "invalid modem response" msgstr "Посочен е невалиден клас модем" #: efax/efax.c:383 msgid "no response from modem" msgstr "" #: efax/efax.c:385 msgid "internal error" msgstr "" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "" #: efax/efax.c:419 msgid "DCS - session format" msgstr "" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "" #: efax/efax.c:430 msgid "MPS - not done" msgstr "" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "" #: efax/efax.c:436 msgid "EOP - done" msgstr "" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "" #: efax/efax.c:784 msgid "header:" msgstr "" #: efax/efax.c:868 msgid "characters received while sending" msgstr "" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "" #: efax/efax.c:915 msgid "flow control did not work" msgstr "" #: efax/efax.c:954 msgid "modem response in data" msgstr "" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "" #: efax/efax.c:1036 msgid "file write:" msgstr "" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "" #: efax/efax.c:1222 msgid "sent" msgstr "" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "" #: efax/efax.c:1291 msgid "frame error" msgstr "" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "" #: efax/efax.c:1391 msgid "received" msgstr "" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "" #: efax/efax.c:2216 msgid "called" msgstr "" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "" #: efax/efax.c:2224 msgid "number is busy" msgstr "" #: efax/efax.c:2226 msgid "dial command failed" msgstr "" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "" #: efax/efax.c:2306 msgid "activity detected" msgstr "" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "" #: efax/efax.c:2353 msgid "fax call answered" msgstr "" #: efax/efax.c:2356 msgid "voice call answered" msgstr "" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "" #: efax/efaxmsg.c:215 msgid " Error: " msgstr "Конфигурационна грешка" #: efax/efaxmsg.c:216 msgid " Warning: " msgstr "" #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "" #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Copyright (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ "Тази програма се разпространява под GNU General Public License, версия 2" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " конфигурационния файл\n" #~ "и /dev/modem не съществува\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " конфигурационен файл\n" #~ "Използване на стандартно устройство /dev/modem\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "Ще използвам стандартна команда за разпечатка 'lpr'\n" #~ msgid "Put the name to appear on the fax top header on sent faxes here" #~ msgstr "" #~ "Постави тук името което да се появи в заглавието на изпратените факсове" #~ msgid "From" #~ msgstr "От" #~ msgid "Refresh fax list" #~ msgstr "Презареждане на факс листата" #~ msgid "Fax" #~ msgstr "Факс" efax-gtk-3.2.8/po/de.gmo0000644000175000001440000005126611544574532011705 00000000000000oLB (Lu ~,#'  %0@OV%h&  #27^T*# ! +n8  B'{jpj6   &&gM#, 6?H:N8::On< X m       !!!! #!L.!#{!!!;!"""'" 6" @"L" Q"]"!d"g"")#'1#*Y########$/$C$ I$S$m$r$ z$$$ $ $$$$$ $%%_1%_%[%UM&c&' '' ')'>'G'W'`' ''' ''''''' ( (((%9(_(((((/)***4-* b*p***** * *****+*+E+U+!k+ ++ ++++",($,M,f,,,,,,,( -6-S-o--"-- --- .-$.R.k......."."/>/Z/r/////// 0 #0 /0=0$E0j0)y0 00001121N1 ]1g1m1~11161 11122$22W2r222 2?28 4$Y4~4 444/44&4-5 05 <5G5W5f5o5555575 +6#66Z6t6666M697:7I7a7i7 q7{7w7888.8J8!d8 8 8P88|9_99>: G:Q: b:o::::::#::a;({;;,; ;; <* <7<<R<@<3<"='====> > ">-><> B>P>c>u>>>>>> >R>"?9?$S?1x????? ???? @&@^:@@)@9@2A KAlAAAAA$AAB2B7BIBfB nB xB BB BB$B B$BC*C;CMCjiCnCCDnDy4EE EE EE EE F$F>FMFTF \FiFF F%FFFFF GG+GG G GG2HHHH.H ,I8IPIWI^IyIII!I IIIJ#!JEJ"^J&J JJ JJJ K%K*BKmKKKK!KKL%L%:L`L!~LLL$LL MM!7MYM9nMMMMM N N6NFN*[N N(NNN OO6ONOkOOOO OO/OP(P APNP!iP PPP#PQ Q)Q0Q KQUQjQ8qQQQQQQ%R+RBR[R sR!R4#@U9PI%7LF!"^ $uf)r  ] [80Kj|MOZ+CkTs3:B6h_vpVgmqGDR5;1Hb-n'Qd/(eAl XYcxo{=ia\ z* Nt.y~2> &w <}W,?ESJ` (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Error: Warning: from the list? or %d characters received while waiting to send?A fax has been received by efax-gtkA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAlbanian - Besnik Bleta Answer callAnswering callAutoBulgarian - Zdravko Nikolov Can't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Choose the selected fax for sendingClass 1Class 2Class 2.0Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?Empty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesExecute a program or script when fax received by modemFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)German - Steffen Wagner Greek - Hellenic Linux Users Group Hebrew - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentityInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Invalid Utf8 received in EfaxController::read_pipe_cb() Invalid Utf8 received in MainWindow::read_error_pipe_cb() Invalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid user name specified - it must be in plain ASCII characters. No user name will be shown on the fax top header line, but don't worry as the fax station number will always be given on the top header Italian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingModemModem Class: Move address downMove address upMove file downMove file upMultiple filesNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulseQueue faxQueued _faxes from socketQuitReceiveReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! SendSend faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSimplified Chinese - Kite Lau Single fileSocketSocket Socket listSocket running on port StandardStandbyStanding by to receive callsStopSwedish - Daniel Nylander Take over callTel number: Telephone numberThe following folder already exists: This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasToneTrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsabnormal termination (code %d)calledcan't delete file %s:can't get format of file %scan't open file %s:can't open output file %s:can't open pagecan't rewind file %s:characters received while sendingconnecteddial command faileddialing %sefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Sent Fax Resolutionefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: settingsexecuting command /bin/sh -c %sfailed page %sfax call answeredfax device write error:file write:finished - %sheader:incorrect quality (-q) argument (%s)internal errorlocal ID (%s) has non-standard characterslocalhost modem command "%s" too longmodem command (%s) failedmodem does not support faxno answer from remote faxno response from modemnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceivedremoved file: %ssentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent page %ssuccesssync: modem not respondingsync: sending escapestimed out after waitingtoo many %%d escapes in command (%s)too many page send retriesunexpected response "%s"using %s in class %susing line buffering of stdoutwrong response after command: %sProject-Id-Version: efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2006-01-07 23:57+0100 Last-Translator: Steffen Wagner Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (NOTE: Faxe werden dauerhaft vom Dateisystem gelöscht) *** Halte senden/empfangen an *** Fehler: Warnung: von der Liste? oder %d Zeichen empfangen während warten auf senden?Ein Fax wurde durch efax-gtk empfangenEin Druckauftrag wurde über Socket empfangenÜber _efaxÜber efaxÜber efax-_gtkÜber efax-gtkAnnehmenDateien zur Liste hinzufügenDateien zur Liste der zu faxenden Dateien hinzufügenNeue Adresse anfügenNeues Verzeichnis anlegenBeschreibung für ausgeähltes Fax anfügen/berichtigenAdressbuchFür Verbindungen erlaubte AdressenAlbanisch - Besnik Bleta Anruf beantwortenRückrufAutoBulgarisch - Zdravko Nikolov Änderungen erfodern inaktiven Programmstatus Drücken Sie Stop für inaktiv Fax kann nicht gesendet werden - ein Fax wurde empfangen Capabilities: Wähle zu sendendes FaxClass 1Class 2Class 2.0KonfigurationsfehlerCopyright (C) 2001 - 2011 Chris Vine Dieses Programm ist unter der GNU General Public Lizenz Version 2 veröffentlicht DatumAdresse löschenLösche OrdnerGewählte Adresse löschen?Lösche ausgewähltes FaxLösche ausgewähltes VerzeichnisBeschreibungWählmodus: Wollen Sie den obigen Bedingungen, Anmerkungen und Ausschlussklauseln zustimmen?Leeren des Ordners durch löschen aller Unterordner und drag-and-dropping oder löschen aller enthaltenen Faxe vor dem Löschen der OrdnerLeere PapierkorbLösche Papierkorb? (NOTE: Alle Faxe im Papierkorb werden dauerhaft vom Dateisystem gelöscht)_Mehrfache Dateien angebenProgramm oder Sript ausführen wenn Fax über Modem empfangen FaxlistenFaxbeschreibung?Faxeingang: Datei zum FaxenDatei Datei nicht vorhanden Dateien zum FaxenFeinOrdnerZeichen in Ordnername unzulässig: Name des Ordners? (Ordner wird in der obersten Ebene gespeichert an kann durch drag-and-drop in andere Ordner verschoben werden)Deutsch - Steffen Wagner Griechisch - Hellenic Linux Users Group Hebräisch - Assaf Gillat Ungarisch - Gergely Szakats, Laszlo Csordas IdentitätUntätigPosteingangBinde Faxempfängernummer in die KopfzeileInitialisations Parameter:Ungültige Utf8 empfangen in EfaxController::read_pipe_cb() Ungültiges Utf8 empfangen in MainWindow::read_error_pipe_cb() Ungültige Modem Class angegeben Geben Class 2 vor Ungültige Option. Optionen sind: Ungültiger Nutzername - nur ASCII-Zeichen sind zulässig. Der Nutzername wird nicht im Faxkopf angezeigt, aber immer die Faxnummer. Italienisch - Luca De Rugeriis Liste der _empfangenen FaxeListe empfangenen FaxeListe gesendeter FaxeLock File: Log File: ProtokollierenModemModem Class: Adresse nach untenAdresse nach obenDatei nach untenDatei nach obenMehrere DateienNameName:Name: Neue Faxe:Keine Faxnummer angegeben. Wollen Sie ein Fax über eine offene Verbindung senden?Kein serieller Anschluss angegebenKein gültiger Dateiname Keine gültige PostScript/PDF-Datei Note: Mit OK werden die Einstellungen gespeichertNummerNummer:Nummer: Weitere Parameter: DruckauftragDRUCK AUFTRAG: SeiteSeitengröße: ParameterAusgewählte Faxe dauerhaft löschen? Lösche ausgewählte Faxe entgültig? (NOTE: Faxe werden dauerhaft vom Dateisystem gelöscht)Polnisch - Pawel Suwinski Popup Bestätigungsdialog vor dem DruckenPopup Dialog öffnen wenn Fax über Modem empfangen wurdePopup Dialog wenn Fax über Socket empfangen wurdePort an den Faxe zu senden sind:Postscript Betrachter Programm:Für Hilfe F1 drückenDruckenDruckprogramm: Ausdruck verkleinern (50-100):Druckauftrag über Socket empfangen Drucke ausgewähltes FaxDrucke ausgewähltes Fax?PulsFax-WarteschlangeFax-Warteschlange vom SocketBeendenEmpfangenEmpfangenZurückweisenLösche Lösche DateiLösche Datei Lösche ausgewählte Datei von ListeZurücksetzenZähler für neue Faxe zurücksetzenEinstellungen zurücksetzenKlingeln (1-9): Run socket serverRussisch - Pavel Vainerman SERIOUS SYSTEM ERROR: Kann kein Verzeichnis für eingehendes Fax anlegen. Das Fax wird nicht gespeichert! SERIOUS SYSTEM ERROR: Kann kein Verzeichnis für eingehende Faxe anlegen. Faxe könne nicht empfangen werden! SERIOUS SYSTEM ERROR: Verzeichnis zur Speicherung gesendeter Faxe kann nicht angelegt werden. Dieses Fax wird nicht gespeichert! SERIOUS SYSTEM ERROR: Kann Verzeichnis für eingehende Faxe nicht öffnen. Dieses Fax wird nicht gespeichert! SERIOUS SYSTEM ERROR: Nicht alle eingegangenen Faxe können gespeichert werden. Alle oder Teile des Faxes werden fehlen! SendenFax sendenSendenSende FaxSende Faxauflösung:PostausgangSerielle Schnittstelle: EinstellungenVereinfachtes Chinesisch - Kite Lau Einzelne DateiSocketSocket Socket ListeSocket läuft auf Port StandardBereitschaftEmpfangsbereit für eingehende AnrufeStopSchwedisch - Daniel Nylander Anruf übernehmenTelefonnummer:TelefonnummerOrdner existiert bereits: Dieses Programm (efax-gtk) ist ein Frontend für efax. efax wurde unter der GNU General Public Lizenz Version 2 durch Ed Casas veröffentlicht.TonPapierkorbUNBEKANNTBenutzung: efax-gtk [Optionen][Dateiname] Optionen: -r Starten im Bereitschaftsmodus: Empfangen -s Starten mit verstecktem Systemablage Über weitere Einzelheiten siehe README Nutzer hat keine Berechtigung zum Lesen der Datei AnsichtBetrachte ausgewähltes FaxBetrachte ausgewählte DateiDie Umgebungsvariable $HOME ist nicht gesetzt _Adressbuch_Einzelne Datei angeben_Datei_Hilfe_Liste der gesendeten Faxe_Beenden_Einstellungen_Übersetzungenungewöhnlicher Abbruch (code %d)angerufenkann Datei nicht löschen %s:Dateiformat unbekannt %skann Datei nicht öffnen %s:kann Ausgabedatei nicht öffnen %s:Kann Seite nicht öffnenkann Datei nicht zurückspulen %s:Zeichen empfangen während des SendensverbundenWählversuch fehlgeschlagenwähle %sefax-gtk Hilfe: Ressourcenefax-gtk Hilfe: Gerätefax-gtk Hilfe: Wählmodusefax-gtk Hilfe: Faxkopfzeileefax-gtk Hilfe: Initialisierungs Parameterefax-gtk Hilfe: Lock Fileefax-gtk Hilfe: Modem Classefax-gtk Hilfe: Nameefax-gtk Hilfe: Nummerefax-gtk Hilfe: Weitere Parameterefax-gtk Hilfe: Seitengrößeefax-gtk Hilfe: Popupefax-gtk Hilfe: Portefax-gtk Hilfe: Postscript Betrachterefax-gtk Hilfe: Druckprogrammefax-gtk Hilfe: Druck verkleinernefax-gtk Hilfe: Reset Parameterefax-gtk Hilfe: Klingelnefax-gtk Hilfe: Sende Fax Auflösungefax-gtk socketefax-gtk: efax-gtk: Adresse hinzufügenefax-gtk: Verzeichnis hinzufügenefax-gtk: Adressbuchefax-gtk: Bedingungen, Anmerkungen und Ausschlussklauselnefax-gtk: Lösche Adresseefax-gtk: Lösche Faxefax-gtk: Lösche Ordnerefax-gtk: Faxbeschreibungefax-gtk: Dateilisteefax-gtk: Datei faxenefax-gtk: Hilfeefax-gtk: Drucke Faxefax-gtk: Faxe von Socket in Warteschlangeefax-gtk: Liste empfangener Faxeefax-gtk: Lösche Faxe aus Warteschlangeefax-gtk: Liste gesendeter Faxeefax-gtk: Übersetzungenefax-gtk: Papierkorbefax-gtk: Fax empfangenefax-gtk: Einstellungenausführen von /bin/sh -c %sFehlgeschlagene Seiten %sFaxanruf beantwortet Faxgerät Schreibfehler:Datei schreiben:beendet - %sKopf:Falsche Qualitätsangabe (-q) als Argument (%s)interner Fehlerlocal ID (%s) hat Nicht-Standard Zeichenlocalhost Modemkommando "%s" zu langModemkommando (%s) fehlgeschlagenModem unterstützt kein FaxmodusKeine Antwort von Gegenstellekeine Antwort vom ModemAnschluss besetzt oder Modem belegtAnschluss ist besetztgeöffnet %sandereSeite gespeichert unter %sempfangengelöschte Datei: %ssendensende %d+%d Zeilen und %d+%d bytes, in %d sek mit %d bpssende Seite %sErfolgsync: Modem antwortet nichtsync: sende EscapesZeit abgelaufen nachzu viele %%d Escapes in Kommando (%s)zu viele SendeversucheUnerwartete Antwort "%s"Verwende %s in class %sverwende Zeilenpuffer von stdoutFalsche Antwort nach Kommando: %sefax-gtk-3.2.8/po/de.po0000644000175000001440000017426711544574530011546 00000000000000# Germany german translation file # Copyright (C) 2001 to 2005 Chris Vine # This file is distributed under the same license as the efax-gtk package. # Chris Vine , 2001-2005. # # msgid "" msgstr "" "Project-Id-Version: efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2006-01-07 23:57+0100\n" "Last-Translator: Steffen Wagner \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Adressbuch" #: src/addressbook.cpp:122 msgid "Name" msgstr "Name" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Nummer" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Neue Adresse anfügen" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Adresse löschen" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Adresse nach oben" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Adresse nach unten" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Gewählte Adresse löschen?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: Lösche Adresse" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: Adresse hinzufügen" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Name:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Nummer:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: Datei faxen" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Ansicht" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: Bedingungen, Anmerkungen und Ausschlussklauseln" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Annehmen" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Zurückweisen" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "" "Wollen Sie den obigen Bedingungen, Anmerkungen und Ausschlussklauseln " "zustimmen?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "Über efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "Über efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Dieses Programm (efax-gtk) ist ein Frontend für efax. efax wurde unter der " "GNU General Public Lizenz Version 2 durch Ed Casas veröffentlicht." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Untätig" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Sende Fax" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Rückruf" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "Empfangsbereit für eingehende Anrufe" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "Fax kann nicht gesendet werden - ein Fax wurde empfangen\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Kein gültiger Dateiname\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "Datei nicht vorhanden\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "Nutzer hat keine Berechtigung zum Lesen der Datei\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "Keine gültige PostScript/PDF-Datei\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "Die Umgebungsvariable $HOME ist nicht gesetzt\n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" "SERIOUS SYSTEM ERROR: Kann kein Verzeichnis für eingehende Faxe anlegen.\n" "Faxe könne nicht empfangen werden!\n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** Halte senden/empfangen an ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" "SERIOUS SYSTEM ERROR: Kann kein Verzeichnis für eingehendes Fax anlegen.\n" "Das Fax wird nicht gespeichert!\n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" "SERIOUS SYSTEM ERROR: Kann Verzeichnis für eingehende Faxe nicht öffnen.\n" "Dieses Fax wird nicht gespeichert!\n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" "SERIOUS SYSTEM ERROR: Nicht alle eingegangenen Faxe können gespeichert " "werden.\n" "Alle oder Teile des Faxes werden fehlen!\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "Ungültige Utf8 empfangen in EfaxController::read_pipe_cb()\n" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" "SERIOUS SYSTEM ERROR: Verzeichnis zur Speicherung gesendeter Faxe kann nicht " "angelegt werden.\n" "Dieses Fax wird nicht gespeichert!\n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "Druckauftrag" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Drucke ausgewähltes Fax" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Betrachte ausgewähltes Fax" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Beschreibung für ausgeähltes Fax anfügen/berichtigen" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Lösche ausgewähltes Fax" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Leere Papierkorb" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Neues Verzeichnis anlegen" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Lösche ausgewähltes Verzeichnis" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "Zähler für neue Faxe zurücksetzen" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Liste empfangener Faxe" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: Liste gesendeter Faxe" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Ausgewählte Faxe dauerhaft löschen?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(NOTE: Faxe werden dauerhaft vom Dateisystem gelöscht)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Lösche ausgewählte Faxe entgültig?\n" "\n" "(NOTE: Faxe werden dauerhaft vom Dateisystem gelöscht)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: Lösche Fax" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Lösche Papierkorb?\n" "\n" "(NOTE: Alle Faxe im Papierkorb werden dauerhaft\n" "vom Dateisystem gelöscht)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: Papierkorb" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: Verzeichnis hinzufügen" # ############################## # cxc # ############################## #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Leeren des Ordners durch löschen aller\n" "Unterordner und drag-and-dropping oder löschen\n" "aller enthaltenen Faxe vor dem Löschen der Ordner" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: Lösche Ordner" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Lösche Ordner" #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Drucke ausgewähltes Fax?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: Drucke Fax" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "Neue Faxe:" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: Faxbeschreibung" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Faxbeschreibung?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Name des Ordners?\n" "(Ordner wird in der obersten Ebene gespeichert\n" "an kann durch drag-and-drop in andere Ordner verschoben\n" "werden)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "Zeichen in Ordnername unzulässig: " #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "Ordner existiert bereits: " #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Ordner" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "Datum" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Beschreibung" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Posteingang" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Postausgang" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Papierkorb" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: Dateiliste" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "Dateien zum Faxen" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Betrachte ausgewählte Datei" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Lösche ausgewählte Datei von Liste" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Dateien zur Liste hinzufügen" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Dateien zur Liste der zu faxenden Dateien hinzufügen" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Datei nach oben" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Datei nach unten" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Lösche Datei " #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " von der Liste?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Lösche Datei" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Copyright (C) 2001 - 2011 Chris Vine\n" "Dieses Programm ist unter der GNU General Public Lizenz Version 2 " "veröffentlicht\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Benutzung: efax-gtk [Optionen][Dateiname]\n" "Optionen:\n" "\t-r Starten im Bereitschaftsmodus: Empfangen\n" "\t-s Starten mit verstecktem Systemablage\n" "Über weitere Einzelheiten siehe README\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Ungültige Option. Optionen sind:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" "Ungültiger Nutzername - nur ASCII-Zeichen sind zulässig.\n" "Der Nutzername wird nicht im Faxkopf angezeigt, aber immer\n" "die Faxnummer.\n" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "Ungültige Modem Class angegeben\n" "Geben Class 2 vor\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "Kein serieller Anschluss angegeben" #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "Datei " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "Socket " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Faxeingang: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "Einzelne Datei" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "Mehrere Dateien" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Socket Liste" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Telefonnummer:" #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Fax senden" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Anruf beantworten" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Anruf übernehmen" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "Bereitschaft" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Stop" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Datei zum Faxen" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "Liste der _empfangenen Faxe" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "_Liste der gesendeten Faxe" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "Fax-Warteschlange vom Socket" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "_Einzelne Datei angeben" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "_Mehrfache Dateien angeben" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_Adressbuch" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Einstellungen" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_Beenden" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "Über efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "Über _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Übersetzungen" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Hilfe" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_Datei" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "" "Keine Faxnummer angegeben. Wollen Sie ein Fax über eine offene Verbindung " "senden?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Telefonnummer" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "Ein Druckauftrag wurde über Socket empfangen" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk socket" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "Ein Fax wurde durch efax-gtk empfangen" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: Fax empfangen" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "Änderungen erfodern inaktiven Programmstatus\n" "Drücken Sie Stop für inaktiv " #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "Italienisch - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "Polnisch - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "Bulgarisch - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "Russisch - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "Hebräisch - Assaf Gillat\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "Griechisch - Hellenic Linux Users Group\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "Albanisch - Besnik Bleta\n" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "Ungarisch - Gergely Szakats, Laszlo Csordas\n" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "Vereinfachtes Chinesisch - Kite Lau\n" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "Deutsch - Steffen Wagner\n" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "Schwedisch - Daniel Nylander\n" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Übersetzungen" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Für Hilfe F1 drücken" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "Ungültiges Utf8 empfangen in MainWindow::read_error_pipe_cb()\n" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "" #: src/settings.cpp:68 msgid "Name: " msgstr "Name: " #: src/settings.cpp:69 msgid "Number: " msgstr "Nummer: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Serielle Schnittstelle: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "Lock File: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "Capabilities: " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Klingeln (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Modem Class: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Wählmodus: " #: src/settings.cpp:211 msgid "Auto" msgstr "Auto" #: src/settings.cpp:213 msgid "Class 1" msgstr "Class 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Class 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Class 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Ton" #: src/settings.cpp:235 msgid "Pulse" msgstr "Puls" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Initialisations Parameter:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "" #: src/settings.cpp:510 msgid "Other Params: " msgstr "Weitere Parameter: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Druckprogramm: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Ausdruck verkleinern (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "Popup Bestätigungsdialog vor dem Drucken" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Postscript Betrachter\n" "Programm:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Run socket server" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Popup Dialog wenn Fax\n" "über Socket empfangen wurde" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "Port an den Faxe zu senden sind:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Für Verbindungen\n" "erlaubte Adressen" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "localhost " #: src/settings.cpp:1016 msgid "other" msgstr "andere" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "Popup Dialog öffnen wenn Fax\n" "über Modem empfangen wurde" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "Programm oder Sript ausführen\n" "wenn Fax über Modem empfangen " #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "Sende Faxauflösung:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" "Binde Faxempfängernummer in die\n" "Kopfzeile" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "Standard" #: src/settings.cpp:1514 msgid "Fine" msgstr "Fein" #: src/settings.cpp:1767 msgid "Log File: " msgstr "Log File: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Seitengröße: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: Einstellungen" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Note: Mit OK werden die Einstellungen gespeichert" #: src/settings.cpp:1979 msgid "Reset" msgstr "Zurücksetzen" #: src/settings.cpp:2012 msgid "Identity" msgstr "Identität" #: src/settings.cpp:2015 msgid "Modem" msgstr "Modem" #: src/settings.cpp:2018 msgid "Params" msgstr "Parameter" #: src/settings.cpp:2021 msgid "Print" msgstr "Drucken" #: src/settings.cpp:2027 msgid "Socket" msgstr "Socket" #: src/settings.cpp:2030 msgid "Receive" msgstr "Empfangen" #: src/settings.cpp:2033 msgid "Send" msgstr "Senden" #: src/settings.cpp:2036 msgid "Logging" msgstr "Protokollieren" #: src/settings.cpp:2039 msgid "Page" msgstr "Seite" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Konfigurationsfehler" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "" #: src/settings.cpp:3102 msgid " or\n" msgstr " oder\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Einstellungen zurücksetzen" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk Hilfe: Name" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk Hilfe: Nummer" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk Hilfe: Gerät" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk Hilfe: Lock File" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk Hilfe: Modem Class" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk Hilfe: Wählmodus" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk Hilfe: Ressourcen" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk Hilfe: Klingeln" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk Hilfe: Initialisierungs Parameter" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk Hilfe: Reset Parameter" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk Hilfe: Weitere Parameter" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk Hilfe: Druckprogramm" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk Hilfe: Druck verkleinern" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk Hilfe: Popup" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk Hilfe: Postscript Betrachter" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk Hilfe: Port" #: src/settings_help.cpp:176 msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk Hilfe: Sende Fax Auflösung" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "efax-gtk Hilfe: Faxkopfzeile" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk Hilfe: Seitengröße" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: Hilfe" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Senden" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Empfangen" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Adressbuch" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Faxlisten" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Einstellungen" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "Socket läuft auf Port " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "Druckauftrag über Socket empfangen\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: Faxe von Socket in Warteschlange" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Wähle zu sendendes Fax" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "DRUCK AUFTRAG: " #: src/socket_list.cpp:501 msgid "Remove " msgstr "Lösche " #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: Lösche Faxe aus Warteschlange" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Fax-Warteschlange" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Liste empfangenen Faxe" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Liste gesendeter Faxe" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Beenden" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "Erfolg" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "Anschluss besetzt oder Modem belegt" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "" #: efax/efax.c:382 msgid "invalid modem response" msgstr "" #: efax/efax.c:383 msgid "no response from modem" msgstr "keine Antwort vom Modem" #: efax/efax.c:385 msgid "internal error" msgstr "interner Fehler" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "" #: efax/efax.c:419 msgid "DCS - session format" msgstr "" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "" #: efax/efax.c:430 msgid "MPS - not done" msgstr "" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "" #: efax/efax.c:436 msgid "EOP - done" msgstr "" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "UNBEKANNT" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "kann Datei nicht löschen %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "gelöschte Datei: %s" #: efax/efax.c:784 msgid "header:" msgstr "Kopf:" #: efax/efax.c:868 msgid "characters received while sending" msgstr "Zeichen empfangen während des Sendens" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "sende %d+%d Zeilen und %d+%d bytes, in %d sek mit %d bps" #: efax/efax.c:915 msgid "flow control did not work" msgstr "" #: efax/efax.c:954 msgid "modem response in data" msgstr "" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "" #: efax/efax.c:1036 msgid "file write:" msgstr "Datei schreiben:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "" #: efax/efax.c:1222 msgid "sent" msgstr "senden" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "" #: efax/efax.c:1291 msgid "frame error" msgstr "" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "" #: efax/efax.c:1391 msgid "received" msgstr "empfangen" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "Keine Antwort von Gegenstelle" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "Kann Seite nicht öffnen" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "sende Seite %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "Seite gespeichert unter %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "ungewöhnlicher Abbruch (code %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "%d Zeichen empfangen während warten auf senden" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "zu viele Sendeversuche" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "wähle %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "" #: efax/efax.c:2216 msgid "called" msgstr "angerufen" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "verbunden" #: efax/efax.c:2224 msgid "number is busy" msgstr "Anschluss ist besetzt" #: efax/efax.c:2226 msgid "dial command failed" msgstr "Wählversuch fehlgeschlagen" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "" #: efax/efax.c:2306 msgid "activity detected" msgstr "" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "zu viele %%d Escapes in Kommando (%s)" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "ausführen von /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "" #: efax/efax.c:2353 msgid "fax call answered" msgstr "Faxanruf beantwortet " #: efax/efax.c:2356 msgid "voice call answered" msgstr "" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "Modem unterstützt kein Faxmodus" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "Verwende %s in class %s" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "Fehlgeschlagene Seiten %s" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "beendet - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "local ID (%s) hat Nicht-Standard Zeichen" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "verwende Zeilenpuffer von stdout" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "Falsche Qualitätsangabe (-q) als Argument (%s)" #: efax/efaxmsg.c:215 msgid " Error: " msgstr "Fehler: " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " Warnung: " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "kann Datei nicht öffnen %s:" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "Dateiformat unbekannt %s" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "kann Datei nicht zurückspulen %s:" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "kann Ausgabedatei nicht öffnen %s:" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "Faxgerät Schreibfehler:" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "Unerwartete Antwort \"%s\"" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "Modemkommando \"%s\" zu lang" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "Zeit abgelaufen nach" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "Falsche Antwort nach Kommando: %s" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "sync: sende Escapes" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "sync: Modem antwortet nicht" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "Modemkommando (%s) fehlgeschlagen" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "geöffnet %s" #~ msgid "New faxes: " #~ msgstr "Neue Faxe:" #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Copyright (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ "Dieses Programm wurde unter der GNU General Public Lizenz Version 2 " #~ "veröffentlicht" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " Konfigurationsdatei\n" #~ "und /dev/modem existieren nicht\n" efax-gtk-3.2.8/po/ru.gmo0000644000175000001440000015767411544574531011754 00000000000000~ B(4 [] _ '5P09@;@ @@0@A,AIAeA#gA6A'C C CDD D'D%9D_DoD&~D DD+D!D1E OE[EjEoEEE^E*F=F#LFpFxF F FnFGG,G1G@GPGiG}G G GBGG H{HHpHI+IFI6[II III III I JJ&Jg=JJJJ:JJGKWK=sKLKK:LWLvL=LL(RM>{M9MM%NG9NNOO P!P5P EP QP\P dPrPP PPPP PPPPP PLPTLQ#QQQ;Q5Rs(Rs{sssss t"(t)Ktut tttt-tuu.uFu`utuuu"uuuv v7vNv&evvvvvv v ww .w#:w^w*fwwwwwwx)x(Ix rxxxxxx?x!}[}y}}}}}}~ ~ 5~ C~d~~,~ ~9ڀ-#B f0ܘ  #@/p)v Þܞ)i ǡܡ-*?4V8.Jj~ ̣m.R #ϤUh| ҥB HiuyGHb{?֧ +3GZb/ju  )>2qHЩLI:@$D%tj!߫D?F;ͮ)BIbu{ϯ  A@[/̰15;BJ0]-˱߱ !Z%,.1ܲ. =^u|(ճ j5  #=,C)p Ƿ з ݷ! )GZj+khpeuYϺ޺  # 0 :DLUf"~ » ܻ&"7DZ Z-~6lt3EI}, @:{+gi 1ml*Kv 0H2O#; 9E\m4*&%!L(n"! ".Q0h"&#&<0c,  *&Qi' ; \$}0";Y&j 6 9X!i+& C!P(r#+<?_*z4& . :EL*d! 4C8_>NQ&9x B+'Sj| (&Ip(+ :[w&I~q=HGo.W^4ht KXb>xp @9U,Gi3J sd+|>_hwA5<:)(F^!eay*B_#tX$Jn%ZTuBCPD@M 7\= ;VC")uF{m5fEr&4Vgvo! -9wL/TYzyz<]/Q'$cc:&d`"Z (NRa2M}q#0jKA;2x6[\}-.sp~ |'ODbl0`8?k,%]mS7I*ORl[6Hin ELv+ gefUQk8 YrW3j1{P?NS1 (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. Error: Warning: from the list? has been received on socket. Send or queue fax? or %d characters received while waiting to send%s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Answer callAnswering callAutoCAN: data reception cancelledCFR - channel OKCRP - repeat commandCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Choose the selected fax for sendingClass 1Class 2Class 2.0Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DCN - disconnectDCS - session formatDateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?EOM - not done, new formatEOP - doneEmpty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFTT - channel not OKFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)IdentityInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Invalid user name specified - it must be in plain ASCII characters. No user name will be shown on the fax top header line, but don't worry as the fax station number will always be given on the top header Invalid user name specified in "Identity" tab - it must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerList _received faxesList received faxesList sent faxesLock File: Log File: LoggingMCF - page OKMPS - not doneModemModem Class: Move address downMove address upMove file downMove file upMultiple filesNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PIN - page not OK, call operatorPIP - page OK, call operatorPRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the name to appear on the fax top header on sent faxes here. It must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitRTN - page not OK, check channelRTP - page OK, check channelReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! Send faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSingle fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopTSI - caller IDTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class hereYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsabnormal termination (code %d)activity detectedbit-reversed HDLC frame, reversing bit ordercalledcan't answer: can't lock devicecan't delete file %s:can't open pagechannel not usable at %d bpschannel not usable at lowest speedcharacters received while sendingconnecteddial command faileddialing %sefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingsexec() call failed:executing command /bin/sh -c %sfailed page %sfax device write error:file write:finished - %sflow control did not workframe errorframe too long (%d, > %d max bytes)header:incompatible local and remote capabilitiesinternal errorinterrupt request ignoredinvalid modem responseinvalid post-page responseinvalid response to DCSlast byte of frame is NULLlocal ID (%s) has non-standard characterslocal ID (%s) truncated to %d characterslocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxmodem response in datano +FPTS response obtained, it is assumed that fax was receivedno XON/DC2 received after CONNECTno answer from remote faxno command or response from remoteno response after frame datano response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceive (+FDR) command failedreceivedreceived %d lines with %d errorsreceived short frame (%d bytes)reception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremote has one or more documents to send.removed file: %srun length buffer overflowsentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent TCF - channel check of %d bytessent page %ssuccesssync: dropping DTRsync: modem not respondingsync: sending escapesterminated by signaltimed out after command: %stimed out after waitingtimed out reading frame datatimed out waiting for commandtoo many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing %s in class %susing line buffering of stdoutwaiting for activitywrong carrierwrong response after command: %swrong response after frame datawrong response after waitingwrong response to command to receive a frameProject-Id-Version: efax-gtk-3.0.6 Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2005-11-09 02:00+0300 Last-Translator: Vitaly Lipatov Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.10.1 Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); 10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); (: ) *** ɣ/ *** ɣ --------------- ɣ . . " " . . ɣ (, ) " ". . " ɣ". ̣ , , , Σ ɣ . "". tiffg3 ( ) $HOME/faxin, , , , , , ɣ , ID . , , , '/ '. " ". ɣ ( ). , ɣ . , which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) ------------- , " ". PostScript/PDF (, Unix/Linux ), tiffg3. . , , " " . PostScript/PDF, " ". , $HOME/faxout. " " , , , . " ". , , . -, . Efax-gtk , . , "" , , " ". , efax-gtk . , ݣ , " " . , , " ". ģ . " " '/ '( " " ). , ̣ - , , " " ( , , ). $HOME/faxsent, , , , , , . , . '/ '. . " ". -------- , $HOME/.efax-gtkrc, /etc/efax-gtkrc or /etc/efax-gtkrc. , $HOME/.efax-gtkrc . , '/'. $HOME/.efax-gtkrc. , , , $HOME/.efax-gtkrc, `' , (/etc/efax-gtkrc or /etc/efax-gtkrc). , , , . ---------------------- , Σ "OK". "", . , "" (). . ----------------------------- , `' ` ' ` '. , . , , , , lpr ( Unix-) gv . PRINT_SHRINK, , . 98 . Σ `', , ` '. . .. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. : : ? . ? %d %s - ģ? efax-gtk PostScript, , , " ". , PostScript, , 'gv'. , 'evince' ( PostScript Gnome) kghostview ( PostScript KDE). gv, '-media A4' '-media Letter' . evince khostview _efax efax-_gtk efax-gtk ۣ 204x196 A4 postscript 'gv' CAN: ɣ CFR - CRP - "", ţ - : 122.0 (C) 2001 - 2011 Chris Vine GNU General Public License, version 2 DCN - DCS - : ? : , ?EOM - , EOP - ? (: ) _ FTT - ? : : ? (, ݣ ӣ ) : WORK_SUBDIR. 204x196 2 . : A4 , . 1024 65535 : 100 . 1024 65535 - . , , . "" - . , , . _ : : MCF - MPS - : :: : . ? , , PostScript/PDF : OK :: : PIN - , PIP - , : : ? ? (: ) ɣ , : Postscript: F1 : (50-100): , ? . , /var/lock . . , . , . -, ɣ , Σ ( , /dev/modem). /dev/ - ttyS1 cua2... Linux, ttyS0 - COM1, ttyS1 - COM2 . _ RTN - , RTP - , ɣɣ : ޣ (1-9): - - , : . Σ! : . ! : Σ! : . Σ! : . ! :: ɣ TSI - : : -s, ! ̣ IḌ ID - %s efax ( man efax). , . - , , , . 1 9. , 1. , PostScript, . , 'lpr' , , . , ģ. ( stdout stderr -- . README) , ɣ . , . (efax-gtk) efax. efax - , GNU General Public License 2 Ed Casas. AT- . ӣ, , , 'AT'. , `Z', . , , `man efax', -c. 2 efax-0.9 . efax , 14400 bps - 1,5,0,2,0,0,0,0, 1,3,0,2,0,0,0,0 . . ӣ, , , 'AT'. , `Z &FE&D2S7=120 &C0 M1L0', , -. , . "" 20498 "" 204x196 , " " . , (, , kprinter, ' ') , ɣ - . , ( , -). , . , ɣ . , , . , - CUPS . , , . , , . , 98 98 ţ . , (, 100, ): efax-gtk [] [ ] : -r -s README efax-0.9 "", efax , , . , efax-0.8 2, 1 efax, $HOME _ _ __ _ ___ ( %d) HDLC , : %s: %d bps , Σ %sefax-gtk help: efax-gtk : efax-gtk : efax-gtk : ɣ efax-gtk : efax-gtk : efax-gtk : efax-gtk : efax-gtk : efax-gtk : efax-gtk : efax-gtk : efax-gtk : efax-gtk : efax-gtk : efax-gtk : Postscriptefax-gtk : efax-gtk : efax-gtk : ɣ efax-gtk : efax-gtk : efax-gtk : -efax-gtk : efax-gtk : efax-gtk efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: , efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: , efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: efax-gtk: , efax-gtk: exec(): /bin/sh -c %s %s : : - %s ( (%d, > %d ): ̣ DCS ID (%s) ID (%s) %d localhost "%s" (%s) ɣ/ +FPTS , XON/DC2 CONNECṬ ̣ %s %s ɣ (+FDR) %d %d (%d ) ɣ̣ , ӣ ̣ , ̣ ɣ̣ , ӣ ̣ ̣ ̣ ̣ : %s %d+%d %d+%d , %d %d bps TCF - %d %s sync: DTRsync: sync: escapes : %s "%s" %s in %s : %s ɣ efax-gtk-3.2.8/po/boldquot.sed0000644000175000001440000000033111466007654013121 00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g efax-gtk-3.2.8/po/en@quot.header0000644000175000001440000000226311466007654013366 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # efax-gtk-3.2.8/po/pl.po0000644000175000001440000023165411544574527011571 00000000000000# Polish translation of Efax-gtk. # Copyright (C) 2001 Chris Vine # This file is distributed under the same license as the efax-gtk package. # Paweł Suwiński , 2005. # # msgid "" msgstr "" "Project-Id-Version: efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2003-04-13 01:21+0100\n" "Last-Translator: Paweł Suwiński \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Książka adresowa" #: src/addressbook.cpp:122 msgid "Name" msgstr "Nazwa" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Numer" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Dodaj nowy adres" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Usuń adres" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Przesuń adres w górę" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Przesuń adres w dół" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Usunąć zaznaczone adresy?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: Usuń adres" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: Dodaj adresy" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Nazwa:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Numer:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: Plik do wysłania" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Podgląd" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: Warunki i Uwagi" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Akceptuj" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Anuluj" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "Czy akceptujesz Warunki i Uwagi znajdujące się powyżej?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "O efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "O efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Program jest (efax-gtk) nakładką graficzną dla programu efax. efax jest " "programem na licencji GNU General Public License, wersji 2 napisanym przez " "Ed'a Casas'a." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Nieaktywny" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Wysyłanie faksu" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Odbierz połączenie" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "Oczekuj na połączenia przychodzące" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "Nie można wysłać faksu - fax w trakcie odbierania\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Niepoprawna nazwa pliku\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "Plik nie istnieje\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "Użytkownik nie posiada praw do odczytu dla tego pliku\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "Niepoprawny plik postscriptowy/PDF\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** Zatrzymanie sesji wysyłania/odbioru ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "WYDRUKUJ ZADANIE" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Drukuj zaznaczony fax" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Podgląd zaznaczonego faksu" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Dodaj/popraw opis dla zaznaczonego faksu" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Usuń zaznaczony fax" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Opróżnij kosz" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Dodaj nowy katalog" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Usuń zaznaczony katalog" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Lista odebranych faksów" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: Lista wysłanych faksów" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Trwale usuń zaznaczony fax?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(UWAGA: Spowoduje to trwałe usunie faksu\n" "z systemu plików)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Trwale usunąć zaznaczone faksy?\n" "\n" "(UWAGA: Spowoduje to trwałe usunie faksu\n" "z systemu plików)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: Usuń fax" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Opróżnić kosz?\n" "\n" "(UWAGA: Spowoduje to trwałe usunięcie z systemu plików\n" "wszystkich zaznaczonych faksów w katalogu Kosz)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: Kosz" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: Dodaj katalog" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Przed usunięciem folderu skasuj w nim wszystkie podkatalogi\n" "i przenieś (metodą 'chwyć i upuść') lub usuń wszystkie\n" "faksy wewnątrz." #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: Usuń katalog" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Usuń katalog: " #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Drukuj zaznaczony fax?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: Drukuj fax" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: Opis faksu" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Opis faksu?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Nazwa katalogu?\n" "(Nazwa zostanie umieszczona na górze\n" "i będzie możliwość przeniesienia jej\n" "(metodą 'chwyć i upuść') do innych katalogów)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "Nazwa katalogu nie może zawierać znaku: " #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "Następujący katalog już istnieje: " #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Katalog" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Opis" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Odebrane" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Wysłane" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Kosz" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: Lista plików" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "Pliki do wysłania" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Wyświetl zaznaczone pliki" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Usuń zaznaczone pliki z listy" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Dodaj pliki do listy" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Dodaj pliki do listy plików do wysłania" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Przesuń plik w górę" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Przesuń plik w dół" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Usuń plik " #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " z listy?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Usuń plik" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Copyright (C) 2001 - 2011 Chris Vine\n" "Program na licencji GNU General Public License, wersji 2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Użycie: efax-gtk [opcje] [plik]\n" "Opcje:\n" "\t-r Uruchom program w trybie oczekiwania\n" "\t-s Uruchom program i ukryj na pasku zadań\n" "Więcej szczegółów znajduje się w pliku README dołączonym\n" "do dystrybucji.\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Niewłaściwa opcja. Opcje:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "Niewłaściwe zdefiniowana klasa modemu\n" "Użycie domyślnej Klasy 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "Niezdefiniowany port szeregowy urządzenia w " #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "Użycie domyślnej rozdzielczości faksu 204x196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "Niewłaściwie zdefiniowana rozdzielczość faksu\n" "Użycie domyślnej rozdzielczości faksu 204x196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "Niewłaściwe zdefiniowana liczba dzwonków\n" "Odpowiedź po jednym dzwonku\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "Użycie domyślnego rozmiaru papieru a4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "Niewłaściwie zdefiniowany rozmiar papieru\n" "Użycie domyślnego rozmiaru papieru a4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "Niewłaściwie zdefiniowany tryb dzwonienia\n" "Użycie domyślnego dzwonienia tonowego\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" "Niewłaściwie zdefiniowane dopasowanie wydruku: użycie domyślnej wartości " "100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "Użycie domyślnej przeglądarki postscript 'gv'\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" "Nie zdefiniowano portu dla serwera gniazdek, więc serwer nie zostanie " "uruchomiony.\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "Niewłaściwie zdefiniowany port dla serwera gniazdek, więc serwer nie " "zostanie uruchomiony. Wartość powinna być z przedziału 1024 - 65535.\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" "Niepoprawnie WORK_SUBDIR: określony katalog. WORK_SUBDIR: będzie pominięty\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "Plik " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "Gniazdko " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Metoda dodawania faksów: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "Pojedynczy plik" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "Wiele plików" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Lista gniazdek" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Numer tel: " #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Wyślij fax" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Odbierz połączenie" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Przejmij połączenie" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "Oczekuj" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Stop" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Fax do wysłania" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "Lista _odebranych faksów" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "_Lista wysłanych faksów" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "Kolejkowane _faksy z gniazdka" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "_Wprowadź pojedynczy plik" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "Wprowadź _wiele plików" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_Książka adresowa" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Ustawienia" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_Wyjście" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "_O efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "O _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Tłumaczenia" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Pomoc" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_Plik" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "Program uruchomiono z opcją -s, ale nie ma paska zadań!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "" "Nie określono numeru telefonu. Czy chcesz wysłać fax na już zestawionym " "połączeniu?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Numer telefonu" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "Zadanie wydruku odebrano w gniazdku" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "gniazdko efax-gtk" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "Fax został odebrany przez efax-gtk" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: fax odebrany" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "Nie można zmienić ustawień dopóki program nie będzie nieaktywny\n" "Naciśnij przycisk Stop by uczynić go nieaktywnym" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Tłumaczenia" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Naciśnij F1 by uzyskać pomoc" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "" #: src/settings.cpp:68 msgid "Name: " msgstr "Nazwa: " #: src/settings.cpp:69 msgid "Number: " msgstr "Numer: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Urządzenie Szeregowe: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "Plik Blokady: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "Możliwości: " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Dzwonki (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Klasa Modemu: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Tryb Dzwonienia: " #: src/settings.cpp:211 msgid "Auto" msgstr "Auto " #: src/settings.cpp:213 msgid "Class 1" msgstr "Klasa 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Klasa 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Klasa 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Tonowe" #: src/settings.cpp:235 msgid "Pulse" msgstr "Pulsacyjne" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Parametry Inicjujące:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "Parametry Resetu: " #: src/settings.cpp:510 msgid "Other Params: " msgstr "Inne Parametry: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Program Drukujący: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Dopasowanie Wydruku (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "Okienko z potwierdzeniem\n" "przed drukowaniem" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Przeglądarka\n" "Postscript:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Uruchom serwer gniazdek" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Wyskakujące powiadomienie jeżeli fax\n" "zostanie odebrany z gniazdka" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "Port na który faksy\n" "będą wysyłane:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Adresy posiadające pozwolenie\n" "na połączenie" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "localhost " #: src/settings.cpp:1016 msgid "other" msgstr "inne" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "Wyskakujące powiadomienie po\n" "odebraniu faksu przez modem" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "Wykonaj program lub skrypt po odebraniu\n" "faksu przez modem" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "" "Rozdzielczość Wysyłanego\n" "Faksu:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "Standardowa" #: src/settings.cpp:1514 msgid "Fine" msgstr "Wysoka" #: src/settings.cpp:1767 msgid "Log File: " msgstr "Plik Logów: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Rozmiar Strony: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: ustawienia" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Uwaga: naciskając przycisk OK zachowasz ustawienia w pliku" #: src/settings.cpp:1979 msgid "Reset" msgstr "Reset" #: src/settings.cpp:2012 msgid "Identity" msgstr "Tożsamość" #: src/settings.cpp:2015 msgid "Modem" msgstr "Modem" #: src/settings.cpp:2018 msgid "Params" msgstr "Parametry" #: src/settings.cpp:2021 msgid "Print" msgstr "Drukuj" #: src/settings.cpp:2027 msgid "Socket" msgstr "Gniazdko" #: src/settings.cpp:2030 msgid "Receive" msgstr "Odbierz" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "Logowanie" #: src/settings.cpp:2039 msgid "Page" msgstr "Strona" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Błąd Konfiguracji" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "Niewłaściwie zdefiniowana klasa modemu" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "Niewłaściwie zdefiniowany rozmiar strony" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "Niewłaściwie zdefiniowana rozdzielczość wysyłanego faksu" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "Niewłaściwie zdefiniowana liczba dzwonków" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "Niewłaściwie zdefiniowany tryb dzwonienia" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "Niewłaściwie zdefiniowany parametr dopasowania wydruku" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" "Niewłaściwie zdefiniowany numer portu gniazdka. Powinien należeć do " "przedziału 1024-65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "Wstaw ustawienia z " #: src/settings.cpp:3102 msgid " or\n" msgstr "lub\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Ustawienia Resetu" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "Pomoc efax-gtk: Nazwa" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "Wstaw numer, który pojawi się w nagłówkach wysyłanych faksów. Będzie to " "jednocześnie numer zgłaszany maszynie wysyłającej fax podczas odbierania " "faksów." #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "Pomoc efax-gtk: Numer" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "Wstaw tutaj szeregowe urządzenie, do którego podłączony jest modem " "(jeżeli parametr nie zostanie określony, program przyjmie domyślną wartość /" "dev/modem). Nie wpisuj przedrostka `/dev/' w nazwie urządzenia -- np. " "ustaw jako `ttyS1' lub `cua2', itp. W Linuksie, ttyS0 odpowiada COM 1, " "ttyS1 - COM 2, itd. " #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "Pomoc efax-gtk: Urządzenie" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "Wstaw tutaj nazwę katalogu z plikami blokad. Jeżeli parametr nie zostanie " "określony, program przyjmie domyślną wartość /var/lock." #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "Pomoc efax-gtk: Plik Blokady" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "Dla efax-0.9 lub nowszych należy zazwyczaj wybierać \"Auto\", wtedy " "program samodzielnie rozpozna klasę modemu, jednak można tu wymusić " "pracę w określonej klasie wybierając jedną z dostępnych. Jednak, domyślną " "wartością efax-0.8 jest Klasa 2, więc jeżeli używasz modemu Klasy 1 ze " "starszą wersją programu efax to należy ustawić tu odpowiednią wartość." #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "Pomoc efax-gtk: Klasa Modemu" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" "To określa czy podczas wysyłania faksów używane będzie tonowe czy pulsacyjne " "dzwonienie." #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "Pomoc efax-gtk: Tryb Dzwonienia" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "To określa możliwości modemu. By dowiedzieć się co to oznacza wykonaj `man " "efax', i zobacz funkcję flagi '-c'. Dla efax-0.9 i modemu Klasy 2, " "zazwyczaj nie trzeba tego definiować i pole powinno pozostać puste, jeżeli " "tylko program potrafi przesłuchać modem. Używając starszej wersji programu " "efax lub modemów innych klas, wartości działające praktycznie z każdym " "modemem 14,400 bit/s to 1,5,0,2,0,0,0,0, lub 1,3,0,2,0,0,0,0 dla tych " "wolniejszych." #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "Pomoc efax-gtk: Możliwości" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "To określa liczbę dzwonków, po których w trybie Oczekiwania zostanie " "odebrane połączenie. Akceptowalne są wartości z przedziału 1-9. Jeżeli " "parametr nie zostanie określony, program przyjmie domyślną wartość 1. " #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "Pomoc efax-gtk: Dzwonki" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "To określa inicjujące komendy `AT' dla modemu w trybie faksu. Wpisz ich " "tyle ile jest wymagane, oddzielając spacjami te, które tego wymagają " "jednak już bez dopisku 'AT' na początku. Jeżeli parametr nie zostanie " "określony, program przyjmie domyślne wartości `Z &FE&D2S7=120 &C0 M1L0', " "które powinny być odpowiednie praktycznie dla każdego modemu. " #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "Pomoc efax-gtk: Parametry Inicjujące" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "To określa komendy `AT' resetujące modem. Wpisz ich tyle ile jest " "wymagane, oddzielając spacjami te, które tego wymagają jednak już bez " "dopisku 'AT' na początku. Jeżeli parametr nie zostanie określony, program " "przyjmie domyślne wartości`Z', które powinny być odpowiednie praktycznie " "dla każdego modemu. " #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "Pomoc efax-gtk: Parametry Resetu" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "To można wykorzystać do przekazania dodatkowych parametrów do programu " "efax (wykonaj `man efax' by zobaczyć jakie są dostępne). Wpisz ich tyle " "ile jest wymagane, oddzielając je spacjami -- np. dodanie `-or' dla " "odwrócenia kolejności bitów podczas odbioru dla modemów Multitech, które " "tego wymagają. Jeżeli nie posiadasz nietypowego modemu, pozostaw to pole " "puste. " #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "Pomoc efax-gtk: Inne Parametry" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "To jest komenda drukująca i pobierająca dane postscript ze standardowego " "wejścia.Jeżeli parametr nie zostanie określony, program przyjmie domyślną " "wartość `lpr'. " #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "Pomoc efax-gtk: Komenda Drukująca" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "To określa skalę, do której drukowana strona zostanie pomniejszona by " "dopasować ją do obszaru wydruku drukarki. Mierzona w procentach -- np. 98 " "zmniejszy stronę do 98 procent jej oryginalnej wartości. Jeżeli parametr " "nie zostanie określony skalowanie nie będzie stosowane (można też ustawić " "wartość 100, ale to nie jest konieczne). " #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "Pomoc efax-gtk: Dopasowanie Wydruku" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "To określa czy okienko z potwierdzeniem ma pojawiać się przed drukowaniem w " "przypadku gdy przycisk \"Wydrukuj zaznaczony fax\" zostanie naciśnięty na " "liście odebranych lub wysłanych faksów. Odznacz opcję jeżeli nie chcesz " "okienka z potwierdzeniem (jeżeli określony został zewnętrzny menadżer " "wydruku, taki jak np. 'kprinter', w polu Program Drukujący, to nie chcesz " "wybierać tej opcji)." #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "Pomoc efax-gtk: Powiadomienia" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "Przeglądarka postscript jest używana do podglądu wysłanych i odebranych " "faksów z listy faksów, oraz także do podglądu faksów do wysłania " "określonych w polu plików \"Pliki do wysłania\" . Wpisz tutaj komendę " "używaną do przeglądania plików postscriptowych. Jeżeli parametr nie " "zostanie określony, program przyjmie domyślną wartość 'gv'. Inne możliwości " "to 'evince' (przeglądarka postscript dla Gnome) lub " "'kghostview'(przeglądarka postscriptu dla KDE). Wybierając gv może być " "konieczność użycia opcji '- media A4' lub '-media Letter' dla wyboru " "właściwego rozmiaru papieru. evince i kghostview robi to automatycznie." #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "Pomoc efax-gtk: Przeglądarka Postscript" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "To określa czy serwer gniazdek ma być uruchamiany dla CUPS czy dla innego " "systemu drukowania. Zaznacz opcję jeżeli ma być uruchomiony." #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "Pomoc efax-gtk: Uruchom serwer gniazdek" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "To określa czy mają pojawiać się wyskakujące powiadomienia w przypadku " "odebrania faksu przez serwer gniazdek od systemu drukowania. Zaznacz opcję " "jeżeli chcesz chcesz być powiadamiany (nie ma efektu jeżeli nie została " "zaznaczona opcja uruchomienia serwera gniazdek). Jeżeli program jest " "nieaktywny faks może zostać wysłany bezpośrednio z tego " "powiadomienia. " #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "To określa numer portu, na którym nasłuchiwać będzie serwer gniazdek." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "Pomoc efax-gtk: Port" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "To określa czy adres inny niż localhost oraz inny niż nazwa hosta twojej " "maszyny będą posiadać pozwolenie na łączenie się z gniazdkiem. Jeżeli nie " "masz nietypowych wymagań (tj. jeżeli demony CUPS lub lpd nie działają na " "innej maszynie), należy wybrać localhost. Jeżeli chcesz by inne maszyny " "mogły się połączyć, wybierz \"inne\" i określ ich pełną nazwę hosta " "(oddzielając spacjami nazwy różnych hostów; nie trzeba określać nazwy " "localhost oraz nazwy hosta twojej maszyny, aczkolwiek jest to dozwolone). " "Jeżeli zostanie wybrana opcja \"inne\" to należy uruchamiać efax-gtk pod " "osłoną programu firewall. " #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "Pomoc efax-gtk: Pozwolenie na połączenia z gniazdkiem" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "Ten parametr określa czy okienko z powiadomieniem będzie się pojawiać po " "odebraniu faksu przez modem. Zaznacz jeżeli chcesz powiadomienie." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "Pomoc efax-gtk: Powiadomienie odbioru" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "Ten parametr określa czy określony program lub skrypt ma być wykonywany po " "odebraniu faksu przez modem. Zaznacz jeżeli chcesz uruchamiać program i " "wpisz jego nazwę." #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "Pomoc efax-gtk: Uruchom program po odebraniu faksu" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "To określa rozdzielczość, w której wysyłane są faksy. \"Standardowa\" daje " "204x98, zaś \"Wysoka\" daje 204x196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "Pomoc efax-gtk: Rozdzielczość Wysyłanych Faksów" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "Ten parametr określa plik logów, do którego będą zapisywane postęp " "negocjacji, status faksu oraz błędy i ostrzeżenia. Jeżeli parametr nie " "zostanie określony, żaden plik logu nie będzie prowadzony. (Zapis logu " "można także uzyskać poprzez przekierowanie wyjść stdout i stderr -- " "szczegóły - zobacz plik README.) " #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "Pomoc efax-gtk: Plik Logu" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "Określ tutaj rozmiar papieru dla faksów" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "Pomoc efax-gtk: Rozmiar Papieru" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "Pomoc efax-gtk: Pomoc" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Wysyłanie" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Odbieranie" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Książka Adresowa" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Lista Faksów" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Ustawienia" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "Wysyłanie faksu\n" "----------------\n" "\n" "Przed wysłaniem faksu, należy go najpierw wskazać w polu \"Fax do wysłania " "\". Musi być w formacie postscript/PDF (format wyjściowy wszystkich " "procesorów tekstu i dokumentów w systemach Unix/Linux), który zostanie " "przekonwertowany przez program we właściwy format faksowy tiffg3.\n" "\n" "Istnieją dwie metody wprowadzania faksów. Pierwsza, faks do wysłania może " "być plikiem już zapisanym na dysku. Możne zostać ręcznie wprowadzony w polu " "\"Fax do wysłania\", lub wprowadzony za pomocą okna wyboru plików. Jeżeli " "plik jest pojedynczym plikiem postscript/PDF, to można go znaleźć wciskając " "przycisk \"Pojedynczy Plik\". Łatwiej będzie go znaleźć przy użyciu tego " "okienka jeżeli będzie znajdował się w katalogu $HOME/faxout. \n" "\n" "Jeżeli określono więcej niż jeden plik w polu \"Fax do wysłanie\", zostaną " "one wysłane jako pojedynczy fax w kolejności w jakiej zostały wpisane w tym " "polu. Wiele plików łatwiej można wybrać korzystając z listy wyboru poprzez " "naciśnięcie przycisku \"Wiele Plików\". Wciśnięcie przycisku \"Wiele Plików" "\" umożliwia wyszukiwanie i dodawanie plików do listy, których kolejność " "można zmieniać za pomocą przycisków ze strzałkami Góra/Dół, lub poprzez " "przeciąganie i upuszczanie ich za pomocą myszy.\n" "\n" "Alternatywnie, faksy mogą być otrzymywane bezpośrednio z systemu drukowania, " "poprzez serwer gniazdek, który dostarcza program. Efax-gtk zarządza listą " "zakolejkowanych faksów odebranych z gniazdka, która jest dostępna przy " "wybraniu \"Gniazdko\" jako metody wprowadzania faksów. Wyświetlenie listy " "zakolejkowanych faksów następuje poprzez naciśnięcie przycisku \"Lista " "gniazdek\". Jest to pewniejsza metoda wysyłania faksów z procesora tekstu i " "umożliwia wysłanie faksu do programu efax-gtk poprzez system drukowania " "bezpośrednio z dowolnego programu do obróbki dokumentów. Fax jest " "kolejkowany do wysłania w liście gniazdek (w głównym oknie programu po " "prawej stronie pola \"Faksy do wysłania\" pojawi się mały czerwony okrąg). " "Szczegóły ustawień systemów drukowania CUPS lub lpr/lprng do wysyłania " "faksów do efax-gtk znajdują się w pliku README dołączonego do dystrybucji.\n" "\n" "Numer telefonu gdzie ma być wysłany fax należy wpisać w polu \"Numer tel\". " "Można go wpisać bezpośrednio lub może zostać wybrany z wbudowanej książki " "adresowej. Książka adresowa jest wywoływana po naciśnięciu przycisku " "\"Numer tel\" lub z menu 'Plik/Książka adresowa' (zobacz \"Używanie książki " "adresowej\" w oknie pomocy). Jeżeli połączenie telefoniczne zostało już " "zestawione, fax może zostać wysłany bez wybierania numeru poprzez " "pozostawienie pustym pola \"Numer tel\" (przy wysyłaniu pojawi się okienko z " "pytaniem czy wysłać fax na już zestawionym połączeniu).\n" "\n" "Można tak ustawić by po odebraniu faksu z systemu drukowania poprzez serwer " "gniazdek, automatycznie pojawiało się okienko z powiadomieniem. Jeżeli " "program nie jest aktywny (np. nie oczekuje na połączenia przychodzące) fax " "może zostać wysłany bezpośrednio z tego okienka bez konieczności wywoływania " "listy zakolejkowanych faksów odebranych z gniazdka.\n" "\n" "Pomyślnie wysłane faksy są umieszczane w katalogu $HOME/faxsent, a ich nazwa " "będzie związana z rokiem, miesiącem, dniem, godziną i sekundami w których " "przesyłanie faksu zostało zakończone, oraz pojawią się one na liście " "wysłanych faksów. Do listy dołączane są tylko faksy wysłane bez błędów. Okno " "raportu wyświetla informacje o przebiegu i postępie procesu wysyłania " "faksu. Lista faksów może zostać wywołana z menu `Plik/Lista wysłanych " "faksów'. Dalej zobacz \"Używanie listy faksów\".\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "Odbieranie faksów\n" "-------------------\n" "\n" "Istnieją trzy metody odbierania faksów.\n" "\n" "Pierwsza, poprzez naciśnięcie przycisku \"Odbierz połączenie\" program może " "odebrać połączenie, które dzwoni, ale nie zostało jeszcze odebrane.\n" "\n" "Druga, poprzez naciśnięcie przycisku \"Przejmij połączenie\" program może " "przejąć połączenie, które już zostało odebrane (np. przez podniesienie " "słuchawki telefonu).\n" "\n" "Trzecia, program może zostać wprowadzony w stan oczekiwania poprzez " "naciśnięcie przycisku \"Oczekuj\". Pozwoli to po określonej w ustawieniach " "liczbie dzwonków automatycznie odebrać połączenie i przyjąć fax. Program " "będzie oczekiwał na połączenia przychodzące do momentu naciśnięcia przycisku " "\"Stop\".\n" "\n" "Odebrane faksy mogą zostać wydrukowane, obejrzane, opisane i można nimi " "zarządzać za pomocą wbudowanej funkcji listy faksów. Można ją przywołać z " "menu `Plik/Lista otrzymanych faksów'. Dalej zobacz \"Używanie listy\n" "faksów\".\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "Używanie książki adresowej\n" "--------------------------\n" "\n" "Aby wybrać numer telefoniczny z książki adresowej podświetl żądany adres " "naciskając ponad nim lewy guzik myszy, a następnie naciśnij przycisk \"OK" "\".\n" "\n" "Adresy można dodawać do książki poprzez naciśnięcie przycisku dodawania i " "wypełnienie pól okienka, które pojawi się po naciśnięciu przycisku. Aby " "usunąć adres z książki adresowej należy podświetlić żądany element i " "nacisnąć przycisk usuwania (kosza). Książka adresowa może być sortowana przy " "użyciu przycisków ze strzałkami góra/dół na podświetlonym adresie, lub " "metodą przenoszenia i upuszczania za pomocą myszy.\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "Używanie listy faksów\n" "----------------------\n" "\n" "Aby przywołać listę faksów przejdź od menu `Plik' i wybierz pozycję `Lista " "odebranych faksów' lub `Lista wysłanych faksów'. Podświetlenie faksu do " "wydrukowania lub obejrzenia dokonuje się lewym przyciskiem myszy. Programy, " "które mają być użyte do drukowania lub podglądu faksów należy określić w " "ustawieniach programu, albo domyślnie zostanie użyty program lpr do " "drukowania (który działa w większości systemach Unix) i program gv do " "podglądu.\n" "\n" "Przy drukowaniu faksów, można zdefiniować w ustawieniach parametr " "DOPASOWANIE_WYDRUKU aby dopasować stronę do obszaru wydruku drukarki. " "Wartość 98 jest odpowiednia dla większości drukarek. Można to zmienić " "podczas pracy programu przywołując z menu `Ustawienia' i wpisując " "odpowiednią wartość w polu 'Drukowanie/Dopasowanie Wydruku'.\n" "\n" "Można dodać opis do odebranych faksów kiedy pojawią się na liście faksów " "(lub odpowiednio poprawione) przez naciśnięcie odpowiedniego przycisku -- " "pozwoli to łatwiej identyfikować przechowywane faksy.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "Ustawienia\n" "-----------\n" "\n" "Ustawienia programu można zmienić ręcznie edytując plik konfiguracyjny " "programu efax-gtk: $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc lub /etc/efax-" "gtkrc. Pliki są poszukiwane w podanej kolejności, więc $HOME/.efax-gtkrc " "jest nadrzędny dla pozostałych.\n" "\n" "Plik konfiguracyjny może być także ustawiony za pomocą okna Ustawienia " "wywoływanego z menu `Plik/Ustawienia'. Ustawienia tak wprowadzane są zawsze " "zapisywane w pliku $HOME/.efax-gtkrc. Jeżeli użyte zostało okno Ustawienia " "i jest potrzeba przywrócenia globalnych ustawień, można to zrobić kasując " "lokalny plik ustawień $HOME/.efax-gtkrc, lub wciskając przycisk `Reset' w " "oknie Ustawienia, co spowoduje przeładowanie ustawień z globalnych plików " "konfiguracyjnych ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc).\n" "\n" "Pomoc przy wypełnianiu Ustawień można uzyskać najeżdżając myszką nad " "odpowiedni przycisk pomocy (?), co przywoła okienko \"Wskazówek\", lub " "poprzez naciśnięcie przycisku, który wywoła okienko informacyjne.\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "Gniazdko uruchomione na porcie " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "Zadanie wydruku odebrane na gniazdku\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: Zakolejkowane faksy z gniazdka" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "Zakolejkowane zadania wydruku" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "Potwierdź wysłanie wybranego faksu" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Wybierz zaznaczone faksy do wysłania" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "DRUKUJ ZADANIE: " #: src/socket_list.cpp:501 msgid "Remove " msgstr "Usuń" #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: Usuń zakolejkowany fax" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: drukuj zadanie odebrane z gniazdka" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Kolejkuj fax" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" " odebrany na gniazdku.\n" "Wysłać czy zakolejkować?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Lista odebranych faksów" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Lista wysłanych faksów" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "Oczekuj" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Wyjście" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "" #: efax/efax.c:382 msgid "invalid modem response" msgstr "" #: efax/efax.c:383 msgid "no response from modem" msgstr "" #: efax/efax.c:385 msgid "internal error" msgstr "" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "" #: efax/efax.c:419 msgid "DCS - session format" msgstr "" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "" #: efax/efax.c:430 msgid "MPS - not done" msgstr "" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "" #: efax/efax.c:436 msgid "EOP - done" msgstr "" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "" #: efax/efax.c:784 msgid "header:" msgstr "" #: efax/efax.c:868 msgid "characters received while sending" msgstr "" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "" #: efax/efax.c:915 msgid "flow control did not work" msgstr "" #: efax/efax.c:954 msgid "modem response in data" msgstr "" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "" #: efax/efax.c:1036 msgid "file write:" msgstr "" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "" #: efax/efax.c:1222 msgid "sent" msgstr "" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "" #: efax/efax.c:1291 msgid "frame error" msgstr "" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "" #: efax/efax.c:1391 msgid "received" msgstr "" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "" #: efax/efax.c:2216 msgid "called" msgstr "" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "" #: efax/efax.c:2224 msgid "number is busy" msgstr "" #: efax/efax.c:2226 msgid "dial command failed" msgstr "" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "" #: efax/efax.c:2306 msgid "activity detected" msgstr "" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "" #: efax/efax.c:2353 msgid "fax call answered" msgstr "" #: efax/efax.c:2356 msgid "voice call answered" msgstr "" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "" #: efax/efaxmsg.c:215 msgid " Error: " msgstr "" #: efax/efaxmsg.c:216 msgid " Warning: " msgstr "" #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "" #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Copyright (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ "Program jest na licencji GNU General Public License, wersji 2" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " plik konfiguracyjny\n" #~ "oraz /dev/modem nie istnieje\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " plik konfiguracyjny\n" #~ "Użycie domyślnego urządzenia /dev/modem\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "Użycie domyślnego polecenia drukowanie 'lpr'\n" #~ msgid "Put the name to appear on the fax top header on sent faxes here" #~ msgstr "Wstaw nazwę, która pojawi się w nagłówkach wysyłanych faksów" #~ msgid "From" #~ msgstr "Od" #~ msgid "?\n" #~ msgstr "?\n" #~ msgid "Refresh fax list" #~ msgstr "Odśwież listę faksów" #~ msgid "Fax" #~ msgstr "Fax" efax-gtk-3.2.8/po/sq.po0000644000175000001440000024767411544574530011604 00000000000000# translation of efax-gtk.pot to Albanian # This file is distributed under the same license as the efax-gtk package. # Copyright (C) YEAR Chris Vine. # Besnik Bleta , 2004-2006. # msgid "" msgstr "" "Project-Id-Version: efax-gtk-3.0.9\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2006-03-15 22:57+0200\n" "Last-Translator: Besnik Bleta \n" "Language-Team: Albanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Libër vendndodhjesh" #: src/addressbook.cpp:122 msgid "Name" msgstr "Emër" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Numër" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Shto vendndodhje të re" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Fshij vendndodhje" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Ngri vendndodhje" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Ul vendndodhje" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Të fshij vendndodhjen e përzgjedhur?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: Fshi vendndodhje" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: Shto vendndodhje" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Emër:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Numër:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: Kartelë për t'u faksuar" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Parje" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: Kushte, Shënime dhe Klauzola" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Prano" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Hidh tej" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "I pranoni Kushtet, Shënimet dhe Klauzolat treguar më sipër?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "Rreth efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "Rreth efax-it" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Ky program (efax-gtk) është një ndërfaqe për efax-in. efax-i është një " "program i qarkulluar nën Licensën e Përgjithshme Publike GNU, versioni 2, " "nga Ed Casas." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Joveprues" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Po dërgoj faks" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Po i përgjigjem thirrjes" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "Në gatishmëri për të marrë thirrje" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "Nuk mund të dërgoj dot faks - është duke u marrë një faks\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Emër i pavlefshëm kartele\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "Kartelë nuk ekziston\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "Përdoruesi nuk ka leje leximi mbi kartelën\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "S'ka kartelë postscript/PDF të vlefshme\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "Nuk keni ndryshoren e mjedisit $HOME të rregulluar\n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" "GABIM SERIOZ SISTEMI: S'krijoj dot drejtori ruajtjeje faksesh të marrë.\n" "Nuk mund të merren fakse!\n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** Po ndërpres sesion dërgimesh/marrjesh ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" "GABIM SERIOZ SISTEMI: S'krijoj dot drejtori ruajtjeje faksesh të marrë.\n" "Ky faks nuk ka për t'u ruajtur!\n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" "GABIM SERIOZ SISTEMI: S'hap dot drejtori faksesh të marrë.\n" "Ky faks nuk ka për t'u ruajtur!\n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" "GABIM SERIOZ SISTEMI: S'ruaj dot tërë fakset e marrë.\n" "Do të mungojë tërë faksi ose një pjesë e tij!\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "U mor Utf8 i pavlefshëm te EfaxController::read_pipe_cb()\n" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" "GABIM SERIOZ SISTEMI: S'krijoj dot drejtori ruajtjeje faksesh të dërguar.\n" "Ky faks nuk ka për t'u ruajtur!\n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "AKT SHTYPJEJE" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Shtyp faksin e përzgjedhur" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Shihni faksin e përzgjedhur" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Shto/përmirëso përshkrimin e faksit të përzgjedhur" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Fshij faksin e përzgjedhur" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Zbraz dosje hedhurinash" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Shto dosje të re" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Fshij dosjen e përzgjedhur" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "Rifillo numërim fakseshtë rinj" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Listë faksesh e marrë" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: Listë faksesh të dërguar" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Të fshij përgjithmonë fakset e përzgjedhur?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(SHËNIM: Kjo do të fshijë përgjithmonë faksin\n" "prej sistemit të kartelave)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Të fshij përgjithmonë fakset e përzgjedhur?\n" "\n" "(SHËNIM: Kjo do të fshijë fakset përgjithmonë\n" "prej sistemit të kartelave)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: Fshi faks" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Të zbraz dosje hedhurinash?\n" "\n" "(SHËNIM: Kjo do të fshijë përgjithmonë prej sistemit të\n" "kartelave tërë fakset në dosjen Hedhurina)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: Dosje hedhurinë" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: Shto dosje" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Zbrazni dosjen duke fshirë cilëndo nëndosje\n" "dhe duke hequr ose fshirë cilindo faks aty\n" "para se të fshini dosjen" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: Fshi dosje" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Fshij dosje: " #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Shtyp faksin e përzgjedhur?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: Shtyp faks" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "Fakse Të rinj:" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: Përshkrim faksi" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Përshkrim faksi?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Emër dosjeje?\n" "(Shënoni që ky do të vendose në nivelin\n" "e sipërm dhe mund të mirret-dhe-lihet\n" "brenda dosjesh të tjera)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "Emri i dosjes nuk mund të përmbajë shenjë:" #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "Dosja vijuese ekziston tashmë:" #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Dosje" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "Datë" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Përshkrim" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Të marrë" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Kuti të Dërguarish" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Hedhurina" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: Listë kartelash" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "Kartela për t'u faksuar" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Shihni kartelën e përzgjedhur" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Hiq kartelën e përzgjedhur prej liste" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Shto kartela te listë" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Shto te listë kartelash kartela për t'u faksuar" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Ngri kartelë" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Ul kartelë" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Hiq kartelë " #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr "prej liste?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Hiq kartelë" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Copyright (C) 2001 - 2011 Chris Vine\n" "Ky program është qarkulluar nën Licensën e Përgjithshme Publike GNU, " "versioni 2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Përdorimi: efax-gtk [mundësi] [emër kartele]\n" "Mundësi:\n" "\t-r Nis programin me mënyrën në pritje faksesh\n" "\t-s Nis programin fshehur në shtyllë sistemi\n" "Për më tepër hollësi shihni kartelën README\n" "që gjendet te shpërndarja\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Mundësi e pavlefshme. Mundësitë janë:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" "Është dhënë emër i pavlefshëm përdoruesi - duhet të jetë\n" "me shenja të thjeshta ASCII. Nuk do të tregohet emër\n" "përdoruesi te rreshti i sipërm i titullit të faksit, por mos\n" "u merakosni sepse numri i faksit do të shfaqet gjithmonë\n" "në titullin e sipërm\n" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "Është dhënë klasë modemi e pavlefshme\n" "Po vazhdoj me parazgjedhjen Klasë 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "S'është dhënë pajisje porte seriale te" #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "Po vazhdoj me qartësi faksi parazgjedhje 204x196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "Është dhënë qartësi faksi e pavlefshme\n" "Po vazhdoj me qartësi faksi parazgjedhje 204x196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "Është dhënë numër i pavlefshën tringëlimash\n" "Do të përgjigjem pas një tringëllime\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "Po vazhdoj me madhësi faqeje parazgjedhje a4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "Është dhënë madhësi faqeje e pavlefshme\n" "Po vazhdoj me madhësi faqeje parazgjedhje a4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "Është dhënë lloj i pavlefshëm sinjali\n" "Po vazhdoj me sinjalin parazgjedhje ton\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" "Është dhënë tkurrje e pavlefshme shtypjeje: po vazhdoj me vlerën " "parazgjedhje 100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "Po vazhdoj me urdhër parazgjedhje parjeje postscript-esh 'gv'\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" "S'është dhënë portë për \"socket\" shërbyesi, prandaj shërbyesi nuk do të " "niset\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "Është dhënë portë e pavlefshme për shërbyes \"socket\"-i, ndaj shërbyesi nuk " "do të niset. Lipset të jetë midis 1024 dhe 65535\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" "Është dhënë WORK_SUBDIR: e pavlefshme. WORK_SUBDIR: do të shpërfillet\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "Kartelë " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "\"Socket\" " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Metodë dhënjeje faksi" #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "Një kartelë" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "Shumë kartela" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Listë \"Socket\"-i" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Numër tel.:" #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Dërgo faks" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Përgjigju thirrjes" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Merr thirrje përsipër" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "Gatishmëri" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Ndal" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Faks për t'u dërguar" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "Listo fakse të _marrë" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "Listë faske të _dërguar" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "Fakse në radhë prej \"socket\"-i" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "_Jepni kartelë" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "Jepni kartela të shu_mëfishta" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_Libër vendndodhjesh" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Rregullime" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_Lër" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "Rreth efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "Rreth _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Përkthime" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Ndihmë" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_Kartelë" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "Programi është nisur me mundësinë -s por nuk ka shtyllë sistemi!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "" "S'është dhënë numër faksi. Doni të dërgohet faksi nëpër një lidhje të hapët?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Numër telefoni" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "Është marrë një akt shtypjeje në \"socket\"" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "\"socket\" efax-gtk" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "efax-gtk ka marrë një faks" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: faks i marrë" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "S'ndryshoj dot rregullimet pa u çaktivizuar programi\n" "Shtypni butonin Ndal për ta çaktivizuar" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "Italisht - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "Polonisht - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "Bullgarisht - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "Rusisht - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "Hebraishte - Assaf Gillat\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "Greqisht - Hellenic Linux Users Group\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "Albanian - Besnik Bleta\n" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "Hungarian - Gergely Szakats, Laszlo Csordas\n" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "Simplified Chinese - Kite Lau\n" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "German - Steffen Wagner\n" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "Swedish - Daniel Nylander\n" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "Catalan - Jordi Sayol Salomo\n" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Përkthime" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Shtypni F1 për ndihmë" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "Utf8 e pavlefshme marrë te MainWindow::read_error_pipe_cb()\n" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "pëfundur prej sinjali" #: src/settings.cpp:68 msgid "Name: " msgstr "Emër: " #: src/settings.cpp:69 msgid "Number: " msgstr "Numër:" #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Pajisje Seriale:" #: src/settings.cpp:191 msgid "Lock File: " msgstr "Lock File: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "Aftësi:" #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Zile (1-9):" #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Klasë Modemi:" #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Sinjal" #: src/settings.cpp:211 msgid "Auto" msgstr "Auto" #: src/settings.cpp:213 msgid "Class 1" msgstr "Klasë 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Klasë 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Klasë 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Ton" #: src/settings.cpp:235 msgid "Pulse" msgstr "Puls" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Parametra Gatitjeje:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "Ricaktoni Parametra:" #: src/settings.cpp:510 msgid "Other Params: " msgstr "Parametra të Tjerë " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Program Shtypjeje: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Tkurrje Shtypjeje (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "Shfaq dialog ripohimi\n" "para shtypjes" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Program Parës\n" "Postscript-esh:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Xhiro shërbyes \"socket\"-i" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Nxirr dialog kur merret\n" "faks prej \"socket\"-i" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "Portë te e cila të\n" "dërgohen fakse:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Vendndodhje të lejuara për\n" "lidhje" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "localhost " #: src/settings.cpp:1016 msgid "other" msgstr "tjetër" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "Shfaq dialog kur merret\n" "faks nga modemi" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "Ekzekuto një program ose programth\n" "kur është marrë faks prej modemit" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "Qartësi Faksesh të Dërguar" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" "Përfshi numër faksi\n" "vendmbërritje te rreshti\n" "i sipër titulli faqeje faksi" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "Standard" #: src/settings.cpp:1514 msgid "Fine" msgstr "Imët" #: src/settings.cpp:1767 msgid "Log File: " msgstr "Kartelë Regjistrimi " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Madhësi Faqeje:" #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: rregullime" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Shënim: shtypja e butonit OK do t'i ruajë rregullimet në kartelë" #: src/settings.cpp:1979 msgid "Reset" msgstr "Rimerr" #: src/settings.cpp:2012 msgid "Identity" msgstr "Identitet" #: src/settings.cpp:2015 msgid "Modem" msgstr "Modem" #: src/settings.cpp:2018 msgid "Params" msgstr "Parametra" #: src/settings.cpp:2021 msgid "Print" msgstr "Shtyp" #: src/settings.cpp:2027 msgid "Socket" msgstr "\"Socket\"" #: src/settings.cpp:2030 msgid "Receive" msgstr "Merr" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "Hyrje" #: src/settings.cpp:2039 msgid "Page" msgstr "Faqe" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" "Është dhënë emër i pavlefshëm përdoruesi te pjesa \"Identitet\" - duhet të " "jetë me shenja të thjeshta ASCII. Nëse e keni problem, lëreni bosh ngaqë " "numri i faksit do të dërgohet përherë me titullin e sipërm" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Gabim Formësimi" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "Është dhënë klasë e pavlefshme modemi" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "Është dhënë madhësi e pavlefshme faqeje" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "Është dhënë qartësi e pavlefshme faksesh të dërguar" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "Është dhënë numër i pavlefshëm tringëllimash" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "Është dhënë lloj i pavlefshëm sinjali" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "Është dhënë parametër i pavlefshëm tkurrjeje shtypjeje" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" "Është dhënë numër i pavlefshëm porte \"socket\"-i. Duhet të jetë ndërmjet " "1024 dhe 65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "Jepni rregullime për" #: src/settings.cpp:3102 msgid " or\n" msgstr " ose\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Ricakto rregullime" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" "Vini këtu emrin që do të duket në titullin e sipërm të faksit te fakset e " "dërguar. Duhet të jetë me shenja të thjeshta ASCII. Nëse kjo është " "problem, lëreni bosh meqë numri i faksit do të duke gjithmonë te titulli i " "sipërm" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk ndihmë: Emër" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "Vini këtu numrin që do të duket në krye të titullit të faksit për fakset që " "dërgohen. Kjo përfshin edhe ID makine faksi dhënë makinës që dërgon faksin " "kur merren fakse" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk ndihmë: Numër" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "Vini këtu pajisjen seriale te e cila është lidhur modemi (nëse nuk jepet " "ndonjë, programi parazgjedh /dev/modem). Mos përfshini pjesën `/dev/' të " "emrit të pajisjes -- me fjalë të tjera vëreni si `ttyS1' ose `cua2', etj. " "Nën Linux, ttyS0 është baraz me COM 1, ttyS1 me COM 2, e me radhë." #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "ndihmë e efax-gtk-së: Pajisje" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "Vini këtu drejtorinë \"lock file\". Nëse nuk jepet ndonjë, programi " "parazgjedh /var/lock" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "ndihmë e efax-gtk-së: Lock File" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "Me efax-0.9 ose më të ri zakonisht do të duhej të zgjidhni \"Auto\", ngaqë " "kështu efax-i do ta gjejë vetë klasën e modemit, por mundet edhe vini një " "klasë tjetër duke e zgjedhur nga ato të dhënat nëse doni. Sidoqoftë, me " "efax-0.8 programi parazgjedh Klasën 2, ndaj nëse përdorni modem të Klasës 1 " "me versione të vjetër të efax-it jepeni Klasën këtu" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "ndihmë për efax-gtk: Klasë Modemi" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" "Kjo përcakton nëse duhet përdorur sinjal ton apo puls kur dërgohen fakse" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "ndihmë për efax-gtk: Sinjal" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "Kjo përcakton aftësitë e modemit. Për të parë se ç'do të thotë kjo kryeni " "`man efax', dhe shihni ç'përmbush shenja `-c' flag. Me efax-0.9 dhe një " "modem të Klasës 2, zakonisht nuk do t'ju ta tregoni këtë dhe do të duhej ta " "linit bosh, ngaqë modemi do të pyetet prej programit. Nëse përdoret një " "version më i hershëm i efax-it ose modem nga një tjetër klasë, vlera me të " "cilat do të punojë praktikisht çfarëdo modem 14,400 bps janë " "1,5,0,2,0,0,0,0, ose 1,3,0,2,0,0,0,0 për më të ngadalshëm." #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "ndihmë për efax-gtk: Aftësi" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "Kjo përcakton numër tringëllimash që lejon modemi para se t'i përgjigjet " "telefonit prej mënyrës Standby. Vlerat e pranueshme janë nga 1 te 9. Nëse " "nuk jepet ndonjë, programi parazgjedh 1" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "ndihmë për efax-gtk: Zile" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "Kjo përcakton urdhra `AT' gatitjeje për modemin gjatë mënyrës faks. Jepni " "aq sa ju duhen, ndarë prej hapësirash për urdhrat që lipset të jenë të " "ndarë, por pa një `AT' paraprake. Nëse nuk jepet ndonjë, programi " "parazgjedh `Z &FE&D2S7=120 &C0 M1L0', që do të jetë i saktë praktikisht për " "çdo modem" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "ndihmë për efax-gtk: Parametra Gatitjeje" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "Kjo përcakton urdhra `AT' gatitjeje që do të rirregullojnë modemin. Jepni " "aq sa ju duhen, ndarë prej hapësirash për urdhrat që lipset të jenë të " "ndarë, por pa një `AT' paraprake. Nëse nuk jepet ndonjë, programi " "parazgjedh `Z', që do të jetë i saktë praktikisht për çdo modem" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "ndihmë për efax-gtk: Ricaktoni Parametra" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "Kjo mund të përdoret për t'i kaluar efax-it çfarëdo parametri tjetër (kryeni " "një `man efax' për të parë se çfarë është e mundshme). Jepni aq sa ju " "duhen, ndarë prej hapësirash për parametra të ndryshëm -- p.sh. përfshini `-" "or' për të kryer përmbysje bitesh gjatë marrjesh nga modem Multitech i cili " "e kërkon këtë. Lëreni bosh këtë, veç në paçi një modem jo të zakonshëm" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "ndihmë për efax-gtk: Parametra të Tjerë" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Ky është urdhri që shtyp dhe pranon futje postscript gjatë futjesh " "standarde. Nëse nuk jepet ndonjë, programi do të parazgjedhë `lpr'" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "ndihmë për efax-gtk: Program Shtypjeje" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Kjo do të përcaktojë shkallën e reduktimit të një faqeje që do të shtypet " "për ta nxënë zona e shtypjes te shtypësi. Shprehur në përqindje -- p.sh. 98 " "do ta tkurrë faqen te 98 përqind e madhësisë së saj. Nëse nuk jepet ndonjë " "nuk do të ketë tkurrje (pra mundeni, por nuk ka nevojë, të jepni 100)" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "ndihmë për efax-gtk: Tkurrje Shtypjeje" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Kjo përcakton nëse të shfaqet apo jo një flluckë dialogu ripohimi para " "shtypjesh kurdo që shtypet butoni \"Shtyp faksin e përzgjedhur\" te listë " "Faksesh të Marrë ose listë Faksesh të Dërguar. Mos vini shenjë te kutia " "nëse nuk doni dialog (nëse te kutia Program Shtypjesh keni dhënë një " "përgjegjës të jashtëm shtypjesh si p.sh. 'kprinter', atëherë nuk ju duhet " "shenjë këtu)." #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "ndihëm për efax-gtk: Flluckë" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "Parësi postscript përdoret për të parë fakse të marrë dhe të dërguar nga " "listë faksesh, dhe edhe për të parë fakse që duhet të dërgohen të " "identifikuar përmes dialogu përzgjedhësi kartelash \"Kartela për t'u faksuar" "\". Përcaktoni këtu urdhrin që duhet përdorur për të parë kartela " "postscript. Nëse nuk jepet ndonjë, programi do të parazgjedhë 'gv'. " "Mundësi të tjera që do të donit të jepni janë 'evince' (parësi postscript " "GNOME) ose 'kghostview' (parësi postscript KDE). Nëse përdoret gv, mund të " "donit të përdorni mundësitë '-media A4' ose '-media Letter' për të " "përzgjedhur madhësinë e duhur të letrës. evince dhe kghostview e bëjnë " "automatikisht këtë" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "ndihmë për efax-gtk: Program Parës për Postscript" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "Kjo përcakton nëse duhet përdorur një shërbyes \"socket\" për CUPS-in apo " "për ndonjë sistem tjetër shtypjeje. Vini shenjë në këtë kuti nëse duhet " "përdorur një" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "ndihmë për efax-gtk: Xhiro shërbyes \"socket\"-i" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "Kjo përcakton nëse duhet të hapet një flluckë dialogu kurdo që merret një " "faks nga shërbyesi \"socket\" prej sistemit të shtypjes. Vini shenjë në " "këtë kuti nëse doni një dialog (nuk ka efekt po qe se nuk keni vënë shenjë " "te kutia për përdorim shërbyesi \"socket\"). Nëse programi është joveprues " "faksi mund të dërgohet drejtpërsëdrejti prej këtij dialogu." #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" "Kjo përcakton numrin e portës prej të cilës duhet të dëgjojë shërbyesi " "\"socket\"." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "ndihmë për efax-gtk: Portë" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "Kjo përcakton nëse do të lejohen vendndodhje të tjera veç strehës vendore " "(localhost) dhe emërstrehës së vet makinës suaj të bëjnë lidhje te \"socket" "\"-i. Nëse nuk keni nevoja pazakonta (do me thënë, veç nëse demonët CUPS ose " "lpd po xhirojnë në një makinë tjetër), do të duhej të zgjidhnit localhost. " "Nëse doni të tjera makina të munden të lidhen, merrni \"tjetër\" dhe " "përcaktoni strehëemra tërësisht të përcaktuar të kompjuterave që mund të " "lidhen (duke ndarë strehëemra të ndryshëm me hapësira, por nuk keni nevojë " "të tregoni ata edhe për makinën tuaj, ngaqë këta janë përherë të lejuar). " "Do të duhej të xhironi efax-gtk-në pas një \"firewall\"-i nëse zgjidhni " "\"tjetër\"." #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "ndihmë për efax-gtk: Lidhje \"socket\" të lejuara" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "Ky parametër përcakton të shfaqet apo jo një dialog flluckë kur merret faks " "prej një modemi. Vini shenjë te kutia nëse doni një flluckë." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "ndihmë për efax-gtk: Flluckë marrjeje" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "Kjo përcakton nëse një program ose programth duhet ekzekutuar kur meeret një " "faks nga një modem. Vini shenjë te kutia nëse doni të ekzekutohet një " "program, dhe jepni emrin e programit." #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "ndihmë për efax-gtk: Ekzekuto program kur merret faks" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "Kjo përcakton qartësinë me të cilën dërgohen fakset. \"Standard\" jep " "204x98 dhe \"Imët\" jep 204x196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "ndihmë për efax-gtk: Qartësi Faksesh të Dërguar" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" "Kjo përcakton në përfshihet a jo numri i faksit vendmbërritje te rreshti i " "sipërm i titullit të faksit për fakset e dërguar. Çshenjojeni kutinë nëse " "nuk doni që ky të duket (le të themi për shkak se përfshin një numër karte " "pagesash)" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "ndihma e efax-gtk-së: Rreshti i sipërm i titullit të faksit" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "Ky parametër përcakton një kartelë regjistrimesh te e cila regjistrohen " "ecuria e negociatave dhe gjendje faksesh, si dhe gabime dhe sinjalizime. " "Nëse nuk jepet ndonjë, atëherë nuk do të ketë kartelë regjistrimesh. " "(Kartelë regjistrimesh mund të mbahet edhe duke ridrejtuar \"stdout\" dhe " "\"stderr\" -- shihni kartelën README për të hollësi të mëtejshme)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "ndihmë për efax-gtk: Kartelë Regjistrimesh" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "Përcaktoni këtu madhësi faqeje për fakset" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "ndihmë për efax-gtk: Madhësi Faqeje" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: Ndihmë" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Po dërgoj" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Po marr" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Libër Vendndodhjesh" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Lista Faksesh" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Rregullime" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "Dërgim faksesh\n" "-------------\n" "\n" "Para se të dërgohet, një faks duhet dhënë te kutia \"Fakse për t'u dërguar" "\". Duhet të jetë në format postscript/PDF (një format i mundshëm për tërë " "përpunuesa fjalësh dhe dokumentesh Unix/Linux), dhe do të shndërrohet nga " "programi në formatin e duhur tiffg3 për fakse.\n" "\n" "Ka dy metoda dhënje faksesh. E para, faksi që duhet dërguar mund të ruhet " "si kartelë në sistem kartelash. Mund të jepet dorazi te kutia \"Fakse për " "t'u dërguar\" ose përmes dialogu përzgjedhjesh kartelash. Nëse kartela " "përmban një kartelë të vetme postscript/PDF, atëherë mund ta gjeni duke " "shtypur butonin \"Kartelë e Vetme\". Mund të gjendet më lehtë me këtë " "dialog nëse është vënë tek drejtoria $HOME/faxout.\n" "\n" "Kur te kutia \"Fakse për t'u dërguar\" janë dhënë më shumë se një kartelë, " "ato mund të dërgohen si një faks i vetëm vargan në rendin që janë dhënë te " "kutia. Kartela të tilla të shumëfishta përzgjidhen më lehtë duke përdorur " "listën e kartelave që shfaqet duke shtypur butonin \"Kartela të Shumëfishta" "\". Shtypja e butonit \"Kartela të Shumëfishta\" lejon gjetjen dhe shtimin " "e kartelave te listë kartelash, dhe ato mund të rirenditen duke përdorur " "butonat shigjetë Sipër ose Poshtë, ose duke i tërhequr e lënë me miun.\n" "\n" "Si alternativë, fakset mund të merren drejtpërsëdrejti nga sistemi i " "shtypjes me anën e shërbyesi \"socket\" prurë nga programi. Efax-gtk-ja " "mban një listë me radhën e fakseve të marrë prej \"socket\"-it të cilët mund " "të kihen duke zgjedhur\"Socket\" si metodë dhënjeje faksesh, e mandej duke " "prurë listën e fakseve në radhë pëmes shtypjes së butonit listë \"socket\"-" "i. Kjo është një mënyrë më e përshtatshme për dërgim faksesh prej një " "fjalëpërpunuesi, dhe mundëson dërgimin e një faksi te efax-gtk për faksim " "nëpërmjet shtypjes prej një programi fjalëpërpunimi. Kur një faks radhitet " "për dërgim te listë \"socket\"-i, do të shfaqet një rreth i vogël i kuq në " "dritaren kryesore të programit djathtas kutisë \"Fakse për t'u dërguar\". " "Për veçanti se si të rregullohet CUPS-i apo lpr/lprng për dërgim te efax-" "gtk, shihni kartelën README që shoqëron shpërndarjen.\n" "\n" "Numri i telefonit te i cili duhet dërguar faksi jepet te kutia \"Numër tel." "\". Ky mund të jepet drejtpërsëdrejti te kutia, ose duke përdorur librin e " "vendndodhjeve pjesë e programit. Libri i vendndodhjeve mund të thirret duke " "shtypur butonin \"Numër tel.\", ose prej pjesës së menusë `Kartelë/Libër " "Vendndodhjesh (shihni pjesën \"Libër Vendndodhjesh\" te ky dialog ndihme). " "Sidoqoftë, nëse një lidhje telefonike me marrës të largët faksesh është " "vendosur tashmë, atëhre faksi mund të dërgohet pa i rënë numrit duke e lënë " "bosh kutinë \"Numër tel.\" (do të shfaqet një dialog që ju pyet nëse doni të " "dërgoni faksin pa i rënë numrit).\n" "\n" "Kur merret një faks nga sistemi i shtypjes përmes një shërbyesi \"socket\", " "rregullimet e programit mund të formësohen gjithashtu të shfaqin " "automatikisht një dialog. Nëse programi është joveprues (për shembull, nuk " "është në pritje faksesh) faksi mund të dërgohet drejtpërsëdrejti prej këtij " "dialogu pa qenë nevoja të thirret lista e fakseve në pritje marrë prej " "\"socket\"-it.\n" "\n" "Fakset e dërguar me sukses kopjohen te një drejtori te drejtoria $HOME/" "faxsent, e cila ka një emër që vjen nga viti, muaji, dita, ora dhe sekondat " "kur u plotësua dërgimi i faksit, dhe që do të shfaqet listën e fakseve të " "dërguar. Ata përfshihen në atë listë vetëm nëse kanë qenë dërguar pa " "gabime. Kutia e paraqitjes së mesazheve efax do të raportojë mbi ecurinë e " "dërgimit të një faksi. Lista e fakseve mund të shfaqet prej pjesës së " "menusë`Kartela/Listo fakse të dërguar'. Shihni \"Përdorim listash faksesh\" " "më poshtë.\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "Marrje faksesh\n" "---------------\n" "\n" "Ofrohen tri rrugë për marrje faksesh.\n" "\n" "Së pari, programi mund të rregullohet t'i përgjigjet një thirrjeje faksi që " "po pret por nuk ka marrë përgjigje, duke shtypur butonin \"Përgjigjju " "thirrjes\".\n" "\n" "Së dyti, programi mund të marrë përsipër një thirrje së cilës i janë " "përgjigjur tashmë (të themi nga një telefon) duke shtypur butonin \"Merr " "përsipër thirrjen\".\n" "\n" "Së treti, programi mund të vendoset në mënyrën pritje duke shtypur butonin " "\"Standby\". Kjo do t'i përgjigjet çdo thirrjeje pas nurmit të " "tringëllimave caktuar në kartelën efax-gtkrc, dhe do të marrë faks. Programi " "do të vazhdojë të marrë fakse deri sa të shtypet butoni \"Ndal\".\n" "\n" "Fakset e marrë mund të shtypen, shihen, përshkruhen dhe administrohen duke " "përdorur lehtësitë e listës së fakseve trupëzuar në program. Kjo mund të " "sillet prej pjesës së menusë `Kartelë/Listo fakse të marrë'. Shihni " "\"Përdorim listash faksesh\" më poshtë.\n" "\n" "Kur merret një faks, mund të rregullohet të shfaqet një flluckë dialogu (për " "të bërë këtë shkoni te dialogu Rregullime). Te dialogu i rregullimeve " "mundet të caktoni gjithashtu një program i cili të ekzekutohet kur merret " "një faks. Numri i faksit jepet si argumenti i parë për programin, çka i " "mundëson programit të gjejë faksin në $HOME/faxin. Shpërndarja përmban dy " "programthe të ekzekutueshëm, mail_fax dhe print_fax, të cilët mund të " "përdoren për të dërguar faks si e-mail ose për ta shtypur për një përdorues " "automatikisht kur merret një. (Këta programthe nuk instalohen prej urdhrit " "'make install' - nëse doni t'i përdorni, bëjini të ekzekutueshëm me 'chmod " "+x' dhe kopjojini te një drejtori që gjendet në shtegun e sistemit si p.sh. /" "usr/local/bin, e mandej përcaktoni emrin e programthit te dialog " "rregullimesh.)\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "Përdorim libri vendndodhjesh\n" "----------------------\n" "\n" "Për të marrë një numër telefoni prej librit të vendndodhjeve, theksoni " "vendndodhjen përkatëse duke shtypur butonin e majtë të miut sipër saj, e " "mandej shtypni butonin \"OK\".\n" "\n" "Vendndodhjet mund të shtohen te libri i vendndodhjeveduke shtypur butonin " "shtoni, dhe duke plotësuar dialogun përkatës që do të shfaqet. Për të " "fshirë një vendndodhje prej librit të vendndodhjeve, theksoni vendndodhjen " "përkatëse dhe shtypni butonin fshini. Libri i vendndodhjeve mund të " "renditet duke përdorur butonat shigjetë sipër e poshtë në një vendndodhje " "të theksuar, ose duke tërhequr dhe lënë me miun.\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "Përdorim listash faksesh\n" "-------------------\n" "\n" "Për të hapur lista faksesh, shkoni tek menuja `Kartelë' dhe zgjidhni zërin " "`Listo fakse të marrë' ose `Listo fakse të dërguar'. Theksoni faksin për " "shtypje apo parje duke shtypur buton i majtë të miut. Programet e " "përdorshëm për shtypje dhe parje janë përcaktuar te kartela formësim efax-" "gtkrc, ose nëse nuk është dhënë ndonjë, programi do të shtypë duke përdorur " "lpr-në (çka funksionon për shumicën e sistemeve Unix) dhe shohë me gv.\n" "\n" "Për shtypje faksesh, mund të caktohet edhe një parametër PRINT_SHRINK " "(Tkurrje Shtypjeje) në efax-gtkrc për të bërë të mundur që faqja e faksit të " "hyjë brenda mënjanave të shtypësit. Një parametër prej 98 do të punojë në " "shumicën e shtypësave. Ky mund të ndryshohet, edhe kur programi xhiron, " "duke shfaqur dialogun `Rregullime' dhe duke e dhënë te kutia `Shtyp/Tkurrje " "Shtypjeje'.\n" "\n" "Mund të shtohet një përshkrim te një faks i marrë kur shfaqet te një listë " "faksesh (ose edhe ndryshohet pakëz) duke shtypur butonin përkatës -- kjo do " "të sjellë identifikim më të lehtë të fakseve.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "Rregullime\n" "--------\n" "\n" "Rregullimet e programit mund të ndryshohen dorazi duke përpunuar kartelë " "formësimi efax-gtk e gjendur $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc ose /" "etc/efax-gtkrc. Kartela kërkohet sipas asaj radhe, ndaj $HOME/.efax-gtkrc " "paraprin dy të tjerat.\n" "\n" "Kartela formësim mund të rregullohet gjithashtu duke përdorur dialogun e " "Rregullimeve prej pjesës së menusë `Kartelë/Rregullime'. Rregullimet e " "dhënë duke përdorur këtë dialog ruhen përherë si $HOME/.efax-gtkrc. Prandaj, " "nëse është përdorur dialogu Rregullime, dhe doni të ktheheni te rregullimet " "e përgjithshëm, kjo mund të bëhet ose duke fshirë kartelën $HOME/.efax-" "gtkrc, ose duke shtypur butonin `Ricaktoni' te dialogu Rregullime, çka do të " "ringarkojë dialogun Rregullime prej kartele të përgjithshme formësimi " "($sysconfdir/efax-gtkrc ose /etc/efax-gtkrc).\n" "\n" "Mund të kini ndihmë gjatë plotësimit të dialogut Rregullime duke mbajtur " "miun përsipër butonit përkatës së ndihmës (?), çka do të shfaqë një dritare " "\"Ndihmëza\", ose duke shtypur buton, çka do të sjellë një dritare të " "dhënash.\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "\"Socket\" xhirues në portën " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "U mor akt shtypjeje në \"socket\" \n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "Po mbyll \"socket\"-in\n" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: fakse në pritje prej \"socket\"-i" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "Akte shtypjeje në radhë" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "Jepni faks të përzgjedhur për dërgim" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Zgjidhni faksin e përzgjedhur për dërgim" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "AKT SHTYPJEJE:" #: src/socket_list.cpp:501 msgid "Remove " msgstr "Hiq " #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: Hiq faks në pritje" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: akt shtypjeje i marrë në \"socket\"" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Vër faks në radhë" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" "është marrë në \"socket\".\n" "Ta dërgoj apo ta vë në radhë faksin?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Listo fakse të marrë" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Listo fakse të dërguar" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "Në pritje faksesh" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Lër" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "sukses" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "numër i zënë ose modem në përdorim" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "gabim i pandreqshëm" #: efax/efax.c:382 msgid "invalid modem response" msgstr "përgjigje e pavlefshme modemi" #: efax/efax.c:383 msgid "no response from modem" msgstr "s'ka përgjigje prej modemit" #: efax/efax.c:385 msgid "internal error" msgstr "gabim i brendshëm" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "NSF - karakteristika përgjigjesh" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "CSI - ID përgjigjeje" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "DIS - aftësi përgjigjeje" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "NSS - karakteristika thirrësi" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "TSI - ID thirrësi" #: efax/efax.c:419 msgid "DCS - session format" msgstr "DCS - format sesioni" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "CFR - kanali OK" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "FTT - kanali jo OK" #: efax/efax.c:430 msgid "MPS - not done" msgstr "MPS - e pa kryer" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "EOM - i papërmbushur, format i ri" #: efax/efax.c:436 msgid "EOP - done" msgstr "EOP - ekryer" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "MCF - faqja OK" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "RTP - faqja OK, kontrollo kanal" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "RTN - faqe jo OK, kontrollo kanalin" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "CRP - përsërit urdhër" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "DCN - shkëputu" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "I PANJOHUR" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "aftësi vendore dhe të largëta të papërputhshme" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "s'fshij dot kartelën %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "hoqa kartelë: %s" #: efax/efax.c:784 msgid "header:" msgstr "titull: " #: efax/efax.c:868 msgid "characters received while sending" msgstr "mora shenja ndërkohë që po dërgoja" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "u dërguan %d+%d rreshta dhe %d+%d bajte, në %d sekonda me %d bps" #: efax/efax.c:915 msgid "flow control did not work" msgstr "kontrolli i rrjedhës nuk funksionoi" #: efax/efax.c:954 msgid "modem response in data" msgstr "përgjigje modemi në të dhëna" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "mesazh gabimi të pjesshëm \"buffer overflow\"" #: efax/efax.c:1036 msgid "file write:" msgstr "shkrim kartele:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "CAN: marrje të dhënash e anuluar" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "gabime marrjeje" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "u morën %d rreshta me %d gabime" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "mora TCF - kontroll kanali (OK: xhirim i %d te %d)" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "mora TCF - kontroll kanali (jo OK: xhirim i %d te %d)" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "bajti i fundit i kornizës është NULL" #: efax/efax.c:1222 msgid "sent" msgstr "dërguar" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "kornizë HDLC që nuk ka 0xff fillestar" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "mbarim kohe në lexim të dhënash kornize e sipër " #: efax/efax.c:1291 msgid "frame error" msgstr "gabim kornize" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "pa përgjigje pa të dhënash kornize" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "përgjigje e gabuar pas të dhënash kornize" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "kornizë shumë e gjatë, (%d, > %d bajte maksimum)" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "mbartës i gabuar" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "përgjigje e gabuar ndaj urdhri për marrje kornize" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "u mor kornizë e shkurtër (%d bajte)" #: efax/efax.c:1391 msgid "received" msgstr "marrë" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "ID-ja e largët është" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "pa përgjigje prej faksi të largët" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "s'hap dpt faqen" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "i largëti ka një a më shumë dokumente për të dërguar dhe mund të marrë" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" "i largëti ka një a më shumë dokumente për të dërguar dhe nuk mund të marrë" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "i largëti nuk ka dokumente për të dërguar dhe mund të marrë" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "i largëti nuk ka dokumente për të dërguar dhe nuk mund të marrë" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "i largëti nuk mund të marrë, po e provoj sido qoftë" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "i largëti nuk ka asgjë për të dërguar, po e provoj sido qoftë" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "kanal i papërdorshëm me %d bps" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "kanal i papërdorshëm me shpejtësinë më të ulët" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "përgjigje e pavlefshme për DCS" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "dërgova faqen %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "përgjigje pasfaqe e pavlefshme" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "mbarim kohe në pritje urdhri e sipër" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "faqe e ruajturte %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "urdhër i panjohur" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "pa urdhër apo përgjigje prej të largëtit" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "përfundim jo i zakonshëm (kod %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "s'u mor XON/DC2 pas CONNECT" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "u morën %d shenja ndërkohë që prisja për dërgim" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "i largëti ka një a më shumë dokumente për të dërguar." #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "s'u mor përgjigje +FPTS, merret e mirëqenë që faksi u mor" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "si shumë prova dërgimi faqeje" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "urdhri (+FDR) i marrjes dështoi" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "po i bie %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "ID-ja e largët është %s" #: efax/efax.c:2216 msgid "called" msgstr "thirrur" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "i lidhur" #: efax/efax.c:2224 msgid "number is busy" msgstr "numri është i zënë" #: efax/efax.c:2226 msgid "dial command failed" msgstr "urdhri për formim numri dështoi" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "po pres për veprimtari" #: efax/efax.c:2306 msgid "activity detected" msgstr "u pa veprimtari" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "s'përgjigjem dot: s'kyç dot pajisjen" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "si shumë shenja %%d te urdhri (%s)" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "po përmbush urdhrin /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "thirrja exec() dështoi:" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "pa urdhër getty të përcaktuar për thirrje me të dhëna" #: efax/efax.c:2353 msgid "fax call answered" msgstr "thirrja faks mori përgjigje" #: efax/efax.c:2356 msgid "voice call answered" msgstr "thirrja zë mori përgjigje" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "pa urdhër voice të përcaktuar për thirrje të zakonshme" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "i pazoti t'i përgjigjem thirrjes" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "modemi nuk mbulon fakse" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "s'përcaktoj dot mbulim klase modemi faks" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "po përdor %s në klasë %s" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "dështoi faqja %s" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "përfundoi - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "ID vendore (%s) cunguar në %d shenja" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "ID-ja vendore (%s) ka shenja jo standarde" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "argument i pasaktë cilësie (-q) (%s)" #: efax/efaxmsg.c:215 msgid " Error: " msgstr "Gabim:" #: efax/efaxmsg.c:216 msgid " Warning: " msgstr "Kujdes:" #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "s'hap dot kartelë %s:" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "s'marr dot format kartele %s" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "s'hap dot kartelë përfundim %s:" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "gabim shkrimi te pajisje faks:" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "përgjigje e papritur \"%s\"" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "urdhër modemi \"%s\" shumë i gjatë" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "mbarim kohe pas urdhri: %s" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "mbarim kohe pas shkrimit" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "përgjigje e gabuar pas urdhri: %s" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "përgjigje e gabuar pas pritjeje" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "sync: modem që s' përgjigjet" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "urdhri për modemin (%s) dështoi" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "urdhri për modemin dështoi" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "%s e kyçur ose e zënë - po pres" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "hapa %s" #~ msgid "New faxes: " #~ msgstr "Fakse Të rinj:" #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Copyright (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ "Ky program është qarkulluar nën Licensën e Përgjithshme Publike GNU, " #~ "versioni 2" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " kartelë formësimi\n" #~ "dhe /dev/modem nuk gjenden\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " kartelë formësim\n" #~ "Po përdor /dev/modem parazgjedhje\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "Po vazhdoj me urdhër parazgjedhje shtypësi 'lpr'\n" efax-gtk-3.2.8/po/en@boldquot.header0000644000175000001440000000247111466007654014230 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # efax-gtk-3.2.8/po/sq.gmo0000644000175000001440000017174011544574532011740 00000000000000 l!B!($"[M"_ ) 7P ;@q=B BB0BC, C9CUC#WC6{C'E E EEFFF%)FOF_F&nF FF+F!F1 G?G XGdGsGxGGGGG^G*KHvHH#HHH HH HnIqIIIIIIIIJ J (JB4JwJ J{JKp,KKKK6KL /L9LJL ]LiLpL LLL&LgL-M#FMjMM,MMMM:M!N88N:qNGNN=OLNOO:OOP=/PmP(P>Q9WQQ%QGQRRSSSS S TT T+T:T @TNT`TpT TTTTTTT TLTT4U#UUU;UV$V,V5V DV NVZV _VkV!rVgVV)W'?W*gWWWWWWW X*X=XQXZWXXY)Z 9[C[][o[ t[[[[ [[[ [ [[\!\0\F\ U\c\u\_\_\[P]U]c^f^o^ w^^^^^^ ^^^ ^_$_=_F_N_k_p___ __%_M_<`M`Ga`ahb!6cXdd(fefPXhmihjjd)lmx#ooMmpcpr$r*r2r/ s;s@sRsSes4t ttuuu,u 2u 6"u t2(ܲHd w Ƴг. |;&Ѵ' ,; h r |Mյ;=&Ld*Sܶ^0*P+ ,7[d<HW\ݹ3::n_  ,C \h~Ƚ ٽ !$CIPXYhW¾*E*bDҿٿ  ! 20<m# '.,V%"9Ur[w0~ #(HM`hq v '  0kKem^m X do    ->l u' F1xC r )Is@Xi~ZLAQ -u 4   #&JZ&b)!# 35T&! '7E>}*!- $7\t+&5(T(}(*14H2} 'D_s#* !4V%t-%">as$ 363?&s ' )5%_ #! =.l$,;%<;Y'  2A5t%7AEZCOS4<-BQcj4& #0T!t)";,^ 3K ,xg!SkZCFij+ t.R8TMX &t7"g~EBL $]BF9< Y*N;fxI' zDLnq3d)yl4aA@?f<Qv0hu=:0H|mv|e98q :jla)('-rp@#5Opw(e 2`]%N;o/R\ 6wV4PMccOkCyXHs.Du6~# G>} /TWAQ12bKW7$^"roJ&PU[`EI!_-1JZU5V^=_+>nd{s?,i*zG [b}{hm3%SY\ (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. Error: Warning: from the list? has been received on socket. Send or queue fax? or %d characters received while waiting to send%s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Albanian - Besnik Bleta Answer callAnswering callAutoBulgarian - Zdravko Nikolov CAN: data reception cancelledCFR - channel OKCRP - repeat commandCSI - answering IDCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Catalan - Jordi Sayol Salomo Choose the selected fax for sendingClass 1Class 2Class 2.0Closing the socket Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DCN - disconnectDCS - session formatDIS - answering capabilitiesDateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?EOM - not done, new formatEOP - doneEmpty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFTT - channel not OKFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)German - Steffen Wagner Greek - Hellenic Linux Users Group HDLC frame missing initial 0xffHebrew - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentityInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Invalid Utf8 received in EfaxController::read_pipe_cb() Invalid Utf8 received in MainWindow::read_error_pipe_cb() Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Invalid user name specified - it must be in plain ASCII characters. No user name will be shown on the fax top header line, but don't worry as the fax station number will always be given on the top header Invalid user name specified in "Identity" tab - it must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerItalian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingMCF - page OKMPS - not doneModemModem Class: Move address downMove address upMove file downMove file upMultiple filesNSF - answering featuresNSS - caller featuresNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the name to appear on the fax top header on sent faxes here. It must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitRTN - page not OK, check channelRTP - page OK, check channelReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! Send faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSimplified Chinese - Kite Lau Single fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopSwedish - Daniel Nylander TSI - caller IDTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether the destination fax number is included in the top fax header line for sent faxes. Uncheck the box if you do not want this to be shown (say because it includes a pay card access number)This specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class hereYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsabnormal termination (code %d)activity detectedcalledcan't answer: can't lock devicecan't delete file %s:can't determine fax modem class supportcan't get format of file %scan't open file %s:can't open output file %s:can't open pagechannel not usable at %d bpschannel not usable at lowest speedcharacters received while sendingconnecteddial command faileddialing %sefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingsexec() call failed:executing command /bin/sh -c %sfailed page %sfax call answeredfax device write error:file write:finished - %sflow control did not workframe errorframe too long (%d, > %d max bytes)header:incompatible local and remote capabilitiesincorrect quality (-q) argument (%s)internal errorinvalid modem responseinvalid post-page responseinvalid response to DCSlast byte of frame is NULLlocal ID (%s) has non-standard characterslocal ID (%s) truncated to %d characterslocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxmodem response in datano +FPTS response obtained, it is assumed that fax was receivedno XON/DC2 received after CONNECTno answer from remote faxno command or response from remoteno getty command defined for data callno response after frame datano response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceive (+FDR) command failedreceivedreceived %d lines with %d errorsreceived TCF - channel check (OK: run of %d in %d)received TCF - channel check (not OK: run of %d in %d)received short frame (%d bytes)reception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremote has one or more documents to send.removed file: %srun length buffer overflowsentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent page %ssuccesssync: modem not respondingterminated by signaltimed out after command: %stimed out after waitingtimed out reading frame datatimed out waiting for commandtoo many %%d escapes in command (%s)too many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing %s in class %svoice call answeredwaiting for activitywrong carrierwrong response after command: %swrong response after frame datawrong response after waitingwrong response to command to receive a frameProject-Id-Version: efax-gtk-3.0.9 Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2006-03-15 22:57+0200 Last-Translator: Besnik Bleta Language-Team: Albanian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (SHËNIM: Kjo do të fshijë përgjithmonë faksin prej sistemit të kartelave) *** Po ndërpres sesion dërgimesh/marrjesh *** Marrje faksesh --------------- Ofrohen tri rrugë për marrje faksesh. Së pari, programi mund të rregullohet t'i përgjigjet një thirrjeje faksi që po pret por nuk ka marrë përgjigje, duke shtypur butonin "Përgjigjju thirrjes". Së dyti, programi mund të marrë përsipër një thirrje së cilës i janë përgjigjur tashmë (të themi nga një telefon) duke shtypur butonin "Merr përsipër thirrjen". Së treti, programi mund të vendoset në mënyrën pritje duke shtypur butonin "Standby". Kjo do t'i përgjigjet çdo thirrjeje pas nurmit të tringëllimave caktuar në kartelën efax-gtkrc, dhe do të marrë faks. Programi do të vazhdojë të marrë fakse deri sa të shtypet butoni "Ndal". Fakset e marrë mund të shtypen, shihen, përshkruhen dhe administrohen duke përdorur lehtësitë e listës së fakseve trupëzuar në program. Kjo mund të sillet prej pjesës së menusë `Kartelë/Listo fakse të marrë'. Shihni "Përdorim listash faksesh" më poshtë. Kur merret një faks, mund të rregullohet të shfaqet një flluckë dialogu (për të bërë këtë shkoni te dialogu Rregullime). Te dialogu i rregullimeve mundet të caktoni gjithashtu një program i cili të ekzekutohet kur merret një faks. Numri i faksit jepet si argumenti i parë për programin, çka i mundëson programit të gjejë faksin në $HOME/faxin. Shpërndarja përmban dy programthe të ekzekutueshëm, mail_fax dhe print_fax, të cilët mund të përdoren për të dërguar faks si e-mail ose për ta shtypur për një përdorues automatikisht kur merret një. (Këta programthe nuk instalohen prej urdhrit 'make install' - nëse doni t'i përdorni, bëjini të ekzekutueshëm me 'chmod +x' dhe kopjojini te një drejtori që gjendet në shtegun e sistemit si p.sh. /usr/local/bin, e mandej përcaktoni emrin e programthit te dialog rregullimesh.) Dërgim faksesh ------------- Para se të dërgohet, një faks duhet dhënë te kutia "Fakse për t'u dërguar". Duhet të jetë në format postscript/PDF (një format i mundshëm për tërë përpunuesa fjalësh dhe dokumentesh Unix/Linux), dhe do të shndërrohet nga programi në formatin e duhur tiffg3 për fakse. Ka dy metoda dhënje faksesh. E para, faksi që duhet dërguar mund të ruhet si kartelë në sistem kartelash. Mund të jepet dorazi te kutia "Fakse për t'u dërguar" ose përmes dialogu përzgjedhjesh kartelash. Nëse kartela përmban një kartelë të vetme postscript/PDF, atëherë mund ta gjeni duke shtypur butonin "Kartelë e Vetme". Mund të gjendet më lehtë me këtë dialog nëse është vënë tek drejtoria $HOME/faxout. Kur te kutia "Fakse për t'u dërguar" janë dhënë më shumë se një kartelë, ato mund të dërgohen si një faks i vetëm vargan në rendin që janë dhënë te kutia. Kartela të tilla të shumëfishta përzgjidhen më lehtë duke përdorur listën e kartelave që shfaqet duke shtypur butonin "Kartela të Shumëfishta". Shtypja e butonit "Kartela të Shumëfishta" lejon gjetjen dhe shtimin e kartelave te listë kartelash, dhe ato mund të rirenditen duke përdorur butonat shigjetë Sipër ose Poshtë, ose duke i tërhequr e lënë me miun. Si alternativë, fakset mund të merren drejtpërsëdrejti nga sistemi i shtypjes me anën e shërbyesi "socket" prurë nga programi. Efax-gtk-ja mban një listë me radhën e fakseve të marrë prej "socket"-it të cilët mund të kihen duke zgjedhur"Socket" si metodë dhënjeje faksesh, e mandej duke prurë listën e fakseve në radhë pëmes shtypjes së butonit listë "socket"-i. Kjo është një mënyrë më e përshtatshme për dërgim faksesh prej një fjalëpërpunuesi, dhe mundëson dërgimin e një faksi te efax-gtk për faksim nëpërmjet shtypjes prej një programi fjalëpërpunimi. Kur një faks radhitet për dërgim te listë "socket"-i, do të shfaqet një rreth i vogël i kuq në dritaren kryesore të programit djathtas kutisë "Fakse për t'u dërguar". Për veçanti se si të rregullohet CUPS-i apo lpr/lprng për dërgim te efax-gtk, shihni kartelën README që shoqëron shpërndarjen. Numri i telefonit te i cili duhet dërguar faksi jepet te kutia "Numër tel.". Ky mund të jepet drejtpërsëdrejti te kutia, ose duke përdorur librin e vendndodhjeve pjesë e programit. Libri i vendndodhjeve mund të thirret duke shtypur butonin "Numër tel.", ose prej pjesës së menusë `Kartelë/Libër Vendndodhjesh (shihni pjesën "Libër Vendndodhjesh" te ky dialog ndihme). Sidoqoftë, nëse një lidhje telefonike me marrës të largët faksesh është vendosur tashmë, atëhre faksi mund të dërgohet pa i rënë numrit duke e lënë bosh kutinë "Numër tel." (do të shfaqet një dialog që ju pyet nëse doni të dërgoni faksin pa i rënë numrit). Kur merret një faks nga sistemi i shtypjes përmes një shërbyesi "socket", rregullimet e programit mund të formësohen gjithashtu të shfaqin automatikisht një dialog. Nëse programi është joveprues (për shembull, nuk është në pritje faksesh) faksi mund të dërgohet drejtpërsëdrejti prej këtij dialogu pa qenë nevoja të thirret lista e fakseve në pritje marrë prej "socket"-it. Fakset e dërguar me sukses kopjohen te një drejtori te drejtoria $HOME/faxsent, e cila ka një emër që vjen nga viti, muaji, dita, ora dhe sekondat kur u plotësua dërgimi i faksit, dhe që do të shfaqet listën e fakseve të dërguar. Ata përfshihen në atë listë vetëm nëse kanë qenë dërguar pa gabime. Kutia e paraqitjes së mesazheve efax do të raportojë mbi ecurinë e dërgimit të një faksi. Lista e fakseve mund të shfaqet prej pjesës së menusë`Kartela/Listo fakse të dërguar'. Shihni "Përdorim listash faksesh" më poshtë. Rregullime -------- Rregullimet e programit mund të ndryshohen dorazi duke përpunuar kartelë formësimi efax-gtk e gjendur $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc ose /etc/efax-gtkrc. Kartela kërkohet sipas asaj radhe, ndaj $HOME/.efax-gtkrc paraprin dy të tjerat. Kartela formësim mund të rregullohet gjithashtu duke përdorur dialogun e Rregullimeve prej pjesës së menusë `Kartelë/Rregullime'. Rregullimet e dhënë duke përdorur këtë dialog ruhen përherë si $HOME/.efax-gtkrc. Prandaj, nëse është përdorur dialogu Rregullime, dhe doni të ktheheni te rregullimet e përgjithshëm, kjo mund të bëhet ose duke fshirë kartelën $HOME/.efax-gtkrc, ose duke shtypur butonin `Ricaktoni' te dialogu Rregullime, çka do të ringarkojë dialogun Rregullime prej kartele të përgjithshme formësimi ($sysconfdir/efax-gtkrc ose /etc/efax-gtkrc). Mund të kini ndihmë gjatë plotësimit të dialogut Rregullime duke mbajtur miun përsipër butonit përkatës së ndihmës (?), çka do të shfaqë një dritare "Ndihmëza", ose duke shtypur buton, çka do të sjellë një dritare të dhënash. Përdorim libri vendndodhjesh ---------------------- Për të marrë një numër telefoni prej librit të vendndodhjeve, theksoni vendndodhjen përkatëse duke shtypur butonin e majtë të miut sipër saj, e mandej shtypni butonin "OK". Vendndodhjet mund të shtohen te libri i vendndodhjeveduke shtypur butonin shtoni, dhe duke plotësuar dialogun përkatës që do të shfaqet. Për të fshirë një vendndodhje prej librit të vendndodhjeve, theksoni vendndodhjen përkatëse dhe shtypni butonin fshini. Libri i vendndodhjeve mund të renditet duke përdorur butonat shigjetë sipër e poshtë në një vendndodhje të theksuar, ose duke tërhequr dhe lënë me miun. Përdorim listash faksesh ------------------- Për të hapur lista faksesh, shkoni tek menuja `Kartelë' dhe zgjidhni zërin `Listo fakse të marrë' ose `Listo fakse të dërguar'. Theksoni faksin për shtypje apo parje duke shtypur buton i majtë të miut. Programet e përdorshëm për shtypje dhe parje janë përcaktuar te kartela formësim efax-gtkrc, ose nëse nuk është dhënë ndonjë, programi do të shtypë duke përdorur lpr-në (çka funksionon për shumicën e sistemeve Unix) dhe shohë me gv. Për shtypje faksesh, mund të caktohet edhe një parametër PRINT_SHRINK (Tkurrje Shtypjeje) në efax-gtkrc për të bërë të mundur që faqja e faksit të hyjë brenda mënjanave të shtypësit. Një parametër prej 98 do të punojë në shumicën e shtypësave. Ky mund të ndryshohet, edhe kur programi xhiron, duke shfaqur dialogun `Rregullime' dhe duke e dhënë te kutia `Shtyp/Tkurrje Shtypjeje'. Mund të shtohet një përshkrim te një faks i marrë kur shfaqet te një listë faksesh (ose edhe ndryshohet pakëz) duke shtypur butonin përkatës -- kjo do të sjellë identifikim më të lehtë të fakseve. Gabim:Kujdes:prej liste?është marrë në "socket". Ta dërgoj apo ta vë në radhë faksin? ose u morën %d shenja ndërkohë që prisja për dërgim%s e kyçur ose e zënë - po pres?efax-gtk ka marrë një faksParësi postscript përdoret për të parë fakse të marrë dhe të dërguar nga listë faksesh, dhe edhe për të parë fakse që duhet të dërgohen të identifikuar përmes dialogu përzgjedhësi kartelash "Kartela për t'u faksuar". Përcaktoni këtu urdhrin që duhet përdorur për të parë kartela postscript. Nëse nuk jepet ndonjë, programi do të parazgjedhë 'gv'. Mundësi të tjera që do të donit të jepni janë 'evince' (parësi postscript GNOME) ose 'kghostview' (parësi postscript KDE). Nëse përdoret gv, mund të donit të përdorni mundësitë '-media A4' ose '-media Letter' për të përzgjedhur madhësinë e duhur të letrës. evince dhe kghostview e bëjnë automatikisht këtëËshtë marrë një akt shtypjeje në "socket"Rreth _efaxRreth efax-itRreth efax-_gtkRreth efax-gtkPranoShto kartela te listëShto te listë kartelash kartela për t'u faksuarShto vendndodhje të reShto dosje të reShto/përmirëso përshkrimin e faksit të përzgjedhurLibër VendndodhjeshVendndodhje të lejuara për lidhjePo vazhdoj me qartësi faksi parazgjedhje 204x196 Po vazhdoj me madhësi faqeje parazgjedhje a4 Po vazhdoj me urdhër parazgjedhje parjeje postscript-esh 'gv' Albanian - Besnik Bleta Përgjigju thirrjesPo i përgjigjem thirrjesAutoBullgarisht - Zdravko Nikolov CAN: marrje të dhënash e anuluarCFR - kanali OKCRP - përsërit urdhërCSI - ID përgjigjejeS'ndryshoj dot rregullimet pa u çaktivizuar programi Shtypni butonin Ndal për ta çaktivizuarNuk mund të dërgoj dot faks - është duke u marrë një faks Aftësi:Catalan - Jordi Sayol Salomo Zgjidhni faksin e përzgjedhur për dërgimKlasë 1Klasë 2Klasë 2.0Po mbyll "socket"-in Gabim FormësimiCopyright (C) 2001 - 2011 Chris Vine Ky program është qarkulluar nën Licensën e Përgjithshme Publike GNU, versioni 2 DCN - shkëputuDCS - format sesioniDIS - aftësi përgjigjejeDatëFshij vendndodhjeFshij dosje: Të fshij vendndodhjen e përzgjedhur?Fshij faksin e përzgjedhurFshij dosjen e përzgjedhurPërshkrimSinjalI pranoni Kushtet, Shënimet dhe Klauzolat treguar më sipër?EOM - i papërmbushur, format i riEOP - ekryerZbrazni dosjen duke fshirë cilëndo nëndosje dhe duke hequr ose fshirë cilindo faks aty para se të fshini dosjenZbraz dosje hedhurinashTë zbraz dosje hedhurinash? (SHËNIM: Kjo do të fshijë përgjithmonë prej sistemit të kartelave tërë fakset në dosjen Hedhurina)Jepni kartela të shu_mëfishtaJepni faks të përzgjedhur për dërgimJepni rregullime përEkzekuto një program ose programth kur është marrë faks prej modemitFTT - kanali jo OKLista FakseshPërshkrim faksi?Metodë dhënjeje faksiFaks për t'u dërguarKartelë Kartelë nuk ekziston Kartela për t'u faksuarImëtDosjeEmri i dosjes nuk mund të përmbajë shenjë:Emër dosjeje? (Shënoni që ky do të vendose në nivelin e sipërm dhe mund të mirret-dhe-lihet brenda dosjesh të tjera)German - Steffen Wagner Greqisht - Hellenic Linux Users Group kornizë HDLC që nuk ka 0xff fillestarHebraishte - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentitetJovepruesTë marrëPërfshi numër faksi vendmbërritje te rreshti i sipër titulli faqeje faksiParametra Gatitjeje:U mor Utf8 i pavlefshëm te EfaxController::read_pipe_cb() Utf8 e pavlefshme marrë te MainWindow::read_error_pipe_cb() Është dhënë WORK_SUBDIR: e pavlefshme. WORK_SUBDIR: do të shpërfillet Është dhënë lloj i pavlefshëm sinjaliËshtë dhënë lloj i pavlefshëm sinjali Po vazhdoj me sinjalin parazgjedhje ton Është dhënë qartësi faksi e pavlefshme Po vazhdoj me qartësi faksi parazgjedhje 204x196 Është dhënë klasë e pavlefshme modemiËshtë dhënë klasë modemi e pavlefshme Po vazhdoj me parazgjedhjen Klasë 2 Mundësi e pavlefshme. Mundësitë janë: Është dhënë madhësi e pavlefshme faqejeËshtë dhënë madhësi faqeje e pavlefshme Po vazhdoj me madhësi faqeje parazgjedhje a4 Është dhënë portë e pavlefshme për shërbyes "socket"-i, ndaj shërbyesi nuk do të niset. Lipset të jetë midis 1024 dhe 65535 Është dhënë parametër i pavlefshëm tkurrjeje shtypjejeËshtë dhënë tkurrje e pavlefshme shtypjeje: po vazhdoj me vlerën parazgjedhje 100 Është dhënë numër i pavlefshën tringëlimash Do të përgjigjem pas një tringëllime Është dhënë numër i pavlefshëm tringëllimashËshtë dhënë qartësi e pavlefshme faksesh të dërguarËshtë dhënë numër i pavlefshëm porte "socket"-i. Duhet të jetë ndërmjet 1024 dhe 65535Është dhënë emër i pavlefshëm përdoruesi - duhet të jetë me shenja të thjeshta ASCII. Nuk do të tregohet emër përdoruesi te rreshti i sipërm i titullit të faksit, por mos u merakosni sepse numri i faksit do të shfaqet gjithmonë në titullin e sipërm Është dhënë emër i pavlefshëm përdoruesi te pjesa "Identitet" - duhet të jetë me shenja të thjeshta ASCII. Nëse e keni problem, lëreni bosh ngaqë numri i faksit do të dërgohet përherë me titullin e sipërmItalisht - Luca De Rugeriis Listo fakse të _marrëListo fakse të marrëListo fakse të dërguarLock File: Kartelë Regjistrimi HyrjeMCF - faqja OKMPS - e pa kryerModemKlasë Modemi:Ul vendndodhjeNgri vendndodhjeUl kartelëNgri kartelëShumë kartelaNSF - karakteristika përgjigjeshNSS - karakteristika thirrësiEmërEmër:Emër: Fakse Të rinj:S'është dhënë numër faksi. Doni të dërgohet faksi nëpër një lidhje të hapët?S'është dhënë portë për "socket" shërbyesi, prandaj shërbyesi nuk do të niset S'është dhënë pajisje porte seriale teEmër i pavlefshëm kartele S'ka kartelë postscript/PDF të vlefshme Shënim: shtypja e butonit OK do t'i ruajë rregullimet në kartelëNumërNumër:Numër:Parametra të Tjerë AKT SHTYPJEJEAKT SHTYPJEJE:FaqeMadhësi Faqeje:ParametraTë fshij përgjithmonë fakset e përzgjedhur? Të fshij përgjithmonë fakset e përzgjedhur? (SHËNIM: Kjo do të fshijë fakset përgjithmonë prej sistemit të kartelave)Polonisht - Pawel Suwinski Shfaq dialog ripohimi para shtypjesShfaq dialog kur merret faks nga modemiNxirr dialog kur merret faks prej "socket"-iPortë te e cila të dërgohen fakse:Program Parës Postscript-esh:Shtypni F1 për ndihmëShtypProgram Shtypjeje: Tkurrje Shtypjeje (50-100):U mor akt shtypjeje në "socket" Shtyp faksin e përzgjedhurShtyp faksin e përzgjedhur?PulsVini këtu drejtorinë "lock file". Nëse nuk jepet ndonjë, programi parazgjedh /var/lockVini këtu emrin që do të duket në titullin e sipërm të faksit te fakset e dërguar. Duhet të jetë me shenja të thjeshta ASCII. Nëse kjo është problem, lëreni bosh meqë numri i faksit do të duke gjithmonë te titulli i sipërmVini këtu numrin që do të duket në krye të titullit të faksit për fakset që dërgohen. Kjo përfshin edhe ID makine faksi dhënë makinës që dërgon faksin kur merren fakseVini këtu pajisjen seriale te e cila është lidhur modemi (nëse nuk jepet ndonjë, programi parazgjedh /dev/modem). Mos përfshini pjesën `/dev/' të emrit të pajisjes -- me fjalë të tjera vëreni si `ttyS1' ose `cua2', etj. Nën Linux, ttyS0 është baraz me COM 1, ttyS1 me COM 2, e me radhë.Vër faks në radhëFakse në radhë prej "socket"-iAkte shtypjeje në radhëLërRTN - faqe jo OK, kontrollo kanalinRTP - faqja OK, kontrollo kanalMerrNë pritje fakseshPo marrHidh tejHiq Hiq kartelëHiq kartelë Hiq kartelën e përzgjedhur prej listeRimerrRicaktoni Parametra:Rifillo numërim fakseshtë rinjRicakto rregullimeZile (1-9):Xhiro shërbyes "socket"-iRusisht - Pavel Vainerman GABIM SERIOZ SISTEMI: S'krijoj dot drejtori ruajtjeje faksesh të marrë. Ky faks nuk ka për t'u ruajtur! GABIM SERIOZ SISTEMI: S'krijoj dot drejtori ruajtjeje faksesh të marrë. Nuk mund të merren fakse! GABIM SERIOZ SISTEMI: S'krijoj dot drejtori ruajtjeje faksesh të dërguar. Ky faks nuk ka për t'u ruajtur! GABIM SERIOZ SISTEMI: S'hap dot drejtori faksesh të marrë. Ky faks nuk ka për t'u ruajtur! GABIM SERIOZ SISTEMI: S'ruaj dot tërë fakset e marrë. Do të mungojë tërë faksi ose një pjesë e tij! Dërgo faksPo dërgojPo dërgoj faksQartësi Faksesh të DërguarKuti të DërguarishPajisje Seriale:RregullimeSimplified Chinese - Kite Lau Një kartelë"Socket""Socket" Listë "Socket"-i"Socket" xhirues në portën Përcaktoni këtu madhësi faqeje për faksetStandardGatishmëriNë gatishmëri për të marrë thirrjeNdalSwedish - Daniel Nylander TSI - ID thirrësiMerr thirrje përsipërNumër tel.:Numër telefoniDosja vijuese ekziston tashmë:Programi është nisur me mundësinë -s por nuk ka shtyllë sistemi! ID-ja e largët ështëID-ja e largët është %sKjo mund të përdoret për t'i kaluar efax-it çfarëdo parametri tjetër (kryeni një `man efax' për të parë se çfarë është e mundshme). Jepni aq sa ju duhen, ndarë prej hapësirash për parametra të ndryshëm -- p.sh. përfshini `-or' për të kryer përmbysje bitesh gjatë marrjesh nga modem Multitech i cili e kërkon këtë. Lëreni bosh këtë, veç në paçi një modem jo të zakonshëmKjo përcakton numër tringëllimash që lejon modemi para se t'i përgjigjet telefonit prej mënyrës Standby. Vlerat e pranueshme janë nga 1 te 9. Nëse nuk jepet ndonjë, programi parazgjedh 1Ky është urdhri që shtyp dhe pranon futje postscript gjatë futjesh standarde. Nëse nuk jepet ndonjë, programi do të parazgjedhë `lpr'Ky parametër përcakton një kartelë regjistrimesh te e cila regjistrohen ecuria e negociatave dhe gjendje faksesh, si dhe gabime dhe sinjalizime. Nëse nuk jepet ndonjë, atëherë nuk do të ketë kartelë regjistrimesh. (Kartelë regjistrimesh mund të mbahet edhe duke ridrejtuar "stdout" dhe "stderr" -- shihni kartelën README për të hollësi të mëtejshme)Ky parametër përcakton të shfaqet apo jo një dialog flluckë kur merret faks prej një modemi. Vini shenjë te kutia nëse doni një flluckë.Ky program (efax-gtk) është një ndërfaqe për efax-in. efax-i është një program i qarkulluar nën Licensën e Përgjithshme Publike GNU, versioni 2, nga Ed Casas.Kjo përcakton urdhra `AT' gatitjeje që do të rirregullojnë modemin. Jepni aq sa ju duhen, ndarë prej hapësirash për urdhrat që lipset të jenë të ndarë, por pa një `AT' paraprake. Nëse nuk jepet ndonjë, programi parazgjedh `Z', që do të jetë i saktë praktikisht për çdo modemKjo përcakton aftësitë e modemit. Për të parë se ç'do të thotë kjo kryeni `man efax', dhe shihni ç'përmbush shenja `-c' flag. Me efax-0.9 dhe një modem të Klasës 2, zakonisht nuk do t'ju ta tregoni këtë dhe do të duhej ta linit bosh, ngaqë modemi do të pyetet prej programit. Nëse përdoret një version më i hershëm i efax-it ose modem nga një tjetër klasë, vlera me të cilat do të punojë praktikisht çfarëdo modem 14,400 bps janë 1,5,0,2,0,0,0,0, ose 1,3,0,2,0,0,0,0 për më të ngadalshëm.Kjo përcakton urdhra `AT' gatitjeje për modemin gjatë mënyrës faks. Jepni aq sa ju duhen, ndarë prej hapësirash për urdhrat që lipset të jenë të ndarë, por pa një `AT' paraprake. Nëse nuk jepet ndonjë, programi parazgjedh `Z &FE&D2S7=120 &C0 M1L0', që do të jetë i saktë praktikisht për çdo modemKjo përcakton numrin e portës prej të cilës duhet të dëgjojë shërbyesi "socket".Kjo përcakton qartësinë me të cilën dërgohen fakset. "Standard" jep 204x98 dhe "Imët" jep 204x196Kjo përcakton nëse të shfaqet apo jo një flluckë dialogu ripohimi para shtypjesh kurdo që shtypet butoni "Shtyp faksin e përzgjedhur" te listë Faksesh të Marrë ose listë Faksesh të Dërguar. Mos vini shenjë te kutia nëse nuk doni dialog (nëse te kutia Program Shtypjesh keni dhënë një përgjegjës të jashtëm shtypjesh si p.sh. 'kprinter', atëherë nuk ju duhet shenjë këtu).Kjo përcakton nëse duhet të hapet një flluckë dialogu kurdo që merret një faks nga shërbyesi "socket" prej sistemit të shtypjes. Vini shenjë në këtë kuti nëse doni një dialog (nuk ka efekt po qe se nuk keni vënë shenjë te kutia për përdorim shërbyesi "socket"). Nëse programi është joveprues faksi mund të dërgohet drejtpërsëdrejti prej këtij dialogu.Kjo përcakton nëse një program ose programth duhet ekzekutuar kur meeret një faks nga një modem. Vini shenjë te kutia nëse doni të ekzekutohet një program, dhe jepni emrin e programit.Kjo përcakton nëse duhet përdorur një shërbyes "socket" për CUPS-in apo për ndonjë sistem tjetër shtypjeje. Vini shenjë në këtë kuti nëse duhet përdorur njëKjo përcakton në përfshihet a jo numri i faksit vendmbërritje te rreshti i sipërm i titullit të faksit për fakset e dërguar. Çshenjojeni kutinë nëse nuk doni që ky të duket (le të themi për shkak se përfshin një numër karte pagesash)Kjo përcakton nëse duhet përdorur sinjal ton apo puls kur dërgohen fakseKjo do të përcaktojë shkallën e reduktimit të një faqeje që do të shtypet për ta nxënë zona e shtypjes te shtypësi. Shprehur në përqindje -- p.sh. 98 do ta tkurrë faqen te 98 përqind e madhësisë së saj. Nëse nuk jepet ndonjë nuk do të ketë tkurrje (pra mundeni, por nuk ka nevojë, të jepni 100)TonHedhurinaI PANJOHURPërdorimi: efax-gtk [mundësi] [emër kartele] Mundësi: -r Nis programin me mënyrën në pritje faksesh -s Nis programin fshehur në shtyllë sistemi Për më tepër hollësi shihni kartelën README që gjendet te shpërndarja Përdoruesi nuk ka leje leximi mbi kartelën ParjeShihni faksin e përzgjedhurShihni kartelën e përzgjedhurMe efax-0.9 ose më të ri zakonisht do të duhej të zgjidhni "Auto", ngaqë kështu efax-i do ta gjejë vetë klasën e modemit, por mundet edhe vini një klasë tjetër duke e zgjedhur nga ato të dhënat nëse doni. Sidoqoftë, me efax-0.8 programi parazgjedh Klasën 2, ndaj nëse përdorni modem të Klasës 1 me versione të vjetër të efax-it jepeni Klasën këtuNuk keni ndryshoren e mjedisit $HOME të rregulluar _Libër vendndodhjesh_Jepni kartelë_Kartelë_NdihmëListë faske të _dërguar_Lër_Rregullime_Përkthimepërfundim jo i zakonshëm (kod %d)u pa veprimtarithirrurs'përgjigjem dot: s'kyç dot pajisjens'fshij dot kartelën %s:s'përcaktoj dot mbulim klase modemi fakss'marr dot format kartele %ss'hap dot kartelë %s:s'hap dot kartelë përfundim %s:s'hap dpt faqenkanal i papërdorshëm me %d bpskanal i papërdorshëm me shpejtësinë më të ulëtmora shenja ndërkohë që po dërgojai lidhururdhri për formim numri dështoipo i bie %sndihmë për efax-gtk: Aftësindihmë e efax-gtk-së: Pajisjendihmë për efax-gtk: Sinjalndihmë për efax-gtk: Ekzekuto program kur merret faksndihma e efax-gtk-së: Rreshti i sipërm i titullit të faksitndihmë për efax-gtk: Parametra Gatitjejendihmë e efax-gtk-së: Lock Filendihmë për efax-gtk: Kartelë Regjistrimeshndihmë për efax-gtk: Klasë Modemiefax-gtk ndihmë: Emërefax-gtk ndihmë: Numërndihmë për efax-gtk: Parametra të Tjerëndihmë për efax-gtk: Madhësi Faqejendihëm për efax-gtk: Flluckëndihmë për efax-gtk: Portëndihmë për efax-gtk: Program Parës për Postscriptndihmë për efax-gtk: Program Shtypjejendihmë për efax-gtk: Tkurrje Shtypjejendihmë për efax-gtk: Flluckë marrjejendihmë për efax-gtk: Ricaktoni Parametrandihmë për efax-gtk: Zilendihmë për efax-gtk: Xhiro shërbyes "socket"-indihmë për efax-gtk: Qartësi Faksesh të Dërguarndihmë për efax-gtk: Lidhje "socket" të lejuara"socket" efax-gtkefax-gtk: efax-gtk: Shto vendndodhjeefax-gtk: Shto dosjeefax-gtk: Libër vendndodhjeshefax-gtk: Kushte, Shënime dhe Klauzolaefax-gtk: Fshi vendndodhjeefax-gtk: Fshi faksefax-gtk: Fshi dosjeefax-gtk: Përshkrim faksiefax-gtk: Listë kartelashefax-gtk: Kartelë për t'u faksuarefax-gtk: Ndihmëefax-gtk: Shtyp faksefax-gtk: fakse në pritje prej "socket"-iefax-gtk: Listë faksesh e marrëefax-gtk: Hiq faks në pritjeefax-gtk: Listë faksesh të dërguarefax-gtk: Përkthimeefax-gtk: Dosje hedhurinëefax-gtk: faks i marrëefax-gtk: akt shtypjeje i marrë në "socket"efax-gtk: rregullimethirrja exec() dështoi:po përmbush urdhrin /bin/sh -c %sdështoi faqja %sthirrja faks mori përgjigjegabim shkrimi te pajisje faks:shkrim kartele:përfundoi - %skontrolli i rrjedhës nuk funksionoigabim kornizekornizë shumë e gjatë, (%d, > %d bajte maksimum)titull: aftësi vendore dhe të largëta të papërputhshmeargument i pasaktë cilësie (-q) (%s)gabim i brendshëmpërgjigje e pavlefshme modemipërgjigje pasfaqe e pavlefshmepërgjigje e pavlefshme për DCSbajti i fundit i kornizës është NULLID-ja vendore (%s) ka shenja jo standardeID vendore (%s) cunguar në %d shenjalocalhost urdhër modemi "%s" shumë i gjatëurdhri për modemin (%s) dështoiurdhri për modemin dështoimodemi nuk mbulon faksepërgjigje modemi në të dhënas'u mor përgjigje +FPTS, merret e mirëqenë që faksi u mors'u mor XON/DC2 pas CONNECTpa përgjigje prej faksi të largëtpa urdhër apo përgjigje prej të largëtitpa urdhër getty të përcaktuar për thirrje me të dhënapa përgjigje pa të dhënash kornizes'ka përgjigje prej modemitpa urdhër voice të përcaktuar për thirrje të zakonshmenumër i zënë ose modem në përdorimnumri është i zënëhapa %stjetërfaqe e ruajturte %surdhri (+FDR) i marrjes dështoimarrëu morën %d rreshta me %d gabimemora TCF - kontroll kanali (OK: xhirim i %d te %d)mora TCF - kontroll kanali (jo OK: xhirim i %d te %d)u mor kornizë e shkurtër (%d bajte)gabime marrjejei largëti nuk mund të marrë, po e provoj sido qoftëi largëti nuk ka dokumente për të dërguar dhe mund të marrëi largëti nuk ka dokumente për të dërguar dhe nuk mund të marrëi largëti nuk ka asgjë për të dërguar, po e provoj sido qoftëi largëti ka një a më shumë dokumente për të dërguar dhe mund të marrëi largëti ka një a më shumë dokumente për të dërguar dhe nuk mund të marrëi largëti ka një a më shumë dokumente për të dërguar.hoqa kartelë: %smesazh gabimi të pjesshëm "buffer overflow"dërguaru dërguan %d+%d rreshta dhe %d+%d bajte, në %d sekonda me %d bpsdërgova faqen %ssuksessync: modem që s' përgjigjetpëfundur prej sinjalimbarim kohe pas urdhri: %smbarim kohe pas shkrimitmbarim kohe në lexim të dhënash kornize e sipër mbarim kohe në pritje urdhri e sipërsi shumë shenja %%d te urdhri (%s)si shumë prova dërgimi faqejei pazoti t'i përgjigjem thirrjespërgjigje e papritur "%s"urdhër i panjohurgabim i pandreqshëmpo përdor %s në klasë %sthirrja zë mori përgjigjepo pres për veprimtarimbartës i gabuarpërgjigje e gabuar pas urdhri: %spërgjigje e gabuar pas të dhënash kornizepërgjigje e gabuar pas pritjejepërgjigje e gabuar ndaj urdhri për marrje kornizeefax-gtk-3.2.8/po/el.po0000644000175000001440000030623611544574527011555 00000000000000# Hellenic support for efax-gtk # Copyright (C) 2001-2004 Chris Vine (for English) # Copyright (C) 2004,2007 Hellenic Linux Users Group # http://www.hellug.gr # This file is distributed under the same license as the efax-gtk package. # # msgid "" msgstr "" "Project-Id-Version: efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2007-03-11 01:00+0200\n" "Last-Translator: ta_panta_rei \n" "Language-Team: Greek \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Βιβλίο διευθύνσεων" #: src/addressbook.cpp:122 msgid "Name" msgstr "Όνομα" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Αριθμός" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Προσθήκη νέας διεύθυνσης" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Διαγραφή διεύθυνσης" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Μετακίνηση διεύθυνσης προς τα πάνω" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Μετακίνηση διεύθυνσης προς τα κάτω" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Να διαγραφεί η επιλεγμένη διεύθυνση;" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: Διαγραφή διεύθυνσης" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: Προσθήκη διεύθυνσης" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Όνομα:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Αριθμός:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: Αρχείο προς αποστολή" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Προβολή" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: Όροι Χρήσης" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Αποδοχή" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Απόρριψη" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "Αποδέχεστε τους Όρους Χρήσης που εμφανίζονται παραπάνω;" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "Σχετικά με το efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "Σχετικά με το efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Το πρόγραμμα αυτό είναι ένα αλληλεπιδραστικό περιβάλλον για το πρόγραμμα " "efax. Το πρόγραμμα efax είναι πνευματική ιδιοκτησία του Ed Casas και " "διανέμεται σύμφωνα με την άδεια χρήσης GNU General Public License, έκδοση 2." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Ανενεργό" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Αποστολή φαξ" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Απάντηση κλήσης" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "Σε αναμονή για απάντηση κλήσεων" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "Αδυναμία αποστολής φαξ - ένα άλλο φαξ λαμβάνεται\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Μη έγκυρο όνομα αρχείου\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "Το αρχείο δεν υπάρχει\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "Ο χρήστης δεν έχει άδεια να διαβάσει αυτό το αρχείο\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "Μη έγκυρο αρχείο PostScript/PDF\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** Διακοπή διαδικασίας αποστολής/λήψης ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "Εργασία Εκτύπωσης" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Εκτύπωση επιλεγμένου φαξ" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Προβολή επιλεγμένου φαξ" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Προσθήκη/διόρθωση περιγραφής επιλεγμένου φαξ" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Διαγραφή επιλεγμένου φαξ" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Άδειασμα κάδου απορριμμάτων" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Προσθήκη νέου καταλόγου" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Διαγραφή επιλεγμένου καταλόγου" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Κατάλογος ληφθέντων φαξ" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: Κατάλογος απεσταλμένων φαξ" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Να διαγραφούν μόνιμα τα επιλεγμένα φαξ;\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(Προσοχή: Με αυτό το φαξ θα διαγραφεί μόνιμα\n" "από το σύστημα)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Να διαγραφούν μόνιμα τα επιλεγμένα φαξ;\n" "\n" "(Προσοχή: Με αυτό τα φαξ θα διαγραφούν μόνιμα\n" "από το σύστημα)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: Διαγραφή φαξ" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Να αδειάσει ο κάδος απορριμμάτων;\n" "\n" "(Προσοχή: Με αυτό όλα τα φαξ στον κατάλογο Απορρίμματα\n" "θα διαγραφούν μόνιμα από το σύστημα)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: Κατάλογος Απορρίμματα" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: Προσθήκη καταλόγου" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Αδειάστε τον κατάλογο διαγράφοντας όλους τους υποκαταλόγους\n" "και μεταφέροντας ή διαγράφοντας όλα τα φαξ που αυτός περιέχει,\n" "πριν να διαγράψετε τον κατάλογο" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: Διαγραφή καταλόγου" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Διαγραφή καταλόγου: " #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr ";" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Εκτύπωση επιλεγμένου φαξ;" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: Εκτύπωση φαξ" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: Περιγραφή φαξ" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Περιγραφή φαξ;" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Όνομα καταλόγου;\n" "(Προσοχή: θα τοποθετηθεί στο κορυφαίο\n" "επίπεδο και μπορεί να μεταφερθεί σε άλλους\n" "καταλόγους)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "Το όνομα του καταλόγου δεν μπορεί να περιέχει το χαρακτήρα: " #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "Ο κατάλογος υπάρχει ήδη: " #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Κατάλογος" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Περιγραφή" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Εισερχόμενα" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Απεσταλμένα" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Απορρίμματα" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: Κατάλογος Αρχείων" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "Αρχεία προς αποστολή" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Προβολή επιλεγμένου αρχείου" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Διαγραφή επιλεγμένου αρχείου από τον κατάλογο" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Προσθήκη αρχείων στον κατάλογο" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Προσθήκη αρχείων στον κατάλογο φαξ προς αποστολή" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Μετακίνηση αρχείου προς τα πάνω" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Μετακίνηση αρχείου προς τα κάτω" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Διαγραφή αρχείου " #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " από τον κατάλογο;" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Διαγραφή αρχείου" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Πνευματική ιδιοκτησία (C) 2001 - 2011 Chris Vine\n" "Αυτό το πρόγραμμα διανέμεται σύμφωνα με την άδεια χρήσης\n" "GNU General Public License, έκδοση 2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Χρήση: efax-gtk [επιλογές] [όνομα_αρχείου]\n" "Επιλογές:\n" "\t-r Εκκίνηση προγράμματος σε κατάσταση αναμονής κλήσης\n" "\t-s Εκκίνηση προγράμματος κρυμμένου στη γραμμή εργασιών\n" "Δείτε το αρχείο README το οποίο διανέμεται μαζί με το πρόγραμμα\n" "για περισσότερες λεπτομέρειες\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Μη έγκυρη επιλογή. Οι επιλογές είναι:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "Ορίστηκε μη έγκυρη κλάση μόντεμ\n" "Θα χρησιμοποιηθεί η προκαθορισμένη κλάση 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "Δεν ορίστηκε συσκευή σειριακής θύρας στο αρχείο ρυθμίσεων " #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "Θα χρησιμοποιηθεί η προκαθορισμένη ανάλυση 204x196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "Ορίστηκε μη έγκυρη ανάλυση φαξ\n" "Θα χρησιμοποιηθεί η προκαθορισμένη ανάλυση 204x196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "Ορίστηκε μη έγκυρος αριθμός κουδουνισμάτων\n" "Θα απαντηθεί η κλήση μετά από ένα κουδούνισμα\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "Θα χρησιμοποιηθεί το προκαθορισμένο μέγεθος σελίδας a4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "Ορίστηκε μη έγκυρο μέγεθος σελίδας\n" "Θα χρησιμοποιηθεί το προκαθορισμένο μέγεθος σελίδας a4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "Ορίστηκε μη έγκυροo σύστημα κλήσης\n" "Θα χρησιμοποιηθεί το προκαθορισμένο τονικό σύστημα κλήσης\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" "Ορίστηκε μη έγκυρη συρρίκνωση εκτύπωσης.\n" "Θα χρησιμοποιηθεί η προκαθορισμένη τιμή 100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "Θα χρησιμοποιηθεί η προκαθορισμένη εντολή προβολής PostScript 'gv'\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" "Δεν ορίστηκε αριθμός πόρτας για τον εξυπηρετητή υποδοχέα\n" "Έτσι ο εξυπηρετητής δεν θα εκκινηθεί\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "Μη έγκυρος αριθμός πόρτας για τον εξυπηρετητή υποδοχέα (πρέπει να είναι " "μεταξύ\n" "1024 και 65535). Έτσι ο εξυπηρετητής δεν θα εκκινηθεί\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "Ορίστηκε μη έγκυρος κατάλογος εργασίας WORK_SUBDIR. Θα αγνοηθεί\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "Αρχείο " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "Υποδοχέας " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Μέθοδος εισαγωγής φαξ: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "Ένα αρχείο" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "Πολλά αρχεία" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Κατάλογος υποδοχέα" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Τηλ. αριθμός: " #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Αποστολή φαξ" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Απάντηση κλήσης" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Ανάληψη κλήσης" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "Σε αναμονή" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Διακοπή" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Φαξ προς αποστολή" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "Κατάλογος _Ληφθέντων φαξ" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "Κατάλογος _Απεσταλμένων φαξ" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "Φαξ στην _Ουρά από υποδοχέα" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "Εισαγωγή _Ενός αρχείου" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "Εισαγωγή _Πολλών αρχείων" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_Βιβλίο διευθύνσεων" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Ρυθμίσεις" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "Έ_ξοδος" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "_Σχετικά με το efax-gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "Σχετικά με το _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Μεταφράσεις" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Βοήθεια" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_Αρχείο" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "" "Το πρόγραμμα εκκινήθηκε με την επιλογή -s, αλλά δεν υπάρχει γραμμή " "εργαλείων!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "" "Δεν ορίστηκε αριθμός τηλεφώνου. Επιθυμείτε να σταλεί το φαξ σε ήδη ανοιχτή " "σύνδεση;" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Αριθμός τηλεφώνου" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "Μία εργασία εκτύπωσης ελήφθη επιτυχώς στον υποδοχέα" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk υποδοχέας" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "Ένα φαξ ελήφθη από το efax-gtk" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: φαξ ελήφθη" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "Αδυναμία αλλαγής ρυθμίσεων όταν το πρόγραμμα δεν είναι ανενεργό\n" "Πατήστε το πλήκτρο Διακοπή για να γίνει ανενεργό" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Μεταφράσεις" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Πατήστε το πλήκτρο F1 για βοήθεια" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "τερματισμός από σήμα" #: src/settings.cpp:68 msgid "Name: " msgstr "Όνομα: " #: src/settings.cpp:69 msgid "Number: " msgstr "Αριθμός: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Σειριακή Συσκευή: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "Αρχείο για εξασφάλιση αποκλειστικής χρήσης: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "Δυνατότητες: " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Κουδουνίσματα (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Κλάση Μόντεμ: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Σύστημα Κλήσης: " #: src/settings.cpp:211 msgid "Auto" msgstr "Αυτόματα" #: src/settings.cpp:213 msgid "Class 1" msgstr "Κλάση 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Κλάση 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Κλάση 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Τονικό" #: src/settings.cpp:235 msgid "Pulse" msgstr "Παλμικό" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Παράμετροι Αρχικοποίησης:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "Παράμετροι Επαναφοράς: " #: src/settings.cpp:510 msgid "Other Params: " msgstr "Άλλες Παράμετροι: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Πρόγραμμα Εκτύπωσης: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Συρρίκνωση Εκτύπωσης (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "Εμφάνιση παραθύρου επιβεβαίωσης\n" "πριν την εκτύπωση" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Πρόγραμμα προβολής\n" "PostScript:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Εκτέλεση εξυπηρετητή υποδοχέα" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Εμφάνιση παραθύρου διαλόγου\n" "όταν λαμβάνεται φαξ στον υποδοχέα" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "Θύρα προς την οποία να\n" "αποστέλλονται τα φαξ:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Διευθύνσεις που επιτρέπεται\n" "να συνδεθούν" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "τοπικός η/υ " #: src/settings.cpp:1016 msgid "other" msgstr "άλλοι" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "Εμφάνιση παραθύρου διαλόγου\n" "όταν λαμβάνεται φαξ από το μόντεμ" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "Εκτέλεση προγράμματος ή σεναρίου\n" "όταν λαμβάνεται φαξ από το μόντεμ" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "Ανάλυση για αποστελλόμενα φαξ:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "Κανονική" #: src/settings.cpp:1514 msgid "Fine" msgstr "Υψηλή" #: src/settings.cpp:1767 msgid "Log File: " msgstr "Αρχείο Καταγραφής: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Μέγεθος Σελίδας: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: ρυθμίσεις" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Προσοχή: πατώντας το πλήκτρο OK θα σωθούν οι ρυθμίσεις σε αρχείο" #: src/settings.cpp:1979 msgid "Reset" msgstr "Επαναφορά" #: src/settings.cpp:2012 msgid "Identity" msgstr "Ταυτότητα" #: src/settings.cpp:2015 msgid "Modem" msgstr "Μόντεμ" #: src/settings.cpp:2018 msgid "Params" msgstr "Παράμετροι" #: src/settings.cpp:2021 msgid "Print" msgstr "Εκτύπωση" #: src/settings.cpp:2027 msgid "Socket" msgstr "Υποδοχέας" #: src/settings.cpp:2030 msgid "Receive" msgstr "Λήψη" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "Καταγραφή" #: src/settings.cpp:2039 msgid "Page" msgstr "Σελίδα" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Σφάλμα Ρυθμίσεων" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "Ορίστηκε μη έγκυρη κλάση μόντεμ" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "Ορίστηκε μη έγκυρο μέγεθος σελίδας" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "Ορίστηκε μη έγκυρη ανάλυση φαξ" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "Ορίστηκε μη έγκυρος αριθμός κουδουνισμάτων" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "Ορίστηκε μη έγκυρο σύστημα κλήσης" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "Ορίστηκε μη έγκυρη παράμετρος συρρίκνωσης εκτύπωσης" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" "Ορίστηκε μη έγκυρος αριθμός θύρας υποδοχέα. Πρέπει να είναι μεταξύ 1024 και " "65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "Εισαγωγή ρυθμίσεων από " #: src/settings.cpp:3102 msgid " or\n" msgstr " ή\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Επαναφορά ρυθμίσεων" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk help: Όνομα" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "Εισάγετε τον αριθμό που θέλετε να εμφανίζεται στην επικεφαλίδα των\n" "αποστελλόμενων φαξ. Αυτός ο αριθμός θα δηλώνεται και ως αναγνωριστικό\n" "προς την άλλη συσκευή όταν λαμβάνονται φαξ" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk help: Αριθμός" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "Εισάγετε τη σειριακή συσκευή στην οποία είναι συνδεμένο το μόντεμ χωρίς το /" "dev\n" "(αν αφεθεί κενό, θα χρησιμοποιηθεί το /dev/modem). Στο λίνουξ η πρώτη " "σειριακή\n" "συσκευή (COM1) ονομάζεται ttyS0, η δεύτερη (COM2) ονομάζεται ttyS1, κ.ο.κ.)" #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk help: Συσκευή" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "Εισάγετε τον κατάλογο δημιουργίας αρχείων αποκλειστικής χρήσης (αν αφεθεί " "κενό, θα χρησιμοποιηθεί το /var/lock)" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk help: Αρχείο Αποκλειστικής Χρήσης" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "Επιλέξτε \"Αυτόματα\" και το efax (από την έκδοση 0.9 και πάνω) θα βρει μόνο " "του την κλάση του μόντεμ. Αν δεν δουλέψει, επιλέξτε αυτό που αντιστοιχεί στο " "μόντεμ σας" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk help: Κλάση Μόντεμ" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" "Καθορίζει αν θα χρησιμοποιηθεί τονικό ή παλμικό σύστημα κλήση κατά την " "αποστολή φαξ" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk help: Σύστημα Κλήσης" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "Καθορίζει τις δυνατότητες του μόντεμ. Δείτε και τη σελίδα οδηγιών του " "προγράμματος efax (με την εντολή man efax) για περισσότερες επεξηγήσεις. Για " "εκδόσεις του προγράμματος efax 0.9 και άνω, μπορεί να αφεθεί κενό και οι " "δυνατότητες δηλώνονται από το ίδιο το μόντεμ. Για προηγούμενες εκδόσεις και " "για μόντεμ ταχύτητας 14.400 δοκιμάστε 1,5,0,2,0,0,0,0 ή για χαμηλότερης " "ταχύτητας 1,3,0,2,0,0,0,0" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk help: Δυνατότητες" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "Καθορίζει τον αριθμό κουδουνισμάτων πριν το μόντεμ απαντήσει σε μία κλήση " "όταν το πρόγραμμα είναι σε κατάσταση αναμονής. Επιτρεπτές τιμές από 1 έως 9. " "Αν αφεθεί κενό θα χρησιμοποιηθεί το 1" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk help: Κουδουνίσματα" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "Καθορίζει τις εντολές `AT' για αρχικοποίηση του μόντεμ σε κατάσταση φαξ. " "Εισάγετε όσες χρειάζονται, χωρίζοντάς τες με κενά, για εντολές που πρέπει να " "χωρίζονται, χωρίς την πρόθεση του `AT'. Αν αφεθεί κενό Θα χρησιμοποιηθεί το " "`Z &FE&D2S7=120 &C0 M1L0', το οποίο δουλεύει πρακτικά με όλα τα μόντεμ" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk help: Παράμετροι Αρχικοποίησης" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "Καθορίζει τις εντολές `AT' για επαναφορά του μόντεμ στην αρχική κατάσταση. " "Εισάγετε όσες χρειάζονται, χωρίζοντάς τες με κενά, για εντολές που πρέπει να " "χωρίζονται, χωρίς την πρόθεση του `AT'. Αν αφεθεί κενό Θα χρησιμοποιηθεί το " "`Z', το οποίο δουλεύει πρακτικά με όλα τα μόντεμ" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk help: Παράμετροι Επαναφοράς" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "Μπορεί να χρησιμοποιηθεί για την προώθηση ορισμάτων στο πρόγραμμα efax. " "Δείτε και τη σελίδα οδηγιών του προγράμματος efax (με την εντολή man efax) " "για να μάθετε τι δυνατότητες υπάρχουν και για περισσότερες λεπτομέρειες. " "Εισάγετε όσες χρειάζονται, χωρίζοντάς τες με κενά. Για τα περισσότερα συνήθη " "μόντεμ μπορεί να αφεθεί κενό" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk help: Άλλες Παράμετροι" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Αυτό το πρόγραμμα θα χρησιμοποιηθεί για την εκτύπωση, και πρέπει να μπορεί " "να δέχεται εντολές PostScript στην κανονική είσοδό του. Αν αφεθεί κενό, θα " "χρησιμοποιηθεί το `lpr'" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk help: Πρόγραμμα Εκτύπωσης" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Καθορίζει το ποσοστό στο οποίο θα συρρικνωθεί η προς εκτύπωση σελίδα για να " "χωρά στην εκτυπώσιμη επιφάνεια του εκτυπωτή. Είναι ποσοστό επί τοις 100 -- π." "χ. η τιμή 98 σημαίνει ότι η σελίδα θα συρρικνωθεί στο 98% του αρχικού της " "μεγέθους. Αν αφεθεί κενό θα χρησιμοποιηθεί το 100, δηλαδή καμμία συρρίκνωση" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk help: Συρρίκνωση Εκτύπωσης" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Καθορίζει αν θα εμφανίζεται αναδυόμενο παράθυρο διαλόγου για επιβεβαίωση " "πριν την εκτύπωση όταν πατηθεί το πλήκτρο \"Εκτύπωση επιλεγμένου φαξ\" στον " "κατάλογο Ληφθέντων ή Απεσταλμένων φαξ. Αφαιρέστε το x από το τετραγωνίδιο αν " "δεν επιθυμείτε ερώτηση επιβεβαίωσης (π.χ.. αν έχετε ορίσει κάποιο πρόγραμμα " "διαχείρισης εκτυπώσεων, όπως το 'kprinter', στο πεδίο Πρόγραμμα Εκτύπωσης)" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk help: Αναδυόμενα Παράθυρα" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "Το πρόγραμμα προβολής PostScript χρησιμοποιείται για την προβολή φαξ από " "τους καταλόγους απεσταλμένων και ληφθέντων φαξ, καθώς και για την προβολή " "φαξ μέσω του επιλογέα αρχείων στην εντολή \"Αρχεία προς αποστολή\". Εισάγετε " "εδώ την εντολή που απαιτείται για την προβολή αρχείων PostScript. Αν αφεθεί " "κενό, θα χρησιμοποιηθεί το 'gv'. Μπορείτε για το 'gv' να προσθέσετε την " "επιλογή '-media A4', για σελίδες μεγέθους A4. Άλλα προγράμματα που πιθανόν " "να υπάρχουν στο σύστημά σας και μπορούν να χρησιμοποιηθούν είναι το " "'evince' (για Gnome) ή 'kghostview' (για KDE)" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk help: Πρόγραμμα Προβολής PostScript" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "Καθορίζει αν θα εκτελεστεί ένας εξυπηρετητής υποδοχέα για σύστημα " "εκτυπώσεων CUPS ή άλλο αντίστοιχο. Βάλτε x στο τετραγωνίδιο θέλετε να " "εκτελεστεί" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "efax-gtk help: Εκτέλεση Εξυπηρετητή Υποδοχέα" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "Καθορίζει αν θα εμφανίζεται αναδυόμενο παράθυρο διαλόγου όταν λαμβάνει φαξ ο " "εξυπηρετητής υποδοχέα από το σύστημα εκτύπωσης. Βάλτε x στο τετραγωνίδιο αν " "θέλετε τέτοιο παράθυρο (πρέπει προφανώς να έχετε επιλέξει και την Εκτέλεση " "Εξυπηρετητή Υποδοχέα). Αν το πρόγραμμα είναι ανενεργό, το φαξ μπορεί να " "σταλεί απ' ευθείας από αυτό το αναδυόμενο παράθυρο" #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" "Καθορίζει τον αριθμό θύρας στην οποία θα ακούει ο εξυπηρετητής υποδοχέα." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk help: Θύρα" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "Καθορίζει ποιές διευθύνσεις πέραν του τοπικού μηχανήματος θα επιτρέπεται να " "συνδεθούν με τον εξυπηρετητή υποδοχέα. Επιλέξτε 'τοπικός η/υ' για συνήθεις " "περιπτώσεις (δηλαδή αν οι εξυπηρετητές CUPS και lpr σας δεν εκτελούνται σε " "άλλον η/υ). Αν επιλέξετε 'άλλοι', πρέπει να καθορίσετε τα πλήρη ονόματα των " "η/υ που μπορούν να συνδεθούν, χωριζόμενα με κενά. Δεν χρειάζεται να " "προσθέσετε το όνομα του τοπικού η/υ, καθώς συνδέσεις από αυτόν πάντα " "επιτρέπονται. Αν επιλέξετε 'άλλοι', καλό θα ήταν να εκτελείται το πρόγραμμα " "efax-gtk προστατευμένο πίσω από κάποιον πυρότοιχο" #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "efax-gtk help: Επιτρεπόμενες συνδέσεις στον υποδοχέα" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "Καθορίζει αν θα εμφανίζεται αναδυόμενο παράθυρο διαλόγου όταν λαμβάνει φαξ " "το μόντεμ. Βάλτε x στο τετραγωνίδιο αν θέλετε τέτοιο παράθυρο" #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "efax-gtk help: Αναδυόμενο παράθυρο κατά τη λήψη" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "Καθορίζει αν κάποιο πρόγραμμα ή σενάριο θα εκτελείται όταν λαμβάνει φαξ το " "μόντεμ. Βάλτε x στο τετραγωνίδιο αν θέλετε να εκτελείται, και εισάγετε το " "όνομα του προγράμματος" #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "efax-gtk help: Εκτέλεση προγράμματος κατά τη λήψη" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "Καθορίζει την ανάλυση των αποστελλομένων φαξ. \"Κανονική\" σημαίνει 204x98 " "και \"Υψηλή\" σημαίνει 204x196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk help: Ανάλυση Αποστελλόμενων Φαξ" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "Καθορίζει ένα αρχείο καταγραφής για τα μηνύματα προόδου κλήσης, χειραψίας με " "το άλλο μόντεμ, κατάστασης μόντεμ, διαγνωστικών και σφαλμάτων. Αν αφεθεί " "κενό δεν τηρείται κανένα αρχείο καταγραφής. (Αρχείο καταγραφής μπορεί επίσης " "να τηρείται με αναδρομολόγηση της κανονικής εξόδου και κανονικού σφάλματος " "του προγράμματος. Δείτε το αρχείο README για περισσότερες λεπτομέρειες)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "efax-gtk help: Αρχείο Καταγραφής" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "Καθορίστε εδώ το μέγεθος σελίδας για τα φαξ" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk help: Μέγεθος Σελίδας" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: Βοήθεια" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Αποστολή" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Λήψη" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Βιβλίο Διευθύνσεων" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Κατάλογοι Φαξ" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Ρυθμίσεις" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "Αποστολή φαξ\n" "------------\n" "\n" "Για να αποστείλετε ένα φαξ, εισάγετε το όνομα του αρχείου στο πεδίο \"Φαξ " "προς αποστολή\". Πρέπει να είναι σε μορφοποίηση PostScript/PDF (που μπορούν " "να παράγουν όλα τα προγράμματα επεξεργασίας κειμένου και εικόνας στο Linux/" "Unix), και θα μετατραπεί αυτόματα από το πρόγραμμα σε μορφοποίηση tiffg3 που " "είναι κατάλληλη για φαξ.\n" "\n" "Υπάρχουν δύο τρόποι εισαγωγής αρχείων φαξ:\n" "\n" "Πρώτος, το φαξ είναι σε ένα αρχείο του συστήματος. Τότε απλά εισάγετε το " "όνομά του στο πεδίο \"Φαξ προς αποστολή\", ή επιλέξτε το με τον επιλογέα " "αρχείων. (Για ευκολία στο ψάξιμο, μπορείτε να βάζετε τα προς αποστολή αρχεία " "PostScript/PDF στον κατάλογο $HOME/faxout σας) Εάν το προς αποστολή φαξ " "αποτελείται από ένα αρχείο μόνο, μπορείτε να το βρείτε με την πλήκτρο \"Ένα " "αρχείο\". Αν αποτελείται από περισσότερα αρχεία, πατήστε το πλήκτρο \"Πολλά " "αρχεία\", και προσθέστε στο πεδίο τα αρχεία, ένα ένα, με τη σειρά που θέλετε " "να εμφανιστούν στο φαξ που θα λάβει ο παραλήπτης. Μπορείτε να αλλάξετε τη " "σχετική σειρά των προς αποστολή αρχείων με τα πλήκτρα Πάνω και Κάτω στο " "πληκτρολόγιο, ή με τη διαδικασία Σύρε-Άφησε του ποντικιού.\n" "\n" "Δεύτερος, το φαξ να ληφθεί απ' ευθείας από το πρόγραμμα εκτύπωσης μέσω ενός " "εξυπηρετητή υποδοχέα που παρέχει το πρόγραμμα efax-gtk. Το efax-gtk διατηρεί " "έναν κατάλογο των φαξ που βρίσκονται στην ουρά του εξυπηρετητή υποδοχέα, ο " "οποίος μπορεί να ελεγχθεί επιλέγοντας \"Υποδοχέας\" σαν μέθοδο εισαγωγής " "φαξ, και μετά πιέζοντας το πλήκτρο \"Κατάλογος υποδοχέα\". Αυτός ο τρόπος " "είναι περισσότερο βολικός για την αποστολή φαξ, απ' ευθείας από μέσα από " "προγράμματα επεξεργασίας κειμένου επιλέγοντας τον κατάλληλο (ψευδο)εκτυπωτή. " "Αν υπάρχουν φαξ στην ουρά του εξυπηρετητή, ένας μικρός κόκκινος κύκλος " "εμφανίζεται στο κύριο παράθυρο του προγράμματος δεξιά από το πεδίο \"Φαξ " "προς αποστολή\". Για λεπτομέρειες σχετικά με τη ρύθμιση των προγραμμάτων " "CUPS ή lpr/lprng για να στέλνουν στο efax-gtk, δέστε το αρχείο README που " "διανέμεται μαζί με το πρόγραμμα\n" "\n" "Ο αριθμός του τηλεφώνου προς το οποίο θα σταλεί το φαξ εισάγεται στο πεδίο " "\"Τηλ. αριθμός\". Μπορείτε είτε να εισάγετε το νούμερο απ' ευθείας ή να " "συμβουλευτείτε το ενσωματωμένο βιβλίο διευθύνσεων. Το βιβλίο διευθύνσεων " "εμφανίζεται πατώντας το πλήκτρο \"Τηλ. αριθμός\", ή επιλέγοντας `Αρχείο/" "Βιβλίο Διευθύνσεων' από το πτυσσόμενο μενού (δείτε επίσης και το κεφάλαιο " "Βιβλίο Διευθύνσεων στη Βοήθεια). Αν η τηλεφωνική κλήση έχει ήδη γίνει από " "σας και η γραμμή έχει ήδη συνδεθεί με το άλλο μόντεμ (χειρωνακτική κλήση) " "μπορείτε να αφήσετε το πεδίο \"Τηλ. αριθμός\" κενό (κι ένα παράθυρο διαλόγου " "θα σας ζητήσει να το επιβεβαιώσετε)\n" "\n" "Όταν κάποιο φαξ ληφθεί από το σύστημα εκτύπωσης μέσω του εξυπηρετητή " "υποδοχέα προς αποστολή, το πρόγραμμα μπορεί να ρυθμιστεί ώστε να εμφανίζει " "ένα αναδυόμενο παράθυρο αυτόματα. Αν το πρόγραμμα είναι ανενεργό ή σε " "κατάσταση αναμονής λήψης, το φαξ που έστειλε το σύστημα εκτύπωσης μπορεί να " "σταλεί απ' ευθείας, χωρίς να χρειάζεται να πάτε στον κατάλογο φαξ στην ουρά " "του εξυπηρετητή και να το στείλετε από εκεί.\n" "\n" "Όσα φαξ σταλούν επιτυχώς αντιγράφονται στον κατάλογο $HOME/faxsent σας, με " "όνομα που προκύπτει από το έτος, μήνα, μέρα, ώρα, λεπτά και δευτερόλεπτα της " "ώρας ολοκλήρωσης αποστολής, και εμφανίζονται στο κατάλογο απεσταλμένων φαξ. " "Σε αυτό τον κατάλογο βρίσκονται μόνο όσα φαξ έχουν σταλεί χωρίς σφάλματα. Το " "πεδίο εμφάνισης μηνυμάτων από το efax δείχνει την πρόοδο της αποστολής του " "φαξ. Ο κατάλογος φαξ μπορεί να εμφανιστεί επιλέγοντας `Αρχείο/Κατάλογος' από " "το πτυσσόμενο μενού. (Δείτε επίσης και το κεφάλαιο Χρήση των καταλόγων φαξ " "στη Βοήθεια)\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "Λήψη φαξ\n" "--------\n" "\n" "Υποστηρίζονται τρείς τρόποι λήψης φαξ.\n" "\n" "Πρώτος, το πρόγραμμα μπορεί να απαντήσει σε μία εισερχόμενη κλήση φαξ, όσο " "το τηλέφωνο κουδουνίζει, πατώντας το πλήκτρο \"Απάντηση κλήσης\".\n" "\n" "Δεύτερος, το πρόγραμμα μπορεί να αναλάβει μία κλήση που έχει ήδη απαντηθεί, " "δηλαδή κάποιος έχει ήδη σηκώσει το ακουστικό, πατώντας το πλήκτρο \"Ανάληψη " "κλήσης\".\n" "\n" "Τρίτος, το πρόγραμμα μπορεί να τεθεί σε κατάσταση αναμονής, πατώντας το " "πλήκτρο \"Σε αναμονή\". Με αυτόν τον τρόπο, το πρόγραμμα θα απαντήσει " "αυτόματα σε εισερχόμενες κλήσεις μετά από ένα αριθμό κουδουνισμάτων που έχει " "καθοριστεί. (Δείτε και την επιλογή `Αρχείο/Ρυθμίσεις' στο μενού). Το " "πρόγραμμα θα συνεχίσει να περιμένει και να λαμβάνει φαξ, μέχρι να πατηθεί το " "πλήκτρο \"Διακοπή\".\n" "\n" "Τα ληφθέντα φαξ μπορούν να τυπωθούν, προβληθούν, περιγραφούν και " "διαχειριστούν με την ενσωματωμένη λειτουργία καταλόγου φαξ. Αυτή εμφανίζεται " "επιλέγοντας `Αρχείο/Κατάλογος ληφθέντων φαξ' στο μενού. Δείτε επίσης το " "κεφάλαιο \"Χρήση του βιβλίου διευθύνσεων\" παρακάτω.\n" "\n" "Όταν λαμβάνεται ένα φαξ, μπορεί από την επιλογή `Ρυθμίσεις' του μενού να " "ρυθμισθεί το πρόγραμμα, ώστε να εμφανίζεται ένα αναδυόμενο παράθυρο. Επίσης " "από την επιλογή `Ρυθμίσεις' του μενού μπορεί να ρυθμισθεί το πρόγραμμα, ώστε " "να εκτελείται κάποιο πρόγραμμα (π.χ.. αναπαραγωγή κάποιου μουσικού αρχείου, " "ή αποστολή μηνύματος ηλ. ταχυδρομείου σε κάποιον χρήστη) όταν λαμβάνεται " "ένα φαξ. Στο εκτελούμενο πρόγραμμα περνιέται ως πρώτο (και μοναδικό) όρισμα " "το όνομα του υποκαταλόγου στον κατάλογο $HOME/faxin, στον οποίο αποθηκεύθηκε " "το ληφθέν φαξ. (Η διανομή του πηγαίου κώδικα του προγράμματος περιέχει δύο " "τέτοια προγράμματα - που δεν εγκαθίστανται αυτόματα - τα οποία μπορούν να " "χρησιμοποιηθούν για την αυτόματη εκτύπωση ή αποστολή με ηλ. ταχυδρομείο του " "ληφθέντος φαξ.)\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "Χρήση του βιβλίου διευθύνσεων\n" "-----------------------------\n" "\n" "Για να χρησιμοποιήσετε έναν αριθμό τηλεφώνου από το βιβλίο διευθύνσεων, " "επιλέξτε την αντίστοιχη διεύθυνση πατώντας το αριστερό πλήκτρο του ποντικιού " "πάνω της, και μετά πατήστε το πλήκτρο \"OK\".\n" "\n" "Μπορείτε να προσθέσετε διευθύνσεις στο βιβλίο διευθύνσεων πατώντας το " "πλήκτρο προσθήκη και μετά συμπληρώνοντας τα πεδία που θα εμφανιστούν. Για να " "διαγράψετε μία διεύθυνση από το βιβλίο διευθύνσεων επιλέξτε την αντίστοιχη " "διεύθυνση πατώντας το αριστερό πλήκτρο του ποντικιού πάνω της, και μετά " "πατήστε το πλήκτρο διαγραφή (κάδος απορριμμάτων). Το βιβλίο διευθύνσεων " "μπορεί να ταξινομηθεί χρησιμοποιώντας τα πλήκτρα Πάνω και Κάτω στο " "πληκτρολόγιο, αφού έχετε επιλέξει κάποια διεύθυνση, ή με τη διαδικασία Σύρε-" "Άφησε του ποντικιού.\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "Χρήση των καταλόγων φαξ\n" "-----------------------\n" "\n" "Για να χρησιμοποιήσετε τη λειτουργία καταλόγων φαξ, από την επιλογή `Αρχείο' " "του μενού, επιλέξτε `Κατάλογος ληφθέντων φαξ' ή `Κατάλογος απεσταλμένων " "φαξ'. Επιλέξτε στη συνέχεια το φαξ που θέλετε να δείτε ή να τυπώσετε " "πατώντας πάνω του το αριστερό πλήκτρο του ποντικιού. Τα προγράμματα που " "χρησιμοποιούνται για την εκτύπωση και προβολή των φαξ περιέχονται στο αρχείο " "ρυθμίσεων του προγράμματος και ορίζονται συμπληρώνοντας τα αντίστοιχα πεδία " "στην επιλογή `Ρυθμίσεις' του μενού. Αν αφεθούν κενά, χρησιμοποιούνται " "προκαθορισμένες τιμές, που δουλεύουν για τα περισσότερα Linux/Unix " "συστήματα.\n" "\n" "Για την εκτύπωση φαξ, η παράμετρος Συρρίκνωση Εκτύπωσης που περιέχεται στο " "αρχείο ρυθμίσεων του προγράμματος και ορίζεται συμπληρώνοντας το αντίστοιχο " "πεδίο στην επιλογή `Ρυθμίσεις/Εκτύπωση' του μενού, επιτρέπει τη σμίκρυνση " "του φαξ ώστε αυτό να χωρά στην εκτυπούμενη επιφάνεια της σελίδας του " "εκτυπωτή. Η τιμή 98 δουλεύει για τους περισσότερους εκτυπωτές.\n" "\n" "Στο ληφθέν φαξ μπορεί να προστεθεί κάποια περιγραφή (ή σχόλιο) όταν το φαξ " "επιλέγεται στη λειτουργία καταλόγων φαξ. Η περιγραφή αυτή (η οποία μπορεί να " "διορθωθεί αργότερα πατώντας το πλήκτρο \"Διόρθωση\") κάνει την ταυτοποίηση " "των ληφθέντων φαξ ευκολότερη.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "Ρυθμίσεις\n" "---------\n" "\n" "Οι ρυθμίσεις του προγράμματος μπορούν να αλλαχθούν με διόρθωση των αρχείων " "ρυθμίσεων του προγράμματος efax-gtk. Τα αρχεία αυτά, κατά σειρά " "προτεραιότητας από το πρόγραμμα, είναι τα $HOME/.efax-gtkrc, $sysconfdir/" "efax-gtkrc και /etc/efax-gtkrc. Επομένως το αρχείο $HOME/.efax-gtkrc έχει " "προτεραιότητα έναντι των άλλων δύο.\n" "\n" "Το αρχείο ρυθμίσεων μπορεί επίσης να αλλαχθεί επιλέγοντας `Ρυθμίσεις' στο " "μενού `Αρχείο/Ρυθμίσεις' του πτυσσόμενου μενού. Οι όποιες ρυθμίσεις αλλάξουν " "με αυτό τον τρόπο σώζονται πάντα στο αρχείο $HOME/.efax-gtkrc. Επομένως, " "μπορείτε αν έχετε αλλάξει κάποιες ρυθμίσεις να επανέλθετε στις αρχικές " "ρυθμίσεις είτε διαγράφοντας το αρχείο $HOME/.efax-gtkrc, είτε πατώντας το " "πλήκτρο `Επαναφορά' (στην δεύτερη περίπτωση οι ρυθμίσεις είναι αυτές που θα " "φορτωθούν εκ νέου από τα αρχεία $sysconfdir/efax-gtkrc και /etc/efax-gtkrc.\n" "\n" "Βοήθεια για τις ρυθμίσεις παρέχεται στο παράθυρο `Ρυθμίσεις' διατηρώντας το " "ποντίκι πάνω από το αντίστοιχο πλήκτρο βοηθείας (;) για να εμφανιστεί μία " "σύντομη περιγραφή, ή πατώντας το αντίστοιχο πλήκτρο βοηθείας για να " "εμφανιστεί το κείμενο βοηθείας.\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "Υποδοχέας εκτελείται στη θύρα " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "Εργασία εκτύπωσης ελήφθη στον υποδοχέα\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "Κλείσιμο υποδοχέα\n" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: Φαξ στην ουρά από τον υποδοχέα" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "Εργασίες εκτύπωσης στην ουρά" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "Εισάγετε επιλεγμένο φαξ για αποστολή" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Επιλογή φαξ για αποστολή" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "Εργασία Εκτύπωσης: " #: src/socket_list.cpp:501 msgid "Remove " msgstr "Αφαίρεση " #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: Αφαίρεση φαξ από την ουρά" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: εργασία εκτύπωσης ελήφθη στον υποδοχέα" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Ουρά φαξ" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" " ελήφθη στον υποδοχέα.\n" "Να αποσταλεί το φαξ\n" "ή να μπει στην ουρά;" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Κατάλογος ληφθέντων φαξ" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Κατάλογος απεσταλμένων φαξ" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "Σε κατάσταση αναμονής λήψης" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Έξοδος" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "επιτυχία" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "Κατειλημμένη γραμμή ή το μόντεμ ήδη χρησιμοποιείται" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "ανεπανόρθωτο σφάλμα" #: efax/efax.c:382 msgid "invalid modem response" msgstr "μη έγκυρη απόκριση από το μόντεμ" #: efax/efax.c:383 msgid "no response from modem" msgstr "καμμία απόκριση από το μόντεμ" #: efax/efax.c:385 msgid "internal error" msgstr "εσωτερικό σφάλμα" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "" #: efax/efax.c:419 msgid "DCS - session format" msgstr "" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "" #: efax/efax.c:430 msgid "MPS - not done" msgstr "" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "" #: efax/efax.c:436 msgid "EOP - done" msgstr "" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "ΑΓΝΩΣΤΟ" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "έλλειψη συμβατότητας δυνατοτήτων τοπικού και απομακρυσμένου φαξ" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "αδυναμία διαγραφής αρχείου %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "διαγραφή αρχείου: %s" #: efax/efax.c:784 msgid "header:" msgstr "κεφαλίδα:" #: efax/efax.c:868 msgid "characters received while sending" msgstr "λήψη χαρακτήρων κατά τη διάρκεια της αποστολής" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "στάλθηκαν %d+%d αράδες και %d+%d bytes, σε %d δευτερόλεπτα με %d bps" #: efax/efax.c:915 msgid "flow control did not work" msgstr "ο έλεγχος ροής δεν λειτούργησε" #: efax/efax.c:954 msgid "modem response in data" msgstr "απόκριση του μόντεμ μέσα στα δεδομένα" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "υπερχείλιση ενταμιευτή" #: efax/efax.c:1036 msgid "file write:" msgstr "εγγραφή σε αρχείο:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "σφάλματα λήψης" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "λήφθηκαν %d αράδες με %d σφάλματα" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "" #: efax/efax.c:1222 msgid "sent" msgstr "απεσταλμένα" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "" #: efax/efax.c:1291 msgid "frame error" msgstr "" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "λανθασμένη απόκριση σε εντολή λήψης πλαισίου" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "ελήφθη μη πλήρες πλαίσιο (%d bytes)" #: efax/efax.c:1391 msgid "received" msgstr "ελήφθη" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "Η ταυτότητα του απομακρυσμένου φαξ είναι" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "καμμία απάντηση από το απομακρυσμένο φαξ" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "αδυναμία ανοίγματος σελίδας" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" "Το απομακρυσμένο φαξ έχει ένα ή περισσότερα έγγραφα προς αποστολή και μπορεί " "να λάβει" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" "Το απομακρυσμένο φαξ έχει ένα ή περισσότερα έγγραφα προς αποστολή και δεν " "μπορεί να λάβει" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "" "Το απομακρυσμένο φαξ δεν έχει έγγραφα προς αποστολή και μπορεί να λάβει" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "" "Το απομακρυσμένο φαξ δεν έχει έγγραφα προς αποστολή και δεν μπορεί να λάβει" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "" "Το απομακρυσμένο φαξ δεν μπορεί να λάβει, αλλά θα προσπαθήσω έτσι κι αλλιώς" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "" "Το απομακρυσμένο φαξ δεν έχει έγγραφα προς αποστολή, αλλά θα προσπαθήσω έτσι " "κι αλλιώς" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "στάλθηκε η σελίδα %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "η σελίδα αποθηκεύθηκε στο %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "άγνωστη εντολή" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "καμμία εντολή ή απόκριση από το απομακρυσμένο φαξ" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "μη κανονικός τερματισμός (κωδικός %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "ελήφθηκαν %d χαρακτήρες αναμένοντας για αποστολή" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "Το απομακρυσμένο φαξ έχει ένα ή περισσότερα έγγραφα προς αποστολή" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "πάρα πολλές προσπάθειες επαναποστολής σελίδας" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "καλείται το %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "Η ταυτότητα του απομακρυσμένου φαξ είναι %s" #: efax/efax.c:2216 msgid "called" msgstr "εκλήθη" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "συνδέθηκε" #: efax/efax.c:2224 msgid "number is busy" msgstr "η γραμμή είναι κατειλημμένη" #: efax/efax.c:2226 msgid "dial command failed" msgstr "η εντολή κλήσης απέτυχε" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "αναμονή για ανίχνευση δραστηριότητας" #: efax/efax.c:2306 msgid "activity detected" msgstr "ανιχνεύθηκε δραστηριότητα" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "αδυναμία απάντησης: αδυναμία αποκλειστικής χρήσης της συσκευής" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "εκτέλεση εντολής /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "αποτυχία κλήσης της exec():" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "δεν έχει ορισθεί εντολή getty για κλήσεις δεδομένων" #: efax/efax.c:2353 msgid "fax call answered" msgstr "κλήση φαξ απαντήθηκε" #: efax/efax.c:2356 msgid "voice call answered" msgstr "φωνητική κλήση απαντήθηκε" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "δεν έχει ορισθεί εντολή getty για φωνητικές κλήσεις" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "αδυναμία απάντησης της κλήσης" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "το μόντεμ δεν υποστηρίζει φαξ" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "" "αδυναμία προσδιορισμού ποιά(ποιές) κλάση(εις) φαξ υποστηρίζει το μόντεμ" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "χρήση του %s σε κλάση %s" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "αποτυχία για τη σελίδα %s" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "ολοκλήρωση - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "Η ταυτότητα του τοπικού φαξ (%s) αποκόπηκε στους %d χαρακτήρες" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "Η ταυτότητα του τοπικού φαξ (%s) περιέχει μη έγκυρους χαρακτήρες" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "χρήση ενταμιευτή γραμμής στην κανονική έξοδο" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "εσφαλμένο όρισμα (%s) για παράμετρο ποιότητας (-q)" #: efax/efaxmsg.c:215 msgid " Error: " msgstr " Σφάλμα: " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " Προειδοποίηση: " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "αδυναμία ανοίγματος του αρχείου %s:" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "αδυναμία εύρεσης της μορφοποίησης του αρχείου %s:" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "αδυναμία ξανατυλίγματος του αρχείου %s:" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "αδυναμία ανοίγματος για εγγραφή του αρχείου %s:" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "σφάλμα εγγραφής στη συσκευή φαξ:" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "απροσδόκητη απόκριση \"%s\"" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "υπερβολικά μακρά εντολή μόντεμ \"%s\"" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "λήξη προθεσμίας μετά από εντολή: %s" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "λήξη προθεσμίας κατά την αναμονή" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "λανθασμένη απόκριση μετά από εντολή: %s" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "λανθασμένη απόκριση μετά από την αναμονή" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "sync: το μόντεμ δεν αποκρίνεται" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "αποτυχίας εντολής μόντεμ (%s)" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "αποτυχίας εντολής μόντεμ" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "%s κλειδωμένο ή κατειλημμένο - αναμονή" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "άνοιγμα %s" #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Πνευματική ιδιοκτησία (C) 2001 - 2008 Chris Vine\n" #~ "Αυτό το πρόγραμμα διανέμεται σύμφωνα με την άδεια χρήσης\n" #~ "GNU General Public License, έκδοση 2" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr " και το /dev/modem δεν υπάρχει\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " Θα χρησιμοποιηθεί το προκαθορισμένο\n" #~ "/dev/modem\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "Θα χρησιμοποιηθεί η προκαθορισμένη εντολή εκτύπωσης 'lpr'\n" #~ msgid "Put the name to appear on the fax top header on sent faxes here" #~ msgstr "" #~ "Εισάγετε το όνομα που θέλετε να εμφανίζεται στην επικεφαλίδα των\n" #~ "αποστελλόμενων φαξ" #~ msgid "From" #~ msgstr "Από" #~ msgid "?\n" #~ msgstr ";\n" #~ msgid "Refresh fax list" #~ msgstr "Ανανέωση καταλόγου φαξ" #~ msgid "Fax" #~ msgstr "Φαξ" efax-gtk-3.2.8/po/pl.gmo0000644000175000001440000013351711544574531011727 00000000000000$[,B([_ a*P.@)1j60z666#666' 9 59 A9L9\9k9r9%999&9 99+:!F:1h: :::^:*;D;#S;w;; ; ;n; <<,<E<Y< p< |<B<{<G=pZ====6> H>R>c> v>>> >>>&>g>F?O?X?^?Gu??=?L@d@:@@@=@6A(A>A9 BZB%yBGBBBC C ,C7C?C ECSCeCuC CCCCCLCTC#TDxDD;DDDDE E E%E *E6E!=Eg_E)E'E*FDFdFFFFFFFFGZ GdG H I&I@IRIWI_I oIyII I IIIII IIJ J J!J6J?JOJ XJdJkJ sJJ$JJJJJJ J K%KMBKGKLM!eNO P(PQPSmThFUUdXWXxRZMZc[}\\\/a]]]]S] __0_6_<_M_ S_ ]_k___0_(_`)`A`\`p`````(`a.aJahaa a"a)a b b&b^|("#ݳ% 'H'`37 (@]wε(-"V!y"ն,( =Jrw}#D^%7()$Cxas9b` V;|04[!+k8{v@X5qN .Q]1LM\~m/_l"Wp*Ge,ZjiEzfTg <- =d2 K6hJnSU?I:YRBAyF&'H ou3cOPt> (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. from the list? has been received on socket. Send or queue fax? or ?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Answer callAnswering callAutoCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Choose the selected fax for sendingClass 1Class 2Class 2.0Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 Delete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?Empty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)IdentityInactiveInboxInitialization Params:Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535List _received faxesList received faxesList sent faxesLock File: Log File: LoggingModemModem Class: Move address downMove address upMove file downMove file upMultiple filesNameName:Name: No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset settingsRings (1-9): Run socket serverSend faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSingle fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! This can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTrashUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class here_Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingslocalhost otherProject-Id-Version: efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2003-04-13 01:21+0100 Last-Translator: Paweł Suwiński Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (UWAGA: Spowoduje to trwałe usunie faksu z systemu plików) *** Zatrzymanie sesji wysyłania/odbioru *** Odbieranie faksów ------------------- Istnieją trzy metody odbierania faksów. Pierwsza, poprzez naciśnięcie przycisku "Odbierz połączenie" program może odebrać połączenie, które dzwoni, ale nie zostało jeszcze odebrane. Druga, poprzez naciśnięcie przycisku "Przejmij połączenie" program może przejąć połączenie, które już zostało odebrane (np. przez podniesienie słuchawki telefonu). Trzecia, program może zostać wprowadzony w stan oczekiwania poprzez naciśnięcie przycisku "Oczekuj". Pozwoli to po określonej w ustawieniach liczbie dzwonków automatycznie odebrać połączenie i przyjąć fax. Program będzie oczekiwał na połączenia przychodzące do momentu naciśnięcia przycisku "Stop". Odebrane faksy mogą zostać wydrukowane, obejrzane, opisane i można nimi zarządzać za pomocą wbudowanej funkcji listy faksów. Można ją przywołać z menu `Plik/Lista otrzymanych faksów'. Dalej zobacz "Używanie listy faksów". Wysyłanie faksu ---------------- Przed wysłaniem faksu, należy go najpierw wskazać w polu "Fax do wysłania ". Musi być w formacie postscript/PDF (format wyjściowy wszystkich procesorów tekstu i dokumentów w systemach Unix/Linux), który zostanie przekonwertowany przez program we właściwy format faksowy tiffg3. Istnieją dwie metody wprowadzania faksów. Pierwsza, faks do wysłania może być plikiem już zapisanym na dysku. Możne zostać ręcznie wprowadzony w polu "Fax do wysłania", lub wprowadzony za pomocą okna wyboru plików. Jeżeli plik jest pojedynczym plikiem postscript/PDF, to można go znaleźć wciskając przycisk "Pojedynczy Plik". Łatwiej będzie go znaleźć przy użyciu tego okienka jeżeli będzie znajdował się w katalogu $HOME/faxout. Jeżeli określono więcej niż jeden plik w polu "Fax do wysłanie", zostaną one wysłane jako pojedynczy fax w kolejności w jakiej zostały wpisane w tym polu. Wiele plików łatwiej można wybrać korzystając z listy wyboru poprzez naciśnięcie przycisku "Wiele Plików". Wciśnięcie przycisku "Wiele Plików" umożliwia wyszukiwanie i dodawanie plików do listy, których kolejność można zmieniać za pomocą przycisków ze strzałkami Góra/Dół, lub poprzez przeciąganie i upuszczanie ich za pomocą myszy. Alternatywnie, faksy mogą być otrzymywane bezpośrednio z systemu drukowania, poprzez serwer gniazdek, który dostarcza program. Efax-gtk zarządza listą zakolejkowanych faksów odebranych z gniazdka, która jest dostępna przy wybraniu "Gniazdko" jako metody wprowadzania faksów. Wyświetlenie listy zakolejkowanych faksów następuje poprzez naciśnięcie przycisku "Lista gniazdek". Jest to pewniejsza metoda wysyłania faksów z procesora tekstu i umożliwia wysłanie faksu do programu efax-gtk poprzez system drukowania bezpośrednio z dowolnego programu do obróbki dokumentów. Fax jest kolejkowany do wysłania w liście gniazdek (w głównym oknie programu po prawej stronie pola "Faksy do wysłania" pojawi się mały czerwony okrąg). Szczegóły ustawień systemów drukowania CUPS lub lpr/lprng do wysyłania faksów do efax-gtk znajdują się w pliku README dołączonego do dystrybucji. Numer telefonu gdzie ma być wysłany fax należy wpisać w polu "Numer tel". Można go wpisać bezpośrednio lub może zostać wybrany z wbudowanej książki adresowej. Książka adresowa jest wywoływana po naciśnięciu przycisku "Numer tel" lub z menu 'Plik/Książka adresowa' (zobacz "Używanie książki adresowej" w oknie pomocy). Jeżeli połączenie telefoniczne zostało już zestawione, fax może zostać wysłany bez wybierania numeru poprzez pozostawienie pustym pola "Numer tel" (przy wysyłaniu pojawi się okienko z pytaniem czy wysłać fax na już zestawionym połączeniu). Można tak ustawić by po odebraniu faksu z systemu drukowania poprzez serwer gniazdek, automatycznie pojawiało się okienko z powiadomieniem. Jeżeli program nie jest aktywny (np. nie oczekuje na połączenia przychodzące) fax może zostać wysłany bezpośrednio z tego okienka bez konieczności wywoływania listy zakolejkowanych faksów odebranych z gniazdka. Pomyślnie wysłane faksy są umieszczane w katalogu $HOME/faxsent, a ich nazwa będzie związana z rokiem, miesiącem, dniem, godziną i sekundami w których przesyłanie faksu zostało zakończone, oraz pojawią się one na liście wysłanych faksów. Do listy dołączane są tylko faksy wysłane bez błędów. Okno raportu wyświetla informacje o przebiegu i postępie procesu wysyłania faksu. Lista faksów może zostać wywołana z menu `Plik/Lista wysłanych faksów'. Dalej zobacz "Używanie listy faksów". Ustawienia ----------- Ustawienia programu można zmienić ręcznie edytując plik konfiguracyjny programu efax-gtk: $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc lub /etc/efax-gtkrc. Pliki są poszukiwane w podanej kolejności, więc $HOME/.efax-gtkrc jest nadrzędny dla pozostałych. Plik konfiguracyjny może być także ustawiony za pomocą okna Ustawienia wywoływanego z menu `Plik/Ustawienia'. Ustawienia tak wprowadzane są zawsze zapisywane w pliku $HOME/.efax-gtkrc. Jeżeli użyte zostało okno Ustawienia i jest potrzeba przywrócenia globalnych ustawień, można to zrobić kasując lokalny plik ustawień $HOME/.efax-gtkrc, lub wciskając przycisk `Reset' w oknie Ustawienia, co spowoduje przeładowanie ustawień z globalnych plików konfiguracyjnych ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Pomoc przy wypełnianiu Ustawień można uzyskać najeżdżając myszką nad odpowiedni przycisk pomocy (?), co przywoła okienko "Wskazówek", lub poprzez naciśnięcie przycisku, który wywoła okienko informacyjne. Używanie książki adresowej -------------------------- Aby wybrać numer telefoniczny z książki adresowej podświetl żądany adres naciskając ponad nim lewy guzik myszy, a następnie naciśnij przycisk "OK". Adresy można dodawać do książki poprzez naciśnięcie przycisku dodawania i wypełnienie pól okienka, które pojawi się po naciśnięciu przycisku. Aby usunąć adres z książki adresowej należy podświetlić żądany element i nacisnąć przycisk usuwania (kosza). Książka adresowa może być sortowana przy użyciu przycisków ze strzałkami góra/dół na podświetlonym adresie, lub metodą przenoszenia i upuszczania za pomocą myszy. Używanie listy faksów ---------------------- Aby przywołać listę faksów przejdź od menu `Plik' i wybierz pozycję `Lista odebranych faksów' lub `Lista wysłanych faksów'. Podświetlenie faksu do wydrukowania lub obejrzenia dokonuje się lewym przyciskiem myszy. Programy, które mają być użyte do drukowania lub podglądu faksów należy określić w ustawieniach programu, albo domyślnie zostanie użyty program lpr do drukowania (który działa w większości systemach Unix) i program gv do podglądu. Przy drukowaniu faksów, można zdefiniować w ustawieniach parametr DOPASOWANIE_WYDRUKU aby dopasować stronę do obszaru wydruku drukarki. Wartość 98 jest odpowiednia dla większości drukarek. Można to zmienić podczas pracy programu przywołując z menu `Ustawienia' i wpisując odpowiednią wartość w polu 'Drukowanie/Dopasowanie Wydruku'. Można dodać opis do odebranych faksów kiedy pojawią się na liście faksów (lub odpowiednio poprawione) przez naciśnięcie odpowiedniego przycisku -- pozwoli to łatwiej identyfikować przechowywane faksy. z listy? odebrany na gniazdku. Wysłać czy zakolejkować?lub ?Fax został odebrany przez efax-gtkPrzeglądarka postscript jest używana do podglądu wysłanych i odebranych faksów z listy faksów, oraz także do podglądu faksów do wysłania określonych w polu plików "Pliki do wysłania" . Wpisz tutaj komendę używaną do przeglądania plików postscriptowych. Jeżeli parametr nie zostanie określony, program przyjmie domyślną wartość 'gv'. Inne możliwości to 'evince' (przeglądarka postscript dla Gnome) lub 'kghostview'(przeglądarka postscriptu dla KDE). Wybierając gv może być konieczność użycia opcji '- media A4' lub '-media Letter' dla wyboru właściwego rozmiaru papieru. evince i kghostview robi to automatycznie.Zadanie wydruku odebrano w gniazdkuO _efaxO efax_O efax-_gtkO efax-gtkAkceptujDodaj pliki do listyDodaj pliki do listy plików do wysłaniaDodaj nowy adresDodaj nowy katalogDodaj/popraw opis dla zaznaczonego faksuKsiążka AdresowaAdresy posiadające pozwolenie na połączenieUżycie domyślnej rozdzielczości faksu 204x196 Użycie domyślnego rozmiaru papieru a4 Użycie domyślnej przeglądarki postscript 'gv' Odbierz połączenieOdbierz połączenieAuto Nie można zmienić ustawień dopóki program nie będzie nieaktywny Naciśnij przycisk Stop by uczynić go nieaktywnymNie można wysłać faksu - fax w trakcie odbierania Możliwości: Wybierz zaznaczone faksy do wysłaniaKlasa 1Klasa 2Klasa 2.0Błąd KonfiguracjiCopyright (C) 2001 - 2011 Chris Vine Program na licencji GNU General Public License, wersji 2 Usuń adresUsuń katalog: Usunąć zaznaczone adresy?Usuń zaznaczony faxUsuń zaznaczony katalogOpisTryb Dzwonienia: Czy akceptujesz Warunki i Uwagi znajdujące się powyżej?Przed usunięciem folderu skasuj w nim wszystkie podkatalogi i przenieś (metodą 'chwyć i upuść') lub usuń wszystkie faksy wewnątrz.Opróżnij koszOpróżnić kosz? (UWAGA: Spowoduje to trwałe usunięcie z systemu plików wszystkich zaznaczonych faksów w katalogu Kosz)Wprowadź _wiele plikówPotwierdź wysłanie wybranego faksuWstaw ustawienia z Wykonaj program lub skrypt po odebraniu faksu przez modemLista FaksówOpis faksu?Metoda dodawania faksów: Fax do wysłaniaPlik Plik nie istnieje Pliki do wysłaniaWysokaKatalogNazwa katalogu nie może zawierać znaku: Nazwa katalogu? (Nazwa zostanie umieszczona na górze i będzie możliwość przeniesienia jej (metodą 'chwyć i upuść') do innych katalogów)TożsamośćNieaktywnyOdebraneParametry Inicjujące:Niepoprawnie WORK_SUBDIR: określony katalog. WORK_SUBDIR: będzie pominięty Niewłaściwie zdefiniowany tryb dzwonieniaNiewłaściwie zdefiniowany tryb dzwonienia Użycie domyślnego dzwonienia tonowego Niewłaściwie zdefiniowana rozdzielczość faksu Użycie domyślnej rozdzielczości faksu 204x196 Niewłaściwie zdefiniowana klasa modemuNiewłaściwe zdefiniowana klasa modemu Użycie domyślnej Klasy 2 Niewłaściwa opcja. Opcje: Niewłaściwie zdefiniowany rozmiar stronyNiewłaściwie zdefiniowany rozmiar papieru Użycie domyślnego rozmiaru papieru a4 Niewłaściwie zdefiniowany port dla serwera gniazdek, więc serwer nie zostanie uruchomiony. Wartość powinna być z przedziału 1024 - 65535. Niewłaściwie zdefiniowany parametr dopasowania wydrukuNiewłaściwie zdefiniowane dopasowanie wydruku: użycie domyślnej wartości 100 Niewłaściwe zdefiniowana liczba dzwonków Odpowiedź po jednym dzwonku Niewłaściwie zdefiniowana liczba dzwonkówNiewłaściwie zdefiniowana rozdzielczość wysyłanego faksuNiewłaściwie zdefiniowany numer portu gniazdka. Powinien należeć do przedziału 1024-65535Lista _odebranych faksówLista odebranych faksówLista wysłanych faksówPlik Blokady: Plik Logów: LogowanieModemKlasa Modemu: Przesuń adres w dółPrzesuń adres w góręPrzesuń plik w dółPrzesuń plik w góręWiele plikówNazwaNazwa:Nazwa: Nie określono numeru telefonu. Czy chcesz wysłać fax na już zestawionym połączeniu?Nie zdefiniowano portu dla serwera gniazdek, więc serwer nie zostanie uruchomiony. Niezdefiniowany port szeregowy urządzenia w Niepoprawna nazwa pliku Niepoprawny plik postscriptowy/PDF Uwaga: naciskając przycisk OK zachowasz ustawienia w plikuNumerNumer:Numer: Inne Parametry: WYDRUKUJ ZADANIEDRUKUJ ZADANIE: StronaRozmiar Strony: ParametryTrwale usuń zaznaczony fax? Trwale usunąć zaznaczone faksy? (UWAGA: Spowoduje to trwałe usunie faksu z systemu plików)Okienko z potwierdzeniem przed drukowaniemWyskakujące powiadomienie po odebraniu faksu przez modemWyskakujące powiadomienie jeżeli fax zostanie odebrany z gniazdkaPort na który faksy będą wysyłane:Przeglądarka Postscript:Naciśnij F1 by uzyskać pomocDrukujProgram Drukujący: Dopasowanie Wydruku (50-100):Zadanie wydruku odebrane na gniazdku Drukuj zaznaczony faxDrukuj zaznaczony fax?PulsacyjneWstaw tutaj nazwę katalogu z plikami blokad. Jeżeli parametr nie zostanie określony, program przyjmie domyślną wartość /var/lock.Wstaw numer, który pojawi się w nagłówkach wysyłanych faksów. Będzie to jednocześnie numer zgłaszany maszynie wysyłającej fax podczas odbierania faksów.Wstaw tutaj szeregowe urządzenie, do którego podłączony jest modem (jeżeli parametr nie zostanie określony, program przyjmie domyślną wartość /dev/modem). Nie wpisuj przedrostka `/dev/' w nazwie urządzenia -- np. ustaw jako `ttyS1' lub `cua2', itp. W Linuksie, ttyS0 odpowiada COM 1, ttyS1 - COM 2, itd. Kolejkuj faxKolejkowane _faksy z gniazdkaZakolejkowane zadania wydrukuWyjścieOdbierzOczekujOdbieranieAnulujUsuńUsuń plikUsuń plik Usuń zaznaczone pliki z listyResetParametry Resetu: Ustawienia ResetuDzwonki (1-9): Uruchom serwer gniazdekWyślij faxWysyłanieWysyłanie faksuRozdzielczość Wysyłanego Faksu:WysłaneUrządzenie Szeregowe: UstawieniaPojedynczy plikGniazdkoGniazdko Lista gniazdekGniazdko uruchomione na porcie Określ tutaj rozmiar papieru dla faksówStandardowaOczekujOczekuj na połączenia przychodząceStopPrzejmij połączenieNumer tel: Numer telefonuNastępujący katalog już istnieje: Program uruchomiono z opcją -s, ale nie ma paska zadań! To można wykorzystać do przekazania dodatkowych parametrów do programu efax (wykonaj `man efax' by zobaczyć jakie są dostępne). Wpisz ich tyle ile jest wymagane, oddzielając je spacjami -- np. dodanie `-or' dla odwrócenia kolejności bitów podczas odbioru dla modemów Multitech, które tego wymagają. Jeżeli nie posiadasz nietypowego modemu, pozostaw to pole puste. To określa liczbę dzwonków, po których w trybie Oczekiwania zostanie odebrane połączenie. Akceptowalne są wartości z przedziału 1-9. Jeżeli parametr nie zostanie określony, program przyjmie domyślną wartość 1. To jest komenda drukująca i pobierająca dane postscript ze standardowego wejścia.Jeżeli parametr nie zostanie określony, program przyjmie domyślną wartość `lpr'. Ten parametr określa plik logów, do którego będą zapisywane postęp negocjacji, status faksu oraz błędy i ostrzeżenia. Jeżeli parametr nie zostanie określony, żaden plik logu nie będzie prowadzony. (Zapis logu można także uzyskać poprzez przekierowanie wyjść stdout i stderr -- szczegóły - zobacz plik README.) Ten parametr określa czy okienko z powiadomieniem będzie się pojawiać po odebraniu faksu przez modem. Zaznacz jeżeli chcesz powiadomienie.Program jest (efax-gtk) nakładką graficzną dla programu efax. efax jest programem na licencji GNU General Public License, wersji 2 napisanym przez Ed'a Casas'a.To określa komendy `AT' resetujące modem. Wpisz ich tyle ile jest wymagane, oddzielając spacjami te, które tego wymagają jednak już bez dopisku 'AT' na początku. Jeżeli parametr nie zostanie określony, program przyjmie domyślne wartości`Z', które powinny być odpowiednie praktycznie dla każdego modemu. To określa możliwości modemu. By dowiedzieć się co to oznacza wykonaj `man efax', i zobacz funkcję flagi '-c'. Dla efax-0.9 i modemu Klasy 2, zazwyczaj nie trzeba tego definiować i pole powinno pozostać puste, jeżeli tylko program potrafi przesłuchać modem. Używając starszej wersji programu efax lub modemów innych klas, wartości działające praktycznie z każdym modemem 14,400 bit/s to 1,5,0,2,0,0,0,0, lub 1,3,0,2,0,0,0,0 dla tych wolniejszych.To określa inicjujące komendy `AT' dla modemu w trybie faksu. Wpisz ich tyle ile jest wymagane, oddzielając spacjami te, które tego wymagają jednak już bez dopisku 'AT' na początku. Jeżeli parametr nie zostanie określony, program przyjmie domyślne wartości `Z &FE&D2S7=120 &C0 M1L0', które powinny być odpowiednie praktycznie dla każdego modemu. To określa numer portu, na którym nasłuchiwać będzie serwer gniazdek.To określa rozdzielczość, w której wysyłane są faksy. "Standardowa" daje 204x98, zaś "Wysoka" daje 204x196To określa czy okienko z potwierdzeniem ma pojawiać się przed drukowaniem w przypadku gdy przycisk "Wydrukuj zaznaczony fax" zostanie naciśnięty na liście odebranych lub wysłanych faksów. Odznacz opcję jeżeli nie chcesz okienka z potwierdzeniem (jeżeli określony został zewnętrzny menadżer wydruku, taki jak np. 'kprinter', w polu Program Drukujący, to nie chcesz wybierać tej opcji).To określa czy mają pojawiać się wyskakujące powiadomienia w przypadku odebrania faksu przez serwer gniazdek od systemu drukowania. Zaznacz opcję jeżeli chcesz chcesz być powiadamiany (nie ma efektu jeżeli nie została zaznaczona opcja uruchomienia serwera gniazdek). Jeżeli program jest nieaktywny faks może zostać wysłany bezpośrednio z tego powiadomienia. Ten parametr określa czy określony program lub skrypt ma być wykonywany po odebraniu faksu przez modem. Zaznacz jeżeli chcesz uruchamiać program i wpisz jego nazwę.To określa czy serwer gniazdek ma być uruchamiany dla CUPS czy dla innego systemu drukowania. Zaznacz opcję jeżeli ma być uruchomiony.To określa czy podczas wysyłania faksów używane będzie tonowe czy pulsacyjne dzwonienie.To określa skalę, do której drukowana strona zostanie pomniejszona by dopasować ją do obszaru wydruku drukarki. Mierzona w procentach -- np. 98 zmniejszy stronę do 98 procent jej oryginalnej wartości. Jeżeli parametr nie zostanie określony skalowanie nie będzie stosowane (można też ustawić wartość 100, ale to nie jest konieczne). TonoweKoszUżycie: efax-gtk [opcje] [plik] Opcje: -r Uruchom program w trybie oczekiwania -s Uruchom program i ukryj na pasku zadań Więcej szczegółów znajduje się w pliku README dołączonym do dystrybucji. Użytkownik nie posiada praw do odczytu dla tego pliku PodglądPodgląd zaznaczonego faksuWyświetl zaznaczone plikiDla efax-0.9 lub nowszych należy zazwyczaj wybierać "Auto", wtedy program samodzielnie rozpozna klasę modemu, jednak można tu wymusić pracę w określonej klasie wybierając jedną z dostępnych. Jednak, domyślną wartością efax-0.8 jest Klasa 2, więc jeżeli używasz modemu Klasy 1 ze starszą wersją programu efax to należy ustawić tu odpowiednią wartość._Książka adresowa_Wprowadź pojedynczy plik_Plik_Pomoc_Lista wysłanych faksów_Wyjście_Ustawienia_TłumaczeniaPomoc efax-gtk: MożliwościPomoc efax-gtk: UrządzeniePomoc efax-gtk: Tryb DzwonieniaPomoc efax-gtk: Uruchom program po odebraniu faksuPomoc efax-gtk: Parametry InicjującePomoc efax-gtk: Plik BlokadyPomoc efax-gtk: Plik LoguPomoc efax-gtk: Klasa ModemuPomoc efax-gtk: NazwaPomoc efax-gtk: NumerPomoc efax-gtk: Inne ParametryPomoc efax-gtk: Rozmiar PapieruPomoc efax-gtk: PowiadomieniaPomoc efax-gtk: PortPomoc efax-gtk: Przeglądarka PostscriptPomoc efax-gtk: Komenda DrukującaPomoc efax-gtk: Dopasowanie WydrukuPomoc efax-gtk: Powiadomienie odbioruPomoc efax-gtk: Parametry ResetuPomoc efax-gtk: DzwonkiPomoc efax-gtk: Uruchom serwer gniazdekPomoc efax-gtk: Rozdzielczość Wysyłanych FaksówPomoc efax-gtk: Pozwolenie na połączenia z gniazdkiemgniazdko efax-gtkefax-gtk: efax-gtk: Dodaj adresyefax-gtk: Dodaj katalogefax-gtk: Książka adresowaefax-gtk: Warunki i Uwagiefax-gtk: Usuń adresefax-gtk: Usuń faxefax-gtk: Usuń katalogefax-gtk: Opis faksuefax-gtk: Lista plikówefax-gtk: Plik do wysłaniaPomoc efax-gtk: Pomocefax-gtk: Drukuj faxefax-gtk: Zakolejkowane faksy z gniazdkaefax-gtk: Lista odebranych faksówefax-gtk: Usuń zakolejkowany faxefax-gtk: Lista wysłanych faksówefax-gtk: Tłumaczeniaefax-gtk: Koszefax-gtk: fax odebranyefax-gtk: drukuj zadanie odebrane z gniazdkaefax-gtk: ustawienialocalhost inneefax-gtk-3.2.8/po/Rules-quot0000644000175000001440000000337611466007654012612 00000000000000# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$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 "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header efax-gtk-3.2.8/po/zh_CN.gmo0000644000175000001440000011616211544574532012313 00000000000000 L!B!("-" 6"A"0Q"","""#"6"'-% U% a%l%|%%%%%%%&% &&+:&!f&1&& &&&&'.'?'O'd'^w'*'(#(4(<( D( N(n[(((( )'),);)K)d)x) ) )B)) *{**p*+&+A+6V++ +++ +++ +, ,&,g8,#,,,,,(-1-:-:@-{-G--=-L4..:...=/S/(/>/9=0w0%0G01 151I1 Y1 e1p1 x111 1111 1122%2>2T2Y2_2 f2Lq2T2#373L3;k33333 33- 4:4!X4 z4 44 44!4g425)K5'u5*555666+6B6`6s66Z667 8888 889!9 19;9B9 J9 V9c99999 999_9_W:[:U;ci;;; ;;;<<!< @<L<S< [<g<$<<<<<<< <=%=M:===G=>?!@A(*BSCPEmmFhFDGdHRJxK`LM1McMNNNN/OOPPS)P4}Q QQQQQQ Q RR-R,?RlRsRR'RRR"R!!S CSMS aSlSSS0S"S( T4TMTeTTTTTTT( U5URUnUUU U"U)V/V ?VJV`VuV-VVVVWW.WDWSW"gWWWWWWX&XFXYXmXXXX X XX X#Y*Y*2Y$]YYYYYYY)Z(:Z cZpZZZZZ?Z!-[O["i[&[[['[\+\ :\D\J\[\y\ \2\6\ ]-]%>]/d]2]*]8];+^)g^^^^6^$^ _+_3_F_a_w___$__`$ `E```v``````a a #aDada,a8a4b/c Lc Xcdc4tcc"c$cc$c "dCfbf qf}ffff$fff$g (g2g#Igmg0g"g ggg"h$h?hOhbhuhOh.h ii-i5i =i GiQTiiiiii ijj2jEj[jbj6rjj jhj;k`Kkkkk=k,l ?lLl\l rlll ll l$lcl'q qqqq qqr rr(r8r Qr ^r kr xrr rrrrr r r sB sLNssss)st t $t.t>t\t.xtt"t ttuuu%uT?uuu+u+u(vHvdvyvvv"vvvvKwuMww xxxyy6yRyYy ry|yy y yyyyy yyz%zX?zUzUzOD{\{ { {|| 1|;|K|R| m| z| ||!|!||||}} }'} 7}D}?c}}}>}r faF0ׄb>kTmv3.bF MW^3:M`"|  Œ ̌֌  *0: k!u00 IS fq*5'Nvڏ( 5Q!m'$*9 LWn(Ƒݑ6M\(s%ߒ !(8ar ēݓ "?!G#i ϔ'(Bk!r!ҕ4 Bc|%ז'' C MZaq&7</ H!U'w'-ǘ33)']R# +8?!Su ך#$:M er*қ !:!PFa,~$`NdS;zAbb#y &JOE Q!/ _t@=GxV:>37S{& I3^qDpR?Dgj+\$%od[<{;: _4Ll+]n55z(Cuf|4or]10itce Z!#")jh8-Gip YW F26g2 MV. muO^KH\Jc>Mr9@l*<0w?6s'LRIw,-nyCP1WkhBHNTm|Z=AY%})ETP/vQX8X'9f}kx7(a*"sB U~[vq`e.KU (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Error: Warning: from the list? has been received on socket. Send or queue fax? or %d characters received while waiting to send%s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Albanian - Besnik Bleta Answer callAnswering callAutoBulgarian - Zdravko Nikolov CAN: data reception cancelledCFR - channel OKCIG - poller IDCRP - repeat commandCSI - answering IDCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Choose the selected fax for sendingClass 1Class 2Class 2.0Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DCN - disconnectDCS - session formatDIS - answering capabilitiesDTC - poller capabilitiesDateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?EOM - not done, new formatEOP - doneEmpty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFTT - channel not OKFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)Greek - Hellenic Linux Users Group HDLC frame missing initial 0xffHebrew - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentityInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Italian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingMCF - page OKMPS - not doneModemModem Class: Move address downMove address upMove file downMove file upMulti-Tech bit order setMultiple filesNSC - poller featuresNSF - answering featuresNSS - caller featuresNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PIN - page not OK, call operatorPIP - page OK, call operatorPRI-EOM - not done, new format, call operatorPRI-EOP - done, call operatorPRI-MPS - not done, call operatorPRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitRTN - page not OK, check channelRTP - page OK, check channelReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! Send faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSimplified Chinese - Kite Lau Single fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopTSI - caller IDTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether the destination fax number is included in the top fax header line for sent faxes. Uncheck the box if you do not want this to be shown (say because it includes a pay card access number)This specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class hereYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsabnormal termination (code %d)activity detectedbit-reversed HDLC frame, reversing bit ordercalledcan't answer: can't lock devicecan't delete file %s:can't determine fax modem class supportcan't open pagechannel not usable at %d bpschannel not usable at lowest speedcharacters received while sendingconnecteddial command faileddialing %sefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingsexec() call failed:executing command /bin/sh -c %sfailed page %sfax call answeredfax device write error:file write:finished - %sflow control did not workframe errorframe too long (%d, > %d max bytes)header:incompatible local and remote capabilitiesincorrect quality (-q) argument (%s)internal errorinterrupt request ignoredinvalid modem responseinvalid post-page responseinvalid response to DCSlast byte of frame is NULLlocal ID (%s) has non-standard characterslocal ID (%s) truncated to %d characterslocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxmodem response in datano +FPTS response obtained, it is assumed that fax was receivedno XON/DC2 received after CONNECTno answer from remote faxno command or response from remoteno getty command defined for data callno response after frame datano response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceive (+FDR) command failedreceivedreceived %d lines with %d errorsreceived TCF - channel check (OK: run of %d in %d)received TCF - channel check (not OK: run of %d in %d)received short frame (%d bytes)reception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremote has one or more documents to send.removed file: %srun length buffer overflowsentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent TCF - channel check of %d bytessent page %ssuccesssync: dropping DTRsync: modem not respondingsync: sending escapesterminated by signaltimed out after command: %stimed out after waitingtimed out during training check datatimed out reading frame datatimed out waiting for commandtoo many %%d escapes in command (%s)too many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing %s in class %susing line buffering of stdoutvoice call answeredwaiting for activitywrong carrierwrong response after command: %swrong response after frame datawrong response after waitingwrong response to command to receive a frameProject-Id-Version: efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2005-09-21 20:01+0800 Last-Translator: Kite Lau Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (注意:这将永久从系统删除此传真) *** 停止发送/接收传真会话中 *** 错误: 警告: 从列表中?已经在套接口接收到。 发送还是列队?或者 当等待发送时收到 %d 字符%s 锁定了或者繁忙 - 等待中?efax-gtk 刚刚接收到一个传真一个postscript查看器是用来从传真列表里查看已收或已发传真,而且也用来查看在"要传真的文件"选择窗口里的待发传真。在这里指定用来查看postscript文件的命令。如果没有指定,程序将默认用“gv“。或者你可能需要指定”evince“(Gnome postscript查看器)或者”kghostview“(KDEpostscript查看器)。如果你使用gv,你可能需要用'-media A4' 或者'-media Letter' 的选项来选择正确的页面尺寸。evince和kghostview可以自动识别的。套接口接收到打印任务_E 关于efax 关于 efax_G 关于efax-gtk关于efax-gtk接受添加文件到列表添加文件到文件列表来发送添加新地址添加新文件夹添加/修改所选传真的描述地址簿允许连接的 地址采用默认传真分辨率204X196 采用默认页面尺寸A4 采用默认的postscript文件查看命令'gv' 阿尔巴尼亚文 - Besnik Bleta 应答传真应答传真中自动保加利亚文 - Zdravko Nikolov CAN: 数据接收被取消CFR - 信道 OKCIG - 轮询身份CRP - 重复命令CSI - 应答身份不能更改设置,除非程序处于非激活状态 按停止键来反激活不能发送传真-已经在接收传真中 能力:选择所选传真来发送Class 1Class 2Class 2.0设置错误版权 (C) 2001 - 2011 Chris Vine 这个程序以GNU 公共版权, 版本2发布 DCN - 断开连接DCS - 会话格式DIS - 应答能力DTC - 轮询能力日期删除地址删除文件夹:删除所选地址吗?删除所选传真删除所选文件夹描述拨号模式:你接受以上的条件,注意和免责条款吗?EOM - 未完成,新格式EOP - 完成删除所有子文件夹来清空文件夹 并且在删除文件夹前 拖放或者删除里面的传真清空废件箱清空废件箱吗? (注意:这将永久性从系统 删除所有废件箱里的传真)_M 输入多个文件输入已选传真来发送输入设置于当调制解调器收到传真时 执行一个程序或脚本FTT - 信道不 OK传真列表传真描述?输入传真方式:待发传真文件文件不存在 待发文件好文件夹文件夹名字不能包含字符:文件夹名字? (注意:这个将被置于顶部 而且可以被拖放 到其他文件夹)希腊文 - Hellenic Linux Users Group HDLC 帧希伯来文 - Assaf Gillat 匈牙利文 - Gergely Szakats, Laszlo Csordas 身份未激活收件箱在页眉 包括目的地 的传真号码初始参数:指定了无效的工作子目录:WORK_SUBDIR: , WORK_SUBDIR: 将被忽略 指定了无效的拨号模式指定了无效的拨号模式 采用默认的拨号模式 指定了无效的传真分辨率 采用默认传真分辨率204X196 指定了无效的调制解调器级别设定了无效调制解调器的级别 采用默认级别Class 2 未知选项。选项是: 指定了无效的页面尺寸指定了无效的页面尺寸 采用默认页面尺寸A4 指定的套接服务器端口号无效,所以服务器将不被启动。端口号必须介于1024和65535之间 指定了无效的打印收缩参数指定了无效的打印页面收缩值:采用默认的值100 指定了无效的拨号号码 响铃一声后将应答 指定了无效的铃声号码指定了无效的已发传真的分辨率指定了无效的套接端口号。它必须介于1024与65535之间意大利文 - Luca De Rugeriis _R 列出已收传真列出已接收传真列出已发送传真锁文件:日记文件:日记MCF - 页 OKMPS - 未完成调制解调器调制解调器级别:下移地址上移地址下移文件上移文件Multi-Tech 比特顺序组多个文件NSC - 轮询特点NSF - 应答特点Nss - 来电特点名字名字:名字:新传真没有指定传真号码。你要发传真到开放的连接吗?没有指定套接服务器的端口号,所以服务器将不被启动。 没有指定串口设备于无效文件名 无效的postscript/PDF文件 注意:按OK键将保存设置到文件号码号码:号码:其他参数:PIN - 页不 OK, 呼叫总机PIP - 页 OK,呼叫总机PRI-EOM - 未完成,新格式,呼叫总机PRI-EOP - 完成,呼叫总机PRI-MPS - 未完成,呼叫总机打印任务打印任务:页面页面尺寸:参数永久性删除传真? 永久性删除此传真吗? (注意:这将永久从系统删除此传真)波兰文 - Pawel Suwinski 打印前 弹出确认对话窗调制解调器收到传真时 弹出窗口当套接口转来传真 弹出对话窗口传真套接至的 的端口号Postscript查看器 程序:需帮助请按F1键打印打印程序:打印收缩(50-100):套接口所接收的打印任务 打印所选传真打印所选传真?脉冲在此指定锁文件的目录。如果留白,程序默认使用/var/lock在这里输入要在已发传真页眉上显示的号码。这也将包括应答传真机显示给对方的身份。在此指定调制解调器连接到的串口设备(如果留白,程序将默认使用/dev/modem)。不要在此包括设备名的"/dev/"部分,也就是只声明"ttyS1", 或者"cua2",等等。在Linux下,ttyS0等同于COM 1, ttyS1等同于COM 2, 以此类推。排队传真_F 从套接口列队传真列队打印任务退出RTN - 页不 OK,检测信道RTP - 页 OK,检测信道接收进入接收待机状态接收中拒绝删除删除文件删除文件从列表中删除所选文件重置重置参数:重置新传真数重置设置铃声(1-9):运行套接服务器俄文 - Pavel Vainerman 严重系统错误:不能新建目录来保存已收传真。 不能保存此传真! 严重系统错误:不能新建目录来保存已收传真。 不能接收传真! 严重系统错误:不能新建目录来保存已收传真。 不能保存传真! 严重系统错误:不能打开已收传真目录。 不能保存此传真! 系统严重错误:不嫩保存已收的所有传真。 所有或部分传真将丢失! 发送传真发送中发送传真中已发传真分辨率:已发箱串口设备:设置简体中文 - Kite Lau 单个文件套接口套接口套接口列表套接服务器运行在端口号在此指定传真的页面尺寸标准待机接收待机中停止TSI - 来电身份接过电话电话号码:电话号码下面文件夹已经存在:这个程序以-s的选项启动,但没有系统托盘可用 远程的身份是远程身份是 %s这里可以用来传递任何其他的参数给efax(用“man efax“来查看可用参数)。可以指定多个参数,用空格隔开不同参数--例如包含”-or“来做一些在接收传真时Multitech调制解调器所需要的翻转。除非你有一个不一般的调制解调器,留白即可。这里设定了在接收待机模式下调制解调器应答前的响铃次数。允许的值为1到9。如果没有指定,程序默认为1。这个指定了接收并打印来自标准输入的postscript文件的命令。如果留白,程序默认为"lpr"这个参数指定了记录传真交涉,状态,错误和警告的日记文件。如果没有指定,那么将没有日志记录。(一个日记文件也可以通过重定向到stdout和stderr--更多细节请看README文件)这个参数指定当调制解调器收到传真时是否弹出对话窗口。如果是,请勾选。这里指定了将重置调制解调器的"AT"命令。可以指定多个命令,不同命令用空格隔开,但不加“AT”前缀。如果没有指定,程序将默认用"Z",这个将适用于大部分调制解调器。这个设定调制解调器的能力。要想知道什么意思,请运行"man efax",查看"-c"选项。在efax-0.9和一个Class 2调制解调器之下,你通常不用指定这个,留白即可,因为陈需会询问调制解调器。如果使用老版本的efax或者一个不同级别的调制解调器,和典型的任何较慢的14,400 bps的调制解调器能工作的值是 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0。这里指定了将重置调制解调器的"AT"命令。可以指定多个命令,不同命令用空格隔开,但不加“AT”前缀。如果没有指定,程序将默认用"Z",这个将适用于大部分调制解调器。这里指定了套接服务器监听的端口号这里指定了已发传真的分辨率。"标准"赋予204X98,而"好"赋予204X196的分辨率这里指定了,在已收传真或已发传真列表里,当按"打印所选传真"按钮时是否在打印前弹出确认对话窗口。去勾选如果你不想要弹出窗口(如果你指定了一个外部打印管理器,例如在打印程序选框里指定了'kprinter',那么你将不需要此勾选)。这里指定了当经过套接服务器接收到来自打印系统的传真任务时是否弹出对话窗口。如果是就勾选(如果你也勾选了运行套接服务器,这里将不生效)。如果程序没激活传真可以从这个窗口直接发送。这里指定当调制解调器收到传真时程序是否执行一个程序或脚本这里指定了是否需要为CUPS或其他打印系统运行一个套接服务器。如果需要就勾选。这里指定了是否在已发传真的页眉包含目的地的传真号码。去勾选如果你不想要这个被显示(例如因为它包含了一个付费卡的先拨号码)。这里指定用音频或脉冲来拨号发送传真这里决定了适应打印机的打印范围所作的收缩范围。这是个百分数--例如98将把页面收缩至实际尺寸的98%。如果留白,将不做任何收缩(也就是说你可以,但不必指定100)音频废件箱未知Usage: efax-gtk [options] [filename] Options: -r 启动程序到接收待机状态 -s 启动程序并隐藏于系统托盘 查看程序附带的自述文件来了解更多细节 用户对此文件不可读 查看查看所选传真查看所选文件efax-0.9或以上版本,你一般需选择"自动",efax会自动判断调制解调器的级别,但你也可以强制使用自己指定的级别。然而efax-0.8会默认Class 2,所以如果你在旧版本的efax里使用Class 1的调制解调器,请在这里指定级别。你没有设置$HOME环境变量 _A 地址簿_E 输入单个文件_F 文件_H 帮助_L 列出已发传真_Q 退出_S 设置_T 翻译不正常终止 (代号 %d)检测到活动比特反转的 HDLC 帧,反转比特顺序中已呼叫不能应答:不能锁定设备不能删除文件 %s:不能确定传真调制解调器的支持级别不能打开页信道速度 %d 字节不可用信道速度最低,不可用发送时收到的字符已连接拨号命令失败拨 %s 中efax-gtk help: 能力efax-gtk help: 设备efax-gtk help: 拨号模式efax-gtk help: 传真收到时执行程序efax-gtk help: 传真页眉efax-gtk help: 起始参数efax-gtk help: 锁文件efax-gtk help: 锁文件efax-gtk help: 调制解调器的级别efax-gtk help: 名字efax-gtk help: 号码efax-gtk help: 其他参数efax-gtk help: 页面尺寸efax-gtk help: 弹出窗口efax-gtk help: 端口efax-gtk help: Postscript文件查看器efax-gtk help: 打印程序efax-gtk help: 打印收缩efax-gtk help: 接收弹出窗口efax-gtk help: 重置参数efax-gtk help: 响铃efax-gtk help: 运行套接口服务器efax-gtk help: 已发传真分辨率efax-gtk help: 套接口允许的连接数efax-gtk 套接口efax-gtk: efax-gtk: 添加地址efax-gtk: 添加文件夹efax-gtk: 地址簿efax-gtk: 条件,注意和免责条款efax-gtk: 删除地址efax-gtk: 删除efax-gtk: 删除文件夹efax-gtk: 传真描述efax-gtk: 文件列表efax-gtk: 待传文件efax-gtk: Helpefax-gtk: 打印传真efax-gtk: 从套接口列队传真任务efax-gtk: 已收传真列表efax-gtk: 删除已排队传真任务efax-gtk: 已发传真列表efax-gtk: 翻译efax-gtk: 废件箱efax-gtk: 传真收到efax-gtk: 套接口接收到打印任务efax-gtk: 设置exec() 呼叫失败执行命令 /bin/sh -c %s失败页 %s应答了传真呼叫传真设备写错误:文件写入:已完成 - %s流控制没起作用帧错误帧太长 (%d, > %d 最大字节) 页眉:不兼容的本地和远程能力不正确的质量 (-q) 参数 (%s)内部错误中断请求被忽略无效的调制解调器反应无效页后反应给 DCS 的反应无效帧的最后一个字节为NULL本地身份 (%s) 有非标准的字符本地身份 (%s) 被缩成 %d 个字符本机调制解调器命令 "%s" 太长调制解调器命令 (%s) 失败调制解调器命令失败调制解调器不支持传真调制解调器数据反应没有获得 +FPTS 反应,就当传真被收到了连接之后没有收到 XON/DC2远程传真没有应答远程没有命令或反应数据呼叫没有设定 getty 命令帧数据后没有反应调制解调器没有反应语音呼叫里没有设定语音命令号码正忙或调制解调器占用中号码忙已打开 %s其他页保存到 %s接收 (+FDR) 命令失败已收接收了 %d 行,并有 %d 个错误已收 TCF - 信道检测 (OK: 在 %d 里 运行了 %d)已收 TCF - 信道检测 (不 OK:在 %d 里 运行了 %d)已收短帧 (%d 字节)接收错误远程无法接收,但尝试中远程没有文件发送而且能接收远程没有文件发送而且能接收远程没有任何东西发送,但尝试中远程有一个或更多文件发送而且能接收远程有一个或更多文件发送而不能接收远程有一个或多个文件要发送已删除文件:%s运行长度溢出已发以 %d 字节每秒的速度,耗时 %d 秒,发送了 %d+%d 行和 %d+%d 字节已发 TCF - 信道检测 %d 字节已发页 %s成功同步:抛弃 DTR同步:调制解调器不反应同步:发送逃逸被信号终止命令:%s 后超时等待超时检测数据过程超时读取帧数据超时等待命令超时在命令 (%s) 里太多 %%d 逃逸太多页发送重试无法应答呼叫未预知的反应 "%s"未知命令不可恢复的错误使用 %s 调制解调器于级别 %s 上使用标准输出的行缓冲应答了语音呼叫等待活动错误的载体命令:%s 后错误反应帧数据后反应错误等待后错误反应对接收帧的命令反应错误efax-gtk-3.2.8/po/Makevars0000644000175000001440000000342511466007654012276 00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = efax-gtk # 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 = Chris Vine. # 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 = cvine@users.sourceforge.net # 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 = efax-gtk-3.2.8/po/bg.gmo0000644000175000001440000016422711544574531011706 000000000000004[LB([%_ *P.@I1660666#666'69 ^9 j9u9999%999&9 :&:+C:!o:1: :::^:*B;m;#|;;; ; ;n;6<E<U<n<< < <B<{<p=p== >%>6:> q>{>> >>> >>>&>g?o?x???G??=@L@@@:@@A=!A_A(A> B9IBB%BGBC%C9C IC UC`ChC nC|CCC CCCCCLCT(D#}DDD;DEE E)E 8E BENE SE_E!fEgE)E'F*BFmFFFFFFFGG,GZ2GG5H EIOIiI{III III I IIIII JJ-J6J >JJJ_JhJxJ JJJ JJ$JJJJKK 'K4K%EKMkKGKMM!NO6P(PQPSmUhoUUdWXx{ZMZcB[\\\/]]]]S] 8_F_Y___e_v_ |_ ____0_(`9`R`j```````(a:aWasaaa a"a) b4b DbObebzb-bbbbcc3cIcXc"lcccccc d&$dKd^d udd^dte[\fw f0rmčt2+ӗkU](_?Kț  ) 9GRVR 3WQ/U<@c},,;Rm%I  +F"ۡ-4,1a?Ӣ"3w/I.z.2ئ ,'7&_ K0ݨcErR8t$4BΫh\ŭ{F `Tr+(*T,$Ѱ 55E3{3! stG(N*wz  ( 4A%a'#91]`V^O5f!+׷1G57}8^2üF7= u ˽() I7+-A۾ 3> r >ǿ%$J] w (I,+Bn(w5g9p,6jlpID:4 ;FQ7-F-t7'  -* Xd x+)5^Dm,$(-I2i7<8/>h<K@0-q9R?,l **R,O*|6#* K0`M4;,P}!U)8F  sx~$E_&8)*%Dybt:ca W<}15\",l9|wAY6rO/R^2MN]n0`m#Xq+ Hf-[kjF{gUh =.!>e3 L7iKoTV@J;ZSCBzG'(I pv4dPQu? (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. Error: from the list? has been received on socket. Send or queue fax? or ?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Answer callAnswering callAutoCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Choose the selected fax for sendingClass 1Class 2Class 2.0Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 Delete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?Empty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)IdentityInactiveInboxInitialization Params:Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535List _received faxesList received faxesList sent faxesLock File: Log File: LoggingModemModem Class: Move address downMove address upMove file downMove file upMultiple filesNameName:Name: No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset settingsRings (1-9): Run socket serverSend faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSingle fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! This can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTrashUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class here_Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingsinvalid modem responselocalhost otherProject-Id-Version: efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2005-05-10 01:21+0100 Last-Translator: Zdravko Nikolov Language-Team: Bulgarian Gnome Project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Внимание: факсът ще баде перманентно изтрит от файл системата) *** Прекратяване на изпращаща/получаваща сесия *** Получаване на факсове ------------------- Съществуват три начина за получаване на факсове. В първият, програмата може да бъде настроена да отговаря на факс повикване чрез натискане на бутона "Отговори на повикване". Във вторият, програмата може да поеме контрол над повикване на което е отговорено (да речем, чрез телефонна слушалка) чрез натискане на бутона "Поеми контрол над повикване". В третият, програмата може да бъде поставена в режим на очакване чрез натискане на бутона "В очакване". Така програмата автоматично ще отговаря на повикване след посочения във файла efax-gtkrc брой позвънявания и ще получи факса. Програмата ще продължи да получава факсове докато не бъде натиснат бутона "Стоп". Получените факсове могат да бъдат разпечатвани, разглеждани и подреждани чрез вграденото факс лист ютилити. То може да бъде извикано от менюто `Файл/Листа получени факсове`. Виж по-долу. Възможно е да настроите програмата да извиква информационния диалог при получаване на факс (чрез диалога настройки). В диалога настройки можесъщо така да посочите програма която да бъде изпълнявана при получаване на факс. Номера на факса се задава като първи (и единствен) аргумент за програмата, което и позволява да го открие в $HOME/faxin. Дистрибуцията съдържа два изпълнителни скрипта, mail_fax и print_fax, които могат да се използват за автоматично изпращане или разпечатване на факса по e-mail, при неговото получаване. (Тези скриптове не биват инсталирани от 'make install' - ако желаете да ги използвате, направете ги изпълними с 'chmod +x' и ги копирайте в системна директория като /usr/local/bin, и след това посочете името на скрипта в диалога настройки.) Изпращане на факсове ---------------- Преди изпращане на факс, трябва да бъде посочено в "Факс за изпращане" прозореца. Трябява да е в postscript/PDF формат (форматът е продукт на всички Unix/Linux текстообработващи програми) и ще бъде преобразуван от програмата в правилния tiffg3 факс формат. Съществуват два начина за въвеждане на факс. При първият, факса за изпращане може да е файл запазен във файл системата. Може да бъде ръчно въведен във "Факс за изпращане" прозореца, или чрез диалога за избор на файл. Ако фаила е единичен postscript/PDF файл, то може да бъде намерен натискайки "Единичен Файл" бутона. Улеснение тук е ако файла се намира в $HOME/faxout директорията. Когато са посочени повече от един факс във "Факс за изпращане" прозореца, те ще бъдат изпратени като един факс по реда по който са въведени. Такива множество файлове могат лесно да бъдат въведени използвайки файл листа получена при натискане на "Множество Файлове"бутона. Натискането на бутона"Множество Файлове" позволява откриването и добавянето на файлове към файл листата, и пренареждането им чрез бутоните Нагоре и Надолу, или чрез dragging и dropping с мишката. Алтернативно, факсовете могат да бъдат получени директо от разпечатващата система чрез сокет сървъра на програмата. Efax-gtk поддържа листа на опашката от факсове получени от сокета, и достъпна чрез избиране на "Сокет" като метод за факс въжвждане, и после можете да видите опашката от факсове натискайки бутона "Сокет Листа" Това е по-удобния начин за изпращане на факс от текстообработваща програма, и позволява факса да бъде изпратен към efax-gtk чрез принтиране от текстообработващата програма. Факс който чака на опашка за изпращане в сокет листата се обозначава с червено кръгче от дясно на "Факс за изпращане" в главния прозорец на програмата. За специфичности на как да настроите CUPS или lpr/lprng да изпращат към efax-gtk, вижте файла README който идва с дистрибуцията. Телефонният номер на който искате де изпратите факс, трябва да бъде въвден в кутийката "Teл номер". Въвеждането може да стане директно, с помоща на вградения адресник. Адресника може да бъде повиканчрез натискане на бутона "Teл номер" , или от менюто 'Файл/Адресник'.Вижте "Използване на адресника" по-долу. Когато факс е получен от разпечатващата система чрез сокет сървъра,настойките на програмата могат да бъдат конфигурирани така че автоматично да извикват диалога. Ако програмата е неактивна (не е в ражим очакване да получи факс) факса може да бъде изпратен директно чрез този диалог, без да се налага извикване на листата от факсове получени от сокета и чакащи на опашка. Успешно изпратените факсове биват копирани в директорията $HOME/faxsent, която получава име съобразно годината, месеца, деня, часа и секундите в които е приключило изпращането на факса, и се появяват в листста на изпратените факсове. Включването им в тази листа става само при условие че са изпратени без грешка. Информационният диалог на efax ще ви докладва за прогреса на изпращания факс. Факс листсата може да бъде извикана от менюто `Файл/Листа на изпратените факсове'. Вижте "Използване на факс листите" по-долу. Настройки ----------- Настройките на програмата могат да бъдат променени ръчно чрез конфигурационния файл efax-gtk състоящ се от $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc или /etc/efax-gtkrc. Файла бива търсен в тази последователност, така че $HOME/.efax-gtkrc омаловажава другите два. Настройката на конфигурационния файл може да се извърши чрез диалога Настойки извикан от менюто 'Файл/Настройки'. Стойностите въведени чрез този диалог се запазват в $HOME/.efax-gtkrc. Ако сте използвали диалога Настойки и искате да върнете глобалните стойности, lизтрийте файла $HOME/.efax-gtkrc или натиснете бутона 'Първоначални Параметри' в диалога Настройки, което ще зареди параметрите от глобалния конфигурационнен файл ($sysconfdir/efax-gtkrc или /etc/efax-gtkrc). За да извикате помощ информация при попълване на настройките в диалога, задръжте курсора над желания бутон помощ (?), или го натиснете. Използване на адресника -------------------------- За да извикате номер от адресника, подчертайте желания адрес чрез натискане на левия бутон на мишката докато сте над него, и натиснете "ОК" бутона. Добавянето на адреси става чрез натискане на бутона добави, след което попълнете желаната информация в диалога. За да изтриете адрес го подчертайте, и натиснете бутона изтривам. Адресника може да бъде сортиран използвйки бутоните нагоре/надолу при подчертан адрес или чрез мишката (grag and drop). Използване на факс листата ---------------------- За да извикате факс листата, изберете менюто `Файл' и посочете меню `Листа получени факсове' или `Листа изпратени факсове'. Изберете факса който искате да изпратите или видите като натиснете левия бутон на мишката. Програмите за разпечатване и гледане на факс се посочват в конфигурационния файл efax-gtkrc, или ако няма такива посочени, програмата ще разпечати използвайки lpr (което работи за повечето Unix системи) и гледа с gv. За разпечатване на факс, РАЗПЕЧАТВАЩ_УМАЛИТЕЛ параметър може да бъде посочен в efax-gtkrc,който позволява на факса да се вмести в принт маржина. Параметър от 98 е добре за повечето принтери. Параметъра може да бъде променян чрез извикване на диалога `Настройки' и въвеждайки го в кутийката `Разпечатване/Разпечатващ умалител'. Описание може да бъде добавено към получен факс чрез натискане на необходимия бутон -- с цел по-лесната им идентификация. Конфигурационна грешка от листата? е получен от сокета. Да изпратя или наредя на опашка факса?или ?Получен е факс от efax-gtkPostscript viеwer Програмата се използва за преглед на получени и изпратни факс листи, и също така за преглед на факсове готови за изпращане достъпни чрез диалога за избор "Фаилове за изпращане". Посочи тук комадата за преглед на Postscript файлове Ако такава не е посочена, програмата ще използва 'gv'. Други вазможни са 'evince' (the Gnome image viewer) или 'kghostview' (the KDE postscript viewer). Ако използвате gv, възможно е да трябва да посочите '-media A4' или '-media Letter' ggv и kghostview правят това автоматичноРазпечатваща задача е получена от сокетаЗа _efaxЗа efax_За efax-_gtkЗа efax-gtkПриемамДобавяне на файлове към листата за факсиранеДобавяне на файлове към листата за факсиранеДобавяне на адресДобавяне на нова директорияДобавяне/изменение описанието на избрания факсАдресникАдреси с позволена връзкаВъзприемане на стандартна факс резолюция 204x196 Използване на стандарт формат А4 Ще използвам стандартната команда за Postscipt гледане 'gv' Отговаряне на повикванеОтговаряне на повикванеАвтоматичноНастройките не могат да се променят докато програмата е активна Натисни Стоп бутона за деактивиране на програматаФаксът не може да бъде изпратен - в момента се получава факс Възможности: Посочване на избрания факс за изпращанеКлас 1Клас 2Клас 2.0Конфигурационна грешкаCopyright (C) 2001 - 2011 Chris Vine Тази програма се разпространява под GNU General Public License, версия 2 Изтриване на адресИзтриване на директория:Изтриване на избрания адрес?Изтриване на избрания факсИзтриване на избраната директорияОписаниеРежим на избиране: Приемате ли Условията, Забележките и Отказване от Права посочени по-горе?Изпразване на директория чрез изтриване на коя да е поддиректория и чрез drag-and-dropping или изтривайки факсовете съдържащи се в неяИзпразване на папката кошчеИзпразване на папката кошче? (Внимание: Всички факсове в папката кошче ще бъдат перманентно изтрити от файл системата)Въведи _множество файловеВъвеждане на избрания факс за изпращанеЗадаване на настройки от Изпълнение на програма или скрипт при получаване на факс от модемаФакс листиФакс описание?Метод за въвеждане на факс: Факс за изпращанеФайл Файлът не съществува Файлове за факсиранеФиннаДиректорияИмето на папката не може да съдържа буквиИме на директория? (Ще бъде сложена в топ нивото и може да бъде drag-and-dropped в други директорииСамоличностНеактивенКутия получениИнициализиращи параметри:Избрана е невалидна WORK_SUBDIR:, WORK_SUBDIR: ще бъде игнорирана Посочен е невалиден режим на избиранеИзбран е невалиден режим на избиране Ще използвам стандартен режим на избиране тон Посочена е невалидна факс резолюция Възприемане на стандартна факс резолюция 204x196 Посочен е невалиден клас модемИзбран е невалиден клас модем Възприемане на стандарт за клас 2 Невалидна опция. Опциите са: Посочен е невалиден размер страницаПосочен е невалиден формат на страница Ще използвам стандарт формат А4 Посочен е невалиден порт сокет сървър, сървърът няма да бъде стартиран. Стойността трябва де е между 1024 и 65535 Посочен е невалиден параметър за разпечатващия умалителПосочена е невалидна стойност за умалителя не разпечатката: Ще използвам стандартната стойност 100 Посочен е невалиден брой позвънявания Отговорянето ще е след едно позвъняване Посочен е невалиден брой позвъняванияПосочена е невалидна резолюция за изпратени факсовеПосочен е невалиден сокет порт номер. Трябва да е между 1024 и 65535Листа _получени факсовеЛиста получени факсовеЛиста изпратени факсовеЗаключване на Файл: Лог файл: ЛогинМодемМодем Клас: Преместване на адреса надолуПреместване на адреса нагореПреместване на файла надолуПреместване на файла нагореМножество файловеИмеИме:Име: Не е посочен факс номер. Да изпратя ли факса по отворена вразка?Не е посочен порт сокет сървър, сървърът няма да бъде стартиран Не е посочено сериен порт устройство в Невалидно име на файл Невалиден Postscipt/PDF файл Забележка: натискането на бутона ОК ще запази настройките вав файлНомерНомер:Номер: Други параметри: Разпечатваща задачаРазпечатваща задача: СтраницаРaзмер на страница: ПараметриПерманентно изтриване на факс? Перманентно изтриване на избраните факсове? (Внимание: факсът ще баде перманентно изтрит от файл системата)Показване на потвърждаващ диалог преди разпечаткаПоказване на диалог при получаване на факс от модемаПоказване на диалог когато факс е получен от сокетаПорт на който факсовете да бъдат изпращани:Програма за преглед на Postscript:Натисни F1 за помощРазпечатванеРазпечатваща програма: Разпечатващ умалител (50-100):Разпечатваща задача получена на сокет Разпечатване на избрания факсРазпечатване на избрания факс?ПулсПостави тук директорията със заключени файлове. Ако не е посочена такава, програмата използва /var/lockПостави тук номера който да се появи в заглавието на изпратените факсове. Това също така ще включи и оповестяването на ID-то на факс станцията на изпращащата факс машина при получаване на факсПостави серийното устройство за което модемът е свързан тук (ако не е посочено такова, програмата използва /dev/modem). Не включвайте `/dev/' частав името на устойството -- примерно, посочете го като 'ttyS1' или `cua2', итн. В Линукс, ttyS0 е COM 1, ttyS1 е COM 2, итн.Нареждане на факс на опашкаНаредени от сокета _факсове чакащи редРазпечатващи задачи на опашкаИзходПолучиВ готовностПолучаванеОтхвърлямОтстраняванеОтстраняване на файлаОтстраняване на файла Отстраняване на избраня файл от листатаПървоначални стойностиПървоначални параметри: Задаване на първоначални настройкиПозвънявания (1-9): Задействане на сокет сървърИзпращане на факсИзпращанеИзпращане на факсРезолюция на изпратените факсове:Кутия изпратениСерийно устроиство: НастройкиЕдиничен файлСокетСокет Сокет листаСокет активен на порт Посочете тук размера на факс страницатаСтандартнаВ готовностВ очакване на повикванеСтопПриемане на повикванеТел номер: Телефонен номерТакава папка вече съществуваПрограмата е стартирана с -s опцията но нямя систем трей! Тези могат да се използват за задаване на различни параметри на efax (задай команда `man efax' за да видиш опциите). Посочете толкова колкото са необходими, разделени с разтояние за различните параметри -- eg include `-or' за обръщане на бит по време на получаване за Multitech модеми. Оставете го празно ако нямате необичаен модемОпределя броя на позвъняванията преди модема да отговори при режим - в готовност Валидните Стойности са между 1 и 9. Ако не е посочена стойност програмата използва 1Това е командата която разпечатва и приема Postscipt данни като стандартни Ако такава не е посочена, програмата използва `lpr'Този параметър определя лог файл в който се завеждат всички процеси на преговори, факс статус, грешки и предупреждения. Ако такъв не е посочен, лог файл няма да бъде заведен. (лог файл може да бъде заведен чрез пренасочване на stdout и stderr -- виж README файла за повече информация)Този параметър определя дали да се появи информационнен диалог когато факс е получен от модема. Тикнете кутийката ако желаете този диалог.Тази програма е графичен интерфейс на efax. efax е програма разпространявана под GNU General Public License, версия 2 от Ed Casas.Определя инициализиращите `AT' команди за възприемане на първоначалните параметри на модема. Посочете толкова колкото са необходими, разделени със разтояние, за команди които трябва да са разграничени, но без представка `AT'. Ако не са посочени такива, програмата използва`Z', което е вярно за почти всички модемиОпределя способностите на модема. За по-подробна информация задайте команда man efax', и вижте операциите на флага `-c'. С версия на efax-0.9 и модем клас 2, не се налага да посочвате стойности тъй като програмата получава нужната информация от модема. Ако използвате по-стара версия на efax или различен клас модем, тези стойности работят с почти всички 14,400 bps модеми - 1,5,0,2,0,0,0,0, или 1,3,0,2,0,0,0,0 за по-бавнитеОпределя инициализиращите `AT' команди за модема при режим - факс Посочете толкова колкото са необходими, разделени със разтояние за команди които трябва да са разграничени, но без представка `AT'. Ако не са посочени такива, програмата използва `Z &FE&D2S7=120 &C0 M1L0', което е вярно за почти всички модемиОпределя номера на порта на който сокет сървъра приема данни.Определя резолюцията на факсовете. "Стандартна" определя 204x98 и "Финна" определя 204x196Определя дали да се появи потвърждаващ диалог преди разпечатване когато бъде натиснат бутона "Разпечатване на избрания факс". Оставете кутийката празна ако не желаете този диалогОпределя дали да се появи известие на екрана когато сокет сървъра получи факс от разпечатващата система. Маркирайте кутийката ако желаете известие (но само при положение че е маркирана и кутийката за пускане на сокет сървъра). Ако програмата е неактивна можете да изпратите факс директно чрез диалога на известието.Определя дали да бъде изпълнена програма или скрипт когато факс е получен от модема. Тикнете кутийката ако искате да изпълните програма и въведете името иОпределя дали да включи сокет сървър за CUPS или друга разпечатваща система. Маркирай кутийката за да се включиОпределя дали тон или пулс избиране ще бъде използвано при изпращане на факовеИзползва се за определяне на фактора за смаляване на страницата за разпечатка и се изразява в процент -- например 98 ще смали страницата до 98 процената от големината и. Ако не е посочена стойност, смаляването няма да се oсъществиТонКошчеНачин на използване: efax-gtk [опции] [име на файл] Опции: -r Стартиране на програмата в режим в очакване на получаване -s Стартиране на програмата в системния трей Виж фаила README който идва с дистрибуцията за допалнителна информация Потребителят няма права за четене над файла ПрегледПреглед на избрания факсПреглед на избрания файлС версия на efax-0.9 или по-висока, обикновено избери "Auto", като в този случай efax ще избере сам класа модем, но класа може да бъде ръчно избран като посочите някой от опоменатите в листсата. С версия efax-0.8 програмата избира стандартно клас 2, така че ако използвате модем клас 1 със стара версия на efax, посочете класа тук_Адресник_Въведи единичен файл_Файл_Помощ_Листа изпратени факсове_Изход_Настройки_Languageefax-gtk помощ: Способностиefax-gtk помощ: Устройствоefax-gtk помощ: Режим на избиранеefax-gtk помощ: Изпълни програма при получаване на факсefax-gtk помощ: Инициализиращи параметриefax-gtk помощ: Заключи файлefax-gtk помощ: Лог файлefax-gtk помощ: Клас модемefax-gtk помощ: Имеefax-gtk помощ: Номерefax-gtk помощ: Други параметриefax-gtk помощ: Размер на страницаefax-gtk помощ: Информационен диалогefax-gtk помощ: Портefax-gtk помощ: Postscript viеwer програмаefax-gtk помощ: Разпечатваща програмаefax-gtk помощ: Разпечатващ умалителefax-gtk помощ: Получи информационно известеefax-gtk помощ: Първоначални параметриefax-gtk помощ: Позвъняванияefax-gtk помощ: Включи Сокет сървърefax-gtk помощ: Резолюция на изпратените факсовеefax-gtk помощ: Позволени сокет връзкиefax-gtk сокетefax-gtk: efax-gtk: Добавяне на адресefax-gtk: Добавяне на папкаefax-gtk: Адресникefax-gtk: Условия, Забележки и Отказване от Праваefax-gtk: Изтриване на адресefax-gtk: Изтриване на факсefax-gtk: Изтриване на директорияefax-gtk: Факс описаниеefax-gtk: Файл листаefax-gtk: Файл за факсиранеefax-gtk: Помощefax-gtk: Разпечатване на факсefax-gtk: Факсове наредени на опашка от сокетаefax-gtk: Листа получени факсовеefax-gtk: Отстраняване на чакащ факсЛиста изпратени факсовеefax-gtk: Languagesefax-gtk: Папка кошчеefax-gtk: получен факсefax-gtk: разпечатваща задача е получена от сокетаefax-gtk: настройкиПосочен е невалиден клас модемlocalhost другиefax-gtk-3.2.8/po/sv.po0000644000175000001440000024401111544574531011570 00000000000000# Swedish translation of efax-gtk. # Copyright (C) 2006 Chris Vine. # This file is distributed under the same license as the efax-gtk package. # Daniel Nylander , 2006. # msgid "" msgstr "" "Project-Id-Version: efax-gtk 3.0.8\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2006-02-11 12:04+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Adressbok" #: src/addressbook.cpp:122 msgid "Name" msgstr "Namn" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Nummer" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Lägg till ny adress" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Ta bort adress" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Flytta adressen uppåt" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Flytta adressen nedåt" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Ta bort vald adress?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: Ta bort adress" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: Lägg till adress" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Namn:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Nummer:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: Fil att faxa" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Visa" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: Villkor, noteringar och ansvarsfriskrivning" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Acceptera" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Vägra" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "" "Accepterar du de villkor, noteringar och ansvarsfriskrivningar som visas " "ovan?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "Om efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "Om efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Det här programmet (efax-gtk) är ett grafiskt gränssnitt för efax. Efax är " "ett program som utgetts under GNU General Public License, version 2 by Ed " "Casas." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Inaktiv" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Skickar fax" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Svarar på samtal" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "Klar för att ta emot samtal" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "Kan inte skicka fax - ett fax tas emot nu\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Inget giltigt filnamn\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "Filen existerar inte\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "Användaren har inte läsrättighet på filen\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "Ingen giltig postscript/PDFfil\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "Du har inte miljövariabeln $HOME inställd\n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" "ALLVARLIGT SYSTEMFEL: Kan inte skapa katalog för att spara mottaget\n" "fax i. Fax kommer inte kunna tas emot!\n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** Stoppar session för sändning/mottagning ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" "ALLVARLIGT SYSTEMFEL: Kan inte skapa katalog för att spara mottagna\n" "fax i. Detta fax kommer inte sparas!\n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" "ALLVARLIGT SYSTEMFEL: Kan inte öppna katalog för mottagna fax.\n" "Detta fax kommer inte sparas!\n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" "ALLVARLIGT SYSTEMFEL: Kan inte spara hela det mottagna faxet.\n" "Hela eller delar av faxet kommer att saknas!\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "Ogiltigt UTF-8-tecken mottogs i EfaxController::read_pipe_cb()\n" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" "ALLVARLIGT SYSTEMFEL: Kan inte skapa katalog för att spara skickade fax i.\n" "Detta fax kommer inte sparas!\n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "UTSKRIFTSJOBB" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Skriv ut markerat fax" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Visa markerat fax" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Lägg till/Rätta till beskrivning för markerat fax" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Ta bort markerat fax" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Töm skräpmapp" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Lägg till ny mapp" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Ta bort markerad mapp" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "Återställ räknare för nya fax" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Lista över mottagna fax" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: Lista över skickade fax" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Ta permanent bort markerat fax?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(NOTERA: Detta kommer att ta bort faxet\n" "permanent från filsystemet)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Ta permanent bort markerat fax?\n" "\n" "(NOTERA: Detta kommer att permanent ta bort\n" "dessa fax från filsystemet)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: Ta bort fax" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Töm skräpmapp?\n" "\n" "(NOTERA: Detta kommer att permanent ta bort\n" "alla fax i Skräpmappen från filsystemet)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: Skräpmapp" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: Lägg till mapp" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Töm mappen genom att ta bort alla barnmappar\n" "och dra-och-släpp eller ta bort eventuella fax\n" "före mappen tas bort" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: Ta bort mapp" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Ta bort mapp: " #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Skriv ut markerat fax?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: Skriv ut fax" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "Nya fax:" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: Faxbeskrivning" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Faxbeskrivning?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Mappnamn?\n" "(Notera att detta kommer att placeras\n" "på toppnivån och kan dra-och-släppas\n" "till andra mappar)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "Mappnamn kan inte innehåll tecken: " #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "Följande mapp existerar redan: " #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Mapp" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "Datum" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Beskrivning" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Inkorg" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Skickade" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Papperskorg" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: Fillista" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "Filer att faxa" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Visa vald fil" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Ta bort vald fil från lista" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Lägg till filer till lista" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Lägg till filer till fillistan för faxning" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Flytta filen uppåt" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Flytta filen nedåt" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Ta bort fil" #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " från listan?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Ta bort fil" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Copyright © 2001 - 2011 Chris Vine\n" "Detta program är utgivet under GNU General Public License, version 2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Användning: efax-gtk [flaggor] [filnamn]\n" "Flaggor:\n" "\t-r Starta programmet i mottagningsläge\n" "\t-s Starta programmet och göm det i systembrickan\n" "Se filen README som kommer med distributionen\n" "för ytterligare detaljer\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Ogiltig flagga. Flaggor är:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" "Ogiltigt användarnamn angavs - det måste vara\n" "i rena ASCII-tecken. Inget användarnamn kommer\n" "att visas på faxets övre rubrikrad men var lugn\n" "eftersom faxmaskinens nummer alltid anges i\n" "topprubriken\n" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "Ogiltig modemklass angiven\n" "Använder förvalet Klass 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "Ingen serieportsenhet angiven i " #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "Använder den förvalda faxupplösningen 204×196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "Ogiltig faxupplösning angiven\n" "Använder den förvalda faxupplösningen 204×196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "Ogiltigt antal ringsignaler angavs\n" "Kommer att svara efter en signal\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "Använder den förvalda pappersstorleken A4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "Ogiltig pappersstorlek angiven\n" "Använder den förvalda pappersstorleken A4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "Ogiltigt ringläge angivet\n" "Använder förvalet tonläge\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" "Ogiltig minskning av utskrift angiven: använder det förvalda värdet 100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "Använder det förvalda visningskommandot för Postscript \"gv\"\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" "Ingen port för uttagsservern har angivits så servern kommer inte att " "startas\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "Ogiltig port för uttagsservern har angivits så servern kommer inte att " "startas. Det måste vara mellan 1024 och 65535\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" "Ogiltig WORK_SUBDIR: katalog angiven. WORK_SUBDIR: kommer att ignoreras\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "Fil " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "Uttag " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Metod för att ta in fax: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "En fil" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "Flera filer" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Uttagslista" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Telefonnummer: " #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Skicka fax" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Svara" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Ta över samtal" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "Mottagningsläge" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Stopp" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Fax att skicka" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "Lista _mottagna fax" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "_Lista skickade fax" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "Köade _fax från uttag" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "_Ange en fil" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "Ange _flera filer" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_Adressbok" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Inställningar" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "A_vsluta" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "Om efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "Om _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Översättningar" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Hjälp" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_Arkiv" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "" "Programmet har startats med flaggan -s men det finns ingen systembricka!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "Inget faxnummer angivet. Vill du skicka faxet på en öppen anslutning?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Telefonnummer" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "Ett utskriftsjobb har tagits emot på uttag" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk uttag" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "Ett fax har tagits emot av efax-gtk" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: fax mottaget" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "Kan inte ändra inställningar såvida inte programmet är inaktivt\n" "Tryck på Stopp-knappen för att göra det inaktivt" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "Italienska - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "Polska - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "Bulgariska - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "Ryska - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "Hebreiska - Assaf Gillat\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "Grekiska - Hellenic Linux Users Group\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "Albanska - Besnik Bleta\n" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "Ungerska - Gergely Szakats, Laszlo Csordas\n" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "Förenklad kinesiska - Kite Lau\n" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "Tyska - Steffen Wagner\n" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "Svensk - Daniel Nylander\n" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Översättningar" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Tryck F1 för hjälp" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "Ogiltig Utf8 mottogs i MainWindow::read_error_pipe_cb()\n" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "terminerad av signal" #: src/settings.cpp:68 msgid "Name: " msgstr "Namn: " #: src/settings.cpp:69 msgid "Number: " msgstr "Nummer: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Serieenhet: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "Låsfil: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "Färdigheter: " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Antal signaler (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Modemklass: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Ringläge: " #: src/settings.cpp:211 msgid "Auto" msgstr "Auto" #: src/settings.cpp:213 msgid "Class 1" msgstr "Klass 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Klass 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Klass 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Ton" #: src/settings.cpp:235 msgid "Pulse" msgstr "Puls" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Parametrar för initiering: " #: src/settings.cpp:509 msgid "Reset Params: " msgstr "Parametrar för återställning: " #: src/settings.cpp:510 msgid "Other Params: " msgstr "Övriga parametrar: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Utskriftsprogram: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Minska utskrift (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "Popup-dialog för bekräftelse\n" "före utskrift" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Visningsprogram\n" "för Postscript:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Kör uttagsserver" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Popup-dialog när fax\n" "tas emot från uttag" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "Port till vilken fax\n" "ska skickas:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Adresser tillåtna att\n" "ansluta" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "localhost " #: src/settings.cpp:1016 msgid "other" msgstr "andra" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "Popup-dialog när fax\n" "tas emot av modem" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "Starta ett program eller skript\n" "när fax tas emot av modem" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "Upplösning för skickade fax:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" "Inkludera mottagarens\n" "faxnummer på faxets\n" "översta rubrikrad" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "Standard" #: src/settings.cpp:1514 msgid "Fine" msgstr "Fin" #: src/settings.cpp:1767 msgid "Log File: " msgstr "Loggfil: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Sidstorlek: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: inställningar" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Notera: tryck på OK-knappen för att spara inställningarna till filen" #: src/settings.cpp:1979 msgid "Reset" msgstr "Återställ" #: src/settings.cpp:2012 msgid "Identity" msgstr "Identitet" #: src/settings.cpp:2015 msgid "Modem" msgstr "Modem" #: src/settings.cpp:2018 msgid "Params" msgstr "Parametrar" #: src/settings.cpp:2021 msgid "Print" msgstr "Skriv ut" #: src/settings.cpp:2027 msgid "Socket" msgstr "Uttag" #: src/settings.cpp:2030 msgid "Receive" msgstr "Ta emot" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "Loggning" #: src/settings.cpp:2039 msgid "Page" msgstr "Sida" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" "Ogiltigt användarnamn angivet i \"Identitet\"-fliken - det måste vara i rena " "ASCII-tecken. Om detta är ett problem, lämna det blankt eftersom faxnumret " "alltid anges på övre rubriken." #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Konfigurationsfel" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "Ogiltig modemklass angiven" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "Ogiltig pappersstorlek angiven" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "Ogiltig upplösning för skickade fax angivet" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "Ogiltigt antal signaler angivet" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "Ogiltigt ringläge angivet" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "Ogiltig parameter för minskning av utskrift angiven" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" "Ogiltigt portnummer för uttag angivet. Det måste vara mellan 1024 och 65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "Ange inställningar från " #: src/settings.cpp:3102 msgid " or\n" msgstr " eller\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Återställ inställningar" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" "Ange namnet här som ska visas på faxets övre rubrik på skickade fax. Det " "måste vara i rena ASCII-tecken. Om detta är ett problem, lämna det blankt " "eftersom faxmaskinens nummer alltid anges på faxets övre rubrik" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk-hjälp: Namn" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "Ange numret här som ska visas på faxets övre rubrik på skickade fax. Detta " "utgör även faxets stations-id som rapporteras till den sändande faxmaskinen " "vid mottagning av fax " #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk-hjälp: Nummer" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "Ange serieenhet till vilken modemet är anslutet till (om ingen är angiven " "kommer programmet att välja förvalet /dev/modem). Inkludera inte \"/dev\"-" "delen av enhetsnamnet -- skriv det alltså som \"ttyS1\" eller \"cua2\" och " "så vidare. I Linux är ttyS0 det samma som COM 1, ttyS1 och COM 2 och så " "vidare." #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk-hjälp: Enhet" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "Ange katalog för låsfil här. Om ingen är angiven kommer programmet att " "välja förvalet /var/lock" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk-hjälp: Låsfil" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "Med efax-0.9 eller högre bör du vanligtvis välja \"Auto\" eftersom efax " "kommer att hitta modemklassen själv men du kan också tvinga fram en klass " "genom att välja en av de angivna om du vill. Dock är förvalet Klass 2 i " "efax-0.8 så om du använder ett Klass 1-modem med äldre versioner av efax bör " "du ange klass här" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk-hjälp: Modemklass" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" "Detta anger om ton eller puls ska användas för uppringning och sändning av " "fax" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk-hjälp: Ringläge" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "Detta anger färdigheterna för modemet. För att se vad detta betyder, kör " "\"man efax\" och se på operationen för flaggan \"-c\". Med efax-0.9 och ett " "Klass 2-modem behöver du inte ange detta och bör lämna den blank eftersom " "programmet frågar modemet. Om du använder en äldre version av efax eller en " "annan modemklass kan värden som fungerar för praktiskt sett alla 14400 b/s " "modem vara 1,5,0,2,0,0,0,0, eller 1,3,0,2,0,0,0,0 för långsammare modem" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk-hjälp: Färdigheter" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "Detta anger antalet signaler som modemet låter ringa före den svarar när den " "står i mottagningsläge. Giltiga värden är 1 till 9. Om \"none\" angivits " "kommer programmet att välja förvalet \"1\"" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk-hjälp: Antal signaler" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "Detta anger \"AT\"-kommandon för initiering av modemet i faxläge. Ange så " "många av dessa som behövs, separerade med blanksteg för kommandon som " "behöver vara separerade men utan det inledande \"AT\". Om inget är angivet " "kommer programmet att välja förvalet \"Z &FE&D2S7=120 &C0 M1L0\", som är " "korrekt för praktiskt taget alla modem" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk-hjälp: Initieringsparametrar" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "Detta anger de \"AT\"-kommandon som återställer modemet. Ange så många " "kommandon som behövs, separerade med blanksteg för kommandon som behöver " "vara separerade men utan det inledande \"AT\". Om inget är angivet kommer " "programmet att välja förvalet \"Z\", som är korrekt för praktiskt taget alla " "modem" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk-hjälp: Återställ parametrar" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "Detta kan användas för att skicka övriga parametrar till efax (kör \"man efax" "\" för att se vad som är möjligt). Ange så många av dessa som behövs, " "separerade med blanksteg för olika parametrar -- exempelvis inkludera \"-or" "\" för att göra en bitomvändning vid mottagning för Multitech-modem som " "kräver det. Om du inte har ett ovanligt modem, lämna detta blankt" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk-hjälp: Övriga parametrar" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "efax-gtk-hjälp: Utskriftsprogram" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Detta är kommandot som skriver ut och tar emot Postscript-indata på standard " "in. Om ingen är angivet kommer programmet att välja förvalet \"lpr\"" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk-hjälp: Utskriftsprogram" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Detta kommer att fastställa till den grad en utskriven sida ska minskas för " "att passa inom skrivarens utskriftsarea. Detta är ett procenttal -- " "exempelvis 98 kommer att minska sidan till 98 procent av dess storlek. Om " "inget är angivet kommer inte minskning att göras (alltså du kan, men det " "finns inget behov för det, ange 100)" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk-hjälp: Minska utskrift" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Detta anger om en popup-dialog med en bekräftelse ska visas före utskrift av " "mottagna eller skickade fax från listan. Avkryssa rutan om du inte vill ha " "en dialog (om du anger en extern utskriftshanterare såsom \"kprinter\" i " "utskriftsprogramrutan, vill du inte denna kryssad)." #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk-hjälp: Pop-up" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "En Postscript-visare används för att visa skickade och mottagna fax via " "faxlistorna och även för att visa fax som ska skickas via filväljaren " "\"Filer att faxa\". Ange kommandot här som ska användas för att visa " "Postscript-filer. Om inget är angivet kommer programmet att välja förvalet " "\"gv\". Andra möjligheter du kanske vill ange är \"evince\" (Gnomes " "Postscript-visare) eller \"kghostview\" (KDE:s Postscript-visare). Om du " "använder gc, kan du behöva använda flaggorna \"-media A4\" eller \"-media " "Letter\" för att välja korrekt pappersstorlek. Programmen evince och " "kghostview gör detta automatiskt" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk-hjälp: Visningsprogram för Postscript" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "Detta anger om en uttagsserver ska köras för CUPS eller för något annat " "utskriftssystem. Kryssa rutan om den ska köras" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "efax-gtk-hjälp: Kör uttagsserver" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "Detta anger om en popup-dialog ska visas när ett fax tas emot av " "uttagsserver från utskriftssystemet. Kryssa rutan om du vill ha en dialog " "(denna har ingen effekt om du inte även har kryssat rutan för att köra " "uttagsservern). Om programmet är inaktivt eller det är i mottagningsläge, " "kan faxet skickas direkt från denna dialog." #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" "Detta anger portnumret på vilken uttagsservern lyssnar på. Det ska vara " "mellan 1024 och 65535." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk-hjälp: Port" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "Detta fastställer om adresser andra än localhost och din maskins egna " "värdnamn ska tillåtas att etablera en anslutning till uttaget. Om du inte " "har speciella krav (till exempel om CUPS eller lpd-demoner körs på en annan " "maskin), bör du välja localhost. Om du vill att andra maskiner ska kunna " "ansluta, välj \"andra\" och ange de hela kvalificerade värdnamn för de " "datorer som får ansluta (separera olika värdnamn med blanksteg, men du " "behöver inte ange localhost och din maskins värdnamn eftersom de alltid " "tillåts). Du bör köra efax-gtk bakom en brandvägg om du väljer \"andra\"." #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "efax-gtk-hjälp: Uttagsanslutningar tillåts" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "Denna parameter anger om en popup-dialog ska visas när ett fax tas emot från " "ett modem. Kryssa rutan om du vill ha en popup." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "efax-gtk-hjälp: Ta emot pop-up" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "Detta anger om ett program eller skript ska startas när ett fax tagits emot " "från ett modem. Kryssa i rutan om du vill starta ett program och ange " "programmets namn." #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "efax-gtk-hjälp: Starta program när fax är mottaget" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "Detta anger vilken upplösning som fax skickas i. \"Standard\" är 204×98 och " "\"Fin\" är 204×196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk-hjälp: Upplösning på skickade fax" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" "Detta anger om mottagarens faxnummer ska inkluderas på faxets övre rubrikrad " "för skickade fax. Kryssa bort om du inte vill att detta ska visas " "(exempelvis att det kanske innehåller ett kontantkortsnummer)" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "efax-gtk-hjälp: Faxets övre rubrikrad" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "Denna parameter anger en loggfil till vilken förloppet för förhandlingar och " "faxstatus, fel och varningar loggas. Om ingen är angiven, kommer ingen " "loggfil att underhållas. (En loggfil kan också behållas genom att omdirigera " "standard ut och standard fel -- se filen README för ytterligare detaljer)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "efax-gtk-hjälp: Loggfil" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "Ange pappersstorlek för fax här" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk-hjälp: Sidstorlek" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: Hjälp" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Sändning" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Mottagning" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Adressbok" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Faxlistor" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Inställningar" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "Sändning av fax\n" "---------------\n" "\n" "Före ett fax skickas måste det anges i \"Fax att skicka\"-rutan. Det måste " "vara i Postscript-format eller PDF-format (ett format som produceras av alla " "ord- och dokumentbehandlare i Unix/Linux) och kommer att konverteras av " "detta program till det korrekta faxformatet tiffg3.\n" "\n" "Det finns två ingångsmetoder för fax. Först, fax som ska sändas kan vara en " "fil sparad på filsystemet. Det kan manuellt anges i \"Fax att skicka\"-" "rutan eller genom filväljardialogen. Om filen består av en enda Postscript-" "fil eller PDF-fil kan du hitta den genom att trycka på \"En fil\"-knappen. " "Den kan lättare hittas med denna dialog om den är placerad i katalogen $HOME/" "faxout.\n" "\n" "När fler än en fil anges i \"Fax att skicka\"-rutan kommer de att skickas " "som ett enda fax och infogade i den ordning de angavs i rutan. Sådana " "multipla filer kan lätt väljas från fillistan som visas genom att trycka på " "\"Flera filer\"-knappen. Genom att trycka på \"Flera filer\"-knappen kan " "filer hittas och läggas till i fillistan och de kan sorteras genom upp- " "eller nedpilknapparna eller genom att dra och släppa dem med musen.\n" "\n" "Som ett alternativ kan fax tas emot direkt från utskriftssystemet genom att " "använda programmets uttagsserver. Efax-gtk underhåller en lista av köade " "fax som tagits emot från uttaget och som går att komma åt genom att välja " "\"Uttag\" som metod för att ta in fax och sedan ta upp listan över köade fax " "genom att trycka på knappen \"Uttagslista\". Det är ett behändigt sätt att " "skicka fax från en ordbehandlare och gör att ett fax kan skickas till " "utsändning till efax-gtk från ordbehandlingsprogrammet. När ett fax är köat " "för utskickning i uttagslistan visas en liten röd cirkel på höger sida av " "\"Fax att skicka\"-rutan i programmets huvudfönster. För information om hur " "man ställer in CUPS eller lpr/lprng för att skicka till efax-gtk, se filen " "README som kommer med distributionen.\n" "\n" "Telefonnumret till vilken faxet ska skickas anges i rutan \"Telefonnummer" "\". Detta kan anges direkt i rutan eller genom att använda den inbyggda " "adressboken. Adressboken kan hämtas upp genom att trycka på \"Telefonnummer" "\"-knappen eller från menyvalet \"Arkiv/Adressbok\" (se \"Adressbok\"-fliken " "i hjälpdialogen). Dock om en telefonanslutning redan har etablerats med " "fjärrmottagaren kan faxet skickas utan att ringa genom att lämna " "\"Telefonnummer\"-rutan blank (en dialog kommer att visas och fråga om du " "vill skicka faxet utan att ringa).\n" "\n" "När ett fax tas emot från utskriftssystemet via uttagsservern, kan " "programmets inställningar också konfigureras för att visa en dialogruta " "automatiskt. Om programmet är inaktivt eller i mottagningsläge kan faxet " "skickas direkt från denna dialog utan att behöva hämta upp listan över köade " "fax mottagna från uttaget.\n" "\n" "Fax som skickas korrekt kopieras till en katalog i $HOME/faxsent vilken har " "ett namn som fås från det år, månad, dag, timma och sekund faxet skickades " "och kommer att visas i listan över skickade fax. De inkluderas endast i den " "listan om de har skickats utan fel. Meddelandenrutan kommer att visa " "förloppet för ett fax som skickas. Faxlistan kan hämtas upp från menyvalet " "\"Arkiv/Lista skickade fax\". Se \"Användning av faxlistor\" nedan.\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "Mottagning av fax\n" "-----------------\n" "\n" "Det finns tre sätt att ta emot fax.\n" "\n" "Första sättet är att programmet kan ställas in att svara på ett faxsamtal " "som ringer men inte har blivit besvarat genom att trycka på \"Svara\"-" "knappen.\n" "\n" "Andra sättet är att programmet kan ta över ett samtal som redan har " "besvarats (till exempel med en vanlig telefon) genom att trycka på \"Ta över " "samtal\"-knappen.\n" "\n" "Tredje sättet är att programmet kan placeras i mottagningsläge genom att " "trycka på knappen \"Mottagningsläge\". Detta kommer att automatiskt svara " "på samtal efter ett förinställt antal signaler enligt filen efax-gtkrc, och " "ta emot faxet. Programmet kommer att fortsätta att ta emot fax tills " "knappen \"Stopp\" har tryckts på.\n" "\n" "Mottagna fax i formatet tiffg3 (en fil för varje sida) placeras i en katalog " "under $HOME/faxin som har ett namn som framställs av det år, månad, dag, " "timma och sekund som mottagning av faxet blev klar och är faxets id-nummer.\n" "\n" "Mottagna fax kan skrivas ut, visas, beskrivas och hanteras med den inbyggda " "faxlistefunktionen. Denna kan tas fram från menyposten \"Arkiv/Lista " "mottagna fax\". Se \"Användning av faxlistor\" nedan.\n" "\n" "När ett fax tas emot kan även en popup-dialog ställas in att visas (gå till " "inställningsdialogen för att göra detta). I inställningsdialogen kan du " "också ange ett program som ska startas när ett fax tas emot. Faxets id-" "nummer skickas som första (och enda) argument till programmet som gör att " "programmet kan hitta faxet i $HOME/faxin. Distributionen innehåller två " "startbara skript, mail_fax och print_fax som kan användas för att e-posta " "ett fax eller att skriva ut ett fax till en användare automatiskt när det " "tas emot. (Dessa skript blir inte installerade med \"make install\" - om du " "vill använda dem, gör dom startbara med \"chmod +x\" och kopiera dem till en " "katalog som finns i systemets sökväg, såsom /usr/local/bin och ange " "skriptets namn i inställningsdialogen.)\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "Användning av adressboken\n" "-------------------------\n" "\n" "För att välja ett telefonnummer från adressboken, markera den relevanta " "adressen genom att klicka på vänstra musknappen på det och tryck sedan på " "\"OK\"-knappen.\n" "\n" "Adresser kan läggas till i adressboken genom att trycka på \"Lägg till\"-" "knappen och sedan fylla i den relevanta dialogen som visas. För att ta bort " "en adress från adressboken, markera den relevanta adressen och tryck på " "borttagningsknappen (Papperskorg). Adressboken kan sorteras genom att " "använda upp- och nedpilknapparna på en markerad adress eller genom att dra " "och släppa med musen.\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "Användning av faxlistor\n" "-----------------------\n" "\n" "För att visa faxlistorna, gå till \"Arkiv\"-menyn och välj menyposterna " "\"Lista mottagna fax\" eller \"Lista skickade fax\". Markera faxet som ska " "skrivas ut eller visas genom att trycka på vänstra musknappen. Programmen " "som ska användas för att skriva ut eller visa faxet anges i " "konfigurationsfilen efax-gtkrc eller om inga är angivna kommer programmet " "att skriva ut med lpr (som fungerar för de flesta Unix-system) och visa med " "gv.\n" "\n" "För att skriva ut fax kan en parameter kallas PRINT_SHRINK anges i efax-" "gtkrc för att göra så att faxsida minskas för att passa inom skrivarens " "utskriftsmarginaler. En parameter på 98 fungerar för de flesta skrivare. " "Detta kan ändras när programmet körs genom att hämta upp \"Inställningar\"-" "dialogen och ange det i \"Utskrift/Minska utskrift\"-rutan.\n" "\n" "En beskrivning kan läggas till ett mottaget fax när det dyker upp i en " "faxlista (eller därpå förbättras) genom att trycka på relevant knapp -- " "detta gör att fax lättare kan identifieras.\n" "\n" "Listan över mottagna fax visas, längst till höger av verktygslisten, antalet " "fax mottagna sedan programmet senast startades. Om efax-gtk är i " "mottagningsläge kommer \"verktygstips\" för programmets ikon i systembrickan " "och att indikera detta antal. Räknaren kan återställas till 0 utan att " "starta om programmet genom att trycka på återställningsknappen i listan för " "mottagna fax.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "Inställningar\n" "-------------\n" "\n" "Programinställningar kan ändras genom att manuellt redigera " "konfigurationsfilen för efax-gtk som omfattar $HOME/.efax-gtkrc, $sysconfdir/" "efax-gtkrc eller /etc/efax-gtkrc. Filen söks efter i den ordningen så att " "$HOME/.efax-gtkrc gäller först av de tre.\n" "\n" "Konfigurationsfilen kan också ställas in genom inställningsdialogen som " "hämtas från menyposten \"Arkiv/Inställningar\". Inställningarna som anges i " "denna dialog lagras alltid som $HOME/.efax-gtkrc. Om inställningsdialogen " "har använts och du vill återgå till de globala inställningarna kan detta " "göras antingen genom att ta bort filen $HOME/.efax-gtkrc eller genom att " "trycka på \"Återställ\"-knappen i inställningsdialogen, som kommer att läsa " "om inställningsdialogen från den globala konfigurationsfilen ($sysconfdir/" "efax-gtkrc eller /etc/efax-gtkrc).\n" "\n" "Hjälp kan fås när inställningsdialogen fylls ut genom att hålla muspekaren " "över den relevanta hjälp-knappen (?), som visas en \"Tips\"-rutan eller " "genom att trycka på knappen vilken visar upp en informationsruta.\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "Uttag körs på port " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "Utskriftsjobb mottagna på uttag\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: Köade fax från uttag" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "Köade utskriftsjobb" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "Ange valt fax att skicka" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Välj det markerade faxet för sändning" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "UTSKRIFTSJOBB: " #: src/socket_list.cpp:501 msgid "Remove " msgstr "Ta bort " #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: Ta bort köade fax" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: utskriftsjobb mottaget på uttag" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Köat fax" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" " har tagits emot på uttag.\n" "Sänd eller placera fax i kö?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Lista mottagna fax" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Lista skickade fax" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "Mottagningsläge" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Avsluta" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "lyckades" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "numret upptaget eller modem används" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "ej återhämtbart fel" #: efax/efax.c:382 msgid "invalid modem response" msgstr "ogiltig modemrespons" #: efax/efax.c:383 msgid "no response from modem" msgstr "inget svar från modem" #: efax/efax.c:385 msgid "internal error" msgstr "internt fel" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "NSC - hämtningsfunktioner" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "CIG - hämtnings-id" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "DTC - hämtningsfärdigheter" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "NSF - svarsfunktioner" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "CSI - svars-id" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "DIS - svarsfärdigheter" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "NSS - uppringningsfunktioner" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "TSI - avsändar-id" #: efax/efax.c:419 msgid "DCS - session format" msgstr "DCS - sessionsformat" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "CFR - kanal OK" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "FTT - kanal inte OK" #: efax/efax.c:430 msgid "MPS - not done" msgstr "MPS - inte klar" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "EOM - inte klar, nytt format" #: efax/efax.c:436 msgid "EOP - done" msgstr "EOP - klar" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "PRI-MPS - inte klar, ring operatör" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "PRI-EOM - inte klar, nytt format, ring operatör" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "PRI-EOP - klar, ring operatör" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "MCF - sida OK" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "RTP - sida OK, kontrollera kanal" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "PIP - sida OK, ring operatör" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "RTN - sida inte OK, kontrollera kanal" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "PIN - sida inte OK, ring operatör" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "CRP - upprepa kommando" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "DCN - koppla ned" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "OKÄND" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "ej kompatibla färdigheter för lokal och fjärr" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "kan inte ta bort fil %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "tog bort fil: %s" #: efax/efax.c:784 msgid "header:" msgstr "huvud:" #: efax/efax.c:868 msgid "characters received while sending" msgstr "tecken mottagna vid sändning" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "skickade %d+%d rader och %d+%d byte, på %d s med %d b/s" #: efax/efax.c:915 msgid "flow control did not work" msgstr "flödeskontroll fungerade inte" #: efax/efax.c:954 msgid "modem response in data" msgstr "modemrespons i data" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "överflöde i körlängdsbuffert" #: efax/efax.c:1036 msgid "file write:" msgstr "filskrivning:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "CAN: datamottagning avbruten" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "mottagningsfel" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "mottog %d rader med %d fel" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "skickade TCF - kanalkontroll på %d byte" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "timeout under träningskontrolldata" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "tog emot TCF - kanalkontroll (OK: körning av %d på %d)" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "tog emotTCF - kanalkontroll (inte OK: körning av %d på %d)" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "sista byte i paket är NOLL" #: efax/efax.c:1222 msgid "sent" msgstr "skickat" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "HDLC-paket saknar inledande 0xff" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "bitomvänt HDLC-paket, vänder om bitordning" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "timeout vid läsning av paketdata" #: efax/efax.c:1291 msgid "frame error" msgstr "paketfel" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "inget svar efter paketdata" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "fel svar efter paketdata" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "paket för långt (%d, > %d max byte)" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "fel bärare" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "fel svar på kommando att ta emot ett paket" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "mottog kort paket (%d byte)" #: efax/efax.c:1391 msgid "received" msgstr "mottaget" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "Fjärr-id är" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "inget svar från fjärrfax" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "kan inte öppna sida" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "fjärrfax har ett eller flera dokument att skicka och kan ta emot" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "mottagare har ett eller flera dokument att skicka och kan inte ta emot" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "mottagare har inga dokument att skicka och kan ta emot" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "mottagare har inga dokument att skicka och kan inte ta emot" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "mottagare kan inte ta emot, försöker ändå" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "mottagare har inget att skicka, försöker ändå" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "kanal är inte användbar på %d b/s" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "kanal inte användbar på lägsta hastighet" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "ogiltigt svar till DCS" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "skickade sida %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "ogiltigt svar på efter-sida" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "avbrottsbegäran ignoreras" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "timeout för väntan efter kommando" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "sida sparad till %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "okänt kommando" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "inget kommando eller respons från mottagare" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "onormalt avslut (kod %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "ingen XON/DC2 mottogs efter CONNECT" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "%d tecken togs emot vid väntan att sända" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "fjärrsida har ett eller flera dokument att sända." #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "inget +FPTS svar togs emot, det antas att faxet togs emot" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "för många sidsändningsförsök" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "mottag (+FDR) kommando misslyckades" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "ringer %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "Fjärr-id är %s" #: efax/efax.c:2216 msgid "called" msgstr "ringde" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "ansluten" #: efax/efax.c:2224 msgid "number is busy" msgstr "numret var upptaget" #: efax/efax.c:2226 msgid "dial command failed" msgstr "ringkommando misslyckades" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "väntar på aktivitet" #: efax/efax.c:2306 msgid "activity detected" msgstr "activitet upptäckt" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "kan inte svara: kan inte låsa enhet" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "för många %%d avbrott i kommando (%s)" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "startar kommando /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "exec() anrop misslyckades:" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "inget getty-kommando angivet för datasamtal" #: efax/efax.c:2353 msgid "fax call answered" msgstr "faxsamtal besvarades" #: efax/efax.c:2356 msgid "voice call answered" msgstr "röstsamtal besvarades" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "inget röstkommando angivet för röstsamtal" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "kunde inte svara på samtal" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "modem har inte stöd för fax" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "kan inte fastställa stöd för faxmodemklass" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "Multi-Tech-bitordning satt" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "använder %s i klass %s" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "misslyckades med sida %s" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "färdig - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "lokalt id (%s) minskat till %d tecken" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "lokalt id (%s) har icke-standardtecken" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "använder radbuffring för standard ut" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "felaktig kvalité (-q) argument (%s)" #: efax/efaxmsg.c:215 msgid " Error: " msgstr " Fel: " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " Varning: " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "kan inte öppna fil %s:" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "kan inte läsa av format på filen %s" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "kan inte spola tillbaka fil %s:" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "kan inte öppna fil för utdata %s:" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "skrivfel mot faxenhet:" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "oväntat svar \"%s\"" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "modemkommando \"%s\" för långt" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "timeout efter kommando: %s" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "timeout efter väntan" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "fel respons efter kommando: %s" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "fel respons efter väntetid" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "synk: släpper DTR" # Avbrott? Bättre ord sökes #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "synk: skickar avbrott" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "synk: modem svarar inte" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "modemkommando (%s) misslyckades" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "modemkommando misslyckades" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "%s låst eller upptagen - väntar" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "öppnade %s" #~ msgid "New faxes: " #~ msgstr "Nya fax: " #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Copyright © 2001 - 2008 Chris Vine\n" #~ "\n" #~ "Detta program är utgivet under GNU General Public License, version 2" #~ msgid "No valid printer selected\n" #~ msgstr "Ingen giltig postscriptfil\n" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " konfigurationsfil\n" #~ "och /dev/modem existerar inte\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " konfigurationfil\n" #~ "Använder förvalet /dev/modem\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "Använder det förvalda skrivarkommandot \"lpr\"\n" efax-gtk-3.2.8/po/efax-gtk.pot0000644000175000001440000015372711544574526013053 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Chris Vine. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: efax-gtk 3.2.8\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "" #: src/addressbook.cpp:122 msgid "Name" msgstr "" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "" #: src/addressbook.cpp:574 msgid "Name:" msgstr "" #: src/addressbook.cpp:575 msgid "Number:" msgstr "" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "" #: src/dialogs.cpp:298 msgid "Accept" msgstr "" #: src/dialogs.cpp:299 msgid "Reject" msgstr "" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "" #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "" #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "" #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "" #: src/file_list.cpp:205 msgid "Move file up" msgstr "" #: src/file_list.cpp:206 msgid "Move file down" msgstr "" #: src/file_list.cpp:593 msgid "Remove file " msgstr "" #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr "" #: src/file_list.cpp:601 msgid "Remove file" msgstr "" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "" #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "" #: src/mainwindow.cpp:297 msgid "Socket " msgstr "" #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "" #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "" #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "" #: src/mainwindow.cpp:658 msgid "_File" msgstr "" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "" #: src/settings.cpp:68 msgid "Name: " msgstr "" #: src/settings.cpp:69 msgid "Number: " msgstr "" #: src/settings.cpp:190 msgid "Serial Device: " msgstr "" #: src/settings.cpp:191 msgid "Lock File: " msgstr "" #: src/settings.cpp:192 msgid "Capabilities: " msgstr "" #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "" #: src/settings.cpp:194 msgid "Modem Class: " msgstr "" #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "" #: src/settings.cpp:211 msgid "Auto" msgstr "" #: src/settings.cpp:213 msgid "Class 1" msgstr "" #: src/settings.cpp:215 msgid "Class 2" msgstr "" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "" #: src/settings.cpp:233 msgid "Tone" msgstr "" #: src/settings.cpp:235 msgid "Pulse" msgstr "" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "" #: src/settings.cpp:510 msgid "Other Params: " msgstr "" #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "" #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" #: src/settings.cpp:976 msgid "Run socket server" msgstr "" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "" #: src/settings.cpp:1016 msgid "other" msgstr "" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "" #: src/settings.cpp:1514 msgid "Fine" msgstr "" #: src/settings.cpp:1767 msgid "Log File: " msgstr "" #: src/settings.cpp:1830 msgid "Page Size: " msgstr "" #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "" #: src/settings.cpp:1979 msgid "Reset" msgstr "" #: src/settings.cpp:2012 msgid "Identity" msgstr "" #: src/settings.cpp:2015 msgid "Modem" msgstr "" #: src/settings.cpp:2018 msgid "Params" msgstr "" #: src/settings.cpp:2021 msgid "Print" msgstr "" #: src/settings.cpp:2027 msgid "Socket" msgstr "" #: src/settings.cpp:2030 msgid "Receive" msgstr "" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "" #: src/settings.cpp:2039 msgid "Page" msgstr "" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "" #: src/settings.cpp:3102 msgid " or\n" msgstr "" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "" #: src/settings_help.cpp:176 msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "" #: src/helpfile.cpp:73 msgid "Sending" msgstr "" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "" #: src/helpfile.cpp:108 msgid "Settings" msgstr "" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "" #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "" #: src/socket_list.cpp:501 msgid "Remove " msgstr "" #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "" #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "" #: efax/efax.c:382 msgid "invalid modem response" msgstr "" #: efax/efax.c:383 msgid "no response from modem" msgstr "" #: efax/efax.c:385 msgid "internal error" msgstr "" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "" #: efax/efax.c:419 msgid "DCS - session format" msgstr "" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "" #: efax/efax.c:430 msgid "MPS - not done" msgstr "" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "" #: efax/efax.c:436 msgid "EOP - done" msgstr "" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "" #: efax/efax.c:784 msgid "header:" msgstr "" #: efax/efax.c:868 msgid "characters received while sending" msgstr "" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "" #: efax/efax.c:915 msgid "flow control did not work" msgstr "" #: efax/efax.c:954 msgid "modem response in data" msgstr "" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "" #: efax/efax.c:1036 msgid "file write:" msgstr "" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "" #: efax/efax.c:1222 msgid "sent" msgstr "" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "" #: efax/efax.c:1291 msgid "frame error" msgstr "" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "" #: efax/efax.c:1391 msgid "received" msgstr "" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "" #: efax/efax.c:2216 msgid "called" msgstr "" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "" #: efax/efax.c:2224 msgid "number is busy" msgstr "" #: efax/efax.c:2226 msgid "dial command failed" msgstr "" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "" #: efax/efax.c:2306 msgid "activity detected" msgstr "" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "" #: efax/efax.c:2353 msgid "fax call answered" msgstr "" #: efax/efax.c:2356 msgid "voice call answered" msgstr "" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "" #: efax/efaxmsg.c:215 msgid " Error: " msgstr "" #: efax/efaxmsg.c:216 msgid " Warning: " msgstr "" #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "" efax-gtk-3.2.8/po/zh_TW.po0000644000175000001440000021720311544574530012175 00000000000000# Traditional Chinese Messages for efax-gtk # Copyright (C) 2006 Free Software Foundation, Inc. # This file is distributed under the same license as the efax-gtk package. # Kite Lau , 2005. # Wei-Lun Chao , 2006. # msgid "" msgstr "" "Project-Id-Version: efax 3.0.9\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2006-05-24 10:56+0800\n" "Last-Translator: Wei-Lun Chao \n" "Language-Team: Chinese (traditional) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: 通訊錄" #: src/addressbook.cpp:122 msgid "Name" msgstr "名稱" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "號碼" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "加入新地址" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "刪除地址" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "上移地址" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "下移地址" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "刪除所選地址嗎?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: 刪除地址" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: 加入地址" #: src/addressbook.cpp:574 msgid "Name:" msgstr "名稱:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "號碼:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: 待傳檔案" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "檢視" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: 條件﹑注意和免責條款" #: src/dialogs.cpp:298 msgid "Accept" msgstr "接受" #: src/dialogs.cpp:299 msgid "Reject" msgstr "拒絕" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "您接受以上的條件﹑注意和免責條款嗎?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "關於 efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "關於 efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "未起動" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "正在傳送傳真" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "正在應答傳真" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "正在待機接收" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "不能傳送傳真-正在接收傳真中\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "無效檔案名稱\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "檔案不存在\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "使用者對此檔案無讀取權限\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "無效的 postscript/PDF 檔案\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "您沒有設定 $HOME 環境變數\n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" "嚴重系統錯誤:無法建立目錄來儲存已收傳真。\n" "無法接收傳真!\n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** 正在停止傳送/接收作業階段 ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" "嚴重系統錯誤:無法建立目錄來儲存已收傳真。\n" "無法儲存此傳真!\n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" "嚴重系統錯誤:無法開啟已收傳真目錄。\n" "不能儲存此傳真!\n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" "系統嚴重錯誤:無法儲存已收的所有傳真。\n" "所有或部分傳真將丟失!\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "在 EfaxController::read_pipe_cb() 中接收到無效的 Utf8\n" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" "嚴重系統錯誤:無法建立目錄來儲存已收傳真。\n" "不能儲存此傳真!\n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "列印任務" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "列印所選傳真" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "檢視所選傳真" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "加入/修改所選傳真的描述" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "刪除所選傳真" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "清空垃圾匣" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "加入新資料夾" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "刪除所選資料夾" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "重置新的傳真數目" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: 已收傳真清單" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: 外送傳真清單" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "永久刪除所選傳真?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(注意:這將永久從系統刪除此傳真)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "永久刪除此傳真嗎?\n" "\n" "\n" "(注意:這將永久從系統刪除此傳真)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: 刪除傳真" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "清空垃圾匣嗎?\n" "\n" "(注意:這將永久性從系統刪除所有垃圾匣裡的傳真)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: 垃圾匣" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: 加入資料夾" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "刪除所有子資料夾來清空資料夾\n" "並且在刪除資料夾前拖曳或是刪除裡面的傳真" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: 刪除資料夾" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "刪除資料夾:" #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "列印所選傳真?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: 列印傳真" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "新傳真:" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: 傳真描述" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "傳真描述?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "資料夾名稱?\n" "(注意:這個將被置於頂部\n" "而且可以被拖曳到其他檔案夾)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "資料夾名稱不能包含字元:" #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "下列資料夾已經存在:" #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "資料夾" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "日期" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "描述" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "收件匣" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "寄件匣" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "垃圾匣" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: 檔案清單" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "待發檔案" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "檢視所選檔案" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "從清單中刪除所選檔案" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "加入檔案到清單" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "加入檔案到檔案清單來傳送" #: src/file_list.cpp:205 msgid "Move file up" msgstr "上移檔案" #: src/file_list.cpp:206 msgid "Move file down" msgstr "下移檔案" #: src/file_list.cpp:593 msgid "Remove file " msgstr "刪除檔案" #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr "從清單中?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "刪除檔案" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "版權 (C) 2001 - 2011 Chris Vine\n" "這個程式以 GNU 公共版權,版本 2 發佈\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "用法: efax-gtk [選項] [檔名]\n" "選項:\n" "\t-r 啟動程式到待機接收狀態\n" "\t-s 啟動程式並隱藏於系統匣\n" "檢視程式附帶的讀我檔案來了解更多細節\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "不明選項。選項是:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" "指定了無效的使用者名稱 - 它必須單純以 ASCII \n" "字元組成。在傳真頁眉列將不會顯示任何使用者名稱,\n" "但是不用擔心,因為傳真機台號碼總是會出現於頁眉中\n" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "設定了無效的數據機級別\n" "採用預設的級別 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "沒有指定序列埠裝置於" #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "採用預設傳真解析度 204x196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "指定了無效的傳真解析度\n" "採用預設傳真解析度 204x196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "指定了無效的響鈴次數\n" "鈴響一聲後將應答\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "採用預設頁面尺寸 A4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "指定了無效的頁面尺寸\n" "採用預設頁面尺寸 A4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "指定了無效的撥號模式\n" "採用預設的撥號模式\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "指定了無效的列印頁面收縮值:採用預設的值 100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "採用預設的 postscript 檔案檢視命令 'gv'\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "沒有指定通訊端伺服器的連接埠號碼,所以將不會啟動伺服器\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "指定的通訊端伺服器連接埠號碼無效,所以伺服器將不會啟動。連接埠號碼必須介於 " "1024 和 65535 之間\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "指定了無效的工作子目錄:。WORK_SUBDIR: 將被忽略\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "檔案 " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "通訊端 " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "傳真輸入方式:" #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "單一檔案" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "多個檔案" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "通訊端清單" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "電話號碼:" #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "傳送傳真" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "應答傳真" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "接起電話" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "待機" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "停止" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "外送傳真" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "列出已收傳真(_R)" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "列出外送傳真(_L)" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "將通訊端傳真排入佇列(_F)" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "輸入單一檔案(_E)" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "輸入多個檔案(_M)" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "通訊錄(_A)" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "設定(_S)" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "離開(_Q)" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "關於 efax-gtk(_G)" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "關於 efax(_E)" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "翻譯(_T)" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "求助(_H)" #: src/mainwindow.cpp:658 msgid "_File" msgstr "檔案(_F)" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "這個程式以 -s 的選項啟動,但沒有系統列可用\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "沒有指定傳真號碼。您要發傳真到開放的連線嗎?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "電話號碼" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "通訊端收到列印任務" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk 通訊端" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "efax-gtk 剛剛接收到一個傳真" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: 傳真收到" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "不能變更設定,除非程式處於非起動狀態\n" "按停止鍵來使它不起動" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "義大利文 - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "波蘭文 - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "保加利亞文 - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "俄文 - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "希伯來文 - Assaf Gillat\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "希臘文 - Hellenic Linux Users Group\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "阿爾巴尼亞文 - Besnik Bleta\n" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "匈牙利文 - Gergely Szakats, Laszlo Csordas\n" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "簡體中文 - Kite Lau\n" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "德文 - Steffen Wagner\n" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "瑞典文 - Daniel Nylander\n" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "嘉泰羅尼亞文 - Jordi Sayol Salomo\n" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "繁體中文 - 趙惟倫\n" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: 翻譯" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "求助請按 F1 鍵" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "在 MainWindow::read_error_pipe_cb() 中收到無效的 Utf8\n" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "被信號終止" #: src/settings.cpp:68 msgid "Name: " msgstr "名稱:" #: src/settings.cpp:69 msgid "Number: " msgstr "號碼:" #: src/settings.cpp:190 msgid "Serial Device: " msgstr "序列埠裝置:" #: src/settings.cpp:191 msgid "Lock File: " msgstr "加鎖檔案:" #: src/settings.cpp:192 msgid "Capabilities: " msgstr "功能:" #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "鈴聲(1-9):" #: src/settings.cpp:194 msgid "Modem Class: " msgstr "數據機級別:" #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "撥號模式:" #: src/settings.cpp:211 msgid "Auto" msgstr "自動" #: src/settings.cpp:213 msgid "Class 1" msgstr "級別 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "級別 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "級別 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "音頻" #: src/settings.cpp:235 msgid "Pulse" msgstr "脈衝" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "初始參數:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "重置參數:" #: src/settings.cpp:510 msgid "Other Params: " msgstr "其它參數:" #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr "列印程式:" #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "列印收縮(50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "列印前跳出確認對話窗" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Postscript\n" "檢視器程式:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "執行通訊端伺服器" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "從通訊端收到傳真時\n" "跳出對話視窗" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "發送傳真的\n" "連接埠號碼" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "允許連線的地址" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "本機" #: src/settings.cpp:1016 msgid "other" msgstr "其它" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "數據機收到傳真時\n" "跳出視窗" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "當數據機收到傳真時\n" "執行一個程式或命令稿" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "外送傳真解析度:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" "在頁眉包含目的地\n" "的傳真號碼" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "標準" #: src/settings.cpp:1514 msgid "Fine" msgstr "精細" #: src/settings.cpp:1767 msgid "Log File: " msgstr "日誌檔案:" #: src/settings.cpp:1830 msgid "Page Size: " msgstr "頁面尺寸:" #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: 設定" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "注意:按 OK 鍵將儲存設定到檔案" #: src/settings.cpp:1979 msgid "Reset" msgstr "重置" #: src/settings.cpp:2012 msgid "Identity" msgstr "身分" #: src/settings.cpp:2015 msgid "Modem" msgstr "數據機" #: src/settings.cpp:2018 msgid "Params" msgstr "參數" #: src/settings.cpp:2021 msgid "Print" msgstr "列印" #: src/settings.cpp:2027 msgid "Socket" msgstr "通訊端" #: src/settings.cpp:2030 msgid "Receive" msgstr "接收" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "日誌" #: src/settings.cpp:2039 msgid "Page" msgstr "頁面" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" "在「身分」分頁中指定了無效的使用者名稱 - 它必須單純由 ASCII 字元組成。如果有" "困難就保持它為空白,因為傳真機台號碼將會總是出現在頁眉" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "設定錯誤" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "指定了無效的數據機級別" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "指定了無效的頁面尺寸" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "指定了無效的外送傳真解析度" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "指定了無效的鈴聲次數" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "指定了無效的撥號模式" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "指定了無效的列印收縮參數" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "指定了無效的通訊端連接埠號碼。它必須介於 1024 與 65535 之間" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "輸入設定來自" #: src/settings.cpp:3102 msgid " or\n" msgstr "或是\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "重置設定" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" "在這裡輸入出現於外送傳真頁眉的名稱。它必須單純由 ASCII 字元組成。如果有困難就" "保持它為空白,因為傳真機台號碼將會總是出現在頁眉" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk 說明: 名稱" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "在這裡輸入要在外送傳真頁眉上顯示的號碼。這也將包括應答傳真機顯示給對方的身" "分。" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk 說明: 號碼" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "在此指定數據機所連線的序列埠裝置(如果留白,程式將預設使用 /dev/modem)。不要" "在此包括裝置名稱的「/dev/」部分,也就是只宣告「ttyS1」, 或是「cua2」…等等。" "在 Linux 下,ttyS0 等同於 COM 1﹑ttyS1 等同於 COM 2…以此類推。" #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk 說明: 裝置" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "在此指定加鎖檔案的目錄。如果留白,程式預設使用 /var/lock" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk 說明: 加鎖檔案" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "在 efax-0.9 或以上的版本,您一般需要選擇「自動」,efax 會自動判斷數據機的級" "別,但您也可以強制使用自己指定的級別。然而 efax-0.8 會預設級別 2,所以如果您" "在舊版本的 efax 裡使用級別 1 的數據機,請在這裡指定級別。" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk 說明: 數據機的級別" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "這裡指定用音頻或脈衝來撥號傳送傳真" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk 說明: 撥號模式" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "這個設定數據機的功能。想知道是什麼意思,請執行「man efax」,檢視「-c」選項。" "在 efax-0.9 和一個 Class 2 數據機之下,您一般不用指定這個,留白即可,因為程式" "會詢問數據機。如果使用舊版本的 efax 或是一個不同級別的數據機,和典型的任何較" "慢的 14,400 bps 的數據機能工作的值是 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0。" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk 說明: 功能" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "這裡設定了在待機接收模式下數據機應答前的響鈴次數。允許的值為 1 到 9。如果沒有" "指定,程式預設為 1。" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk 說明: 響鈴" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "這裡指定了在傳真機模式下用於數據機的起始「AT」命令。可以指定多個命令,不同命" "令用空格隔開,但不加「AT」字首。如果沒有指定,程式將預設用「Z &FE&D2S7=120 " "&C0 M1L0」,這個將適用於大部分數據機。" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk 說明: 起始參數" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "這裡指定了將重置數據機的「AT」命令。可以指定多個命令,不同命令用空格隔開,但" "不加「AT」字首。如果沒有指定,程式將預設用「Z」,這個將適用於大部分數據機。" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk 說明: 重置參數" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "這裡可以用來傳遞任何其它的參數給 efax(用「man efax」來檢視可用參數)。可以指" "定多個參數,而用空格隔開不同參數--例如包含「-or」來做一些在接收傳真時 " "Multitech 數據機所需要的位元反轉。除非您有一個不平常的數據機,那就讓它留白。" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk 說明: 其它參數" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "這是用來接收並列印來自標準輸入的 postscript 檔案的命令。如果留空,程式預設為" "\"lpr\"" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk 說明: 列印程式" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "這決定了適應印表機的列印範圍所作的收縮程度。這是個百分比--例如 98 將把頁面" "收縮至實際尺寸的 98%。如果留空,將不做任何收縮(也就是說您可以-但不必-指定 " "100)" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk 說明: 列印收縮" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "這指定在已收傳真或外送傳真清單裡,當按\"列印所選傳真\"按鈕時是否在列印前彈出" "確認對話視窗。如果您不想要彈出視窗就去勾選(如果您指定了一個外部列印管理器," "例如在列印程式選框裡指定了'kprinter',那麼您將不需要此勾選)。" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk 說明: 彈出視窗" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "postscript 檢視器是用來從傳真清單裡檢視已收或外送傳真,而且也用來檢視在\"要傳" "真的檔案\"選擇視窗裡的外送傳真。在這裡指定用來檢視 postscript 檔案的命令。如" "果沒有指定,程式將預設用「gv」。或是您可能需要指定「evince」(Gnome " "postscript 檢視器)或是「kghostview」(KDEpostscript 檢視器)。如果您使用 " "gv,您可能需要用 '-media A4' 或是 '-media Letter' 的選項來選擇正確的頁面尺" "寸。evince 和 kghostview 則可以自動辨識。" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk 說明: Postscript 檔案檢視器" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "這裡指定了是否需要為 CUPS 或其它列印系統執行一個通訊端伺服器。如果需要就勾" "選。" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "efax-gtk 說明: 執行通訊端伺服器" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "這裡指定了,當經過通訊端伺服器接收到來自列印系統的傳真任務時,是否彈出對話視" "窗。如果是就勾選(如果您也勾選了執行通訊端伺服器,這裡將不生效)。如果程式沒" "起動傳真可以從這個視窗直接傳送。" #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" "這裡指定了通訊端伺服器監聽的連接埠號碼。它應該要介於 1023 與 65535 之間。" #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk 說明: 連接埠" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "這裡指定了,是否本機和您機器自己的主機名之外的地址,被允許連線到通訊端伺服" "器。除非您有不尋常的需要(也就是,除了 CUPS 或 lpd 守護程式在另外一台機器執" "行),否則您應該選擇本機。如果您想讓其它機器也可以連線,請選\"其它\"而且指定" "被允許連線的電腦的主機名全稱(用空格隔開不同主機名,但您不需在這指定本機和您" "的機器主機名,因為它們總是被允許連線的)。如果您選擇\"其它\",您應該在防火牆" "之後執行 efax-gtk。" #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "efax-gtk 說明: 通訊端允許的連線數" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "這個參數指定當數據機收到傳真時,是否彈出對話視窗。如果是,請勾選。" #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "efax-gtk 說明: 接收彈出視窗" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "這裡指定當數據機收到傳真時,程式是否執行一個程式或命令稿。如果您想要執行一個" "程式,就勾選此方框並輸入程式名稱。efax-gtk 附有兩個命令稿:print_fax 與 " "mail_fax,它們可以用來自動列印接收到的傳真,或者將它郵寄給某位使用者 (因此您" "可以在這裡輸入 'mail_fax' 以郵寄傳真)。參看 README 檔案以獲得詳細資料。" #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "efax-gtk 說明: 傳真收到時執行程式" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "這裡指定了外送傳真的解析度。\"標準\" 代表 204x98,而\"好\" 代表 204x196 的解" "析度" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk 說明: 外送傳真解析度" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" "這裡指定了是否在外送傳真的頁眉包含目的地的傳真號碼。如果您不想要這個被顯示就" "去勾選(例如因為它包含了一個付費卡的先撥號碼)。" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "efax-gtk 說明: 傳真頁眉" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "這個參數指定了記錄傳真交涉、狀態、錯誤和警告的日誌檔案。如果沒有指定,那麼將" "沒有日誌記錄。(一個日誌檔案也可以透過重新導向到 stdout 和 stderr--更多細節" "請看 README 檔案)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "efax-gtk 說明: 日誌檔案" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "在此指定傳真的頁面尺寸" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk 說明: 頁面尺寸" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: 求助" #: src/helpfile.cpp:73 msgid "Sending" msgstr "傳送中" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "接收中" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "通訊錄" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "傳真清單" #: src/helpfile.cpp:108 msgid "Settings" msgstr "設定" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "通訊端伺服器執行於連接埠 " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "通訊端所接收的列印任務\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "正在關閉通訊端\n" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: 排入佇列的通訊端傳真任務" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "排入佇列的列印任務" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "輸入已選傳真來傳送" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "選擇所選傳真來傳送" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "列印任務:" #: src/socket_list.cpp:501 msgid "Remove " msgstr "移除" #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: 移除已佇列傳真任務" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: 通訊端接收到列印任務" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "佇列傳真" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" "已經在通訊端接收到。\n" "傳送還是排入佇列?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "列出已接收傳真" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "列出已傳送傳真" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "進入待機接收狀態" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "離開" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "成功" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "號碼忙碌中或數據機佔用中" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "不可回復的錯誤" #: efax/efax.c:382 msgid "invalid modem response" msgstr "無效的數據機反應" #: efax/efax.c:383 msgid "no response from modem" msgstr "數據機沒有反應" #: efax/efax.c:385 msgid "internal error" msgstr "內部錯誤" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "NSC - 輪詢特點" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "CIG - 輪詢身分" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "DTC - 輪詢功能" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "NSF - 應答特點" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "CSI - 應答身分" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "DIS - 應答功能" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "Nss - 來電特點" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "TSI - 來電身分" #: efax/efax.c:419 msgid "DCS - session format" msgstr "DCS - 作業階段格式" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "CFR - 線路正常" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "FTT - 線路異常" #: efax/efax.c:430 msgid "MPS - not done" msgstr "MPS - 未完成" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "EOM - 未完成、新格式" #: efax/efax.c:436 msgid "EOP - done" msgstr "EOP - 完成" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "PRI-MPS - 未完成、呼叫總機" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "PRI-EOM - 未完成、新格式、呼叫總機" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "PRI-EOP - 完成、呼叫總機" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "MCF - 頁面正常" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "RTP - 頁面正常、偵測線路" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "PIP - 頁面正常、呼叫總機" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "RTN - 頁面異常、偵測線路" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "PIN - 頁面異常、呼叫總機" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "CRP - 重複命令" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "DCN - 中斷連線" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "不明" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "不相容的本地和遠端功能" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "不能刪除檔案 %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "已刪除檔案:%s" #: efax/efax.c:784 msgid "header:" msgstr "頁眉:" #: efax/efax.c:868 msgid "characters received while sending" msgstr "傳送時收到的字元" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "" "以每秒 %6$d 位元組的速度,耗時 %5$d 秒,傳送了 %1$d+%2$d 列和 %3$d+%4$d 位元" "組" #: efax/efax.c:915 msgid "flow control did not work" msgstr "流程控制沒起作用" #: efax/efax.c:954 msgid "modem response in data" msgstr "數據機資料反應" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "執行長度溢出" #: efax/efax.c:1036 msgid "file write:" msgstr "檔案寫入:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "CAN: 資料接收被取消" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "接收錯誤" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "接收了 %d 列,並有 %d 個錯誤" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "外送 TCF - 線路偵測 %d 位元組" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "偵測資料程序逾時" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "已收 TCF - 線路偵測 (正常: 執行了 %2$d 中的 %1$d)" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "已收 TCF - 線路偵測 (異常:執行了 %2$d 中的 %1$d)" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "圖框的最後一個位元組為 NULL" #: efax/efax.c:1222 msgid "sent" msgstr "已送" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "HDLC 圖框缺少起始的 0xff" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "位元反轉的 HDLC 圖框,反轉位元順序中" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "讀取圖框資料逾時" #: efax/efax.c:1291 msgid "frame error" msgstr "圖框錯誤" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "圖框資料之後沒有反應" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "圖框資料之後反應錯誤" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "圖框太長 (%d, > %d 最大位元組) " #: efax/efax.c:1371 msgid "wrong carrier" msgstr "錯誤的載體" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "對接收圖框的命令反應錯誤" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "已收短圖框 (%d 位元組)" #: efax/efax.c:1391 msgid "received" msgstr "已收" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "遠端的身分是" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "遠端傳真沒有應答" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "無法開啟頁面" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "遠端有一個或更多檔案要傳送而且能接收" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "遠端有一個或更多檔案要傳送而且不能接收" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "遠端沒有檔案傳送而且能接收" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "遠端沒有檔案傳送而且不能接收" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "遠端無法接收,但嘗試中" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "遠端沒有任何東西傳送,但嘗試中" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "線路速度 %d 位元組時無法使用" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "線路速度最低時無法使用" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "給 DCS 的反應無效" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "外送頁 %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "無效頁後反應" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "插斷請求被忽略" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "等待命令逾時" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "頁儲存到 %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "不明命令" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "遠端沒有命令或反應" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "不正常終止 (代號 %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "CONNECT 之後沒有收到 XON/DC2" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "等待傳送時收到 %d 個字元" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "遠端有一個或多個檔案要傳送" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "沒有獲得 +FPTS 反應,就當做傳真被收到了" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "太多頁傳送重試" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "接收 (+FDR) 命令失敗" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "撥往 %s 中" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "遠端身分是 %s" #: efax/efax.c:2216 msgid "called" msgstr "已呼叫" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "已連線" #: efax/efax.c:2224 msgid "number is busy" msgstr "號碼忙線" #: efax/efax.c:2226 msgid "dial command failed" msgstr "撥號命令失敗" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "等待動作中" #: efax/efax.c:2306 msgid "activity detected" msgstr "偵測到動作" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "無法應答:無法鎖定裝置" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "在命令 (%s) 裡太多 %%d 跳脫字元" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "執行命令 /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "exec() 呼叫失敗:" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "沒有設定 getty 命令用來呼叫資料" #: efax/efax.c:2353 msgid "fax call answered" msgstr "應答了傳真呼叫" #: efax/efax.c:2356 msgid "voice call answered" msgstr "應答了語音呼叫" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "語音呼叫裡沒有設定語音命令" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "無法應答呼叫" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "數據機不支援傳真" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "不能確定傳真數據機的支援級別" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "Multi-Tech 位元順序組" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "使用 %2$s 級別的 %1$s 數據機" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "失敗頁 %s" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "已完成 - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "本地身分 (%s) 被縮成 %d 個字元" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "本地身分 (%s) 有非標準的字元" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "使用標準輸出的列緩衝區" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "不正確的品質 (-q) 參數 (%s)" #: efax/efaxmsg.c:215 msgid " Error: " msgstr " 錯誤: " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " 警告: " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "無法開啟檔案 %s:" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "無法獲得檔案 %s 的格式:" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "無法倒帶檔案 %s:" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "無法開啟輸出檔案 %s:" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "傳真裝置寫入錯誤:" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "未預知的反應 \"%s\"" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "數據機命令 \"%s\" 太長" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "命令:%s 之後逾時" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "等待逾時" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "命令:%s 之後錯誤反應" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "等待之後錯誤反應" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "同步:拋棄 DTR" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "同步:傳送跳脫" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "同步:數據機不反應" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "數據機命令 (%s) 失敗" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "數據機命令失敗" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "%s 已鎖定或是忙線 - 等待中" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "已開啟 %s" #~ msgid "New faxes: " #~ msgstr "新傳真:" #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "著作權所有 (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ "本程式根據 GNU 一般公共授權第二版而釋出" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr " 設定檔案以及 /dev/modem 不存在\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "配置檔案使用預設裝置 /dev/modem\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "採用預設的列印命令 'lpr'\n" #~ msgid "Traditional Chinese - Wei-Lun Chao" #~ msgstr "繁體中文 - 趙惟倫" efax-gtk-3.2.8/po/LINGUAS0000644000175000001440000000006311466007654011622 00000000000000en_GB it pl bg ru he el sq hu zh_CN zh_TW de sv ca efax-gtk-3.2.8/po/hu.po0000644000175000001440000024174111544574530011562 00000000000000# Hungarian translation of efax-gtk # This file is distributed under the same license as the efax-gtk package. # Copyright (C) 2001-2010 Chris Vine. # Gergely Szakats 2005. # Laszlo Csordas 2010 # msgid "" msgstr "" "Project-Id-Version: efax-gtk 3.2.3 rev:20100625\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2010-06-25 14:54+0100\n" "Last-Translator: csola48 \n" "Language-Team: csola48 \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Hungarian\n" "X-Poedit-Country: HUNGARY\n" "X-Poedit-SourceCharset: utf-8\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Címjegyzék" #: src/addressbook.cpp:122 msgid "Name" msgstr "Név" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Szám" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Új cím hozzáadása" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Cím törlése" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Cím mozgatása felfelé" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Cím mozgatása lefelé" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Kijelölt cím törlése?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: Cím törlése" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: Cím hozzáadása" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Név:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Szám:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: Faxolandó fájl" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Nézet" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "Feltételek, megjegyzések és korlátozások" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Elfogadás" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Elutasítás" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "Elfogadja a fenti feltételeket, megjegyzéseket és korlátozásokat?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "Névjegy" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "Copyright (C) 2001 - 2011 Chris Vine" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" "A programot Chris Vine írta és adta ki a GNU General Public License 2. " "verziója alapján. Ez egy front-end az efax programhoz, amelyet Ed Casas " "készített." #: src/dialogs.cpp:541 msgid "About efax" msgstr "Az efax programról" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "efax Copyright (C) 1999 Ed Casas" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Ez az efax program grafikus felülete. Az efax program a GNU General Public " "License 2. verzió feltételei szerint került kibocsátásra. Szerzője: Ed Casas." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Nem aktív" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Fax küldése" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Üzenet bemondás" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "Automatikus fogadás" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" "Nem küldhető fax - a modem foglalt.\n" "A fax az újrahívási listába került\n" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "Nem küldhető fax - egy fax vétele van folyamatban\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Érvénytelen fájlnév\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "Nincs ilyen fájl\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "A felhasználó nem jogosult a fájl olvasására\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "Érvénytelen PostScript/PDF fájl\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "Nincs beállítva a $HOME környezeti változó\n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" "SÚLYOS RENDSZERHIBA! Nem hozható létre a fogadott faxok mappája.\n" "A faxok fogadása nem lehetséges!\n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** Automatikus küldés/fogadás leállítva ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" "SÚLYOS RENDSZERHIBA! Nem hozható létre a fogadott faxok mappája.\n" "Ez a fax nem lesz elmentve!\n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" "SÚLYOS RENDSZERHIBA! Nem lehet megnyitni a fogadott faxok mappáját.\n" "Ez a fax nem lesz elmentve!\n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" "SÚLYOS RENDSZERHIBA! Nem menthető el egyetlen fogadott fax sem.\n" "Az összes fax vagy a faxok egy része el fog veszni!\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" "Érvénytelen UTF-8 kódolás vétele az EfaxControllerben::read_pipe_cb()\n" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" "SÚLYOS RENDSZERHIBA! Nem hozható létre az elküldött faxok mappája.\n" "Ez a fax nem lesz elmentve!\n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "NYOMTATÁSI FELADAT" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "Nyomtatás beállítása" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Kiválasztott fax nyomtatása" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Kiválasztott fax megtekintése" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Kiválasztott fax leírásának létrehozása/módosítása" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Kiválasztott fax törlése" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Kuka kiürítése" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Új dosszié létrehozása" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Kiválasztott dosszié törlése" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "Új faxok számának lenullázása" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Fogadott faxok jegyzéke" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: Elküldött faxok jegyzéke" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Kiválasztott fax végleges törlése?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(FIGYELEM: Ezzel a művelettel végleg törli a faxot\n" "a fájlrendszerből)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Végleg törli a kiválasztott faxokat?\n" "\n" "(FIGYELEM: Ezzel a művelettel végleg törli\n" "a faxokat a fájlrendszerből)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: Fax törlése" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Kuka kiürítése?\n" "\n" "(FIGYELEM: Ezzel a művelettel végleg törli a faxokat\n" "a Kukából és a fájlrendszerből)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: Kuka" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: Dosszié hozzáadása" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Ürítse ki a mappát a törlése előtt,\n" "törölje a benne található mappákat és helyezze át, illetve törölje\n" "a mappákban található fájlokat" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: Dosszié törlése" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Dosszié törlése: " #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Kiválasztott fax nyomtatása?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: Fax nyomtatása" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "Új faxok:" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: Fax leírása" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Fax leírása?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Dosszié elnevezése?\n" "(Figyelem: a dosszié a legfelsőbb szinten helyezkedik el\n" "és áthelyezhető más dossziékba)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "A dosszié neve nem tartalmazhatja a következő karaktereket: " #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "Már létezik ilyen dosszié: " #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Dosszié" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "Dátum" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Leírás" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Fogadott" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Elküldött" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Kuka" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: Fájljegyzék" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "Küldendő fájlok" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Kiválasztott fájl megtekintése" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Kiválasztott fájl törlése a jegyzékből" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Fájl hozzáadása a jegyzékhez" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Fájlok hozzáadása a küldendő faxok jegyzékéhez" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Mozgatás felfelé" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Mozgatás lefelé" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Fájl törlése" #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " a jegyzékből?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Fájl törlése" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Copyright (C) 2001 - 2011 Chris Vine\n" "Ez a program a GNU General Public License 2. verzió feltételei szerint " "került kibocsátásra\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Használat: efax-gtk [paraméterek] [fájlnév]\n" "Paraméterek:\n" "\t-r Program indítása automatikus fogadás módban\n" "\t-s Program elrejtése a tálcán az indítás után\n" "További részletekért olvassa el a README fájlt\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Érvénytelen paraméter. Érvényes paraméterek:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" "Érvénytelen felhasználót jelölt meg - használjon\n" "ASCII karaktereket. A felhasználó neve nem lesz\n" "feltüntetve a fax fejlécén, de aggodalomra semmi\n" "ok, mivel a faxszám mindig fel lesz tüntetve a fejlécen\n" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "Érvénytelen modem osztály\n" "Alapértelmezett Class 2 alkalmazása\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "Nincs meghatározva a soros-port eszköz " #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "Alapértelmezett 204x196 felbontás alkalmazása\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "Érvénytelen fax felbontás\n" "Alapértelmezett 204x196 felbontás alkalmazása\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "Érvénytelen csengetésszám\n" "Válasz egy csengetés után\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "Alapértelmezett A4 papírméret alkalmazása\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "Érvénytelen papírméret\n" "Alapértelmezett A4 papírméret alkalmazása\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "Érvénytelen tárcsázási mód\n" "Alapértelmezett tónus-mód alkalmazása\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "Érvénytelen nagyítási érték: alapértelmezett 100 érték használata\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "Alapértelmezett PostScript megtekintési parancs alkalmazása: gv\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" "Nincs meghatározva a socket kiszolgáló port, a kiszolgáló nem indítható el\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "Érvénytelen socket kiszolgáló port lett megadva, a kiszolgáló nem indítható " "el. Az értéknek 1024 és 65535 között kell lennie\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" "Érvénytelen újrahívási intervallom lett megadva. Az érték 5 és 1440 perc " "között kell legyen\n" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "Érvénytelen WORK_SUBDIR paraméter. Paraméter figyelmen kívül hagyása\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" "DBUS hiba: az efax-gtk nem indítható.\n" "\n" "A DBUS szekciónak futnia szükséges" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "efax-gtk: DBUS hiba" #: src/mainwindow.cpp:295 msgid "File " msgstr "Fájl " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "Socket " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Fax beviteli módszer: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "Egy fájl" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "Több fájl" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Socket jegyzék" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Telefonszám: " #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Fax küldése" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Válaszol" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Hívás feldolgozása" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "Automatikus fogadás" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Leállítás" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Küldendõ fax" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "_Fogadott faxok jegyzéke" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "_Elküldött faxok jegyzéke" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "_Sorban várakozik" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "Fájl beszú_rása" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "_Több fájl beszúrása" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_Címjegyzék" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "Újrahívás _várakozási sor" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Beállítások" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_Kilépés" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "_Naplófájl nyomtatása" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "Naplófájl nyomtatás _beállítása" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "Naplófájl _megtekintése" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "Az efax-_gtk programról" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "Az _efax programról" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Fordítások" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Súgó" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_Fájl" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "_Napló" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "A program -s paraméterrel indult el, de nincs a rendszertálcán!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "Nincs megadva faxszám. Fax küldése a jelenlegi kapcsolaton belül?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Telefonszám" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "A nyomtatási feladat a socketen keresztül érkezett" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk socket" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "Egy fax érkezett az efax-gtk segítségével" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: fax érkezett" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "A beállítások módosítása csak inaktív üzemmódban lehetséges\n" "Nyomja meg a Leállítás gombot a beállítások szerkesztéséhez" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "olasz - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "lengyel - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "bolgár - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "orosz - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "héber - Assaf Gillat\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "görög - Görög Linux Felhasználói Csoport\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "albán - Besnik Bleta\n" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "magyar - Szakáts Gergely, Csordás László\n" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "egyszerűsített kínai - Kite Lau\n" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "német - Steffen Wagner\n" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "svéd - Daniel Nylander\n" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "katalán - Jordi Sayol Salomo\n" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "hagyományos kínai - Wei-Lun Chao\n" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Fordítások" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Súgóhoz nyomja meg az F1 billentyűt" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" "Érvénytelen UTF-8 kódolás vétele a Menü ablakban::read_error_pipe_cb()\n" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "megsemmisítve jel által" #: src/settings.cpp:68 msgid "Name: " msgstr "Név: " #: src/settings.cpp:69 msgid "Number: " msgstr "Szám: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Soros eszköz: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "Zárt fájl: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "Képességek: " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Csengetések száma (1-9):" #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Modem osztály: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Tárcsázási mód: " #: src/settings.cpp:211 msgid "Auto" msgstr "Automatikus" #: src/settings.cpp:213 msgid "Class 1" msgstr "Class 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Class 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Class 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Tónus" #: src/settings.cpp:235 msgid "Pulse" msgstr "Pulzus" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Lekérdezési paraméterek:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "Paraméterek lenullázása: " #: src/settings.cpp:510 msgid "Other Params: " msgstr "Egyéb paraméterek: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "GTK+ nyomtatási rendszer használata" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Nyomtató program: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Nagyítás nyomtatásnál (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "Felugró ablak a\n" "nyomtatás előtt" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "PostScript nézegető\n" "program:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Socket kiszolgáló indítása" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Felugró ablak fax\n" "socketről való érkezésekor" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "Port, amelyikre\n" "a faxokat küldeni kell:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Kapcsolaton belül\n" "engedélyezett címek:" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "helyi kiszolgáló " #: src/settings.cpp:1016 msgid "other" msgstr "egyéb" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "Felugró ablak fax érkezésekor\n" "a modemen keresztül" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "Program vagy script végrehajtása fax\n" "érkezésekor a modemen keresztül" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "Küldendő faxok felbontása: " #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" "A címzett faxszámának\n" "feltüntetése a fax fejlécén" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "Automatikus újrahívás" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "Újrahívási intervallum (perc):" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "Hívási előtag:" #: src/settings.cpp:1512 msgid "Standard" msgstr "Szabványos" #: src/settings.cpp:1514 msgid "Fine" msgstr "Finom" #: src/settings.cpp:1767 msgid "Log File: " msgstr "Naplófájl: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Oldalméret: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: beállítások" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Figyelem: mentse el a beállításokat az OK gomb megnyomásával" #: src/settings.cpp:1979 msgid "Reset" msgstr "Lenullázás" #: src/settings.cpp:2012 msgid "Identity" msgstr "Azonosító" #: src/settings.cpp:2015 msgid "Modem" msgstr "Modem" #: src/settings.cpp:2018 msgid "Params" msgstr "Paraméterek" #: src/settings.cpp:2021 msgid "Print" msgstr "Nyomtatás" #: src/settings.cpp:2027 msgid "Socket" msgstr "Socket" #: src/settings.cpp:2030 msgid "Receive" msgstr "Fogadás" #: src/settings.cpp:2033 msgid "Send" msgstr "Küldés" #: src/settings.cpp:2036 msgid "Logging" msgstr "Naplózás" #: src/settings.cpp:2039 msgid "Page" msgstr "Oldal" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" "Érvénytelen felhasználót jelölt meg az \"Azonosító\" menüben - használjon " "ASCII karaktereket. Nem lesz gond, ha ezt a mezőt üresen hagyja, mivel a " "faxszám mindig fel lesz tüntetve a fejlécen" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Konfigurációs hiba" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "Érvénytelen modem osztály" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "Érvénytelen oldalméret" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "Érvénytelen fax felbontás" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "Érvénytelen csengetésszám" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "Érvénytelen tárcsázási mód" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "Érvénytelen nyomtatási nagyítási paraméter" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" "Érvénytelen socket kiszolgáló port. Az értéknek 1024 és 65535 között kell " "lennie" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" "Érvénytelen újrahívási inetrevallum. Az érték 5 és 1440 perc között kell " "legyen." #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "Következő beállítások alkalmazása: " #: src/settings.cpp:3102 msgid " or\n" msgstr "vagy\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Beállítások lenullázása" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" "Írja be a küldendő fax fejlécén megjelenő nevet. Használjon ASCII " "karaktereket. Amennyiben ez problematikus, hagyja üresen ezt a mezőt, mivel " "a faxszám mindig fel lesz tüntetve a kimenő fax fejlécén" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk súgó: Név" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "Adja meg a küldendő faxok fejlécén megjelenő számot, amely segítségével a " "fogadó faxok azonosítani tudják a feladót" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk súgó: Szám" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "Írja be a soros eszköz nevét, amelyhez a modem csatlakoztatva van (ha nincs " "megadva semmilyen érték, akkor az alapértelmezett /dev/modem eszköz kerül " "alkalmazásra). Az eszköz neve elé ne írja a dev előtagot, csupán annyit: " "ttyS1 vagy cua2, stb. A Linuxban a ttyS0 megegyezik COM 1-el, a ttyS1 a COM " "2-vel, stb." #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk súgó: Eszköz" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "Adja meg a zárt fájl elérési útját. Ha nem adott meg semmilyen értéket, a " "program az alapértelmezett /var/lock értéket fogja használni" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk súgó: Zárt fájl" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "Az efax-0.9 vagy magasabb verziószám esetében általában az \"Automatikus\" " "opciót érdemes kiválasztani. Ilyenkor a program megpróbálja azonosítani a " "modemet, de kézzel is beállítható a kívánt érték." #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk súgó: Modem osztály" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" "Itt határozható meg, hogy tónus vagy pulzus tárcsázási módot használ faxok " "küldésekor" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk súgó: Tárcsázási mód" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "Ez az opció határozza meg a modem képességeit. További információért " "tekintse meg a man efax-t és vizsgálja meg a -c paraméter működését. Class 2 " "modem esetében, ha az efax-0.9 verzióját használja, hagyja üresen ezt a " "mezőt. Egyéb esetben használja a következő értékeket: 14,400 bps modem " "esetében: 1,5,0,2,0,0,0,0, lassúbb modem esetében pedig: 1,3,0,2,0,0,0,0" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk súgó: Képességek" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "Amikor a program automatikus fogadásra van beállítva, ezzel a paraméterrel " "lehet beállítani azt, hogy hány csengetés után adjon faxhangot. Érvényes " "értékek: 1-9. Alapértelmezett esetben a program 1 csengetés után ad faxhangot" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk súgó: Csengetések" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "Itt lehet meghatározni a modem lekérdezési parancsot (AT), amikor a modem " "fax üzemmódban működik. Adja meg itt a kívánt értéket. Ha nem ad meg semmit, " "a program az alapértelmezett Z &FE&D2S7=120 &C0 M1L0' parancsot fogja " "használni, amely kompatibilis a legtöbb modemmel" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk súgó: Lekérdezési paraméterek" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "Itt lehet meghatározni a modem lenullázási parancsot (AT). Ha nem ad meg " "semmit, a program az alapértelmezett Z parancsot fogja használni, amely " "kompatibilis a legtöbb modemmel" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk súgó: Paraméretek lenullázása" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "Itt kiegészítő paramétereket adhat meg az efax számára (lásd: man efax). Ha " "csak nem valamilyen különleges modemet használ, hagyja üresen ezt a mezőt" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk súgó: Egyéb paraméterek" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" "Ha ez van beállítva, akkor a program a GTK+ nyomtatási rendszert fogja " "később használni a parancssorban megadott utasítások szerint a fax " "nyomtatására" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "efax-gtk súgó: GTK+ nyomtatási rendszer használata" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Ez a parancs végzi a Postscript fájl nyomtatását. Ha nincs megadva semmi, az " "lpr parancs kerül végrehajtásra" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk súgó: Nyomtató program" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Itt határozható meg a nagyítási arány a nyomtatásnál, hogy a szöveg " "beleférjen a nyomtató nyomtatási területére" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk súgó: Nyomtatási nagyitás" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Itt állítható be, hogy kér-e megerősítést miután megnyomta a \"Kiválasztott " "fax nyomtatása\" gombot. Ha nincs szükség megerősítésre, ne jelölje be ezt a " "négyzetet." #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk súgó: Felugró ablak" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "A PostScript nézegető program segítségével nézegetheti a fogadott és az " "elküldött faxokat. Adja meg azt a parancsot itt, amely megnyitja az Ön által " "kiválasztott programot. Az alapértelmezett - gv, de ha például GNOME " "környezetben dolgozik, akkor megadhatja a evince parancsot. KDE esetében a " "kghostview parancsot javasolt." #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk súgó: Postscript nézegető program" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "Itt állítható be, hogy futtatni kívánja-e socket kiszolgálót a CUPS vagy " "egyéb nyomtatási rendszerhez. Jelölje be ezt a négyzetet a kiszolgáló " "futtatásához" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "efax-gtk súgó: Socket kiszolgáló futtatása" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "Itt állítható be, hogy kíván-e látni felugró párbeszéd ablakot, amikor a fax " "a socket kiszolgálón keresztül érkezik. Jelölje be a ezt a négyzetet, ha " "látni akarja a párbeszéd ablakot. Ha a program nincs beállítva automatikus " "fogadásra, akkor a párbeszéd ablak segítségével faxokat is küldhet." #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" "Itt állítható be, hogy melyik porton fog figyelni a socket kiszolgáló. " "Értéke 1024 és 65535 között kell legyen." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk súgó: Port" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "Itt állítható be, hogy lehet-e más helyekről is csatlakozni az Ön gépéhez. " "Normális esetben a localhost értéket kell beállítani. Ha azt szeretné, hogy " "más gépek is csatlakozhassanak az Ön gépéhez, válassza az \"egyéb\" opciót " "és adja meg a távoli gépek nevét. Ezt az opciót csak aktív tűzfal mellett " "ajánlatos használni." #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "efax-gtk súgó: Engedélyezett socket kapcsolatok" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "Itt állítható be, hogy kíván-e látni felugró ablakot fax érkezésekor. Ha " "igen, akkor jelölje be ezt a négyzetet." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "efax-gtk súgó: Fogadási párbeszéd ablak" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "Itt határozható meg az a program, amely végrehajtásra kerül, ha fax érkezett " "a modemen keresztül. Jelölje be a négyzetet és adja meg a program nevét, ha " "végre szeretne hajtani valamilyen programot új fax érkezésekor" #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "efax-gtk súgó: Program végrehajtása fax érkezésekor" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "Itt állítható be a kimenő faxok felbontása. A \"Szabványos\" - 204x98, a " "\"Finom\" - 204x196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk help: Kimenő faxok felbontása" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" "Itt határozható meg, hogy a rendeltetési faxszám megjelenjen-e az elküldött " "faxok fejlécén. Ne jelölje be, amennyiben nem akarja, hogy ezek az adatok " "láthatók legyenek (például, ha tartalmazza a hitelkártya elérési kódját)" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "efax-gtk súgó: A fax fejléce" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" "Ha a modem használatban van vagy a címzett foglalt ez a program képes " "automatikusan újratárcsázni, ha ezt kívánja. Ehhez jelölje be a négyzetet." #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "efax-gtk súgó: Újrahívás" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" "Ez meghatározza azt az előhívót, ami hozzárendelődik minden tárcsázott " "számhoz - például megadhat 9-et, ha olyan kapcsolótáblán keresztül kíván " "telefonálni, amihez szükséges a 9-et tárcsázni, hogy külső vonalat kapjon, " "amelyet egy szünet követ." #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "efax-gtk help: Hívási előtag" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "Itt határozható meg a program naplófájlja, amely tartalmazni fogja a program " "működése során történt eseményeket" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "efax-gtk súgó: Naplófájl" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "Adja meg az oldalméretet" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk súgó: Oldalméret" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: Súgó" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Küldés" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "Automatikus újrahívás" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Fogadás" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Címjegyzék" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Fogadott faxok jegyzéke" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Beállítások" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "Faxok küldése\n" "\n" "A küldendő faxot (PostScript/PDF fájlt) meg kell határozni a \"Küldendő fax" "\" opciónál. PostScript/PDF fájl létrehozására bármely Unix/Linux rendszer " "képes, csakúgy mint a szövegszerkesztő programok többsége.\n" "Két módszer létezik fax hozzáadásához. Ha csupán egy fájlt szeretne faxon " "elküldeni, akkor ezt az \"Egy fájl\" opció segítségével teheti meg.\n" "Ha több fájl található a \"Küldendő fax\" pontnál, akkor ezek egy faxként " "lesznek elküldve külön-külön oldalon. Ha több fájlt szeretne egyszerre " "küldeni, akkor inkább a \"Több fájl\" opciót érdemes használni.\n" "A küldendő faxok továbbítása a nyomtatóprogram socket kiszolgálóján " "keresztül is történhet. A lista eléréséhez válassza a \"Socket\" pontot és " "nyomja meg a \"Socket jegyzék\" gombot. Ez a módszer kényelmesebb, mivel a " "faxot úgy is el lehet küldeni, hogy a szövegszerkesztő programban megnyomja " "a \"Nyomtatás\" gombot. Egy piros pont fogja jelezni a faxprogram ablakában, " "hogy a socketből érkezett fájl van a küldendő faxok listájában.\n" "A telefonszámot beütheti kézzel, de használhatja a beépített címjegyzéket " "is. Amennyiben a telefonkapcsolat már létrejött a küldés történhet " "telefonszám megadása nélkül is.\n" "A sikeresen elküldött faxok a $HOME/Elküldött faxok mappába kerülnek.\n" "\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" "\n" "Automatikus újrahívás\n" "\n" "A program beállítások között választható egy automatikus újrahívás funkció. " "Ez egy fax küldésekor, amennyiben a modem vagy a célállomás foglalt, akkor " "egy várakozási sort hoz létre és meghatározott időnként megkísérli a fax " "újraküldését.\n" "Ha a program beállításokban aktiválta az automatikus újrahívás funkciót, " "akkor a fax elküldése mindaddig aktív lesz, amíg be nem következik " "valamelyik esemény:\n" "(a) a fax elküldése sikeres,\n" "(b) a címzett állomás tartósan foglalt (modem hiba, a távoli szám nem " "válaszol),\n" "(c) a faxot a felhasználó eltávolította a várakozási sorból,\n" "(d) ha a küldendő fax egy nyomtatási feladat a nyomtatási rendszerben, akkor " "a fax küldés várakozási sorban ez meg fog jelenni,\n" " (e) ha a küldött fax mellékelt fájlt is tartalmazott és ez a fájl törölve " "vagy elmozgatva lett az eredeti helyéről,\n" "(f) a \"Leállítás\" gomb lett megnyomva egy továbbítási kísérlet közben.\n" "\n" "Egy fax várakozási sor automatikus újrahívás funkciója nem fog működni, " "amennyiben az újraküldés közben a \"Beállítások\" párbeszéd ablak nyitva " "van. Amennyiben a \"Beállítások\" párbeszéd ablak be lesz zárva a " "legközelebbi elküldési kísérlet már működni fog.\n" "\n" "Az automatikus újrahívás várakozási sor a programból való kilépéskor " "törlődik.\n" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "Fogadott faxok\n" "\n" "Három módszer létezik a faxok fogadásához.\n" "\n" "1. Ha megnyomja a \"Válaszol\" gombot a program 'felveszi a kagylót' és " "válaszol a bejövő hívásra.\n" "\n" "2. Amennyiben Ön vette fel a kagylót, a faxot a \"Hívás feldolgozása\" gomb " "megnyomásával tudja fogadni.\n" "\n" "3. Az \"Automatikus fogadás\" gomb megnyomása után a program automatikusan " "figyelni fogja a bejövő hívásokat, és a beállított csengetésszám után " "fogadja a faxot. Az automatikus fogadás leállításához nyomja meg a " "\"Leállítás\" gombot. \n" "A fogadott faxok a $HOME/Fogadott faxok mappába kerülnek tiffg3 formátumban " "(egy fájl minden egyes fogadott oldalra).\n" "A fogadott faxokkal a \"Fogadott faxok jegyzéke\" menüben dolgozhat. Lásd: " "\"Fogadott faxok jegyéke\" témakört.\n" "Be lehet állítani azt, hogy egy felugró ablak jelezze a fax érkezését, " "illetve meghatározható az a program, amely végrehajtásra kerül fax " "érkezésekor.\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "Címjegyzék használata\n" "\n" "A telefonszám kiválasztásához a címjegyzékből jelölje ki a telefonszámot az " "egér bal gombjával és nyomja meg az \"OK\" gombot.\n" "\n" "Új címzett hozzáadásához nyomja meg a \"Hozzáadás\" gombot és írja be a " "szükséges adatokat a megjelenő párbeszéd ablakban. A címzett törléséhez " "nyomja a \"Törlés\" gombot. A címzetteket rendezni, valamint felfelé és " "lefelé is tudja mozgatni a címjegyzékben a nyílbillentyűk valamint az egér " "használatával.\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "Fogadott faxok jegyzéke\n" "\n" "A fogadott faxok jegyzékének megnyitásához a Fájl menüpontban válassza a " "Fogadott faxok jegyzéke pontot. Az egér bal gombjának segítségével válassza " "ki azt a faxot, amelyiket meg szeretné nézni vagy ki szeretné nyomtatni. A " "nyomtató és a nézegető programok az efax-gtkrc konfigurációs fájlban " "kerülnek meghatározásra. Ha a konfigurációs fájl nem tartalmaz erre " "vonatkozó bejegyzéseket, az efax-gtk az alapértelmezett programokat fogja " "használni a nyomtatáshoz, illetve a nézegetéshez.\n" "\n" "Nyomtatásnál meghatározhatja a nagyítási arányt. A 98 értéket a legtöbb " "nyomtató támogatja. A kívánt értéket a \"Beállítások\" -> \"Nyomtatás\" " "menüpontban tudja beállítani.\n" "\n" "A fogadott faxokhoz fűzhető megjegyzés. Ezzel könnyebben tudja majd " "beazonosítani a beérkezett faxokat.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "Beállítások\n" "\n" "A program beállításaik manuálisan is meg tudja változtatni a $HOME/.efax-" "gtkrc, $sysconfdir/efax-gtkrc vagy /etc/efax-gtkrc konfigurációs fájlok " "szerkesztésével. A fájlok a fenti sorrendben kerülnek kiválasztásra, így a " "$HOME/.efax-gtkrc elsőbbséget élvez.\n" "\n" "A beállítást elvégezheti úgy is, hogy megnyitja a Fájl/Beállítások párbeszéd " "ablakot. Ilyenkor a beállítások elmentése a $HOME/.efax-gtkrc fájlba " "történik. Amennyiben vissza szeretne térni a globális beállításokhoz, " "törölje a $HOME/.efax-gtkrc fájlt vagy nyomja meg a Lenullázás gombot a " "párbeszéd ablakban. Ezek után a program a globális beállításokat fogja " "használni ($sysconfdir/efax-gtkrc vagy /etc/efax-gtkrc).\n" "\n" "Segítséghez tartsa az egérmutatót a megfelelő gomb felett vagy nyomja meg a " "gombot az információs ablak megjelenítéséhez.\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "A socket a következő porton fut: " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "Socketre nyomtatási feladat érkezett\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "Socket lezárása\n" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: Sorba helyezett fájlok a socketből" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "Nyomtatási feladatok sorrendje" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "Válassza ki a küldendő faxot" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Kijelölt fax kiválasztása küldéshez" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "NYOMTATÁSI FELADAT: " #: src/socket_list.cpp:501 msgid "Remove " msgstr "Törlés " #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: Fax sorrend törlése" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: socketből érkezett nyomtatási feladatok" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Faxok sorrendje" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" " érkezett a socketen keresztül.\n" "Fax küldése vagy sorba helyezése?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "Fax napló kezdése:" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "Fax napló vége:" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "Nem nyitható meg a napló olvasáshoz" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "efax-gtk: naplófájl nyomtatása" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "Nem nyitható meg a naplófájl megtekintéshez" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "efax-gtk: naplófájl megtekintése" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "efax-gtk: napló megtekintése" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Fogadott faxok jegyzéke" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Elküldött faxok jegyzéke" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "Újrahívási várakozási sor" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "Automatikus fogadás" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Kilépés" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "efax-gtk: Újrahívás várakozási sor" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "Fax eltávolítása az újrahívási listából" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "Fax eltávolítása" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "az újrahívási listából" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "efax-gtk: Fax eltávolítása az újrahívásból?" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "Nincs nyomtatni való fájl" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "Betűtípus:" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "Betűtípus méret:" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "Betűtípus nyomtatáshoz" #: efax/efax.c:379 msgid "success" msgstr "siker" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "a hívott szám vagy a modem foglalt" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "értelmezhetetlen hiba" #: efax/efax.c:382 msgid "invalid modem response" msgstr "érvénytelen modem válasz" #: efax/efax.c:383 msgid "no response from modem" msgstr "a modem nem válaszol" #: efax/efax.c:385 msgid "internal error" msgstr "belső hiba" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "NSC - poller tulajdonságai" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "CIG - poller ID" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "DTC - poller képességek" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "NSF - válasz tulajdonságai" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "CSI - válasz ID" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "DIS - válasz képességek" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "NSS - hívó tulajdonságai" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "TSI - hívó ID" #: efax/efax.c:419 msgid "DCS - session format" msgstr "DCS - munkafázis formátum" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "CFR - csatorna OK" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "FTT - csatorna nem OK" #: efax/efax.c:430 msgid "MPS - not done" msgstr "MPS - nincs befejezve" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "EOM - nincs befejezve, új formátum" #: efax/efax.c:436 msgid "EOP - done" msgstr "EOP - rendben" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "PRI-MPS - nincs befejezve, kezelő hívása" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "PRI-EOM - nincs befejezve, új formátum, kezelő hívása" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "PRI-EOP - befejezve, kezelő hívása" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "MCF - oldal OK" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "RTP - oldal OK, csatorna ellenőrzése" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "PIP - oldal OK, kezelő hívása" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "RTN - oldal nincs rendben, csatorna ellenőrzése" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "PIN - oldal nincs rendben, kezelő hívása" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "CRP - parancsismétlés" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "DCN - lekapcsolódás" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "ISMERETLEN" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "inkompatibilis helyi és távoli kapacitások" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "a következő fájl nem törölhető: %s" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "eltávolított fájl: %s" #: efax/efax.c:784 msgid "header:" msgstr "fejléc:" #: efax/efax.c:868 msgid "characters received while sending" msgstr "küldéskor beérkezett karakterek" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "elküldve %d+%d sor, %d+%d byte %d másodperc alatt %d bps sebességen" #: efax/efax.c:915 msgid "flow control did not work" msgstr "áramlás ellenőrzés nem működik" #: efax/efax.c:954 msgid "modem response in data" msgstr "modem válasz adatokban" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "futási időtartam puffer túlterhelése" #: efax/efax.c:1036 msgid "file write:" msgstr "fájlírás:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "CAN: adatfogadás törölve" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "fogadási hibák" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "%d sor érkezett %d hibával" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "elküldve TCF - csatorna ellenőrzése, %d byte" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "időtartam túllépése adatellenőrzéskor" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "a fogadott TCF - csatorna ellenőrzése (OK: run of %d in %d)" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "a fogadott TCF - csatorna ellenőrzése (not OK: run of %d in %d)" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "a keret utolsó byte-ja NULL" #: efax/efax.c:1222 msgid "sent" msgstr "elküldve" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "A HDLC keretben nincs kezdeti 0xff" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "bit-megfordított HDLC keret, bit utasítás fordítása" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "idő túllépése keretadat olvasása során" #: efax/efax.c:1291 msgid "frame error" msgstr "kerethiba" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "nincs válasz keretadat után" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "rossz válasz keretadat után" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "a keret túl hosszú (%d, > %d max byte)" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "rossz hordozó" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "rossz válasz a keretfogadási parancsra" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "rövid keret érkezett (%d byte)" #: efax/efax.c:1391 msgid "received" msgstr "fogadott" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "A távoli ID" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "távoli fax nem válaszol" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "az oldalt nem lehet megnyitni" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" "a távoli gépen egy vagy több küldendő dokumentum van és fogadásra készen áll" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" "a távoli gépen egy vagy több küldendő dokumentum van, de fogadásra nem áll " "készen" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "a távoli gépen nincs küldendő dokumentum, de fogadásra készen áll" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "a távoli gépen nincs küldendő dokumentum és fogadásra sem áll készen" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "a távoli gép nem tud fogadni, további próbálkozás" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "a távoli gépen nincs küldendő anyag, további próbálkozás" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "a csatorna nem használható %d bps-n" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "a csatorna nem használható alacsonyabb sebességen" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "érvénytelen válasz a DCS-re" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "elküldött oldal %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "érvénytelen post-page válasz" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "a megszakítási kérelem figyelmen kívül hagyva" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "időtúllépéssel történő várakozás parancsra" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "oldal elmentve %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "a parancs nem azonosítható" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "nincs parancs vagy válasz a távoli gépről" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "nem normális megsemmisítés (kód %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "nem érkezett XON/DC2 a CONNECT után" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "%d karakter érkezett küldésre való várakozáskor" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "a távoli gépen egy vagy több küldendő dokumentum van" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "nem érkezett +FPTS válasz, a fax fogadása vélelmezve van" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "túl sok kísérlet oldal küldésénél" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "fogadási (+FDR) parancs sikertelen" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "tárcsázás: %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "A távoli gép ID-je %s" #: efax/efax.c:2216 msgid "called" msgstr "hívás" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "csatlakozás" #: efax/efax.c:2224 msgid "number is busy" msgstr "a hívott szám foglalt" #: efax/efax.c:2226 msgid "dial command failed" msgstr "a tárcsázási parancs sikertelen" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "várakozás aktivitásra" #: efax/efax.c:2306 msgid "activity detected" msgstr "aktivitás észlelve" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "nem lehet válaszolni: az eszköz zárolása nem lehetséges" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "túl sok %%d ESC karakter a parancsban (%s)" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "parancs végrehajtása /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "az exec() hívás sikertelen" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "nincs meghatározva getty parancs adathíváshoz" #: efax/efax.c:2353 msgid "fax call answered" msgstr "faxhívás megválaszolva" #: efax/efax.c:2356 msgid "voice call answered" msgstr "hanghívás megválaszolva" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "nincs meghatározva voice parancs a hanghíváshoz" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "nem lehet válaszolni a hívásra" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "a modem nem támogatja a faxszolgáltatást" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "nem határozható meg a modem támogatási osztály" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "Multi-Tech bit utasítás beállítása" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "%s in class %s használata" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "hibás oldal %s" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "befejezve - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "a helyi ID (%s) megcsonkítva a %d karakterekkel" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "a helyi ID (%s) nem szabványos karaktereket tartalmaz" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "line buffering alkalmazása a stdout kimeneten" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "helytelen minőségi (-q) paraméter (%s)" #: efax/efaxmsg.c:215 msgid " Error: " msgstr " Hiba: " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " Figyelem: " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "nem nyitható fájl %s:" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "nem formázható fájl %s:" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "nem tekerhető vissza a fájl %s:" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "nem nyitható meg a fájl %s:" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "hiba a faxeszközre történő íráskor" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "váratlan válasz \"%s\"" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "a modem utasítás \"%s\" túl hosszú" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "várakozási idő túllépése a következő parancs után: %s" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "várakozási idő túllépése" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "rossz válasz a következő parancs után: %s" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "rossz válasz várakozás után" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "szinkron: DTR elvetése" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "szinkron: ESC karakter küldése" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "szinkron: a modem nem válaszol" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "sikertelen modem utasítás (%s)" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "sikertelen modem utasítás" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "%s zárolva van vagy foglalt - várakozás" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "megnyitva %s" efax-gtk-3.2.8/po/stamp-po0000644000175000001440000000001211544574533012254 00000000000000timestamp efax-gtk-3.2.8/po/hu.gmo0000644000175000001440000020135611544574532011726 00000000000000wL('B)'(l'L'[._ >6CPG@JGO PO[OkO0OO,OOP#P6(P'_R R RRRRR%RR S&S BSOS+lS!S1SS TT T%T4TETYTvTTTTT^T _V3`H`9` a%,aGRaahb%cAcVcjc zc cc ccc cccc cd!d0dFd_dudzdd dLddTd#Oesee;eeeee f+f-Hfvf!f f ff ff!fggng)g'g*gh$h?hQhWhgh ~hhhhhhhZhZi)jj kkll l=l Zlhlpl l lllll l ll mmm4m CmQmcm_~m_m[>nUncnToYobo jovooooo ooo oo$ p0p9pAp^pcp~pp pp%pMp/q@qGTqr[s!)tKuuYvv(wxPzm{hk||d}~xwMtcƒ&#+OU]6/L|S4 /=PV\mr ̈,ވ 2'Hpˉ"!! CM a#lŠۊ0"'(JsӋ "7(Ktˌ "7)Z$ čڍ-4Ibwӎ"5$Lqӏ&$<Ofz Ӑ ߐ #7*?$jϑ)(G p}Ȓ?!:\"v&ݓ'8 GQWh 26:%K/q2*ԕ8;8)tʖ6ϖ$ +8@Sn$͗$-RmŘژ " 0Qq,Kv4›aYLnNU +FG5*ʳ-T%5zŵٵ 5']s; ʶ)׶1.3Cb Ƿ ٷ,Gcu&8/_5NŹ#(Bks {$ҺNXٻ$9S oF$ ,:ӽpVh)I˾+DSkz?um /"- ?K 89!UKwML ^KNC73{I0LfZ;8YUSm 7Pb'u  EaR})#A7y+ :%,+R~ 'ug"51( 5&T {#'%&?]|Dl 1&0Wv /',7 dq"a!hecRx/ 8F O] |# # 2>S hu C 3@Xsz`{W]y_{?`Q_|L# %28?!_0Y   !'<d8y<(3 To!%4 "@ c"p # 9@z+ 6$Mr."&,>k+/(2,6_ -2F_w. "9'\2%#B4Z!#$ 0@(Z $ (-). X2d60Fw$ +<3%p-0-2C$v #=#Aa 7H LV@UY:9( F/a >^+},3+ (6!_.1J-Y(%{}Afq2\,[,kg<e "E_Xethw']nI 0/Md/M )x6V8A~@`WZza== Y+O93bYC 4^*S\.rZs 3~ThOkVm] L2f&dDvWKJ-is%nqaz8.?-{1HR77(;!(y9"t`)i&$PDU}pCHS+Q m'r!Gx#NcL@|U$5Pjo16 JK4  #BEI:X N5*yFBvu0FcRu:[>l;Gjlo?bgp>|^<T_Qw (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Automatic redialing ------------------- The program settings have an option for automatic redialing of a fax to be sent if the modem was in use or the receiving station was busy when the first attempt to send it was made. A list of the faxes queued for redialing can be brought up from the 'File' pull-down menu or from the icon in the system tray. If the program settings have been set to provide for automatic redialing, the program will keep trying to send the fax at the intervals chosen in the settings until either (a) the sending of the fax is successful, (b) there has been a failure arising from something other than the modem being in use or the recipient station being busy (such as a modem error, or the remote number ringing out without answering), (c) the fax is removed by the user from the list of faxes queued for redialing, (d) if the fax to be sent is a print job received from the print system, the print job is removed by the user from the dialog showing the list of queued faxes from the print socket, (e) if the fax to be sent comprises file(s) on the file system, the file(s) are deleted or moved (or their permissions changed to make them unreadable), or (f) the 'Stop' button is pressed while an attempt is being made to send the fax concerned which is queued for redialing. A fax queued for redialing will not be sent while the Settings dialog is open. Instead, if the interval for resending such a fax has passed, a further sending attempt will take place once the Settings dialog has been closed. The list of queued faxes for redialing is not preserved when the program is terminated. However, if any unsent faxes are print jobs received from the print system, they can still be found in the dialog showing the list of queued faxes from the print socket (assuming they have not been explicitly removed from that list by the user). Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. Error: Warning: from the list? from the redial queue? has been received on socket. Send or queue fax? or %d characters received while waiting to send%s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Albanian - Besnik Bleta Answer callAnswering callAutoAuto redialingAutomatic redialBeginning fax log: Bulgarian - Zdravko Nikolov CAN: data reception cancelledCFR - channel OKCIG - poller IDCRP - repeat commandCSI - answering IDCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot open log file for readingCannot open log file for viewingCannot send fax - a fax is being received Cannot send fax - the modem is in use. Adding the fax to the redial queue Capabilities: Catalan - Jordi Sayol Salomo Choose the selected fax for sendingClass 1Class 2Class 2.0Closing the socket Config ErrorCopyright (C) 2001 - 2011 Chris VineCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DBUS error: Cannot start efax-gtk. Make sure the DBUS session message bus is runningDCN - disconnectDCS - session formatDIS - answering capabilitiesDTC - poller capabilitiesDateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Dial Prefix:Do you accept the Conditions, Notices and Disclaimers shown above?EOM - not done, new formatEOP - doneEmpty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Ending fax log: Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFTT - channel not OKFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)Font size: Font: German - Steffen Wagner Greek - Hellenic Linux Users Group HDLC frame missing initial 0xffHebrew - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentityIf this is checked, the program will use the GTK+ print system rather than the command line argument specified below to print faxesInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Interval (minutes):Invalid Utf8 received in EfaxController::read_pipe_cb() Invalid Utf8 received in MainWindow::read_error_pipe_cb() Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid redial interval has been specified. It needs to be between 5 and 1440 minutes Invalid redial interval specified. It must be between 5 and 1440 minutesInvalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Invalid user name specified - it must be in plain ASCII characters. No user name will be shown on the fax top header line, but don't worry as the fax station number will always be given on the top header Invalid user name specified in "Identity" tab - it must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerItalian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingMCF - page OKMPS - not doneModemModem Class: Move address downMove address upMove file downMove file upMulti-Tech bit order setMultiple filesNSC - poller featuresNSF - answering featuresNSS - caller featuresNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No file to print specifiedNo port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PIN - page not OK, call operatorPIP - page OK, call operatorPRI-EOM - not done, new format, call operatorPRI-EOP - done, call operatorPRI-MPS - not done, call operatorPRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print fontPrint job received on socket Print logfile page _setupPrint page setupPrint selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the name to appear on the fax top header on sent faxes here. It must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitRTN - page not OK, check channelRTP - page OK, check channelRe_dial queueReceiveReceive standbyReceivingRedial queueRejectRemove Remove fax from redial listRemove fax to Remove fileRemove file Remove selected file from listResetReset Params: Reset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! SendSend faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSimplified Chinese - Kite Lau Single fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopSwedish - Daniel Nylander TSI - caller IDTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis program was written by Chris Vine and is released under the GNU General Public License, version 2. It is a front end for efax. efax was written by Ed CasasThis specifies a prefix to be prepended to any dialed number - for example you can specify '9,' here to dial through a switchboard which needs 9 to obtain an outside line followed by a delay.This specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether the destination fax number is included in the top fax header line for sent faxes. Uncheck the box if you do not want this to be shown (say because it includes a pay card access number)This specifies whether the program is to redial automatically when sending a fax if the modem is in use or the recipient is busy. Check the box if you want want automatic redialThis specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTraditional Chinese - Wei-Lun Chao TrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details Use GTK+ Print SystemUser does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class hereYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Log_Print logfile_Quit_Settings_Translations_View logfileabnormal termination (code %d)activity detectedbit-reversed HDLC frame, reversing bit ordercalledcan't answer: can't lock devicecan't delete file %s:can't determine fax modem class supportcan't get format of file %scan't open file %s:can't open output file %s:can't open pagecan't rewind file %s:channel not usable at %d bpschannel not usable at lowest speedcharacters received while sendingconnecteddial command faileddialing %sefax is copyright (C) 1999 Ed Casasefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Dial Prefixefax-gtk help: Execute program when fax receivedefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Redialefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk help: Use GTK+ print systemefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: DBUS errorefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Redial queueefax-gtk: Remove fax for redialling?efax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: View logefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: print logfileefax-gtk: settingsefax-gtk: view logfileexec() call failed:executing command /bin/sh -c %sfailed page %sfax call answeredfax device write error:file write:finished - %sflow control did not workframe errorframe too long (%d, > %d max bytes)header:incompatible local and remote capabilitiesincorrect quality (-q) argument (%s)internal errorinterrupt request ignoredinvalid modem responseinvalid post-page responseinvalid response to DCSlast byte of frame is NULLlocal ID (%s) has non-standard characterslocal ID (%s) truncated to %d characterslocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxmodem response in datano +FPTS response obtained, it is assumed that fax was receivedno XON/DC2 received after CONNECTno answer from remote faxno command or response from remoteno getty command defined for data callno response after frame datano response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceive (+FDR) command failedreceivedreceived %d lines with %d errorsreceived TCF - channel check (OK: run of %d in %d)received TCF - channel check (not OK: run of %d in %d)received short frame (%d bytes)reception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremote has one or more documents to send.removed file: %srun length buffer overflowsentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent TCF - channel check of %d bytessent page %ssuccesssync: dropping DTRsync: modem not respondingsync: sending escapesterminated by signaltimed out after command: %stimed out after waitingtimed out during training check datatimed out reading frame datatimed out waiting for commandtoo many %%d escapes in command (%s)too many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing %s in class %susing line buffering of stdoutvoice call answeredwaiting for activitywrong carrierwrong response after command: %swrong response after frame datawrong response after waitingwrong response to command to receive a frameProject-Id-Version: efax-gtk 3.2.3 rev:20100625 Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2010-06-25 14:54+0100 Last-Translator: csola48 Language-Team: csola48 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Hungarian X-Poedit-Country: HUNGARY X-Poedit-SourceCharset: utf-8 (FIGYELEM: Ezzel a művelettel végleg törli a faxot a fájlrendszerből) *** Automatikus küldés/fogadás leállítva *** Automatikus újrahívás A program beállítások között választható egy automatikus újrahívás funkció. Ez egy fax küldésekor, amennyiben a modem vagy a célállomás foglalt, akkor egy várakozási sort hoz létre és meghatározott időnként megkísérli a fax újraküldését. Ha a program beállításokban aktiválta az automatikus újrahívás funkciót, akkor a fax elküldése mindaddig aktív lesz, amíg be nem következik valamelyik esemény: (a) a fax elküldése sikeres, (b) a címzett állomás tartósan foglalt (modem hiba, a távoli szám nem válaszol), (c) a faxot a felhasználó eltávolította a várakozási sorból, (d) ha a küldendő fax egy nyomtatási feladat a nyomtatási rendszerben, akkor a fax küldés várakozási sorban ez meg fog jelenni, (e) ha a küldött fax mellékelt fájlt is tartalmazott és ez a fájl törölve vagy elmozgatva lett az eredeti helyéről, (f) a "Leállítás" gomb lett megnyomva egy továbbítási kísérlet közben. Egy fax várakozási sor automatikus újrahívás funkciója nem fog működni, amennyiben az újraküldés közben a "Beállítások" párbeszéd ablak nyitva van. Amennyiben a "Beállítások" párbeszéd ablak be lesz zárva a legközelebbi elküldési kísérlet már működni fog. Az automatikus újrahívás várakozási sor a programból való kilépéskor törlődik. Fogadott faxok Három módszer létezik a faxok fogadásához. 1. Ha megnyomja a "Válaszol" gombot a program 'felveszi a kagylót' és válaszol a bejövő hívásra. 2. Amennyiben Ön vette fel a kagylót, a faxot a "Hívás feldolgozása" gomb megnyomásával tudja fogadni. 3. Az "Automatikus fogadás" gomb megnyomása után a program automatikusan figyelni fogja a bejövő hívásokat, és a beállított csengetésszám után fogadja a faxot. Az automatikus fogadás leállításához nyomja meg a "Leállítás" gombot. A fogadott faxok a $HOME/Fogadott faxok mappába kerülnek tiffg3 formátumban (egy fájl minden egyes fogadott oldalra). A fogadott faxokkal a "Fogadott faxok jegyzéke" menüben dolgozhat. Lásd: "Fogadott faxok jegyéke" témakört. Be lehet állítani azt, hogy egy felugró ablak jelezze a fax érkezését, illetve meghatározható az a program, amely végrehajtásra kerül fax érkezésekor. Faxok küldése A küldendő faxot (PostScript/PDF fájlt) meg kell határozni a "Küldendő fax" opciónál. PostScript/PDF fájl létrehozására bármely Unix/Linux rendszer képes, csakúgy mint a szövegszerkesztő programok többsége. Két módszer létezik fax hozzáadásához. Ha csupán egy fájlt szeretne faxon elküldeni, akkor ezt az "Egy fájl" opció segítségével teheti meg. Ha több fájl található a "Küldendő fax" pontnál, akkor ezek egy faxként lesznek elküldve külön-külön oldalon. Ha több fájlt szeretne egyszerre küldeni, akkor inkább a "Több fájl" opciót érdemes használni. A küldendő faxok továbbítása a nyomtatóprogram socket kiszolgálóján keresztül is történhet. A lista eléréséhez válassza a "Socket" pontot és nyomja meg a "Socket jegyzék" gombot. Ez a módszer kényelmesebb, mivel a faxot úgy is el lehet küldeni, hogy a szövegszerkesztő programban megnyomja a "Nyomtatás" gombot. Egy piros pont fogja jelezni a faxprogram ablakában, hogy a socketből érkezett fájl van a küldendő faxok listájában. A telefonszámot beütheti kézzel, de használhatja a beépített címjegyzéket is. Amennyiben a telefonkapcsolat már létrejött a küldés történhet telefonszám megadása nélkül is. A sikeresen elküldött faxok a $HOME/Elküldött faxok mappába kerülnek. Beállítások A program beállításaik manuálisan is meg tudja változtatni a $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc vagy /etc/efax-gtkrc konfigurációs fájlok szerkesztésével. A fájlok a fenti sorrendben kerülnek kiválasztásra, így a $HOME/.efax-gtkrc elsőbbséget élvez. A beállítást elvégezheti úgy is, hogy megnyitja a Fájl/Beállítások párbeszéd ablakot. Ilyenkor a beállítások elmentése a $HOME/.efax-gtkrc fájlba történik. Amennyiben vissza szeretne térni a globális beállításokhoz, törölje a $HOME/.efax-gtkrc fájlt vagy nyomja meg a Lenullázás gombot a párbeszéd ablakban. Ezek után a program a globális beállításokat fogja használni ($sysconfdir/efax-gtkrc vagy /etc/efax-gtkrc). Segítséghez tartsa az egérmutatót a megfelelő gomb felett vagy nyomja meg a gombot az információs ablak megjelenítéséhez. Címjegyzék használata A telefonszám kiválasztásához a címjegyzékből jelölje ki a telefonszámot az egér bal gombjával és nyomja meg az "OK" gombot. Új címzett hozzáadásához nyomja meg a "Hozzáadás" gombot és írja be a szükséges adatokat a megjelenő párbeszéd ablakban. A címzett törléséhez nyomja a "Törlés" gombot. A címzetteket rendezni, valamint felfelé és lefelé is tudja mozgatni a címjegyzékben a nyílbillentyűk valamint az egér használatával. Fogadott faxok jegyzéke A fogadott faxok jegyzékének megnyitásához a Fájl menüpontban válassza a Fogadott faxok jegyzéke pontot. Az egér bal gombjának segítségével válassza ki azt a faxot, amelyiket meg szeretné nézni vagy ki szeretné nyomtatni. A nyomtató és a nézegető programok az efax-gtkrc konfigurációs fájlban kerülnek meghatározásra. Ha a konfigurációs fájl nem tartalmaz erre vonatkozó bejegyzéseket, az efax-gtk az alapértelmezett programokat fogja használni a nyomtatáshoz, illetve a nézegetéshez. Nyomtatásnál meghatározhatja a nagyítási arányt. A 98 értéket a legtöbb nyomtató támogatja. A kívánt értéket a "Beállítások" -> "Nyomtatás" menüpontban tudja beállítani. A fogadott faxokhoz fűzhető megjegyzés. Ezzel könnyebben tudja majd beazonosítani a beérkezett faxokat. Hiba: Figyelem: a jegyzékből?az újrahívási listából érkezett a socketen keresztül. Fax küldése vagy sorba helyezése?vagy %d karakter érkezett küldésre való várakozáskor%s zárolva van vagy foglalt - várakozás?Egy fax érkezett az efax-gtk segítségévelA PostScript nézegető program segítségével nézegetheti a fogadott és az elküldött faxokat. Adja meg azt a parancsot itt, amely megnyitja az Ön által kiválasztott programot. Az alapértelmezett - gv, de ha például GNOME környezetben dolgozik, akkor megadhatja a evince parancsot. KDE esetében a kghostview parancsot javasolt.A nyomtatási feladat a socketen keresztül érkezettAz _efax programrólAz efax programrólAz efax-_gtk programrólNévjegyElfogadásFájl hozzáadása a jegyzékhezFájlok hozzáadása a küldendő faxok jegyzékéhezÚj cím hozzáadásaÚj dosszié létrehozásaKiválasztott fax leírásának létrehozása/módosításaCímjegyzékKapcsolaton belül engedélyezett címek:Alapértelmezett 204x196 felbontás alkalmazása Alapértelmezett A4 papírméret alkalmazása Alapértelmezett PostScript megtekintési parancs alkalmazása: gv albán - Besnik Bleta VálaszolÜzenet bemondásAutomatikusAutomatikus újrahívásAutomatikus újrahívásFax napló kezdése:bolgár - Zdravko Nikolov CAN: adatfogadás törölveCFR - csatorna OKCIG - poller IDCRP - parancsismétlésCSI - válasz IDA beállítások módosítása csak inaktív üzemmódban lehetséges Nyomja meg a Leállítás gombot a beállítások szerkesztéséhezNem nyitható meg a napló olvasáshozNem nyitható meg a naplófájl megtekintéshezNem küldhető fax - egy fax vétele van folyamatban Nem küldhető fax - a modem foglalt. A fax az újrahívási listába került Képességek: katalán - Jordi Sayol Salomo Kijelölt fax kiválasztása küldéshezClass 1Class 2Class 2.0Socket lezárása Konfigurációs hibaCopyright (C) 2001 - 2011 Chris VineCopyright (C) 2001 - 2011 Chris Vine Ez a program a GNU General Public License 2. verzió feltételei szerint került kibocsátásra DBUS hiba: az efax-gtk nem indítható. A DBUS szekciónak futnia szükségesDCN - lekapcsolódásDCS - munkafázis formátumDIS - válasz képességekDTC - poller képességekDátumCím törléseDosszié törlése: Kijelölt cím törlése?Kiválasztott fax törléseKiválasztott dosszié törléseLeírásTárcsázási mód: Hívási előtag:Elfogadja a fenti feltételeket, megjegyzéseket és korlátozásokat?EOM - nincs befejezve, új formátumEOP - rendbenÜrítse ki a mappát a törlése előtt, törölje a benne található mappákat és helyezze át, illetve törölje a mappákban található fájlokatKuka kiürítéseKuka kiürítése? (FIGYELEM: Ezzel a művelettel végleg törli a faxokat a Kukából és a fájlrendszerből)Fax napló vége:_Több fájl beszúrásaVálassza ki a küldendő faxotKövetkező beállítások alkalmazása: Program vagy script végrehajtása fax érkezésekor a modemen keresztülFTT - csatorna nem OKFogadott faxok jegyzékeFax leírása?Fax beviteli módszer: Küldendõ faxFájl Nincs ilyen fájl Küldendő fájlokFinomDossziéA dosszié neve nem tartalmazhatja a következő karaktereket: Dosszié elnevezése? (Figyelem: a dosszié a legfelsőbb szinten helyezkedik el és áthelyezhető más dossziékba)Betűtípus méret:Betűtípus:német - Steffen Wagner görög - Görög Linux Felhasználói Csoport A HDLC keretben nincs kezdeti 0xffhéber - Assaf Gillat magyar - Szakáts Gergely, Csordás László AzonosítóHa ez van beállítva, akkor a program a GTK+ nyomtatási rendszert fogja később használni a parancssorban megadott utasítások szerint a fax nyomtatásáraNem aktívFogadottA címzett faxszámának feltüntetése a fax fejlécénLekérdezési paraméterek:Újrahívási intervallum (perc):Érvénytelen UTF-8 kódolás vétele az EfaxControllerben::read_pipe_cb() Érvénytelen UTF-8 kódolás vétele a Menü ablakban::read_error_pipe_cb() Érvénytelen WORK_SUBDIR paraméter. Paraméter figyelmen kívül hagyása Érvénytelen tárcsázási módÉrvénytelen tárcsázási mód Alapértelmezett tónus-mód alkalmazása Érvénytelen fax felbontás Alapértelmezett 204x196 felbontás alkalmazása Érvénytelen modem osztályÉrvénytelen modem osztály Alapértelmezett Class 2 alkalmazása Érvénytelen paraméter. Érvényes paraméterek: Érvénytelen oldalméretÉrvénytelen papírméret Alapértelmezett A4 papírméret alkalmazása Érvénytelen socket kiszolgáló port lett megadva, a kiszolgáló nem indítható el. Az értéknek 1024 és 65535 között kell lennie Érvénytelen nyomtatási nagyítási paraméterÉrvénytelen nagyítási érték: alapértelmezett 100 érték használata Érvénytelen újrahívási intervallom lett megadva. Az érték 5 és 1440 perc között kell legyen Érvénytelen újrahívási inetrevallum. Az érték 5 és 1440 perc között kell legyen.Érvénytelen csengetésszám Válasz egy csengetés után Érvénytelen csengetésszámÉrvénytelen fax felbontásÉrvénytelen socket kiszolgáló port. Az értéknek 1024 és 65535 között kell lennieÉrvénytelen felhasználót jelölt meg - használjon ASCII karaktereket. A felhasználó neve nem lesz feltüntetve a fax fejlécén, de aggodalomra semmi ok, mivel a faxszám mindig fel lesz tüntetve a fejlécen Érvénytelen felhasználót jelölt meg az "Azonosító" menüben - használjon ASCII karaktereket. Nem lesz gond, ha ezt a mezőt üresen hagyja, mivel a faxszám mindig fel lesz tüntetve a fejlécenolasz - Luca De Rugeriis _Fogadott faxok jegyzékeFogadott faxok jegyzékeElküldött faxok jegyzékeZárt fájl: Naplófájl: NaplózásMCF - oldal OKMPS - nincs befejezveModemModem osztály: Cím mozgatása lefeléCím mozgatása felfeléMozgatás lefeléMozgatás felfeléMulti-Tech bit utasítás beállításaTöbb fájlNSC - poller tulajdonságaiNSF - válasz tulajdonságaiNSS - hívó tulajdonságaiNévNév:Név: Új faxok:Nincs megadva faxszám. Fax küldése a jelenlegi kapcsolaton belül?Nincs nyomtatni való fájlNincs meghatározva a socket kiszolgáló port, a kiszolgáló nem indítható el Nincs meghatározva a soros-port eszköz Érvénytelen fájlnév Érvénytelen PostScript/PDF fájl Figyelem: mentse el a beállításokat az OK gomb megnyomásávalSzámSzám:Szám: Egyéb paraméterek: PIN - oldal nincs rendben, kezelő hívásaPIP - oldal OK, kezelő hívásaPRI-EOM - nincs befejezve, új formátum, kezelő hívásaPRI-EOP - befejezve, kezelő hívásaPRI-MPS - nincs befejezve, kezelő hívásaNYOMTATÁSI FELADATNYOMTATÁSI FELADAT: OldalOldalméret: ParaméterekKiválasztott fax végleges törlése? Végleg törli a kiválasztott faxokat? (FIGYELEM: Ezzel a művelettel végleg törli a faxokat a fájlrendszerből)lengyel - Pawel Suwinski Felugró ablak a nyomtatás előttFelugró ablak fax érkezésekor a modemen keresztülFelugró ablak fax socketről való érkezésekorPort, amelyikre a faxokat küldeni kell:PostScript nézegető program:Súgóhoz nyomja meg az F1 billentyűtNyomtatásNyomtató program: Nagyítás nyomtatásnál (50-100):Betűtípus nyomtatáshozSocketre nyomtatási feladat érkezett Naplófájl nyomtatás _beállításaNyomtatás beállításaKiválasztott fax nyomtatásaKiválasztott fax nyomtatása?PulzusAdja meg a zárt fájl elérési útját. Ha nem adott meg semmilyen értéket, a program az alapértelmezett /var/lock értéket fogja használniÍrja be a küldendő fax fejlécén megjelenő nevet. Használjon ASCII karaktereket. Amennyiben ez problematikus, hagyja üresen ezt a mezőt, mivel a faxszám mindig fel lesz tüntetve a kimenő fax fejlécénAdja meg a küldendő faxok fejlécén megjelenő számot, amely segítségével a fogadó faxok azonosítani tudják a feladótÍrja be a soros eszköz nevét, amelyhez a modem csatlakoztatva van (ha nincs megadva semmilyen érték, akkor az alapértelmezett /dev/modem eszköz kerül alkalmazásra). Az eszköz neve elé ne írja a dev előtagot, csupán annyit: ttyS1 vagy cua2, stb. A Linuxban a ttyS0 megegyezik COM 1-el, a ttyS1 a COM 2-vel, stb.Faxok sorrendje_Sorban várakozikNyomtatási feladatok sorrendjeKilépésRTN - oldal nincs rendben, csatorna ellenőrzéseRTP - oldal OK, csatorna ellenőrzéseÚjrahívás _várakozási sorFogadásAutomatikus fogadásFogadásÚjrahívási várakozási sorElutasításTörlés Fax eltávolítása az újrahívási listábólFax eltávolításaFájl törléseFájl törléseKiválasztott fájl törlése a jegyzékbőlLenullázásParaméterek lenullázása: Új faxok számának lenullázásaBeállítások lenullázásaCsengetések száma (1-9):Socket kiszolgáló indításaorosz - Pavel Vainerman SÚLYOS RENDSZERHIBA! Nem hozható létre a fogadott faxok mappája. Ez a fax nem lesz elmentve! SÚLYOS RENDSZERHIBA! Nem hozható létre a fogadott faxok mappája. A faxok fogadása nem lehetséges! SÚLYOS RENDSZERHIBA! Nem hozható létre az elküldött faxok mappája. Ez a fax nem lesz elmentve! SÚLYOS RENDSZERHIBA! Nem lehet megnyitni a fogadott faxok mappáját. Ez a fax nem lesz elmentve! SÚLYOS RENDSZERHIBA! Nem menthető el egyetlen fogadott fax sem. Az összes fax vagy a faxok egy része el fog veszni! KüldésFax küldéseKüldésFax küldéseKüldendő faxok felbontása: ElküldöttSoros eszköz: Beállításokegyszerűsített kínai - Kite Lau Egy fájlSocketSocket Socket jegyzékA socket a következő porton fut: Adja meg az oldalméretetSzabványosAutomatikus fogadásAutomatikus fogadásLeállítássvéd - Daniel Nylander TSI - hívó IDHívás feldolgozásaTelefonszám: TelefonszámMár létezik ilyen dosszié: A program -s paraméterrel indult el, de nincs a rendszertálcán! A távoli IDA távoli gép ID-je %sItt kiegészítő paramétereket adhat meg az efax számára (lásd: man efax). Ha csak nem valamilyen különleges modemet használ, hagyja üresen ezt a mezőtAmikor a program automatikus fogadásra van beállítva, ezzel a paraméterrel lehet beállítani azt, hogy hány csengetés után adjon faxhangot. Érvényes értékek: 1-9. Alapértelmezett esetben a program 1 csengetés után ad faxhangotEz a parancs végzi a Postscript fájl nyomtatását. Ha nincs megadva semmi, az lpr parancs kerül végrehajtásraItt határozható meg a program naplófájlja, amely tartalmazni fogja a program működése során történt eseményeketItt állítható be, hogy kíván-e látni felugró ablakot fax érkezésekor. Ha igen, akkor jelölje be ezt a négyzetet.Ez az efax program grafikus felülete. Az efax program a GNU General Public License 2. verzió feltételei szerint került kibocsátásra. Szerzője: Ed Casas.A programot Chris Vine írta és adta ki a GNU General Public License 2. verziója alapján. Ez egy front-end az efax programhoz, amelyet Ed Casas készített.Ez meghatározza azt az előhívót, ami hozzárendelődik minden tárcsázott számhoz - például megadhat 9-et, ha olyan kapcsolótáblán keresztül kíván telefonálni, amihez szükséges a 9-et tárcsázni, hogy külső vonalat kapjon, amelyet egy szünet követ.Itt lehet meghatározni a modem lenullázási parancsot (AT). Ha nem ad meg semmit, a program az alapértelmezett Z parancsot fogja használni, amely kompatibilis a legtöbb modemmelEz az opció határozza meg a modem képességeit. További információért tekintse meg a man efax-t és vizsgálja meg a -c paraméter működését. Class 2 modem esetében, ha az efax-0.9 verzióját használja, hagyja üresen ezt a mezőt. Egyéb esetben használja a következő értékeket: 14,400 bps modem esetében: 1,5,0,2,0,0,0,0, lassúbb modem esetében pedig: 1,3,0,2,0,0,0,0Itt lehet meghatározni a modem lekérdezési parancsot (AT), amikor a modem fax üzemmódban működik. Adja meg itt a kívánt értéket. Ha nem ad meg semmit, a program az alapértelmezett Z &FE&D2S7=120 &C0 M1L0' parancsot fogja használni, amely kompatibilis a legtöbb modemmelItt állítható be, hogy melyik porton fog figyelni a socket kiszolgáló. Értéke 1024 és 65535 között kell legyen.Itt állítható be a kimenő faxok felbontása. A "Szabványos" - 204x98, a "Finom" - 204x196Itt állítható be, hogy kér-e megerősítést miután megnyomta a "Kiválasztott fax nyomtatása" gombot. Ha nincs szükség megerősítésre, ne jelölje be ezt a négyzetet.Itt állítható be, hogy kíván-e látni felugró párbeszéd ablakot, amikor a fax a socket kiszolgálón keresztül érkezik. Jelölje be a ezt a négyzetet, ha látni akarja a párbeszéd ablakot. Ha a program nincs beállítva automatikus fogadásra, akkor a párbeszéd ablak segítségével faxokat is küldhet.Itt határozható meg az a program, amely végrehajtásra kerül, ha fax érkezett a modemen keresztül. Jelölje be a négyzetet és adja meg a program nevét, ha végre szeretne hajtani valamilyen programot új fax érkezésekorItt állítható be, hogy futtatni kívánja-e socket kiszolgálót a CUPS vagy egyéb nyomtatási rendszerhez. Jelölje be ezt a négyzetet a kiszolgáló futtatásáhozItt határozható meg, hogy a rendeltetési faxszám megjelenjen-e az elküldött faxok fejlécén. Ne jelölje be, amennyiben nem akarja, hogy ezek az adatok láthatók legyenek (például, ha tartalmazza a hitelkártya elérési kódját)Ha a modem használatban van vagy a címzett foglalt ez a program képes automatikusan újratárcsázni, ha ezt kívánja. Ehhez jelölje be a négyzetet.Itt határozható meg, hogy tónus vagy pulzus tárcsázási módot használ faxok küldésekorItt határozható meg a nagyítási arány a nyomtatásnál, hogy a szöveg beleférjen a nyomtató nyomtatási területéreTónushagyományos kínai - Wei-Lun Chao KukaISMERETLENHasználat: efax-gtk [paraméterek] [fájlnév] Paraméterek: -r Program indítása automatikus fogadás módban -s Program elrejtése a tálcán az indítás után További részletekért olvassa el a README fájlt GTK+ nyomtatási rendszer használataA felhasználó nem jogosult a fájl olvasására NézetKiválasztott fax megtekintéseKiválasztott fájl megtekintéseAz efax-0.9 vagy magasabb verziószám esetében általában az "Automatikus" opciót érdemes kiválasztani. Ilyenkor a program megpróbálja azonosítani a modemet, de kézzel is beállítható a kívánt érték.Nincs beállítva a $HOME környezeti változó _CímjegyzékFájl beszú_rása_Fájl_Súgó_Elküldött faxok jegyzéke_Napló_Naplófájl nyomtatása_Kilépés_Beállítások_FordításokNaplófájl _megtekintésenem normális megsemmisítés (kód %d)aktivitás észlelvebit-megfordított HDLC keret, bit utasítás fordításahívásnem lehet válaszolni: az eszköz zárolása nem lehetségesa következő fájl nem törölhető: %snem határozható meg a modem támogatási osztálynem formázható fájl %s:nem nyitható fájl %s:nem nyitható meg a fájl %s:az oldalt nem lehet megnyitninem tekerhető vissza a fájl %s:a csatorna nem használható %d bps-na csatorna nem használható alacsonyabb sebességenküldéskor beérkezett karakterekcsatlakozása tárcsázási parancs sikertelentárcsázás: %sefax Copyright (C) 1999 Ed Casasefax-gtk súgó: Képességekefax-gtk súgó: Eszközefax-gtk súgó: Tárcsázási módefax-gtk help: Hívási előtagefax-gtk súgó: Program végrehajtása fax érkezésekorefax-gtk súgó: A fax fejléceefax-gtk súgó: Lekérdezési paraméterekefax-gtk súgó: Zárt fájlefax-gtk súgó: Naplófájlefax-gtk súgó: Modem osztályefax-gtk súgó: Névefax-gtk súgó: Számefax-gtk súgó: Egyéb paraméterekefax-gtk súgó: Oldalméretefax-gtk súgó: Felugró ablakefax-gtk súgó: Portefax-gtk súgó: Postscript nézegető programefax-gtk súgó: Nyomtató programefax-gtk súgó: Nyomtatási nagyitásefax-gtk súgó: Fogadási párbeszéd ablakefax-gtk súgó: Újrahívásefax-gtk súgó: Paraméretek lenullázásaefax-gtk súgó: Csengetésekefax-gtk súgó: Socket kiszolgáló futtatásaefax-gtk help: Kimenő faxok felbontásaefax-gtk súgó: Engedélyezett socket kapcsolatokefax-gtk súgó: GTK+ nyomtatási rendszer használataefax-gtk socketefax-gtk: efax-gtk: Cím hozzáadásaefax-gtk: Dosszié hozzáadásaefax-gtk: CímjegyzékFeltételek, megjegyzések és korlátozásokefax-gtk: DBUS hibaefax-gtk: Cím törléseefax-gtk: Fax törléseefax-gtk: Dosszié törléseefax-gtk: Fax leírásaefax-gtk: Fájljegyzékefax-gtk: Faxolandó fájlefax-gtk: Súgóefax-gtk: Fax nyomtatásaefax-gtk: Sorba helyezett fájlok a socketbőlefax-gtk: Fogadott faxok jegyzékeefax-gtk: Újrahívás várakozási sorefax-gtk: Fax eltávolítása az újrahívásból?efax-gtk: Fax sorrend törléseefax-gtk: Elküldött faxok jegyzékeefax-gtk: Fordításokefax-gtk: Kukaefax-gtk: napló megtekintéseefax-gtk: fax érkezettefax-gtk: socketből érkezett nyomtatási feladatokefax-gtk: naplófájl nyomtatásaefax-gtk: beállításokefax-gtk: naplófájl megtekintéseaz exec() hívás sikertelenparancs végrehajtása /bin/sh -c %shibás oldal %sfaxhívás megválaszolvahiba a faxeszközre történő íráskorfájlírás:befejezve - %sáramlás ellenőrzés nem működikkerethibaa keret túl hosszú (%d, > %d max byte)fejléc:inkompatibilis helyi és távoli kapacitásokhelytelen minőségi (-q) paraméter (%s)belső hibaa megszakítási kérelem figyelmen kívül hagyvaérvénytelen modem válaszérvénytelen post-page válaszérvénytelen válasz a DCS-rea keret utolsó byte-ja NULLa helyi ID (%s) nem szabványos karaktereket tartalmaza helyi ID (%s) megcsonkítva a %d karakterekkelhelyi kiszolgáló a modem utasítás "%s" túl hosszúsikertelen modem utasítás (%s)sikertelen modem utasítása modem nem támogatja a faxszolgáltatástmodem válasz adatokbannem érkezett +FPTS válasz, a fax fogadása vélelmezve vannem érkezett XON/DC2 a CONNECT utántávoli fax nem válaszolnincs parancs vagy válasz a távoli géprőlnincs meghatározva getty parancs adathíváshoznincs válasz keretadat utána modem nem válaszolnincs meghatározva voice parancs a hanghíváshoza hívott szám vagy a modem foglalta hívott szám foglaltmegnyitva %segyéboldal elmentve %sfogadási (+FDR) parancs sikertelenfogadott%d sor érkezett %d hibávala fogadott TCF - csatorna ellenőrzése (OK: run of %d in %d)a fogadott TCF - csatorna ellenőrzése (not OK: run of %d in %d)rövid keret érkezett (%d byte)fogadási hibáka távoli gép nem tud fogadni, további próbálkozása távoli gépen nincs küldendő dokumentum, de fogadásra készen álla távoli gépen nincs küldendő dokumentum és fogadásra sem áll készena távoli gépen nincs küldendő anyag, további próbálkozása távoli gépen egy vagy több küldendő dokumentum van és fogadásra készen álla távoli gépen egy vagy több küldendő dokumentum van, de fogadásra nem áll készena távoli gépen egy vagy több küldendő dokumentum vaneltávolított fájl: %sfutási időtartam puffer túlterheléseelküldveelküldve %d+%d sor, %d+%d byte %d másodperc alatt %d bps sebességenelküldve TCF - csatorna ellenőrzése, %d byteelküldött oldal %ssikerszinkron: DTR elvetéseszinkron: a modem nem válaszolszinkron: ESC karakter küldésemegsemmisítve jel általvárakozási idő túllépése a következő parancs után: %svárakozási idő túllépéseidőtartam túllépése adatellenőrzéskoridő túllépése keretadat olvasása soránidőtúllépéssel történő várakozás parancsratúl sok %%d ESC karakter a parancsban (%s)túl sok kísérlet oldal küldésénélnem lehet válaszolni a hívásraváratlan válasz "%s"a parancs nem azonosíthatóértelmezhetetlen hiba%s in class %s használataline buffering alkalmazása a stdout kimenetenhanghívás megválaszolvavárakozás aktivitásrarossz hordozórossz válasz a következő parancs után: %srossz válasz keretadat utánrossz válasz várakozás utánrossz válasz a keretfogadási parancsraefax-gtk-3.2.8/po/zh_TW.gmo0000644000175000001440000012421111544574532012337 00000000000000$ -,"B"($#M# V#a#0q##,#####6$'M& u& &&&&&%&&&& ' 0'='+Z'!'1'' ''((0(N(_(o((^(*(!)0)#N)r)z) )) )n)*-*B*_*y*~***** * *B*<+ W+{b++p+b,x,,6,, ,,- "-.-5- J-W-\-&c-g--# ./.O.,f....:..8.:6/Gq//=/L0`0:~000=021(1>192V2%u2G223n4444 4 44 444 55%555 D5Q5j5y555555 5L5T(6#}666;677 7)7 87Y7-v77!7 7 77 7 8!8g488)8'8*929R9m99999999Z9R:!;; <<<= =5=R=Z= j=t={= = ====== =>>_0>_>[>UL?c?@@ @#@8@A@Q@Z@ y@@@ @@$@@@@ AA+A;A JAWA%hAMAAAGBICD!DE(~FGPpImJh/KKdAMNx;PPMQcQ7S#YYYmYYYYY(YZ+ZGZeZZ Z"Z)Z[ [#[9[N[-e[[[[[[\\,\"@\c\\\\\\&\]2]F]f]u]] ] ]] ]#]^* ^$6^[^j^^^^^)^(_ <_I_e____?_!`(`"B`&e```'``a aa#a4aRa [a2|a6aab%b/=b2mb*b8b;c)@cjc{cc6c$c cd dd:dPdedd$ddd$de9eOehe}eeeee e ef=f,Zff4h2Rh h hh:hh"h$i8i$s/[ss s s(ss>s=tA\tt;tFt!@u:buuu;uv$vAv8wz Kz Xzez zzzzz z z zBzR1{{{ {+{| | ||!/|!Q|.s||"| ||} }} }Q=}}}%}.}~?~]~q~x~~"~~~~O~Iu'x "Ё!!7> Wah o | ؂Y-VYރP8\  )3FM h u %! ' :G Wd>†ՆD-q.c$igg~84r֒I38 ' CMT%+2E&X#  ȗ ӗޗ 63F z!*" &EX(q! ՙߙ 0,N{՚#/Ge+#$Hf)~&,Ϝ 1K(`ѝ'.>m%͞ޞ( 2CX sŸџ ( !(#J n{&ՠ'($MTp7ѡ" ,E+a'¢$  )0@[&b?@ɣ )!6'X*-6٤9'Jrd& -:AUq ֦),BU mz$!ק ,K$dryO#j|MPhK;Sz.]FmYw 3C'sS .Kc#7/j`Wg*pUz!&XoZ[ 8vbANV75eIf!<Y1}>ik *U?'u^R~Q:@k`D_ + LZ n6}i:%LnJl\[IteuE;dQ|"&GF0t]/ ^<x8q=,@3=DT+abET,Wp6q{-gJV"Hd 4(NoAB2M$5OHf )9r$P%~v{s01(h?\4mBXy2R)x  >G-9lwc_aC (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Error: Warning: from the list? has been received on socket. Send or queue fax? or %d characters received while waiting to send%s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Albanian - Besnik Bleta Answer callAnswering callAutoBulgarian - Zdravko Nikolov CAN: data reception cancelledCFR - channel OKCIG - poller IDCRP - repeat commandCSI - answering IDCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Catalan - Jordi Sayol Salomo Choose the selected fax for sendingClass 1Class 2Class 2.0Closing the socket Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DCN - disconnectDCS - session formatDIS - answering capabilitiesDTC - poller capabilitiesDateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?EOM - not done, new formatEOP - doneEmpty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFTT - channel not OKFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)German - Steffen Wagner Greek - Hellenic Linux Users Group HDLC frame missing initial 0xffHebrew - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentityInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Invalid Utf8 received in EfaxController::read_pipe_cb() Invalid Utf8 received in MainWindow::read_error_pipe_cb() Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Invalid user name specified - it must be in plain ASCII characters. No user name will be shown on the fax top header line, but don't worry as the fax station number will always be given on the top header Invalid user name specified in "Identity" tab - it must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerItalian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingMCF - page OKMPS - not doneModemModem Class: Move address downMove address upMove file downMove file upMulti-Tech bit order setMultiple filesNSC - poller featuresNSF - answering featuresNSS - caller featuresNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PIN - page not OK, call operatorPIP - page OK, call operatorPRI-EOM - not done, new format, call operatorPRI-EOP - done, call operatorPRI-MPS - not done, call operatorPRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the name to appear on the fax top header on sent faxes here. It must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitRTN - page not OK, check channelRTP - page OK, check channelReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! Send faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSimplified Chinese - Kite Lau Single fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopSwedish - Daniel Nylander TSI - caller IDTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether the destination fax number is included in the top fax header line for sent faxes. Uncheck the box if you do not want this to be shown (say because it includes a pay card access number)This specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTraditional Chinese - Wei-Lun Chao TrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class hereYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsabnormal termination (code %d)activity detectedbit-reversed HDLC frame, reversing bit ordercalledcan't answer: can't lock devicecan't delete file %s:can't determine fax modem class supportcan't get format of file %scan't open file %s:can't open output file %s:can't open pagecan't rewind file %s:channel not usable at %d bpschannel not usable at lowest speedcharacters received while sendingconnecteddial command faileddialing %sefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingsexec() call failed:executing command /bin/sh -c %sfailed page %sfax call answeredfax device write error:file write:finished - %sflow control did not workframe errorframe too long (%d, > %d max bytes)header:incompatible local and remote capabilitiesincorrect quality (-q) argument (%s)internal errorinterrupt request ignoredinvalid modem responseinvalid post-page responseinvalid response to DCSlast byte of frame is NULLlocal ID (%s) has non-standard characterslocal ID (%s) truncated to %d characterslocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxmodem response in datano +FPTS response obtained, it is assumed that fax was receivedno XON/DC2 received after CONNECTno answer from remote faxno command or response from remoteno getty command defined for data callno response after frame datano response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceive (+FDR) command failedreceivedreceived %d lines with %d errorsreceived TCF - channel check (OK: run of %d in %d)received TCF - channel check (not OK: run of %d in %d)received short frame (%d bytes)reception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremote has one or more documents to send.removed file: %srun length buffer overflowsentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent TCF - channel check of %d bytessent page %ssuccesssync: dropping DTRsync: modem not respondingsync: sending escapesterminated by signaltimed out after command: %stimed out after waitingtimed out during training check datatimed out reading frame datatimed out waiting for commandtoo many %%d escapes in command (%s)too many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing %s in class %susing line buffering of stdoutvoice call answeredwaiting for activitywrong carrierwrong response after command: %swrong response after frame datawrong response after waitingwrong response to command to receive a frameProject-Id-Version: efax 3.0.9 Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2006-05-24 10:56+0800 Last-Translator: Wei-Lun Chao Language-Team: Chinese (traditional) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; (注意:這將永久從系統刪除此傳真) *** 正在停止傳送/接收作業階段 *** 錯誤: 警告: 從清單中?已經在通訊端接收到。 傳送還是排入佇列?或是 等待傳送時收到 %d 個字元%s 已鎖定或是忙線 - 等待中?efax-gtk 剛剛接收到一個傳真postscript 檢視器是用來從傳真清單裡檢視已收或外送傳真,而且也用來檢視在"要傳真的檔案"選擇視窗裡的外送傳真。在這裡指定用來檢視 postscript 檔案的命令。如果沒有指定,程式將預設用「gv」。或是您可能需要指定「evince」(Gnome postscript 檢視器)或是「kghostview」(KDEpostscript 檢視器)。如果您使用 gv,您可能需要用 '-media A4' 或是 '-media Letter' 的選項來選擇正確的頁面尺寸。evince 和 kghostview 則可以自動辨識。通訊端收到列印任務關於 efax(_E)關於 efax關於 efax-gtk(_G)關於 efax-gtk接受加入檔案到清單加入檔案到檔案清單來傳送加入新地址加入新資料夾加入/修改所選傳真的描述通訊錄允許連線的地址採用預設傳真解析度 204x196 採用預設頁面尺寸 A4 採用預設的 postscript 檔案檢視命令 'gv' 阿爾巴尼亞文 - Besnik Bleta 應答傳真正在應答傳真自動保加利亞文 - Zdravko Nikolov CAN: 資料接收被取消CFR - 線路正常CIG - 輪詢身分CRP - 重複命令CSI - 應答身分不能變更設定,除非程式處於非起動狀態 按停止鍵來使它不起動不能傳送傳真-正在接收傳真中 功能:嘉泰羅尼亞文 - Jordi Sayol Salomo 選擇所選傳真來傳送級別 1級別 2級別 2.0正在關閉通訊端 設定錯誤版權 (C) 2001 - 2011 Chris Vine 這個程式以 GNU 公共版權,版本 2 發佈 DCN - 中斷連線DCS - 作業階段格式DIS - 應答功能DTC - 輪詢功能日期刪除地址刪除資料夾:刪除所選地址嗎?刪除所選傳真刪除所選資料夾描述撥號模式:您接受以上的條件﹑注意和免責條款嗎?EOM - 未完成、新格式EOP - 完成刪除所有子資料夾來清空資料夾 並且在刪除資料夾前拖曳或是刪除裡面的傳真清空垃圾匣清空垃圾匣嗎? (注意:這將永久性從系統刪除所有垃圾匣裡的傳真)輸入多個檔案(_M)輸入已選傳真來傳送輸入設定來自當數據機收到傳真時 執行一個程式或命令稿FTT - 線路異常傳真清單傳真描述?傳真輸入方式:外送傳真檔案 檔案不存在 待發檔案精細資料夾資料夾名稱不能包含字元:資料夾名稱? (注意:這個將被置於頂部 而且可以被拖曳到其他檔案夾)德文 - Steffen Wagner 希臘文 - Hellenic Linux Users Group HDLC 圖框缺少起始的 0xff希伯來文 - Assaf Gillat 匈牙利文 - Gergely Szakats, Laszlo Csordas 身分未起動收件匣在頁眉包含目的地 的傳真號碼初始參數:在 EfaxController::read_pipe_cb() 中接收到無效的 Utf8 在 MainWindow::read_error_pipe_cb() 中收到無效的 Utf8 指定了無效的工作子目錄:。WORK_SUBDIR: 將被忽略 指定了無效的撥號模式指定了無效的撥號模式 採用預設的撥號模式 指定了無效的傳真解析度 採用預設傳真解析度 204x196 指定了無效的數據機級別設定了無效的數據機級別 採用預設的級別 2 不明選項。選項是: 指定了無效的頁面尺寸指定了無效的頁面尺寸 採用預設頁面尺寸 A4 指定的通訊端伺服器連接埠號碼無效,所以伺服器將不會啟動。連接埠號碼必須介於 1024 和 65535 之間 指定了無效的列印收縮參數指定了無效的列印頁面收縮值:採用預設的值 100 指定了無效的響鈴次數 鈴響一聲後將應答 指定了無效的鈴聲次數指定了無效的外送傳真解析度指定了無效的通訊端連接埠號碼。它必須介於 1024 與 65535 之間指定了無效的使用者名稱 - 它必須單純以 ASCII 字元組成。在傳真頁眉列將不會顯示任何使用者名稱, 但是不用擔心,因為傳真機台號碼總是會出現於頁眉中 在「身分」分頁中指定了無效的使用者名稱 - 它必須單純由 ASCII 字元組成。如果有困難就保持它為空白,因為傳真機台號碼將會總是出現在頁眉義大利文 - Luca De Rugeriis 列出已收傳真(_R)列出已接收傳真列出已傳送傳真加鎖檔案:日誌檔案:日誌MCF - 頁面正常MPS - 未完成數據機數據機級別:下移地址上移地址下移檔案上移檔案Multi-Tech 位元順序組多個檔案NSC - 輪詢特點NSF - 應答特點Nss - 來電特點名稱名稱:名稱:新傳真:沒有指定傳真號碼。您要發傳真到開放的連線嗎?沒有指定通訊端伺服器的連接埠號碼,所以將不會啟動伺服器 沒有指定序列埠裝置於無效檔案名稱 無效的 postscript/PDF 檔案 注意:按 OK 鍵將儲存設定到檔案號碼號碼:號碼:其它參數:PIN - 頁面異常、呼叫總機PIP - 頁面正常、呼叫總機PRI-EOM - 未完成、新格式、呼叫總機PRI-EOP - 完成、呼叫總機PRI-MPS - 未完成、呼叫總機列印任務列印任務:頁面頁面尺寸:參數永久刪除所選傳真? 永久刪除此傳真嗎? (注意:這將永久從系統刪除此傳真)波蘭文 - Pawel Suwinski 列印前跳出確認對話窗數據機收到傳真時 跳出視窗從通訊端收到傳真時 跳出對話視窗發送傳真的 連接埠號碼Postscript 檢視器程式:求助請按 F1 鍵列印列印程式:列印收縮(50-100):通訊端所接收的列印任務 列印所選傳真列印所選傳真?脈衝在此指定加鎖檔案的目錄。如果留白,程式預設使用 /var/lock在這裡輸入出現於外送傳真頁眉的名稱。它必須單純由 ASCII 字元組成。如果有困難就保持它為空白,因為傳真機台號碼將會總是出現在頁眉在這裡輸入要在外送傳真頁眉上顯示的號碼。這也將包括應答傳真機顯示給對方的身分。在此指定數據機所連線的序列埠裝置(如果留白,程式將預設使用 /dev/modem)。不要在此包括裝置名稱的「/dev/」部分,也就是只宣告「ttyS1」, 或是「cua2」…等等。在 Linux 下,ttyS0 等同於 COM 1﹑ttyS1 等同於 COM 2…以此類推。佇列傳真將通訊端傳真排入佇列(_F)排入佇列的列印任務離開RTN - 頁面異常、偵測線路RTP - 頁面正常、偵測線路接收進入待機接收狀態接收中拒絕移除刪除檔案刪除檔案從清單中刪除所選檔案重置重置參數:重置新的傳真數目重置設定鈴聲(1-9):執行通訊端伺服器俄文 - Pavel Vainerman 嚴重系統錯誤:無法建立目錄來儲存已收傳真。 無法儲存此傳真! 嚴重系統錯誤:無法建立目錄來儲存已收傳真。 無法接收傳真! 嚴重系統錯誤:無法建立目錄來儲存已收傳真。 不能儲存此傳真! 嚴重系統錯誤:無法開啟已收傳真目錄。 不能儲存此傳真! 系統嚴重錯誤:無法儲存已收的所有傳真。 所有或部分傳真將丟失! 傳送傳真傳送中正在傳送傳真外送傳真解析度:寄件匣序列埠裝置:設定簡體中文 - Kite Lau 單一檔案通訊端通訊端 通訊端清單通訊端伺服器執行於連接埠 在此指定傳真的頁面尺寸標準待機正在待機接收停止瑞典文 - Daniel Nylander TSI - 來電身分接起電話電話號碼:電話號碼下列資料夾已經存在:這個程式以 -s 的選項啟動,但沒有系統列可用 遠端的身分是遠端身分是 %s這裡可以用來傳遞任何其它的參數給 efax(用「man efax」來檢視可用參數)。可以指定多個參數,而用空格隔開不同參數--例如包含「-or」來做一些在接收傳真時 Multitech 數據機所需要的位元反轉。除非您有一個不平常的數據機,那就讓它留白。這裡設定了在待機接收模式下數據機應答前的響鈴次數。允許的值為 1 到 9。如果沒有指定,程式預設為 1。這是用來接收並列印來自標準輸入的 postscript 檔案的命令。如果留空,程式預設為"lpr"這個參數指定了記錄傳真交涉、狀態、錯誤和警告的日誌檔案。如果沒有指定,那麼將沒有日誌記錄。(一個日誌檔案也可以透過重新導向到 stdout 和 stderr--更多細節請看 README 檔案)這個參數指定當數據機收到傳真時,是否彈出對話視窗。如果是,請勾選。這裡指定了將重置數據機的「AT」命令。可以指定多個命令,不同命令用空格隔開,但不加「AT」字首。如果沒有指定,程式將預設用「Z」,這個將適用於大部分數據機。這個設定數據機的功能。想知道是什麼意思,請執行「man efax」,檢視「-c」選項。在 efax-0.9 和一個 Class 2 數據機之下,您一般不用指定這個,留白即可,因為程式會詢問數據機。如果使用舊版本的 efax 或是一個不同級別的數據機,和典型的任何較慢的 14,400 bps 的數據機能工作的值是 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0。這裡指定了在傳真機模式下用於數據機的起始「AT」命令。可以指定多個命令,不同命令用空格隔開,但不加「AT」字首。如果沒有指定,程式將預設用「Z &FE&D2S7=120 &C0 M1L0」,這個將適用於大部分數據機。這裡指定了通訊端伺服器監聽的連接埠號碼。它應該要介於 1023 與 65535 之間。這裡指定了外送傳真的解析度。"標準" 代表 204x98,而"好" 代表 204x196 的解析度這指定在已收傳真或外送傳真清單裡,當按"列印所選傳真"按鈕時是否在列印前彈出確認對話視窗。如果您不想要彈出視窗就去勾選(如果您指定了一個外部列印管理器,例如在列印程式選框裡指定了'kprinter',那麼您將不需要此勾選)。這裡指定了,當經過通訊端伺服器接收到來自列印系統的傳真任務時,是否彈出對話視窗。如果是就勾選(如果您也勾選了執行通訊端伺服器,這裡將不生效)。如果程式沒起動傳真可以從這個視窗直接傳送。這裡指定當數據機收到傳真時,程式是否執行一個程式或命令稿。如果您想要執行一個程式,就勾選此方框並輸入程式名稱。efax-gtk 附有兩個命令稿:print_fax 與 mail_fax,它們可以用來自動列印接收到的傳真,或者將它郵寄給某位使用者 (因此您可以在這裡輸入 'mail_fax' 以郵寄傳真)。參看 README 檔案以獲得詳細資料。這裡指定了是否需要為 CUPS 或其它列印系統執行一個通訊端伺服器。如果需要就勾選。這裡指定了是否在外送傳真的頁眉包含目的地的傳真號碼。如果您不想要這個被顯示就去勾選(例如因為它包含了一個付費卡的先撥號碼)。這裡指定用音頻或脈衝來撥號傳送傳真這決定了適應印表機的列印範圍所作的收縮程度。這是個百分比--例如 98 將把頁面收縮至實際尺寸的 98%。如果留空,將不做任何收縮(也就是說您可以-但不必-指定 100)音頻繁體中文 - 趙惟倫 垃圾匣不明用法: efax-gtk [選項] [檔名] 選項: -r 啟動程式到待機接收狀態 -s 啟動程式並隱藏於系統匣 檢視程式附帶的讀我檔案來了解更多細節 使用者對此檔案無讀取權限 檢視檢視所選傳真檢視所選檔案在 efax-0.9 或以上的版本,您一般需要選擇「自動」,efax 會自動判斷數據機的級別,但您也可以強制使用自己指定的級別。然而 efax-0.8 會預設級別 2,所以如果您在舊版本的 efax 裡使用級別 1 的數據機,請在這裡指定級別。您沒有設定 $HOME 環境變數 通訊錄(_A)輸入單一檔案(_E)檔案(_F)求助(_H)列出外送傳真(_L)離開(_Q)設定(_S)翻譯(_T)不正常終止 (代號 %d)偵測到動作位元反轉的 HDLC 圖框,反轉位元順序中已呼叫無法應答:無法鎖定裝置不能刪除檔案 %s:不能確定傳真數據機的支援級別無法獲得檔案 %s 的格式:無法開啟檔案 %s:無法開啟輸出檔案 %s:無法開啟頁面無法倒帶檔案 %s:線路速度 %d 位元組時無法使用線路速度最低時無法使用傳送時收到的字元已連線撥號命令失敗撥往 %s 中efax-gtk 說明: 功能efax-gtk 說明: 裝置efax-gtk 說明: 撥號模式efax-gtk 說明: 傳真收到時執行程式efax-gtk 說明: 傳真頁眉efax-gtk 說明: 起始參數efax-gtk 說明: 加鎖檔案efax-gtk 說明: 日誌檔案efax-gtk 說明: 數據機的級別efax-gtk 說明: 名稱efax-gtk 說明: 號碼efax-gtk 說明: 其它參數efax-gtk 說明: 頁面尺寸efax-gtk 說明: 彈出視窗efax-gtk 說明: 連接埠efax-gtk 說明: Postscript 檔案檢視器efax-gtk 說明: 列印程式efax-gtk 說明: 列印收縮efax-gtk 說明: 接收彈出視窗efax-gtk 說明: 重置參數efax-gtk 說明: 響鈴efax-gtk 說明: 執行通訊端伺服器efax-gtk 說明: 外送傳真解析度efax-gtk 說明: 通訊端允許的連線數efax-gtk 通訊端efax-gtk: efax-gtk: 加入地址efax-gtk: 加入資料夾efax-gtk: 通訊錄efax-gtk: 條件﹑注意和免責條款efax-gtk: 刪除地址efax-gtk: 刪除傳真efax-gtk: 刪除資料夾efax-gtk: 傳真描述efax-gtk: 檔案清單efax-gtk: 待傳檔案efax-gtk: 求助efax-gtk: 列印傳真efax-gtk: 排入佇列的通訊端傳真任務efax-gtk: 已收傳真清單efax-gtk: 移除已佇列傳真任務efax-gtk: 外送傳真清單efax-gtk: 翻譯efax-gtk: 垃圾匣efax-gtk: 傳真收到efax-gtk: 通訊端接收到列印任務efax-gtk: 設定exec() 呼叫失敗:執行命令 /bin/sh -c %s失敗頁 %s應答了傳真呼叫傳真裝置寫入錯誤:檔案寫入:已完成 - %s流程控制沒起作用圖框錯誤圖框太長 (%d, > %d 最大位元組) 頁眉:不相容的本地和遠端功能不正確的品質 (-q) 參數 (%s)內部錯誤插斷請求被忽略無效的數據機反應無效頁後反應給 DCS 的反應無效圖框的最後一個位元組為 NULL本地身分 (%s) 有非標準的字元本地身分 (%s) 被縮成 %d 個字元本機數據機命令 "%s" 太長數據機命令 (%s) 失敗數據機命令失敗數據機不支援傳真數據機資料反應沒有獲得 +FPTS 反應,就當做傳真被收到了CONNECT 之後沒有收到 XON/DC2遠端傳真沒有應答遠端沒有命令或反應沒有設定 getty 命令用來呼叫資料圖框資料之後沒有反應數據機沒有反應語音呼叫裡沒有設定語音命令號碼忙碌中或數據機佔用中號碼忙線已開啟 %s其它頁儲存到 %s接收 (+FDR) 命令失敗已收接收了 %d 列,並有 %d 個錯誤已收 TCF - 線路偵測 (正常: 執行了 %2$d 中的 %1$d)已收 TCF - 線路偵測 (異常:執行了 %2$d 中的 %1$d)已收短圖框 (%d 位元組)接收錯誤遠端無法接收,但嘗試中遠端沒有檔案傳送而且能接收遠端沒有檔案傳送而且不能接收遠端沒有任何東西傳送,但嘗試中遠端有一個或更多檔案要傳送而且能接收遠端有一個或更多檔案要傳送而且不能接收遠端有一個或多個檔案要傳送已刪除檔案:%s執行長度溢出已送以每秒 %6$d 位元組的速度,耗時 %5$d 秒,傳送了 %1$d+%2$d 列和 %3$d+%4$d 位元組外送 TCF - 線路偵測 %d 位元組外送頁 %s成功同步:拋棄 DTR同步:數據機不反應同步:傳送跳脫被信號終止命令:%s 之後逾時等待逾時偵測資料程序逾時讀取圖框資料逾時等待命令逾時在命令 (%s) 裡太多 %%d 跳脫字元太多頁傳送重試無法應答呼叫未預知的反應 "%s"不明命令不可回復的錯誤使用 %2$s 級別的 %1$s 數據機使用標準輸出的列緩衝區應答了語音呼叫等待動作中錯誤的載體命令:%s 之後錯誤反應圖框資料之後反應錯誤等待之後錯誤反應對接收圖框的命令反應錯誤efax-gtk-3.2.8/po/it.gmo0000644000175000001440000013351611544574531011727 00000000000000 [hBi([_ 1*P.@0:60J6{6#666'8 9 99*999@9%R9x99&9 99+9!:16: h:t::^:*:#*;N;V; ^; h;nu;;;<<0< G< S<B_<{<=p1====6= >)>:> M>Y>`> u>>&>g>#?A9-BgB%BGBBC%C9C IC UC`C hCvCCC CCCCCLCT"D#wDDD;D EEE#E 2E e/e'fXjn-yS}s dJr݄"ćڇ "*%Ek7ۈ&@ /K<{ʉq6u&ӊ܊ t ~ۋ >R݌^Ph> ڍ (<L7Uu#' ?I R_R/ҏhqk+ݐQ %[)X1]֒L4,*Rٓ,I`v Ք %*0j7a!&?D_Ζݖ "j3/:?# c$Ƙ#$> Ywdܙ1ޛ   '19 AN'^ Μ " ; G U bo v / ڝ (';Vcw2]<ZXIQXMڪU+7Ʈ. u0Ʊͱ  )<=f-Ҳ &;Rr)' #0"Tw('0.J(\ҵ+ @aж,&8Hqv}"A^#5&'h@w`rX7a_yBU9|.2[) j6{u>W3pM ,PC]/KL\~l-k!Vo(Fd*ZiDzeSf :+;c0 J4gIbmRT=H8YQ?xE$%G nt1 NOs< (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. from the list? has been received on socket. Send or queue fax? or A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Answer callAnswering callBulgarian - Zdravko Nikolov Can't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Choose the selected fax for sendingClass 1Class 2Class 2.0Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 Delete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?Empty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)Greek - Hellenic Linux Users Group Hebrew - Assaf Gillat IdentityInactiveInboxInitialization Params:Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Italian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingModem Class: Move address downMove address upMove file downMove file upMultiple filesNameName:Name: No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman Send faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSingle fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandbyStanding by to receive callsStopTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! This can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTrashUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class here_Address book_Enter single file_Help_List sent faxes_Quit_Settings_Translationsefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingslocalhost otherProject-Id-Version: efax-gtk Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2005-02-20 14:50+0100 Last-Translator: Luca De Rugeriis Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (NOTA: Ciò eliminerà permanentemente il fax dal filesystem) *** Sessione di invio/ricezione terminata*** Ricevere i fax -------------- Sono forniti tre modi per ricevere i fax. Primo, il programma può essere impostato in modo da rispondere ad una chiamata che sta squillando ma alla quale non è stato ancora risposto, premendo il tasto "Rispondi chiamata". Secondo, il programma può prendere una chiamata alla quale è stato già risposto (per es. alzando la cornetta) premendo il tasto "Rileva chiamata". Terzo, il programma può essere lasciato in modalità in attesa premendo il tasto "In attesa". Così risponderà automaticamente a qualsiasi chiamata dopo il numero di squilli specificato nel file efax-gtkrc, ricevendo il fax. Il programma continuerà a ricevere fax finché non verra premuto il tasto "Ferma". I fax ricevuti in formato tiffg3 (un file per pagina) vengono copiati in una directory sotto la directory $HOME/faxin, il cui nome è derivato dall' anno, mese, giorno, ora e secondi in cui la ricezione del fax è stato completato. I fax ricevuti possono essere visualizzati, descritti e gestiti tramite l' utilità lista fax inclusa. Questa può essere invocata dall' elemento del menù a tendina `File/Mostra fax ricevuti'. Vedi "Utilizzare la lista dei fax" più avanti. Inviare i fax ------------- Per inviare un fax, questo deve essere specificato nella casella "Fax da inviare". Il file deve essere in formato postscript/PDF (un formato prodotto da qualunque word processor su Unix/Linux), esso sarà poi convertito dal programma nel formato fax corretto tiffg3. Ci sono due metodi per inserire i fax. Primo, il fax da inviare può essere un file salvato sul filesystem. Può essere inserito manualmente nella casella "Fax da inviare" oppure tramite la finestra di selezione file. Se il file consiste in un singolo file postscript/PDF, allora lo si può selezionare premendo il tasto "File singolo". Il file sarà trovato più facilmente tramite questa finestra di dialogo se esso è salvato nella directory $HOME/faxout. Se nella casella "Fax da inviare" viene specificato più di un file, essi saranno inviati come un fax singolo, con i file concatenati nell'ordine in cui sono stati inseriti nella casella. Questi file multipli possono essere selezionati più facilmente usando la lista dei file invocata premendo il tasto "File multipli". Premendo il tasto "File multipli" si possono aggiungere i file trovati alla lista, essi potranno essere riordinati usando i tasti a freccia Su e Giù, oppure trascinandoli con il mouse. Come alternativa, i fax possono essere ricevuti direttamente dal sistema di stampa tramite un socket server fornito dal programma. Efax-gtk mantiene una lista dei fax in coda ricevuti dal socket alla quale si può accedere scegliendo "Socket" come metodo di inserimento dei fax, e successivamente premendo il tasto "lista socket" che invocherà la lista dei fax in coda. Questo è un metodo conveniente per inviare i fax da un programma di videoscrittura, poichè permette di inviare un fax, tramite efax-gtk, stampando dal programma di video scrittura. Per altri particolari su come configurare CUPS o lpr/lprng per spedire fax tramite efax-gtk, consultare il file README incluso nella distribuzione. Il numero di telefono al quale il fax dovrà essere inviato, deve essere inserito nella casella "Numero di tel". Esso può essere inserito direttamente nella casella, oppure usando la rubrica integrata. La rubrica può essere invocata premendo il tasto "Numero di tel", o dall'elemento del menù a tendina `File/Rubrica'. Vedi "Utilizzare la rubrica" più avanti. Comunque se è stata già stabilita una connessione telefonica in precedenzacon la macchina che dovrà ricevere i fax, allora i fax possono essere inviati senza comporre il numero di telefono, lasciando la casella "Numero di tel." in bianco. (verrà presentata una finestra di dialogo che chiederà se si vuoleinviare il fax senza prima comporre il numero di telefono) Quando un fax viene ricevuto dal sottosistema di stampa tramite il socket server,il programma può essere configurato in modo da visualizzare una finestra di dialogo automaticamente.Se il programma è inattivo o è in modalità stand-by in ricezione, il fax può esserespedito direttamente tramite questo dialogo senza bisogno di utilizzare la lista dei fax ricevuti dal socket. I fax inviati con successo vengono copiati in una directory sotto la diretory $HOME/faxsent, il cui nome sarà derivato dall'anno, mese, giorno, ora e secondi in cui l'invio del fax è stato completato e appariranno nella lista dei fax inviati. Essi saranno inclusi in questa lista solo se sono stati inviati senza errori. La casella di visualizzazione dei messaggi di efax darà delle indicazioni sul progresso dell'invio dei fax. La lista dei fax inviati può essere invocata dall'elemento del menù a tendina `File/Mostra i fax inviati'. Vedi "Utilizzare la lista dei fax" più avanti. Impostazioni ------------ Le impostazioni del programma possono essere modificate editando il file di configurazione di efax-gtk che comprende $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc o /etc/efax-gtkrc. Il file viene cercato in questo ordine, quindi $HOME/.efax-gtkrc ha la precedenza sugli altri due. Il file di configurazione può anche essere impostato usando il dialogo Impostazioni lanciato dall' elemento del menù a tendina `File/Impostazioni'. Le impostazioni inserite usando questo dialogo verranno salvate sempre in $HOME/.efax-gtkrc. Allo stesso modo, se è stato usato il dialogo Impostazioni, e vuoi ritornare alle impostazioni globali, ciò può essere fatto sia cancellando il file $HOME/.efax-gtkrc, sia premendo il tasto `Reset' nel dialogo Impostazioni, il quale ricaricherà le impostazioni dal file di configurazione globale (da $sysconfdir/efax-gtkrc o da /etc/efax-gtkrc). Un aiuto mentre si inseriscono le Impostazioni può essere ottenuto mantenendo il mouse sopra il tasto di aiuto (?) pertinente, il quale mostrerà un suggerimento, o premendo il tasto, il quale mostrerà una finestra di informazioni Utilizzare la rubrica --------------------- Per utilizzare un numero telefonico dalla rubrica, selezionare l' indirizzo interessato premendo il tasto sinistro del mouse sopra di esso, e quindi premere il tasto "OK". Gli indirizzi possono essere aggiunti alla rubrica premendo il tasto aggiungi, e poi completando i campi della finestra di dialogo che apparirà. Per cancellare un indirizzo dalla rubrica, selezionare l' indirizzo interessato e premere il tasto cancella (cestino). La rubrica può essere ordinata usando i tasti freccia in su e freccia in giù su di un indirizzo selezionato. Utilizzare la lista dei fax --------------------------- Per richiamare la lista dei fax, vai sul menù `File' e scegli gli elementi `Mostra fax ricevuti' o `Mostra fax inviati'. Seleziona il fax da stampare o da visualizzare premendo il tasto sinistro del mouse. I programmi che verrano utilizzati per stampare o visualizzare i fax sono specificati nel file di configurazione efax-gtkrc, o, se non vengono specificati, il programma stamperà con lpr (che funzionerà per la maggioranza dei sistemi Unix) e visualizzerà con gv. Per stampare i fax, un parametro PRINT_SHRINK può essere specificato in efax-gtkrc, in modo da far rientrare la pagina del fax nei margini della stampante. Un valore del parametro pari a 98 funzionerà con la maggioranza delle stampanti. Questo può essere cambiato mentre il programma sta girando, invocando il dialogo `Impostazioni' ed inserendolo nella casella `Stampa/Riduzione Stampa'. Una descrizione può essere aggiunta (o successivamente modificata) ad un fax ricevuto, quando questo appare nella lista dei fax, premendo il tasto pertinente -- ciò renderà più facile il riconoscimento dei fax. dalla lista? è stato ricevuto dal socket. Si vuole spedire il fax o metterlo in coda? o Efax-gtk ha ricevuto un faxUn visualizzatore postscript è utilizzato per vedere, tramite la lista dei fax, i fax ricevuti ed inviati, ed anche per vedere i fax da inviare individuati tramite la finestra di dialogo "File da inviare". Specifica qui i comandi che dovranno essere usati per visualizzare i file postscript. Se non vengono specificati il programma utilizzerà 'gv' come predefinito. Altre possibilità che potresti voler usare sono 'evince' (il visualizzatore postscript di Gnome) oppure 'kghostview' (il visualizzatore postscript di KDE). Se usi gv, potresti aver bisogno di usare l' opzione '-media A4' oppure '-media Letter' per selezionare il formato corretto della pagina. evince e kghostview lo fanno automaticamenteCoda di stampa ricevuta sul socketInformazioni su _efaxInformazioni su efaxInformazioni su efax-_gtkInformazioni su efax-gtkAccettaAggiungi i file alla listaAggiungi i file da inviare alla listaAggiungi un nuovo indirizzoAggiungi una nuova cartellaAggiungi/correggi la descrizione per il fax selezionatoRubricaIndirizzi autorizzati alla connessioneUtilizzo una risoluzione per i fax di 204x196 come predefinita Utilizzo il formato pagina a4 come predefinito Utilizzo il visualizzatore postscript 'gv' come predefinito Rispondi chiamataSto rispondendo alla chiamataBulgaro - Zdravko Nikolov Non è possibile cambiare le impostazioni se il programma è attivo Premi il pulsante Ferma per renderlo inattivoNon è possibile inviare fax - ricezione fax in corso Scegli il fax selezionato per inviarloClasse 1Classe 2Classe 2.0Errore di configurazioneCopyright (C) 2001 - 2011 Chris Vine Questo programma è rilasciato sotto la GNU General Public License, versione 2 Elimina indirizzoElimina cartellaElimina indirizzo selezionato?Elimina il fax selezionatoElimina cartella selezionataDescrizioneComposizione: Accetti le Condizioni, le Note e i Disclaimers mostrati sopra?Svuota la cartella eliminando tutte le sottocartelle e trascinando o eliminando ogni fax in essa contentuto prima di eliminare la cartellaSvuotare il cestinoSvuotare il cestino? (NOTA: Tutti i fax nel cestino verranno eliminati in maniera permanente)Aggiungi file m_ultipliInserisci il fax selezionatoInserisci opzioni da Esegue un programma o uno script quando il modem riceve un faxLista FaxDescrizione fax?Metodo di inserimento fax: Fax da inviareDa fileIl file non esiste File da inviareCartellaIl nome della cartella non può contenere il carattere:Nome cartella?(NOTA: la cartella verrà creata al livello più alto e potrà essere trascinata dentro altre cartelle)Greco - Hellenic Linux Users Group Ebraico - Assaf Gillat IdentitàInattivoFax ricevutiParametri di Inizializzazione: La directory WORK_SUBDIR: specificata non è valida. WORK_SUBDIR: verrà ignorata Il tipo di composizione specificato è invalidoLa modalità di composizione specificata non è valida Utilizzo la composizione a toni come predefinita La risoluzione per i fax specificata è invalida Utilizzo una risoluzione per i fax di 204x196 come predefinita La classe del modem specificata è invalidaLa classe del modem specificata è ivalida Utilizzo la Classe 2 come predefinita Opzione non valida. Le opzioni sono: Il formato pagina specificato è invalidoIl formato pagina specificato è invalidoUtilizzo il formato pagina a4 come predefinito E' stata specificata una porta invalida per il socket server, quindi il server non verrà avviato. Il numero della porta deve essere compreso tra 1024 e 65535 Il parametro di riduzione specificato è invalidoLa riduzione della pagina specificata non è valida: utilizzo il valore 100 come predefinito Il numero di squilli specificato non è valido Risponderò dopo uno squillo Il numero di squilli specificato è invalidoLa risoluzione del fax spedito è invalidaLa porta del socket specificata è invalida. Deve essere compresa tra 1024 e 65535Italiano - Luca De Rugeriis _Mostra i fax ricevutiMostra i fax ricevutiMostra i fax inviatiFile di Lock: File di Log: LogClasse Modem: Muovi l'indirizzo in giùMuovi l'indirizzo in suMuovi il file in giùMuovi il file in suFile multipliNomeNome:Nome: Non è stato specificato nessun numero per il fax. Si vuole inviare il fax su una chiamata già esistente?Non è stata specificata nessuna porta per il socket server, quindi il server non verrà avviato Nessuna porta seriale specificataNome di file non valido File postscript/PDF non valido Nota: premendo il tasto OK le impostazioni verranno salvate nel fileNumeroNumero:Numero: Altri Parametri: CODA DI STAMPACODA DI STAMPA: PaginaFormato Pagina: ParametriEliminare permanentemente il fax? Eliminare permanentemente i fax selezionati? (NOTA: Ciò eliminerà permanentemente i fax dal filesystem)Polacco - Pawel Suwinski Apri una finestra di conferma prima di stampareApre una finestra di dialogo quando il modem riceve un faxApri una finestra di dialogo quando si riceve un fax dal socketPorta alla quale inviare i fax:Visualizzatore Postscript Programma:Premi F1 per l' aiutoStampaProgramma per la Stampa: Restringimento Stampa (50-100):Coda di stampa ricevuta sul socket Stampa il fax selezionatoStampa il fax selezionato?PulsazioniInserisci qui la directory del file lock. Se non viene specificata, il programma utilizzerà /var/lock come predefinitoInserisci qui il numero che apparirà sull' intestazione dei fax inviati. Questo comprenderà anche l' identificativo di stazione riportato alla macchina che spedisce i fax quando si stanno ricevendo dei faxInserisci qui il nome del dispositivo seriale al quale è connesso il modem (se non viene inserito, il programma utilizzerà /dev/modem). Non includere la parte `/dev' del nome del dispositivo -- cioè specificalo come `ttyS1' oppure `cua2', ecc. Con Linux ttyS0 equivale a COM1, ttyS1 a COM2, e così viaCoda faxFax in _coda dal socketCode di stampaEsciRicezioneIn attesaRicezioneRifiutaEliminaElimina fileElimino il fileElimina il file selezionato dalla listaRipristinaParametri di Reset: Resetta le impostazioniSquilli (1-9): Avvia il socket serverRusso - Pavel Vainerman Invia faxInvioSto inviando il faxRisoluzione Fax Inviati:Fax inviatiDispositivo: ImpostazioniFile singoloSocketDa socket Lista socketSocket avviato sulla porta Specifica qui il formato della pagina per i faxIn attesaIn attesa di ricevere chiamateFermaRileva chiamataNumero di tel:Numero di telefonoLa seguente cartella è già esistente:Il programma è stato lanciato con l'opzione -s ma non c'è nessuna area di notifica! Questo campo può essere usato per passare qualsiasi altro parametro ad efax (digita `man efax' per vedere quelli disponibili). Specifica quanti comandi vuoi, separati da spazi per parametri diversi -- cioè aggiungi `-or' per eseguire un' inversione di bit in ricezione per i modem Multitech che lo richiedono. A meno che non usi un modem insolito, lascia questo campo vuotoSpecifica qui il numero di squilli che il modem farà passare prima di rispondere quando si trova in modalità In attesa. Valori possibili sono da 1 a 9. Se non viene specificato il programma utilizzerà 1 come predefinitoQuesto è il comando per la stampa che accetta un input postscript sullo standard input. Se non viene specificato, il programma utilizzerà `lpr' come predefinitoQuesto parametro specifica un file di log nel quale verranno memorizzati i progressi sulle negoziazioni e sullo stato del fax, gli errori e gli avvertimenti. Se non viene specificato, allora non sarà mantenuto nessun file di log. (Un file di log può anche essere creato reindirizzando stdout e stderr -- vedi il file README per ulteriori dettagli)Questo parametro specifica se una finestra di pop-up dovrà apparire quando il modem riceve un fax. Seleziona la casella se vuoi la finestra di pop-up.Questo programma (efax-gtk) è un frontend per efax. efax è un programma rilasciato sotto la GNU General Public License, versione 2 da Ed Casas.Specifica qui i comandi `AT' che resetteranno il modem. Specifica quanti comandi vuoi, separati da spazi per i comandi che lo necessitano, ma senza anteporre `AT'. Se non vengono specificati, il programma utilizzerà come predefinito `Z', che è corretto praticamente per tutti i modemSpecifica qui le capabilities del modem. Per capire cosa significa digita `man efax', e guarda come opera il parametro `-c'. Con efax-0.9 ed un modem Classe 2, solitamente non avrai bisogno di specificarle e dovresti lasciare il campo vuoto, poiché il programma interrogherà il modem. Se stai usando una vecchia versione di efax o una classe del modem differente, i valori che funzionano praticamente con qualsiasi modem 14.400 bps sono 1,5,0,2,0,0,0,0 oppure 1,3,0,2,0,0,0,0 per i più lentiSpecifica qui i comandi `AT' di inizializzazione del modem quando si trova in modalità fax. Specifica quanti comandi vuoi, separati da spazi per i comandi che lo necessitano, ma senza anteporre `AT'. Se non vengono specificati, il programma utilizzerà come predefinito `Z &FE&D2S7=120 &C0 M1L0', che è corretto praticamente per tutti i modemSpecifica qui il numero della porta sulla quale il socket server sarà in ascoltoSpecifica qui la risoluzione per i fax inviati. "Standard" è 204x98 e "Fine" è 204x196Specifica qui se dovrà apparire una finestra di pop-up di conferma primadi stampare quando viene premuto il tasto "Stampa i fax selezionati" nellalista dei Fax Ricevuti o dei Fax Inviati. Deseleziona la casella se non vuoila finestra di dialogo (se hai specificato un programma esterno per gestirele stampe come 'kprinter' nella casella Programma per la Stampa, alloranon selezionare la casella)Specifica qui se dovrà apparire una finestra di pop-up quando il socket server riceve un fax dal sistema di stampa. Spunta la casella se vuoi che appaia la finestra. (Questa impostazione non ha effetto se la casella per avviare il socket server non è spuntata.)Specifica qui se bisogna eseguire un programma o uno script quando il modemriceve un fax. Seleziona la casella se vuoi che sia eseguito un programma, edinserisci il nome del programma.Specifica qui se il socket server deve essere eseguito per CUPS o per qualche altro sistema di stampa. Spunta la casella se deve essere avviatoSpecifica qui se verrà utilizzata la chiamata a toni o a frequenza per spedire i faxQuesto determinerà di quanto una pagina stampata verrà ridotta per adattarsi all' area di stampa della stampante. E' una percentuale -- cioè 98 ridurrà la pagina al 98 percento della sua grandezza. Se non viene specificata non avverrà nessuna riduzione (cioè puoi specificare 100, ma non ce n' è bisogno)ToniCestinoUso:·efax-gtk·[opzioni]·[nomefile] Opzioni: -r··Lancia il programma in modalità di ricezione attesa -s··Lancia il programma minimizzato nell'area di notifica Leggi il file README distribuito con il programma per ulteriori dettagli L' utente non ha permessi di lettura sul file VisualizzaVisualizza il file selezionatoVisualizza il file selezionatoCon efax-0.9 o superiore dovresti solitamente scegliere "Auto", in questo modo efax troverà la classe del modem da solo, ma se vuoi puoi forzare una classe scegliendone una tra quelle specificate. Comunque, con efax-0.8 il programma utilizzerà la Classe 2 come predefinita, quindi se stai usando un modem Classe 1 con una vecchia versione di efax, specifica la Classe qui_Rubrica_Aggiungi file singolo_AiutoMostra i _fax inviati_Esci_Impostazioni_Traduzioniefax-gtk aiuto: Capabilitiesefax-gtk aiuto: Dispositivoefax-gtk aiuto: Modalità di Composizioneefax-gtk aiuto: Eseguire un programma quando si riceve un faxefax-gtk aiuto: Parametri di Inizializzazioneefax-gtk aiuto: File Lockefax-gtk aiuto: File Logefax-gtk aiuto: Classe del Modemefax-gtk aiuto: Nomeefax-gtk aiuto: Numeroefax-gtk aiuto: Altri Parametriefax-gtk aiuto: Formato Paginaefax-gtk aiuto: Popupefax-gtk aiuto: Portaefax-gtk aiuto: Visualizzatore Postscriptefax-gtk aiuto: Programma per la Stampaefax-gtk aiuto: Riduzione Stampaefax-gtk aiuto: Pop-up in ricezioneefax-gtk aiuto: Parametri di Resetefax-gtk aiuto: Squilliefax-gtk aiuto: Avviare il socket serverefax-gtk aiuto: Risoluzione Fax Inviatiefax-gtk aiuto: Connessioni al socket consentiteefax-gtk: Aggiungi indirizzoefax-gtk: Aggiungi cartellaefax-gtk: Rubricaefax-gtk: Condizioni, Note e Disclaimersefax-gtk: Elimina indirizzoefax-gtk: Elimina faxefax-gtk: Elimina cartellaefax-gtk: Descrizione faxefax-gtk: Lista fileefax-gtk: File da inviareefax-gtk: Aiutoefax-gtk: Stampa faxefax-gtk: Fax in coda dal socketefax-gtk: Elenco fax ricevuti efax-gtk: Elimina fax in codaefax-gtk: Elenco fax inviatiefax-gtk: Traduzioniefax-gtk: Cestinoefax-gtk: fax ricevutoefax-gtk: coda di stampa ricevuta sul socketefax-gtk: opzionicomputer localealtriefax-gtk-3.2.8/po/ca.po0000644000175000001440000025501211544574531011526 00000000000000# Catalan translation of Efax-gtk ver. 3.2.0 # Copyright (C) 2010 Chris Vine. # This file is distributed under the same license as the Efax-gtk package. # Jordi Sayol , 2007-2010. # # # msgid "" msgstr "" "Project-Id-Version: Efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2010-04-04 14:17+0100\n" "Last-Translator: Jordi Sayol \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Catalan\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: Llibreta d'adreces" #: src/addressbook.cpp:122 msgid "Name" msgstr "Nom" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "Número" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "Crea una nova adreça" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "Esborra adreça" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "Mou adreça amunt" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "Mou adreça avall" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "Voleu esborrar l'adreça seleccionada?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: esborrar l'adreça" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: crear adreça" #: src/addressbook.cpp:574 msgid "Name:" msgstr "Nom:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "Número:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: fitxer a enviar per fax" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "Visualitza" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: condicions, avisos i renúncies" #: src/dialogs.cpp:298 msgid "Accept" msgstr "Accepta" #: src/dialogs.cpp:299 msgid "Reject" msgstr "Rebutja" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "Accepteu les condicions, avisos i renúncies mostrades a dalt?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "Quan a efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "Copyright (C) 2001 - 2011 Chris Vine" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" "Aquest programa l'ha escrit en Chis Vine i es distribueix sota els termes de " "la Llicència Pública General de GNU, versió 2. Aquest programa és una " "interfície per a l'efax. L'efax l'ha escrit en Ed Casas." #: src/dialogs.cpp:541 msgid "About efax" msgstr "Quan a efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "efax és copyright (C) 1999 Ed Casas" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "Aquest programa (efax-gtk) és una interfície per a l'efax l'efax és un " "programa que es distribueix sota els termes de la Llicència Pública General " "de GNU, versió 2 per Ed Casas." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "Inactiu" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "Enviant fax" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "Responent a la trucada" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "A l'espera de rebre trucades" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "No és possible enviar el fax - s'està rebent un fax\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "Nom de fitxer no vàlid\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "El fitxer no existeix\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "L'usuari no té permís per llegir el fitxer\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "Fitxer postscript/PDF no vàlid\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "No teniu la variable d'entorn $HOME fixada\n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" "Error del sistema greu: no es pot crear el directori on desar els faxos " "rebuts.\n" "No podreu rebre faxos\n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** S'està aturant la sessió d'enviament/recepció ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" "Error del sistema greu: No es pot crear el directori o desar el fax rebut.\n" "Aquest fax no serà desat\n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" "Error del sistema greu: No es pot obrir el directori de faxos rebuts.\n" "Aquest fax no serà desat\n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" "Error del sistema greu: No es pot desar tot el fax rebut.\n" "Tot o part del fax es perdrà\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "S'ha rebut un Utf8 invàlid a EfaxController::read_pipe_cb()\n" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" "Error del sistema greu: No es pot crear el directori per desar el fax " "enviat.\n" "Aquest fax no serà desat\n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "TREBALL D'IMPRESSIÓ" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "Configuració de la pàgina d'impressió" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "Imprimeix fax seleccionat" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "Visualitza fax seleccionat" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "Afegeix/esmena la descripció del fax seleccionat" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "Esborra el fax seleccionat" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "Buida la paperera" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "Crea una carpeta" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "Esborra la carpeta seleccionada" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "Esborra comptador de faxos nous" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: Llista de faxos rebuts" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: Llista de faxos enviats" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "Voleu esborrar permanentment el fax seleccionat?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(NOTA: Això esborrarà de forma permanent el fax\n" "del sistema de fitxers)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "Esborrar de forma permanent els faxos seleccionats?\n" "\n" "(NOTA: Això esborrarà de forma permanent els faxos\n" "del sistema de fitxers)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: esborrar fax" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "Voleu buidar la paperera?\n" "\n" "(Nota: això esborrarà de forma permanent tots els faxos\n" "de la paperera" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: paperera" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: crear carpeta" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "Buideu la carpeta esborrant-ne les carpetes filles\n" "i arrossegueu a fora o suprimiu qualsevol fax que hi hagi\n" "abans d'esborrar la carpeta" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: esborrar la carpeta" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "Esborrar la carpeta: " #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "Imprimir el fax seleccionat?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: imprimir fax" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "Faxos nous:" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: descripció de fax" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "Descripció del fax?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "Nom de la carpeta?\n" "(Nota: això serà col·locat a dalt\n" "de tot i pot ser arrossegat a\n" "una altra carpeta)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "El nom de carpeta no pot tindre el caràcter: " #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "La següent carpeta ja existeix: " #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "Carpeta" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "Data" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "Descripció" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "Safata d'entrada" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "Enviat" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "Paperera" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: llista de fitxers" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "Fitxers per enviar" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "Veure fitxer seleccionat" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "Esborra el fitxer seleccionat de la llista" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "Afegeix fitxers a la llista" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "Afegeix fitxers a la llista de fitxers per enviar" #: src/file_list.cpp:205 msgid "Move file up" msgstr "Mou fitxer amunt" #: src/file_list.cpp:206 msgid "Move file down" msgstr "Mou fitxer avall" #: src/file_list.cpp:593 msgid "Remove file " msgstr "Esborra fitxer " #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " de la llista?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "Esborra fitxer" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "Copyright (C) 2001 - 2011 Chris Vine\n" "Aquest programa es distribueix sota els termes de la Llicència Pública " "General de GNU, versió 2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Ús: efax-gtk [opcions] [nom de fitxer]\n" "Opcions:\n" "\t-r inicia el programa en mode d'espera de trucada\n" "\t-s inicia el programa amagat a l'area de notificació\n" "Mira el fitxer README que ve amb la distribució\n" "per a més detalls\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "Opció invàlida. Les opcions son:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" "El nom d'usuari especificat és invàlid (ha de contenir només\n" "caràcters ASCII simples). No es mostrarà el nom d'usuari a la\n" "capçalera del fax, però el número de fax de l'estació si hi serà.\n" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "Classe de mòdem especificat invàlid\n" "Adoptant per defecte de Classe 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "No s'ha especificat dispositiu de port sèrie a " #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "Adoptant la resolució de fax per defecte de 204x196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "La resolució de fax especificada és invàlida.\n" "S'adoptarà la resolució de fax per defecte de 204x196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "Nombre de timbres especificat invàlid\n" "Respondrà després d'un timbre\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "Adoptant el mida de la pàgina de A4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "Mida de pàgina especificat invàlid\n" "Adoptant mida de pàgina per defecte de A4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "Mode de marcatge especificat invàlid\n" "Adoptant mode de marcatge per defecte de tons\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "" "La reducció d'impressió especificada és invàlida: adoptant valor per defecte " "de 100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "Adoptant ordre de visualitzador postscript per defecte de 'gv'\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "" "No s'ha especificat el port per al servidor de sòcol, per tant el servidor " "no serà iniciat\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "El port especificat per al servidor de sòcol és invàlid, per tant el " "servidor no serà iniciat. Ha de ser ente 1024 i 65535\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" "El directori especificat a WORK_SUBDIR: és invàlid. WORK_SUBDIR: serà " "ignorat\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr "Fitxer " #: src/mainwindow.cpp:297 msgid "Socket " msgstr "Sòcol " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "Mètode d'entrada de fax: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "Un fitxer" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "Múltiples fitxers" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "Llista del sòcol" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "Núm. telèfon: " #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "Enviar fax" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "Respon la trucada" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "Agafa la trucada" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "En espera" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "Atura" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "Fax per enviar" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "Llista de faxos _rebuts" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "_Llista de faxos enviats" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "Cua de _faxos del sòcol " #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "_Introduïu un fitxer" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "Introduïu _múltiples fitxers" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "Llibreta d'_adreces" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_Preferències" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_Surt" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "_Imprimeix el fitxer de registre" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "_Configuració de la pàgina d'impressió del registre" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "_Visualitza el fitxer de registre" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "Quan a l'efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "Quan a l'_efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_Traduccions" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_Ajuda" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_Fitxer" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "_Registre" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "" "El programa ha esta iniciat amb la opció -s però no hi ha àrea de " "notificació!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "" "No s'ha especificat cap número de fax. Voleu enviar el fax amb una connexió " "establerta?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "Número de telèfon" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "Un treball d'impressió s'ha rebut al sòcol" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk sòcol" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "S'ha rebut un fax amb efax-gtk" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: fax rebut" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "No es poden canviar les preferències fins que el programa estigui inactiu\n" "premeu el botó Atura per posar-lo inactiu" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "Italià - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "Polac - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "Búlgar - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "Rus - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "Hebreu - Assaf Gillat\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "Grec - Hellenic Linux Users Group\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "Albanès - Besnik Bleta\n" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "Hongarès - Gergely Szakats, Laszlo Csordas\n" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "Xinès simplificat - Kite Lau\n" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "Alemany - Steffen Wagner\n" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "Suec - Daniel Nylander\n" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "Català - Jordi Sayol Salomó\n" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "Xinès tradicional - Wei-Lun Chao\n" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: Traduccions" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "Premeu F1 per a l'ajuda" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "S'ha rebut un Utf8 invàlid a MainWindow::read_error_pipe_cb()\n" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "interromput per una senyal" #: src/settings.cpp:68 msgid "Name: " msgstr "Nom: " #: src/settings.cpp:69 msgid "Number: " msgstr "Número: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "Dispositiu sèrie: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "Fitxer de bloqueig: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "Compatibilitats: " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "Timbres (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr "Classe de mòdem: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "Mode de marcatge: " #: src/settings.cpp:211 msgid "Auto" msgstr "Automàtic" #: src/settings.cpp:213 msgid "Class 1" msgstr "Classe 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "Classe 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "Classe 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "Tons" #: src/settings.cpp:235 msgid "Pulse" msgstr "Pulsos" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "Paràmetres d'inicialització:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "Paràmetres de reinici: " #: src/settings.cpp:510 msgid "Other Params: " msgstr "Altres paràmetres: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "Utilitza el sistema d'impressió del GTK+" #: src/settings.cpp:663 msgid "Print Program: " msgstr "Programa d'impressió: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "Reducció d'impressió (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "Diàleg emergent de confirmació\n" "abans d'imprimir" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "Programa visualitzador\n" "de postscript:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "Inicia el servidor de sòcol" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "Diàleg emergent quan\n" "es rep un fax des del sòcol" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" "Port a on han de ser\n" "enviats els faxos:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "Adreces permeses\n" "per connectar" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "màquina local " #: src/settings.cpp:1016 msgid "other" msgstr "altres" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "Diàleg emergent quan rebis\n" "un fax pel mòdem" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "Executa un programa o fitxer de seqüència\n" "quan es rebi un fax pel mòdem" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "Resolució enviant fax:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" "Incloure número de fax\n" "del destinatari a la\n" "capçalera de la pàgina" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "Prefix:" #: src/settings.cpp:1512 msgid "Standard" msgstr "Estàndard" #: src/settings.cpp:1514 msgid "Fine" msgstr "Fina" #: src/settings.cpp:1767 msgid "Log File: " msgstr "Fitxer de registre: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "Mida de pàgina: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: Preferències" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "Nota: prement el botó d'acord salvarà les preferències al fitxer" #: src/settings.cpp:1979 msgid "Reset" msgstr "Restableix" #: src/settings.cpp:2012 msgid "Identity" msgstr "Identitat" #: src/settings.cpp:2015 msgid "Modem" msgstr "Mòdem" #: src/settings.cpp:2018 msgid "Params" msgstr "Paràm." #: src/settings.cpp:2021 msgid "Print" msgstr "Impr." #: src/settings.cpp:2027 msgid "Socket" msgstr "Sòcol" #: src/settings.cpp:2030 msgid "Receive" msgstr "Rebre" #: src/settings.cpp:2033 msgid "Send" msgstr "Enviant" #: src/settings.cpp:2036 msgid "Logging" msgstr "Registre" #: src/settings.cpp:2039 msgid "Page" msgstr "Pàgina" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" "Nom d'usuari invàlid especificat a la pestanya «Identitat» (ha de contenir " "només\n" "caràcters ASCII simples). Si això és un problema, deixeu-lo en blanc ja que " "el número de l'estació de fax sempre apareixerà a la capçalera" #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "Error de configuració" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "Classe de mòdem especificada invàlida" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "Mida de pàgina especificat invàlid" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "Resolució d'enviament de fax especificada invàlida" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "Nombre de timbres especificat invàlid" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "Mode de marcatge especificat invàlid" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "Paràmetre de reducció d'impressió especificat invàlid" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "" "Número de port de sòcol especificat invàlid. Ha de ser entre 1024 i 65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "Introdueix preferències des de " #: src/settings.cpp:3102 msgid " or\n" msgstr " o\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "Reinicia preferències" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" "Poseu aquí el nom que ha d'aparèixer a la capçalera dels faxos enviats. Ha " "de contenir només\n" "caràcters ASCII simples. Si això és un problema, deixeu-lo en blanc ja que " "el número de fax de l'estació sempre apareixerà a la capçalera" #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "Ajuda de l'efax-gtk: nom" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "Poseu aquí el número que ha d'aparèixer a la capçalera dels faxos enviats. " "Això també serà enviat com a identificador d'estació de fax a l'aparell de " "fax remot quan es rebin faxos" #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "Ajuda de l'efax-gtk: número" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "Poseu aquí el dispositiu sèrie al que està connectat el mòdem (si no hi " "poses res, el programa l'assumirà com a /dev/modem) No hi incloguis la part " "'/dev/' del nom de dispositiu -- per exemple 'ttyS1' o 'cua2', etc. A Linux, " "ttyS0 s'equipara amb COM 1, ttyS1 amb COM 2 i així successivament" #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "Ajuda de l'efax-gtk: dispositiu" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "Poseu aquí el directori del fitxer de bloqueig. Si no hi poseu res, el " "programa farà servir /var/lock" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "Ajuda de l'efax-gtk: fitxer de bloqueig" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "Amb el efax-0.9 o superior podeu triar tranquilament «Auto», i llavors efax " "buscarà la classe de mòdem ell mateix, però si voleu, també en podeu forçar " "la classe triant-ne una. Tant mateix, efax-0.8 utilitza per defecte la " "classe 2, per tant, si esteu utilitzant un mòdem de classe 1 amb una versió " "vella d'efax, heu d'especificar la classe aquí" #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "Ajuda de l'efax-gtk: classe de mòdem" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" "Això especifica si s'utilitzarà tons o pulsos per trucar quan s'enviïn faxos" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "Ajuda de l'efax-gtk: mode de marcatge" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "Això especifica les compatibilitats del mòdem. Per veure que significa això " "feu un 'man efax' i mireu els operadors de la opció '-c'. Amb efax-0.9 i un " "mòdem classe 2, normalment no es necessitarà especificar res i es pot deixar " "en blanc, ja que el programa ho preguntarà al mòdem. Si esteu fent servir " "una versió vella d'efax o un mòdem de classe diferent, els valors que " "funcionaran amb pràcticament qualsevol mòdem de 14.400 bps son " "1,5,0,2,0,0,0,0, o 1,3,0,2,0,0,0,0 per a els que son més lents" #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "Ajuda de l'efax-gtk: Compatibilitats" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "Això defineix el nombre de timbres que el mòdem deixa passar abans de " "respondre el telèfon quan és en mode 'En espera'. Els valors acceptats son " "de 1 a 9. Si no n'especifiqueu cap el programa utilitzarà per defecte l'1" #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "Ajuda de l'efax-gtk: timbres" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "Això especifica l'ordre AT d'inicialització per al mòdem quan és en mode " "fax. Especifiqueu-ne tantes com sigui necessari, separades per espais les " "que necessitin estar-ho, però sense estar precedides per un 'AT'. Si no " "n'especifiqueu cap, el programa utilitzarà per defecte `Z &FE&D2S7=120 &C0 " "M1L0', que serà correcte per a pràcticament tots els mòdems" #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "Ajuda de l'efax-gtk: paràmetres d'inicialització" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "Això especifica l'ordre 'AT' que reinicialitzarà el mòdem. Especifiqueu " "tantes ordres com sigui necessari, separades per espais les que necessitin " "estar-ho, però sense estar precedides per un 'AT'. Si no n'especifiqueu cap, " "el programa utilitzarà per defecte `Z', que serà correcte per a pràcticament " "tots els mòdems" #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "Ajuda de l'efax-gtk: reinicialitza paràmetres" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "Això és per passar-li qualsevol altre paràmetre a efax (feu 'man efax' per " "veure que hi teniu disponible). Especifiqueu-ne tants com siguin necessaris, " "separant amb espais els diferents paràmetres. Per exemple inclogueu-hi '-or' " "per a fer una inversió de bit durant la recepció per als mòdems Multitech " "que ho necessitin. A no ser que tingueu un mòdem poc comú, deixe-ho en blanc" #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "Ajuda de l'efax-gtk: altres paràmetres" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" "si s'activa, el programa farà servir el sistema d'impressió del GTK+ en lloc " "de l'argument de la línia d'ordres especificat a sota per a imprimir faxos" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "Ajuda de l'efax-gtk: Utilitzeu el sistema d'impressió del GTK+" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Aquesta és l'ordre per a imprimir i que també accepta ordres postscript a " "l'entrada estàndard. Si no s'hi especifica res, el programa farà servir per " "defecte 'lpr'. Això no tindrà efecte si està seleccionat el botó de " "«Utilitzeu el sistema d'impressió del GTK+»" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "Ajuda de l'efax-gtk: programa d'impressió" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Això determinarà quan s'ha de reduir una pàgina per que càpiga dins de " "l'àrea d'impressió de la impressora. És en tant per cent -- o sigui, 98 " "reduirà la pàgina al 98 per cent de la seva mida. Si no s'especifica res, no " "es farà cap reducció (per exemple podeu, tot i que no caldria, especificar " "100)" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "Ajuda de l'efax-gtk: reducció d'impressió" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "Això especifica si un diàleg emergent de confirmació ha d'aparèixer abans " "d'imprimir quan premeu el botó de «Imprimeix fax seleccionat» a la llista de " "faxos rebuts o la de faxos enviats. Desmarque-ho si no voleu un diàleg (si " "teniu especificat un administrador d'impressió extern com per exemple " "'kprinter' al camp de Programa d'Impressió, llavors preferireu no tindre " "aquest camp activat). Això no tindrà efecte si està seleccionat el botó de " "«Utilitzeu el sistema d'impressió del GTK+»" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "Ajuda de l'efax-gtk: emergent" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "El visualitzador postscript s'utilitza per veure els faxos enviats i rebuts, " "i també per veure i identificar els faxos per enviar a través del diàleg " "selector de fitxers «Fitxers per enviar». Especifiqueu aquí l'ordre per " "visualitzar fitxers postscript. Si no n'especifiqueu cap, el programa farà " "servir per defecte 'gv'. Una altra opció que us podria interessar és " "'evince' (el visualitzador postscript de Gnome) o 'kghostview' (el " "visualitzador postscript de KDE). Si feu servir gv, necessitareu afegir-hi " "les opcions '-media A4' o '-media Letter' per seleccionar correctament la " "mida del paper. ggv i kghostview ho fan automàticament" #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "Ajuda de l'efax-gtk: programa visualitzador de postscript" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "Això especifica si el servidor de sòcol s'ha de posar en marxa per a CUPS o " "per a algun altre sistema d'impressió. Marqueu el camp si voleu que s'iniciï" #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "Ajuda de l'efax-gtk: inicia el servidor de sòcol" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "Això especifica si un diàleg emergent ha d'aparèixer quan un fax és rebut " "per el servidor de sòcol des de el sistema d'impressió. Marqueu el camp si " "voleu un diàleg (això no te efecte si no teniu marcat el camp d'iniciar el " "servidor de sòcol) Si el programa està inactiu o està en mode d'espera per " "rebre faxos, el fax pot ser enviat directament des d'aquest diàleg" #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "" "Això especifica el número de port a on el servidor de sòcol ha d'escoltar. " "Ha de ser entre 1024 i 65535." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "Ajuda de l'efax-gtk: port" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "Això determina si es permet connectar amb el servidor de sòcol a altres " "adreces que no siguin ni la teva màquina local ni el teu nom de domini. A no " "ser que tingueu requeriments inusuals (com per exemple, tindre els dimonis " "de CUPS o de lpd corrent en una altra màquina) podeu triar màquina local. Si " "voleu que altres màquines puguin connectar, trieu «altres» i especifiqueu els " "noms de domini de les màquines que poden connectar (separant els diferents " "noms de domini per espais, però no heu d'especificar la màquina local ni el " "nom de domini del vostre ordinador ja que sempre serà permesa). Tals noms de " "domini es poden especificar com un nom de domini ordinari o en notació " "numèrica. La notació numèrica pot tenir * com a comodí final, així que per " "exemple 10.1. * permetrà accés a les adreces 10.1.0.0 a 10.1.255.255. Heu de " "fer córrer l'efax-gtk darrera un tallafoc si trieu «altres»." #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "Ajuda de l'efax-gtk: connexions permeses al sòcol" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "Aquest paràmetre especifica si voleu un diàleg emergent quan es rebi un fax " "des del mòdem. Marqueu el camp si voleu un avis emergent." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "Ajuda de l'efax-gtk: emergent de recepció" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "Això especifica si un programa o fitxer de seqüència s'ha d'executar quan " "des del mòdem es rebi un fax. Marqueu el camp si voleu executar un programa, " "i escrigueu-hi el nom. efax-gtk ve amb dos fitxers se seqüència, print_fax i " "mail_fax, els quals es poden fer servir per imprimir els faxos quan es reben " "ò enviar-los per correu a un usuari (per tant per enviar un correu amb un " "fax podeu escriure aquí 'mail_fax'). Llegiu el fitxer README per a més " "detalls." #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "Ajuda de l'efax-gtk: executa un programa quan es rebi un fax" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "Això especifica la resolució dels faxos que s'envien. «Estàndard» dona 204x98 " "i «Fina» dona 204x196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "Ajuda de l'efax-gtk: resolució d'enviament de faxos" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" "Això especifica si el número de fax del destinatari s'ha d'incloure a la " "capçalera dels faxos enviats. Desmarqueu el camp si no voleu que això es " "vegi (diguem que inclou un número d'accés d'una tarja de pagament)" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "Ajuda de l'efax-gtk: capçalera del fax" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" "Això especifica el prefix que s'anteposarà a qualsevol número marcat - per " "exemple, podeu especificar '9,' aquí per marcar a través d'un panell de " "control que necessita 9 per obtenir una línia exterior seguit d'un retard." #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "ajuda de l'efax-gtk: Prefix" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "Aquest paràmetre especifica un fitxer de registre que segueix les " "negociacions i l'estat del fax, errors i advertiments son enregistrats. Si " "no s'en especifica cap, no es crearà cap registre (També es pot mantenir un " "fitxer de registre redireccionant stdout i stderr -- veure el fitxer README " "per més detalls)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "Ajuda de l'efax-gtk: fitxer de registre" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "Especifiqueu aquí la mida de la pàgina per als faxos" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "Ajuda de l'efax-gtk: mida de la pàgina" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: ajuda" #: src/helpfile.cpp:73 msgid "Sending" msgstr "Enviant" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "Rebent" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "Llibreta d'adreces" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "Llistes de faxos" #: src/helpfile.cpp:108 msgid "Settings" msgstr "Preferències" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "Enviant Faxos\n" "-------------\n" "\n" "Abans d'enviar un fax, s'ha d'especificar al camp «Fax per enviar». Ha de ser " "en format postscript o PDF (un format produït per tots el editors i " "processador de documents de Unix/Linux), i aquest serà convertit pel " "programa al format correcte de fax tiffg3.\n" "\n" "Hi ha dos mètodes d'entrada de fax. El primer, el fax per enviar pot ser un " "fitxer desat al sistema de fitxers. Pot ser escrit manualment al camp «Fax " "per enviar», o introduït mitjançant el diàleg de selecció de fitxers. Si el " "fax compren un sol fitxer, llavors el podeu buscar prement el botó «Un " "fitxer». Es pot trobar més fàcilment amb aquest diàleg si és al directori " "$HOME/faxout.\n" "\n" "Quan s'especifiquen més d'un fitxer al camp «Fax per enviar», seran enviats " "com un sol fax ajuntant-los en l'ordre en que han estat inclosos al camp. " "Per seleccionar varis fitxers és més fàcil fer-ho prement el botó «Múltiples " "fitxers». Prement el botó «Múltiples fitxers» et permet trobar i afegir " "fitxers a la llista de fitxers i amés amés poden ser reordenats fent servir " "els botons amb les fletxes amunt i avall, o arrossegant i deixant amb el " "ratolí.\n" "\n" "Com a alternativa, els faxos poden ser rebuts directament des del sistema " "d'impressió mitjançant el servidor de sòcol proveït pel programa. Efax-gtk " "manté una llista dels faxos rebuts des del sòcol i que son accessibles " "seleccionant «Sòcol» com a mètode d'entrada de fax i accedir a la llista de " "faxos en cua prement el botó «Llista del sòcol». Aquesta és la forma més " "recomanable d'enviar faxos des de un processador de textos ja que permet " "enviar un fax a efax-gtk imprimint des del processador de textos. Quan un " "fax és posat a la cua de la llista del sòcol per ser enviat, un petit punt " "vermell apareixerà a la finestra principal del programa, a la dreta del camp " "«Fax per enviar». Per més informació de com ajustar CUPS o lpr/lprng per a " "enviar a efax-gtk, mireu el fitxer README que ve amb la distribució.\n" "\n" "El número de telèfon al que el fax serà enviat és al camp «Núm. telèfon». Pot " "ser escrit directament en aquest camp o utilitzant la llibreta d'adreces " "inclosa. La llibreta d'adreces es pot invocar prement el botó «Núm. telèfon» " "o des del menú 'Fitxer/Llibreta d'adreces'(mireu l'etiqueta «Llibreta " "d'Adreces» en aquesta finestra d'ajuda). Tant mateix, si ja s'ha establert " "una connexió amb el fax remot, llavors el fax pot ser enviat sense marcar " "tot deixant el camp «Núm. telèfon» en blanc (un diàleg apareixerà preguntant " "si voleu enviar el fax sense marcar).\n" "\n" "Quan un fax és rebut pel servidor de sòcol des del sistema d'impressió, les " "preferències del programa poden ser configurades per oferir un diàleg " "automàticament. Si el programa és inactiu o és en espera de rebre faxos, el " "fax pot ser enviat directament des d'aquest diàleg sense la necessitat " "d'invocar la llista de fax en cua rebuts del sòcol.\n" "\n" "Els faxos enviats correctament son copiats a un directori dins el directori " "$HOME/faxsent i que el nom que rep deriva de l'any, el mes, el dia, l'hora i " "els segons en que l'enviament del fax es va completar, i apareixerà a la " "Llista de faxos enviats. Només son inclosos en aquesta llista si s'han " "enviat sense cap error. La finestra de missatges de l'efax informarà del " "progrés del fax que s'està enviant. Es pot accedir a la llista de faxos des " "del menú 'Fitxer/Llista de faxos enviats'. Mireu l'etiqueta «Llista de Faxos» " "en aquesta finestra d'ajuda.\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "Recepció de faxos\n" "-----------------\n" "\n" "Hi ha tres mètodes per rebre faxos.\n" "\n" "El primer, el programa pot respondre una trucada que està sonant i que no ha " "estat resposta, prement el botó «Respon la trucada».\n" "\n" "El segon, el programa pot agafar una trucada que ja ha estat resposta (com " "per exemple, per mitjà d'un telèfon de mà) prement el botó «Agafa la " "trucada».\n" "\n" "El tercer, el programa es pot posar en mode d'espera prement el botó «En " "espera». Això farà que respongui qualsevol trucada després del nombre de " "timbres que s'hagi especificat al fitxer efax-gtkrc, i rebrà el fax. El " "programa es mantindrà a l'espera de rebre trucades fins que es premi el botó " "«Atura».\n" "\n" "Els faxos rebuts, en format tiffg3 (un fitxer cada pàgina) son copiats a un " "directori dins el directori $HOME/faxin i que el nom que rep deriva de " "l'any, el mes, el dia, l'hora i els segons en que la recepció del fax es va " "completar, i és el número ID del fax.\n" "\n" "Els faxos rebuts poden ser impresos, vistos, descrits i manipulats fent " "servir l'utilitat per a la llista de faxos inclosa. S'hi pot accedir des del " "menú 'Fixer/Llista de faxos rebuts'. Mireu l'etiqueta «Llista de Faxos» en " "aquesta finestra d'ajuda.\n" "\n" "Quan un fax s'ha rebut, un diàleg emergent pot ser ajustat per que aparegui " "(aneu al diàleg de les preferències per fer això). Al diàleg de preferències " "també podeu especificar que un programa s'executi quan es rebi un fax. El " "número d'ID del fax li és transmès com primer (i únic) argument al programa, " "i que permet al programa trobar el fax a $HOME/faxin. La distribució conté " "dos scripts executables, mail fax i print fax, i que poden ser utilitzats " "per a enviar per correu electrònic o imprimir un fax a un usuari " "automàticament quan és rebut. (Aquests scripts no son instal·lats amb 'make " "install' - si els voleu utilitzar, feu-los executables amb 'chmod +x' i els " "copieu a un directori que estigui inclòs al camí del sistema com per " "exemple /usr/local/bin, després especifiqueu el nom del fitxer de seqüència " "al diàleg de preferències.)\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "Utilitzant la llibreta d'adreces\n" "--------------------------------\n" "\n" "Per agafar un número de telèfon de la llibreta d'adreces, ressalta l'adreça " "pertinent fent clic amb el botó esquerra del ratolí, i després prem el botó " "«D'acord».\n" "\n" "Es poden afegir adreces a la llibreta d'adreces prement el botó 'Crear nova " "adreça' i omplint el pertinent diàleg que apareixerà. Per esborrar una " "adreça de la llibreta d'adreces, ressalta l'adreça pertinent i prem el botó " "'Esborra adreça' (escombraries). La llibreta d'adreces es pot ordenar tot " "fent servir els botons amb fletxa amunt i avall a una adreça ressaltada o " "arrossegant i deixant amb el ratolí.\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "Utilitzant les llistes de faxos\n" "-------------------------------\n" "\n" "Per accedir a les llites de faxos, aneu al menú 'Fitxer' i trieu 'Llista de " "faxos rebuts' o 'Llista de faxos enviats'. Ressalteu el fax a imprimir o " "visualitzar feny clic amb el boto esquerra del ratolí. Els programes " "utilitzats per imprimir i visualitzar els faxos estan especificats al fitxer " "de configuració efax-gtkrc, i si no ni ha cap d'especificat, el programa " "imprimirà fent servir lpr (que funcionarà en la majoria de sistemes Unix) i " "visualitzar amb gv.\n" " \n" "Per imprimir faxos, el paràmetre PRINT_SHRINK pot ser especificat a efax-" "gtkrc per permetre ajusta la pàgina del fax dins dels marges de " "l'impressora. Un valor de 98 anirà be per a la majoria d'impressores. Això " "es pot modificar mentre el programa és en marxa, accedint al diàleg de " "preferències i entrant al camp 'Impr./Reducció d'impressió'.\n" "\n" "Es pot afegir una descripció a un fax rebut quan apareix a la llista de " "faxos (o posteriorment corregir) prement el botó pertinent -- això permetrà " "que els faxos siguin més fàcilment identificables.\n" "\n" "La llista de faxos rebuts mostrarà, a la dreta de la barra d'eines, el " "nombre de faxos rebuts des de que el programa es va iniciar per última " "vegada. Si efax-gtk és en espera de recepció de faxos, el rètol indicador de " "l'icona del programa a l'àrea de notificació també mostrarà aquest nombre. " "El comptador es pot reajustar a 0 sense re-iniciar el programa prement el " "botó 'Esborrar comptador de faxos nous' a la llista de faxos rebuts.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "Preferències\n" "------------\n" "\n" "Les preferències del programa poden ser canviades manualment editant el " "fitxer de configuració de l'efax-gtk que consta de $HOME/.efax-gtkrc, " "$sysconfdir/efax-gtkrc o /etc/efax-gtkrc. Els fitxers son buscats en aquest " "ordre, per tant $HOME/.efax-gtkrc te preferència sobre els altres dos.\n" "\n" "El fitxer de configuració es pot modificar també fent servir el diàleg de " "preferències des de el menú 'Fitxer/Preferències'. Les preferències " "introduïdes en aquest diàleg son sempre guardades a $HOME/.efax-gtkrc. Per " "tant, si el diàleg de preferències s'ha fet servir i voleu retornar a les " "preferències globals, això es pot fer tant esborrant el fitxer $HOME/.efax-" "gtkrc com prement el botó Restablir del diàleg de preferències, el qual " "rellegirà les preferències des del fitxer de configuració global " "($sysconfdir/efax-gtkrc o /etc/efax-gtkrc).\n" "\n" "L'ajuda es pot obtenir metre omples els camps del diàleg de preferències " "mantenint el cursó del ratolí sobre el pertinent botó d'ajuda (?), el qual " "et mostrarà un «rètol indicador» o prement el botó que et mostrarà una " "finestra d'informació.\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "Sòcol funcionant al port " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "Trebal d'impressió rebut al sòcol\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "Tancant el sòcol\n" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: Faxos en cua des del sòcol" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "Treballs d'impressió en cua" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "Entra el fax seleccionat per enviar" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "Tria el fax seleccionat per enviar" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "TREBALL D'IMPRESSIÖ: " #: src/socket_list.cpp:501 msgid "Remove " msgstr "Esborra " #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: esborrar fax en cua" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: treball d'impressió rebut al sòcol" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "Fax a la cua" #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" " s'ha rebut al sòcol.\n" "Enviar el fax o posar a la cua?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "Iniciant registre del fax:" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "Finalitzant el registre del fax:" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "No es pot llegir el fitxer de registre" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "efax-gtk: imprimir el fitxer de registre" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "No es pot visualitzar el fitxer de registre" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "efax-gtk: visualitzar el fitxer de registre" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "efax-gtk: visualitzar el registre" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "Llista de faxos rebuts" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "Llista de faxos enviats" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "Recepció en espera" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "Surt" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "No s'ha especificat cap fitxer per imprimir" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "Tipus de lletra:" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "Mida de lletra:" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "Tipus de lletra per imprimir" #: efax/efax.c:379 msgid "success" msgstr "amb èxit" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "Número ocupat o mòdem en ús" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "error irrecuperable" #: efax/efax.c:382 msgid "invalid modem response" msgstr "resposta del mòdem invàlida" #: efax/efax.c:383 msgid "no response from modem" msgstr "sense resposta del mòdem" #: efax/efax.c:385 msgid "internal error" msgstr "error intern" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "NSC - característiques del sondeig" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "CIG - id del sondeig" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "DTC - capacitats del sondeig" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "NSF - característiques de la resposta" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "CSI - id de la resposta" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "DIS - capacitats de la resposta" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "NSS - característiques del trucant" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "TSI - id del trucant" #: efax/efax.c:419 msgid "DCS - session format" msgstr "DCS - format de sessió" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "CFR - canal correcte" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "FTT - canal no correcte" #: efax/efax.c:430 msgid "MPS - not done" msgstr "MPS - no fet" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "EOM - no fet, format nou" #: efax/efax.c:436 msgid "EOP - done" msgstr "EOP - fet" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "PRI-MPS - no fet, cridar operador" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "PRI-EOM - no fet, nou format, crida operador" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "PRI-EOP - fet, crida operador" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "MCF - pàgina correcta" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "RTP - pàgina correcta, verifica canal" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "PIP - pàgina correcta, crida operador" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "RTN - pàgina no correcta, verifica canal" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "PIN - pàgina no correcta, crida operador" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "CRP - repetir ordre" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "DCN - desconnexió" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "DESCONEGUT" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "les capacitats locals i remotes són incompatibles" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "no es pot esborrar el fitxer %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "fitxer suprimit: %s" #: efax/efax.c:784 msgid "header:" msgstr "capçalera:" #: efax/efax.c:868 msgid "characters received while sending" msgstr "caràcters rebuts mentre s'enviava" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "enviades %d+%d línies i %d+%d octets, en %d segons a %d bps" #: efax/efax.c:915 msgid "flow control did not work" msgstr "control de flux no funciona" #: efax/efax.c:954 msgid "modem response in data" msgstr "resposta del mòdem en dades" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "corren sobreeiximent de memòria intermèdia longitudinal" #: efax/efax.c:1036 msgid "file write:" msgstr "fitxer escrit:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "CAN: recepció de dades cancel·lada" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "errors de recepció" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "rebudes %d línies amb %d errors" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "enviat TCF - verificació de canal de %d octets" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "temps sobrepassat mentre es provava de verificar les dades" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "rebut TCF - verificació de canal (correcte: corrent de %d en %d)" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "rebut TCF - verificació de canal (no correcte: corrent de %d en %d)" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "l'últim octet de la trama és NULL" #: efax/efax.c:1222 msgid "sent" msgstr "enviat" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "HDLC 0xff inicial manca a la trama " #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "trama HDLC amb marc invertit; s'està invertint l'ordre dels bits" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "temps sobrepassat llegint dades de la trama" #: efax/efax.c:1291 msgid "frame error" msgstr "error a la trama" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "sense resposta després de dades de la trama" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "resposta incorrecta després de dades de la trama" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "trama massa llarga (%d, > %d màx. octets)" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "portadora incorrecta" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "resposta incorrecta a l'ordre de rebre una trama" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "rebuda trama curta (%d octets)" #: efax/efax.c:1391 msgid "received" msgstr "rebut" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "l'ID remot és" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "sense resposta del fax remot" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "no puc obrir la pàgina" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "el remot té un o més documents per enviar i pot rebre" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "el remot té un o més documents per enviar i no pot rebre" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "el remot no té documents per enviar i pot rebre" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "el remot no té documents per enviar i no pot rebre" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "el remot no pot rebre, provant de totes maneres" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "el remot no té res per enviar, provant de totes maneres" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "canal no usable a %d bps" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "canal no usable a la velocitat més baixa" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "resposta invàlida a DCS" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "enviada pàgina %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "resposta després de pàgina invàlida" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "ignorada sol·licitud d'interrupció" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "temps sobrepassat esperant l'ordre" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "pàgina desada a %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "ordre no reconeguda" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "sense ordre ni resposta del remot" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "finalització anormal (codi %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "no s'ha rebut XON/DC2 després de CONNECT" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "%d caràcters rebuts mentre esperava per enviar" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "el remot te un o més documents per enviar." #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" "no s'ha obtingut la resposta +FPTS, s'assumeix que aquell fax l'ha rebut" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "masses intens d'enviar la pàgina" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "rebre (+FDR) ordre fallida" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "marcant %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "l'ID del remot és %s" #: efax/efax.c:2216 msgid "called" msgstr "cridat" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "connectat" #: efax/efax.c:2224 msgid "number is busy" msgstr "el número comunica" #: efax/efax.c:2226 msgid "dial command failed" msgstr "ordre de marcatge fallida" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "esperant activitat" #: efax/efax.c:2306 msgid "activity detected" msgstr "activitat detectada" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "no es pot respondre: no es pot bloquejar el dispositiu" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "masses %%d escapaments a l'ordre (%s)" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "executant l'ordre /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "crida a exec() fallida:" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "ordre 'getty' no definida per la trucada de dades" #: efax/efax.c:2353 msgid "fax call answered" msgstr "trucada de fax resposta" #: efax/efax.c:2356 msgid "voice call answered" msgstr "trucada de veu resposta" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "ordre de veu no definida per la trucada de veu" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "incapaç de respondre la trucada" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "el mòdem no te suport per a fax" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "no es pot determinar la classe de fax mòdem suportada" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "Multi-Tech ordre de bit activat" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "usan %s en classe %s" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "la pàgina %s fallida" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "finalitzat _ %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "l'ID local (%s) retallada a %d caràcters" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "l'ID local (%s) te caràcters no estàndard" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "usan la línia d'emplenament de la memòria intermèdia del stdout" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "argument de qualitat (-q) incorrecte (%s)" #: efax/efaxmsg.c:215 msgid " Error: " msgstr " Error: " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " Atenció: " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "no es pot obrir el fitxer %s:" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "no es pot obtenir el format del fitxer %s" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "no es pot rebobinar el fitxer %s:" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "no es pot obrir el fitxer de sortida %s" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "error d'escriptura del dispositiu de fax:" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "resposta inesperada «%s»" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "ordre del mòdem «%s» massa llarg" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "temps sobrepassat després de l'ordre: %s" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "temps sobrepassat després d'esperar" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "resposta incorrecta després de l'ordre: %s" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "resposta incorrecta després d'esperar" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "sync: deixant DTR" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "sync: enviant escapaments" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "sync: mòdem no respon" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "ordre de mòdem (%s) fallida" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "ordre de mòdem fallida" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "%s bloquejat o ocupat - esperant" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "s'ha obert %s" #~ msgid "New faxes: " #~ msgstr "Faxos nous: " #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "Copyright (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ "Aquest programa es distribueix sota els termes de la Llicència Pública " #~ "General de GNU, versió 2" #~ msgid "No valid printer selected\n" #~ msgstr "No s'ha seleccionat cap impressora vàlida\n" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " fitxer de configuració\n" #~ "i /dev/modem no existeix\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " fitxer de configuració\n" #~ "Utilitzant opció per defecte de /dev/modem\n" efax-gtk-3.2.8/po/he.po0000644000175000001440000026041011544574527011542 00000000000000# translation of efax-gtk.po to HEBREW # Hebrew translation of Efax-gtk. # Copyright (C) 2001-2005 Chris Vine # This file is distributed under the same license as the efax-gtk package. # Assaf Gillat , 2004-2006. # # msgid "" msgstr "" "Project-Id-Version: efax-gtk\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2006-09-16 16:31+0200\n" "Last-Translator: Assaf Gillat\n" "Language-Team: HEBREW \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.9.1\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: פנקס כתובות" #: src/addressbook.cpp:122 msgid "Name" msgstr "שם" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "מספר" #: src/addressbook.cpp:196 msgid "Add new address" msgstr "הוסף כתובת חדשה" #: src/addressbook.cpp:197 msgid "Delete address" msgstr "מחק כתובת" #: src/addressbook.cpp:198 msgid "Move address up" msgstr "העבר כתובת למעלה" #: src/addressbook.cpp:199 msgid "Move address down" msgstr "העבר כתובת למטה" #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr "מחק כתובת מסומנת?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: מחק כתובת" #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: הוסף כתובת" #: src/addressbook.cpp:574 msgid "Name:" msgstr "שם:" #: src/addressbook.cpp:575 msgid "Number:" msgstr "מספר:" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: קובץ לפקסס" #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "תצוגה" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: תנאים התראות וויתורים" #: src/dialogs.cpp:298 msgid "Accept" msgstr "קבל" #: src/dialogs.cpp:299 msgid "Reject" msgstr "דחה" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr "האם אתה מקבל את התנאים, ההתראות והוויתורים המוצגים למעלה?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr "אודות efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr "אודות efax" #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" "תכנית זו היא תכנית חזית הבנויה מעל efax. התכנית efax היא תכנית המופצת תחת " "רישיון: GNU General Public License, version 2" #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "לא פעיל" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr "שולח פקס" #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr "עונה לשיחה" #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr "ממתין לקבלת שיחות" #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr "אי אפשר לשלוח פקס - פקס מתקבל ברגע זה\n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr "שם קובץ לא תקין\n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr "קובץ לא קיים\n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr "אין למשתמש זכויות קריאה לקובץ זה\n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr "קובץ פוסקריפט לא תקין\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr "משתנה הסביבה HOME$ שלך לא מוגדר\n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" "בעיית מערכת חמורה: לא יכול ליצור תיקייה לשמירת פקסים מתקבלים.\n" "הפקסים לא יתקבלו!\n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** עוצר שליחה/קבלה ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" "בעיית מערכת חמורה: לא יכול ליצור תיקייה לשמירת פקסים מתקבלים.\n" "הפקס הנוכחי לא ישמר!\n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" "בעיית מערכת חמורה: לא יכול לפתוח תיקיית פקסים מתקבלים.\n" "הפקס הנוכחי לא ישמר!\n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" "בעיית מערכת חמורה: לא יכול לשמור את כל הפקסים המתקבלים.\n" "כל או חלק מן הפקסים יהיו חסרים!\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "התקבל Utf8 לא תקין ב- EfaxController::read_pipe_cb()\n" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" "בעיית מערכת חמורה: לא יכול ליצור תיקייה לשמירת פקסים נשלחים.\n" "הפקס הנוכחי לא ישמר!\n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr "עבודת הדפסה" #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr "הדפס פקס נבחר" #: src/fax_list.cpp:212 msgid "View selected fax" msgstr "הצג פקס נבחר" #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr "הוסף/תקן תיאור לפקס נבחר" #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr "מחק פקס נבחר" #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr "רוקן סל אשפה" #: src/fax_list.cpp:248 msgid "Add new folder" msgstr "הוסף תיקיה חדשה" #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr "מחק תיקיה מסומנת" #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr "אפס מונה פקסים חדשים" #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: רשימת פקסים שהתקבלו" #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: רשימת פקסים שנשלחו" #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr "מחק לצמיתות את הפקסים המסומנים?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(הערה: זה ימחק לצמיתות את הפקס מהדיסק)" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" "מחק לצמיתות את הפקסים המסומנים?\n" "\n" "(הערה: זה ימחק לצמיתות את הפקסים מהדיסק)" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: מחק פקס" #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" "רוקן סל אשפה?\n" "\n" "(הערה: זה ימחק לצמיתות את כל הפקסים בסל האשפה מהדיסק)" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: סל אשפה" #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: הוסף תיקייה" #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" "רוקן את התיקייה על ידי מחיקת כל תיקיות המשנה,\n" "או העברתם על ידי גרירה ושחרור.\n" "או מחיקת כל הפקסים המוכלים לפני מחיקת התיקייה" #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: מחק תיקיה" #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr "מחק תיקיה: " #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr "?הדפס פקס נבחר" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: הדפס פקס" #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr "פקסים חדשים:" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: תיאור פקס" #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr "תיאור פקס?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" "שם התיקייה?\n" "(שימו לב שהיא תמוקם בתיקיית השורש \n" "ואפשר לגרור ולשחרר אותה\n" "אל תוך תיקיות אחרות)" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr "אסור לשם תיקיה להכיל תו: " #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr "התיקייה העוקבת כבר קיימת: " #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "תיקיה" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "תאריך" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "תיאור" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "פקסים נכנסים" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "פקסים יוצאים" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "סל אשפה" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: רשימת קבצים" #: src/file_list.cpp:142 msgid "Files to fax" msgstr "קבצים לשליחה" #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr "הצג קובץ נבחר" #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr "הסר קובץ נבחר מהרשימה" #: src/file_list.cpp:188 msgid "Add files to list" msgstr "הוסף קבצים לרשימה" #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr "הוסף קבצים לרשימת הקבצים לשליחה" #: src/file_list.cpp:205 msgid "Move file up" msgstr "העבר קובץ למעלה" #: src/file_list.cpp:206 msgid "Move file down" msgstr "העבר קובץ למטה" #: src/file_list.cpp:593 msgid "Remove file " msgstr "הסר קובץ " #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " מהרשימה?" #: src/file_list.cpp:601 msgid "Remove file" msgstr "הסר קובץ" #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" "כל הזכויות שמורות © 2001 - 2011 כריס וין\n" "תכנית זו מופצת תחת רישיון\n" "GNU General Public License, version 2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" "אופציות:\n" "\t-r התחל את התוכנית במצב קבלה לפקס\n" "\t-s התחל את התוכנית מוחבאת במגש המערכת\n" "ראה קובץ README שמגיע ביחד עם ההפצה לאפשרויות נוספות\n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr "אפשרות לא חוקית. האפשרויות הן:\n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" "צויין שם משתמש לא תקין - הוא חייב להיות\n" "באותיות ASCII. לא יופיע שם משתמש על ראש הדף\n" "אבל לא לדאוג כי מספר הטלפון של הפקס\n" "יופיע בראש הדף\n" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" "סוג פקס לא תקין\n" "מאמץ ברירת מחדל של קבוצה 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr "לא צוינה יציאת התקן טורי " #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr "מאמץ רזולוציית פקס של 204x196 כברירת מחדל\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" "רזולוציית פקס שצוינה לא תקינה\n" "מאמץ רזולוציית פקס של 204x196 כברירת מחדל\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" "צוין מספר צלצולים שגוי\n" "הטלפון יענה לאחר צלצול אחד\n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr "מאמץ גודל עמוד של a4 כברירת מחדל\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" "מצוין גודל עמוד לא תקין\n" "מאמץ גודל עמוד של a4 כברירת מחדל\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" "צוין סוג חיוג לא תקין\n" "מאמץ חיוג צלילים כברירת מחדל\n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr "מצוין ערך כיווץ הדפסה לא תקין: מאמץ ערך ברירת מחדל של 100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "מאמץ הצגת קבצי פוסקריפט ב - 'gv' כברירת מחדל\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr "לא צוינה פיתחה עבור שרת השקע, לכן השרת לא יופעל\n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" "צוין ערך לא תקין של פיתחה עבור שרת השקע, לכן השרת לא יאותחל. ערך הפיתחה צריך " "להיות בין 1024 ל 65535\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "צוינה תיקיה לא תקינה עבור תיקיית העבודה. מתעלם מתיקיה העבודה\n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr " קובץ" #: src/mainwindow.cpp:297 msgid "Socket " msgstr "שקע " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr "דרך קבלת פקס: " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr "קובץ בודד" #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr "קבצים מרובים" #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr "רשימת פקסים בשרת השקע" #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr "מספר טלפון: " #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr "שלח פקס" #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr "ענה לטלפון" #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr "השתלט על השיחה" #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr "המתן לקבלת שיחות" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "עצור" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr "פקס לשליחה" #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr "רשימת פקסים שהת_קבלו" #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr "רשימת פקסים ש_נשלחו" #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "_פקסים בתור משקע" #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr "הכנס קובץ _בודד" #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr "הכנס קבצים _מרובים" #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_פנקס כתובות" #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_הגדרות" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_יציאה" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr "אודות efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr "אודות _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_תרגומים" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_עזרה" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_קובץ" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr "התוכנית הורצה עם האופציה -s אבל אין שום מגש מערכת!\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr "לא צוין מספר פקס. האם ברצונכם לשלוח את הפקס על חיבור פתוח?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr "מספר טלפון:" #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr "עבודה הדפסה התקבלה בשקע" #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk: שקע" #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr "פקס התקבל על ידי efax-gtk" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: פקסים שהתקבלו" #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" "אפשר לשנות הגדרות רק שהתכנית במצב לא פעיל\n" "לחץ על כפתור ה\"עצור\" להביא את התכנית למצה לא פעיל" #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "איטלקית - Luca De Rugeriis\n" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "פולנית - Pawel Suwinski\n" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "בולגרית - Zdravko Nikolov\n" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr "רוסית - Pavel Vainerman\n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "עברית - אסף גילת\n" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "יוונית - הקבוצה היוונית של משתמשי לינוקס\n" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "אלבנית - Besnik Bleta\n" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "הונגרית - Gergely Szakats, Laszlo Csordas\n" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "סינית מופשטת - Kite Lau\n" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "גרמנית - Steffen Wagner\n" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "שוודית - Daniel Nylander\n" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "קאטאלנית - Jordi Sayol Salomo\n" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "סינית מסורתית - Wei-Lun Chao\n" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: תרגומים" #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr "לחץ F1 לעזרה" #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "התקבל Utf8 לא תקין ב- MainWindow::read_error_pipe_cb()\n" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr "הסתיים על ידי אות (סיגנל)" #: src/settings.cpp:68 msgid "Name: " msgstr "שם: " #: src/settings.cpp:69 msgid "Number: " msgstr "מספר: " #: src/settings.cpp:190 msgid "Serial Device: " msgstr "התקן טורי: " #: src/settings.cpp:191 msgid "Lock File: " msgstr "קובץ נעילה: " #: src/settings.cpp:192 msgid "Capabilities: " msgstr "יכולות: " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr "צלצולים (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr "" "סוג פקודות\n" "מודם: " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr "מצב חיוג: " #: src/settings.cpp:211 msgid "Auto" msgstr "אוטומטי" #: src/settings.cpp:213 msgid "Class 1" msgstr "סוג 1" #: src/settings.cpp:215 msgid "Class 2" msgstr "סוג 2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "סוג 2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "חיוג צלילים" #: src/settings.cpp:235 msgid "Pulse" msgstr "חיוג מתקפים" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr "פרמטרי אתחול:" #: src/settings.cpp:509 msgid "Reset Params: " msgstr "פרמטרי איפוס: " #: src/settings.cpp:510 msgid "Other Params: " msgstr "פרמטרים נוספים: " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "השתמש במערכת ההדפסות של GTK+" #: src/settings.cpp:663 msgid "Print Program: " msgstr "תכנית הדפסה: " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr "שיעור כיווץ הדפסה (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" "תיבת דו שיח קופצת\n" "לפני הדפסה" #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" "תכנית להצגת קבצי\n" "פוסקריפט:" #: src/settings.cpp:976 msgid "Run socket server" msgstr "הרץ שרת שקע" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" "תיבת דו שיח קופצת כאשר\n" "מתקבל מהשקע" #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "פיתחה שאליה הפקסים ישלחו:" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "כתובות שאליהן מותר\n" "להתחבר" #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "מחשב מקומי " #: src/settings.cpp:1016 msgid "other" msgstr "אחר" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" "תיבת דו שיח קופצת כאשר\n" "מתקבל פקס על ידי המודם" #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" "הרץ תכנית או קובץ אצווה\n" "כאשר מתקבל פקס על ידי המודם" #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr "רזולוציית שליחת פקס:" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" "כלול מספר פקס\n" "של פקס היעד בשורת\n" "הכותרת של הפקס" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "רגיל" #: src/settings.cpp:1514 msgid "Fine" msgstr "איכותי" #: src/settings.cpp:1767 msgid "Log File: " msgstr "קובץ יומן: " #: src/settings.cpp:1830 msgid "Page Size: " msgstr "גודל עמוד: " #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: הגדרות" #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr "הערה: לחיצה על לחצן האישור תשמור את ההגדרות לקובץ" #: src/settings.cpp:1979 msgid "Reset" msgstr "אפס" #: src/settings.cpp:2012 msgid "Identity" msgstr "הזדהות" #: src/settings.cpp:2015 msgid "Modem" msgstr "מודם" #: src/settings.cpp:2018 msgid "Params" msgstr "פרמטרים" #: src/settings.cpp:2021 msgid "Print" msgstr "הדפסה" #: src/settings.cpp:2027 msgid "Socket" msgstr "שקע" #: src/settings.cpp:2030 msgid "Receive" msgstr "קבלה" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "יומן" #: src/settings.cpp:2039 msgid "Page" msgstr "עימוד" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" "צויין שם משתמש לא תקין בסימניית \"זיהוי\" - המשתמש חייב להיות בעל תווי ASCII " "פשוטים. אם זאת בעיה, השאר את השדה ריק, כי מספר הטלפון של הפקס תמיד מופיע " "בכותרת העליונה." #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr "תצורה שגויה" #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr "מצוין סוג פקס לא תקין" #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr "מצוין גודל עמוד לא תקין" #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr "צוינה רזולוציית פקס שגויה" #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr "צוין מספר צלצולים לא תקין" #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr "צוין סוג חיוג לא תקין" #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr "צוין ערך כיווץ הדפסה לא תקין" #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr "צוינה ערך פיתחה שקע לא תקינה. הוא חייב להיות בין 1024 ל 65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr "הכנס הגדרות מ.." #: src/settings.cpp:3102 msgid " or\n" msgstr " או\n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr "אפס הגדרות" #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" "הכנס כאן את השם שברצונך שיופיע על הכותרת העליונה של הפקסים הנשלחים. זה חייב " "להיות תווי ASCII פשוטים. אם זאת בעיה, השאר את שדה זה ריק, כי בכל מקרה מספר " "הטלפון של הפקס יופיע בכותרת העליונה של הפקס." #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "עזרה של efax-gtk: שם" #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" "כתוב כאן את מספר הטלפון שיופיע בקצה העליון של הפקסים הנשלחים. מספר זה יהיה " "גם המספר שבו יזדהה הפקס למכונות פקסימיליה בקבלת פקסים." #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "עזרה של efax-gtk: מספר" #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" "כתוב כאן את שם ההתקן הטורי שאליו מחובר המודם (אם לא מצוין שום ערך, התכנית " "תשתמש ב '/dev/modem/' כברירת מחדל). אל תכלול את החלק שמתחיל ב- '/dev/' בשם " "ההתקן -- כלומר ציין אותו כ- 'ttyS1' או 'cua2' וכדומה. בלינוקס, 'ttyS0' זהה " "ל- COM 1 ו 'ttyS1' זהה ל- COM 2, וכך הלאה." #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "עזרה של efax-gtk: התקן" #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" "כתוב כאן את נתיב תיקיית הנעילה. אם לא מוגדרת אחת, התכנית תשתמש ב- '/var/" "lock' כברירת מחדל" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "עזרה של efax-gtk: קובץ נעילה" #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" "עם efax-0.9 או גבוה יותר רצוי בדרך כלל להשתמש ב\"אוטומטי\", כך efax ינסה " "למצוא את סוג הפקס בעצמו, אבל אפשר גם לכפות סוג על ידי בחירה באחת מהאפשרויות " "הרצויות. למרות זאת, עם efax-0.8 התכנית תשתמש כברירת מחדל בסוג 2, אז אם רוצים " "להשתמש במודם מסוג 1 עם גרסאות ישנות של efax ציינו את הסוג המבוקש." #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "עזרה של efax-gtk: סוג מודם" #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "אופציה זו מציינת האם להשתמש בחיוג מתקפים או צלילים כאשר שולחים פקסים" #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "עזרה של efax-gtk: סוג חיוג" #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" "אופציה זו מציינת את היכולות של המודם. על מנת לראות את משמעות העניין פנה " "לתיעוד על ידי 'man efax' , וחפש אחר דגלון האופציה '-c'. עם efax גרסה 0.9 " "ומודם סוג 2, בדרך כלל לא תצטרך לציין את אופציה זו ולהשאירה ריקה, והתכנית " "תבדוק את המודם. במידה ומשתמשים בגרסה ישנה של efax או סוג מודם אחר, הערכים " "שיעבדו מעשית עם כל מודם בקצב 14,400 ס\"ש הם 1,5,0,2,0,0,0,0 או " "1,3,0,2,0,0,0,0 למודמים אטיים יותר." #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "עזרה של efax-gtk: יכולות" #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" "אופציה זו מציינת את מספר הצלצולים שהמודם יאפשר לפני שהוא יענה לטלפון במצב " "המתן לקבלת שיחות .ערכים שיתקבלו הם 1 עד 9. אם לא יצוין ערך, התכנית תשתמש " "בערך 1 כברירת מחדל." #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "עזרה של efax-gtk: צלצולים" #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" "אופציה זו מציינת את מחרוזת האתחול של המודם על ידי פקודות 'AT' למצב פקס. " "ציינו את כל הפקודות הנחוצות, מופרדות על ידי רווחים, אבל ללא התחילית 'AT'. אם " "לא תצוין שום מחרוזת, התכנית תשתמש\n" "ב 'Z &FE&D2S7=120 &C0 M1L0' כברירת מחדל, אשר למעשה תהיה נכונה כמעט עבור כל " "מודם." #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "עזרה של efax-gtk: פרמטרי אתחול" #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" "אופציה זו מציינת את פקודות ה-'AT' שיאפסו את המודם. ציינו את כל הפקודות " "שצריך, מופרדות על ידי רווחים עבור פקודות שאמורות להיות מופרדות, אבל בלי " "התחילית 'AT'. אם לא יצוין, התכנית תשתמש כברירת מחדל ב-'Z', שהיא תתאים למעשה " "לרוב המודמים." #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "עזרה של efax-gtk: פרמטרי איפוס" #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" "אופציה זו יכולה לשמש להעביר כל פרמטר רצוי ל-efax (רשמו 'man efax' על מנת " "לראות אלו פרמטרים זמינים). ציינו כמה פרמטרים שדרושים, מופרדים על ידי רווחים " "לכל פרמטר.לדוגמה כללו '-or' לביצוע היפוך סיביות בזמן קבלה עבור מודמים של " "Multitech אשר דורשים זאת. השאירו שדה זה ריק, אלא אם כן יש לכם מודם מיוחד." #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "עזרה של efax-gtk: פרמטרים נוספים" #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" "אם זה יסומן, התוכנית תשתמש במערכת ההדפסה של GTK+ במקום בפרמטרי שורת הפקודה " "המצויינים למטה על מנת להדפיס פקסים." #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "עזרת efax-gtk: השתמש במערכת ההדפסה של GTK+" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "זוהי הפקודה שמדפיסה ולוקחת קבצי פוסקריפט לצינור הקלט הסטנדרטי. אם לא מצוינת " "תכנית, התכנית 'lpr' תבחר כברירת מחדל" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "עזרה של efax-gtk: תכנית הדפסה" #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "אופציה זו תקבע את המידה שבה העמוד המודפס יוקטן כדי להיכנס לתוך קטע העמוד " "הנראה של המדפסת שלכם. המספר מסמל אחוז -- לדוגמה 98 יכווץ את העמוד ל 98 אחוז " "מגודלו. אם לא מצוין דבר, שום כיווץ לא יבוצע (אפשר לציין 100 אם תרצו אבל אין " "לזה משמעות רבה)" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "עזרה של efax-gtk: כיווץ הדפסה" #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" "אופציה זו מציינת האם להראות תיבת דו שיח קופצת לפני הדפסה כאשר לחצן \"הדפס " "פקס נבחר\" נלחץ ברשימת הפקסים שנשלחו או ברשימת הפקסים שהתקבלו. בטלו סימון " "תיבת זו אם לא תרצו תיבת דו שיח (אם ציינתם תכנית הדפסה חיצונית כגון " "'kprinter' בתור תכנית הדפסה, אז אתם בטח לא תרצו לסמן אופציה זו)" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "עזרה של efax-gtk: תיבת דו שיח קופצת" #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" "מציג הפוסקריפט נועד כדי להציג את הפקסים ברשימות הקבלה והשליחה. כמוכן לראות " "פקסים שמוצגים דרך תיבת דו שיח של \"קבצים לשליחה\". ציין כאן את התכנית שבה " "יעשה שימוש להצגת קבצי פוסקריפט. אם לא מצוינת אחת, יעשה שימוש בתכנית 'gv' " "כברירת המחדל. אפשרויות נוספות שיכולות להיות שימושיות הן 'evince' (מציג " "פוסקריפט של גנום) או 'kghostview' (מציג פוסקריפט של KDE). אם יעשה שימוש ב " "'gv' , רצוי להשתמש ב '-media A4' או ב '-media Letter' על מנת לבחור את גודל " "העמוד הנכון. evince ו kghostview עושים את זה אוטומטי." #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "עזרה של efax-gtk: תכנית לצפייה בפוסקריפט" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" "אופציה זו מציינת האם שרת השקע ירוץ עבור CUPS או עבור תכנית הדפסה אחרת. סמנו " "את התיבה אם הוא ירוץ או לא." #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "עזרה של efax-gtk: הרץ שרת שקע" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" "אופציה זו מציינת אם תיבת דו שיח תופיע כאשר מתקבל פקס על ידי שרת השקע ממערכת " "ההדפסה. סמנו את התיבה אם תרצו בתיבת דו שיח (לאופציה זו תהיה השפעה רק כאשר " "תסומן גם התיבה 'הרץ שרת שקע'). אם התכנית לא פעילה הפקס יוכל להישלח ישירות " "מתיבת דו שיח זו." #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr "אופציה זו מציינת את ערך הפיתחה שאליה מאזין שרת השקע." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "עזרה של efax-gtk: פיתחה" #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" "אופציה זו קובעת אם כתובות אחרות חוץ מהמחשב המקומי יהיו מסוגלות ליצור חיבור " "עם השקע. אלא אם כן יש לך דרישות בלתי רגילות(כלומר, במידה ו CUPS או lpd רצים " "על מכונה אחרת), מומלץ לבחור במחשב מקומי. אם אתם מעוניינים שמכונות אחרות " "יוכלו להתחבר, בחרו \"אחר\" ו ציינו את שם השרת במלואו של המחשב שיורשה להתחבר " "(כאשר השמות מופרדים ברווחים, אין צורך לציין localhost ואת שם המחשב שלכם כי " "הם מאופשרים תמיד). מומלץ להריץ את efax-gtk מאחורי חומת-אש אם בחרתם \"אחר\"." #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "עזרה של efax-gtk: חיבור שקע מאושר" #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" "אופציה זו מציינת אם תיבת דו שיח תופיע כאשר מתקבל פקס מהמודם. סמנו תיבה זו אם " "ברצונכם שתופיע תיבת דו שיח." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "עזרה של efax-gtk: קבל תיבת דו שיח קופצת" #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" "אופציה זו מציינת אם תבוצע תכנית או קובץ אצווה כאשר מתקבל פקס מהמודם. סמנו " "את התיבה אם תרצו להריץ תכנית, והכניסו את שם התכנית." #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "עזרה של efax-gtk: הרץ תכנית כאשר מתקבל פקס" #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" "אופציה זו מציינת את הרזולוציה שבה פקסים ישלחו.\"רגיל\" ייתן ערך של 204x98 ו" "\"איכותי\" ייתן ערך של 204x196" #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "עזרה של efax-gtk: רזולוציית שליחת פקס" #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" "אפשרות זו מציינת האם מספר פקס היעד ייכלל בשורת הכותרת של הפקסים הנשלחים. בטל " "סימון של תיבת סימון זו אם אין ברצונך לרות מספר זה (למשל, בגלל שמספר זה מכיל " "מספר גישה של כרטיס חיוג)" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "עזרה של efax-gtk : שורת הכותרת של הפקס" #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" "פרמטר זה מציין את שמו של קובץ היומן שאליו כל התהליך העבודה של המודם ינוטר, " "כל השגיאות והאזהרות יכתבו אליו. אם לא יצוין אחד, לא ייווצר קובץ יומן. (קובץ " "יומן יכול להיווצר על ידי הפניית הפלט הסטנדרטי ופלט השגיאה. (לפרטים נוספים " "ראה קובץ README)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "עזרה של efax-gtk : קובץ יומן" #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr "ציין כאן את גודל העמוד לפקסים" #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "עזרה של efax-gtk: גודל עמוד" #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: עזרה" #: src/helpfile.cpp:73 msgid "Sending" msgstr "שליחת פקס" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "קבלת פקס" #: src/helpfile.cpp:94 msgid "Address Book" msgstr "פנקס כתובות" #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr "רשימת פקסים" #: src/helpfile.cpp:108 msgid "Settings" msgstr "הגדרות" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" "שליחת פקסים\n" "-----------\n" "\n" "לפני ששולחים פקס, הוא חייב להיות מצוין בתיבה \"פקס לשליחה\". הוא חייב להיות " "בפורמט של פוסקריפט (פורמט זה נוצר על ידי מעבדי תמלילים של יוניקס/לינוקס). " "והוא יומר על ידי התכנית לפורמט הפקס tiffg3.\n" "\n" "יש שתי דרכים עיקריות להכנסת פקסים. הראשונה, הפקס יכול להיות קובץ שנשמר על " "מערכת הקבצים. אפשר להכניסו ידנית לתיבת \"פקס לשליחה\", או הכנסה באמצעות תיבת " "הדו שיח של הבחירה. אם הקובץ מורכב מקובץ פוסקריפט אחד תוכל למצוא אותו על ידי " "לחיצה על \"קובץ בודד\". הוא יכול להימצא ביתר קלות על ידי מיקומו בתיקיה $HOME/" "faxout. \n" "\n" "כאשר יותר מקובץ אחד מוצג בתיבת \"פקס לשליחה\", הם ישלחו כפקס אחד מוצמד בסדר " "שבו הקבצים הוכנסו לתיבה. בחירת קבצים מרובים בצורה כזו יכולה להיעשות בקלות " "על ידי שימוש בלחצן \"קבצים מרובים\". לחיצה על \"קבצים מרובים\" מאפשרת " "לקבצים להימצא ולהסתדר על ידי שימוש בחיצים למעלה ולמטה, או על ידי גרירה " "ושחרור בעכבר.\n" "\n" "כאלטרנטיבה, פקסים יכולים להתקבל ישירות ממערכת ההדפסות על ידי שימוש בשרת שקע " "המסופק על ידי התכנית. Efax-gtk שומרת תור של פקסים שהתקבלו מהשקע ויכולים " "להתקבל על ידי בחירת \"שקע\" בדרך קבלת הפקסים, ואז לחיצה על הלחצן \"רשימת " "פקסים בשרת השקע\". זוהי דרך יותר נוחה לשליחת פקסים ממעבד תמלילים. בזמן שיש " "פקס מחכה בתור יופיע עיגול אדום קטן בחלון התכנית בצד הימני של תיבת \"שליחת פקס" "\". לפרטים נוספים כיצד להגדיר את CUPS או lpr/lprng לשלוח פקסים לefax-gtk, " "ראה קובץ README שבא ביחד עם ההפצה.\n" "\n" "מספר הטלפון שאליו הפקס ישלח מוכנס לתוך תיבת \"מספר טלפון\". הוא יכול להיות " "מוכנס ידנית או על ידי שימוש בפנקס הכתובות המובנה. פנקס הכתובות יכול להיות " "מופעל על ידי לחיצה על \"מספר טלפון\" או על ידי התפריט קובץ/פנקס כתובות. " "למרות זאת, אם נוצר כבר חיבור טלפוני עם פקס מרוחק, הפקס יכול להישלח ללא הכנסת " "מספר טלפון בתיבה (תופיע תיבת דו שיח שתשאל האם לשלוח פקס ללא חיוג).\n" "\n" "כאשר פקס מתקבל ממערכת ההדפסה דרך שרת השקע, אפשר להגדיר את התכנית להעלות תיבת " "דו שיח אוטומטית. אם התכנית במצב לא פעיל או מחכה לקבל פקסים, הפקס יכול " "להישלח ישירות מתיבת הדו שיח בלי צורך להשתמש בתור הפקסים הממתינים מהשקע.\n" "\n" "פקסים שנשלחו בצורה תקינה מועתקים לתיקיה $HOME/faxsent, ששמה מורכב מהשנה, " "החודש, היום, השעה והשניות שבהם הסתיימה שליחת הפקס, והם יופיעו ברשימת הפקסים " "הנשלחים. אפשר לפתוח רשימה זו על ידי התפריט 'קובץ/רשימת פקסים שנשלחו'. ראה " "\"שימוש ברשימות פקסים\" בהמשך.\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "קבלת פקסים\n" "----------\n" "\n" "ישנן שלוש דרכים לקבל פקסים.\n" "\n" "הראשונה, כאשר נשלח פקס אפשר לענות לפקס על ידי לחיצה על \"ענה לטלפון\".\n" "\n" "השנייה, התכנית יכולה להשתלט על שיחה שכבר נענתה (למשל על ידי שפורפרת הטלפון) " "על ידי לחיצה על \"השתלט על השיחה\".\n" "\n" "השלישית, אפשר לשים את התכנית על המתן לקבלת שיחות על ידי לחיצה על \"המתן " "לקבלת שיחות\". התכנית תענה אוטומטית לשיחות לאחר מספר מוגדר של צלצולים " "המצוין בקובץ efax-gtkrc, וקבלת הפקס. התכנית תמשיך לקבל פקסים עד שילחץ לחצן ה" "\"עצור\".\n" "\n" "פקסים שהתקבלו יכולים להיות מודפסים, מוצגים, מתוארים ומנוהלים על ידי רשימת " "הפקסים הפנימית. אפשר להעלות אותה דרך התפריט 'קובץ/רשימת קבצים שהתקבלו'.ראה " "\"שימוש ברשימת פקסים\" בהמשך.\n" "\n" "כאשר פקס מתקבל, אפשר לכוון שתיבת דו שיח תופיע (לכו להגדרות לעשות זאת). במסך " "ההגדרות אפשר לציין אפילו תכנית שתבוצע כאשר מתקבל פקס. מספר הפקס מועבר " "לפרמטר הראשון (ורק אליו) של התכנית, וזה מאפשר לתכנית למצוא את הפקס ב $HOME/" "faxin. ההפצה מכילה 2 קבצי אצווה mail_fax ו print_fax, אשר יכולים לשמש לשלוח " "את הפקס בדואר אלקטרוני או להדפיסו בצורה אוטומטית. (קבצי אצווה אלו לא מותקנים " "כברירת מחדל, על מנת להשתמש בהם יש לבצע 'chmod +x' ולהעתיקם לתיקיה שמופיעה " "בנתיב המערכת כגון /usr/local/bin, ואז לציין את שם הקובץ במסך ההגדרות).\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" "שימוש בפנקס כתובות\n" "------------------\n" "\n" "על מנת לבחור מספר טלפון מפנקס הכתובות, הדגישו את הכתובת הרצויה על ידי לחיצה " "על לחצן העכבר השמאלי מעליה, ואז לחצו על \"אישור\".\n" "\n" "כתובות מוספות לרשימה על ידי לחיצה על כפתור ההוספה, ואז השלמת הפרטים התיבה " "שתפתח לפניכם. בכדי למחוק כתובת מפנקס הכתובות, הדגישו את הכתובת הרלוונטית " "ולחצו מחק (סל אשפה). אפשר למיין את פנקס הכתובות בעזרת שימוש בלחצני החצים " "למעלה ולמטה על כתובת מודגשת, או על ידי גרירה ושחרור של העכבר.\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" "שימוש ברשימות פקסים\n" "-------------------\n" "\n" "על מנת להעלות את רשימות הפקסים, לכו אל תפריט 'קובץ' ובחרו את 'רשימת פקסים " "שנשלחו' או את 'רשימת פקסים שהתקבלו'. הדגישו את הפקס שברצונכם להדפיס או להציג " "על ידי לחיצה על הלחצן השמאלי של העכבר. התכניות שמציגות ומדפיסות את הפקס " "מצוינות בקובץ התצורה efax-gtkrc, או אם לא מצוינות ההדפסה תעשה על ידי lpr " "(יעבוד ברוב מכונות היוניקס) וההצגה תעשה על ידי gv.\n" "\n" "על מנת להדפיס פקס, פרמטר בשם PRINT_SHRINK יכול להיות מצוין בefax-gtkrc על " "מנת לאפשר לעמוד פקס להתאים להדפסה בגלל מגבלות השוליים של המדפסות. פרמטר של " "98 יעבוד ברוב המדפסות. אפשר לשנות את פרמטר זה במסך ההגדרות ,הכנסת ערך חדש " "ב'הדפסה/שיעור כיווץ הדפסה'\n" "\n" "אפשר להוסיף תיאור לפקס שהתקבל כאשר הוא מופיע ברשימה (כמוכן ניתן לתקן את " "התיאור) על ידי לחיצה על הכפתור הרלוונטי -- זה יאפשר לכם למצוא את פקסים ביתר " "קלות.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "הגדרות\n" "------\n" "\n" "אפשר לשנות את ההגדרות של התכנית על ידי שינוי ידני של הקבצים $HOME/.efax-" "gtkrc , $sysconfdir/efax-gtkrc או /etc/efax-gtkrc. מנגנון החיפוש של התכנית " "מחפש את הקובץ בסדר זה, כך ש $HOME/.efax-gtkrc לוקח עדיפות על שני האחרים.\n" "\n" "אפשר לשנות כמוכן את קובץ התצורה על ידי שימוש במסך ההגדרות שמועלה דרך התפריט " "'קובץ/הגדרות'. ההגדרות שמוכנסות בשימוש במסך זה נשמרות תמיד ב $HOME/.efax-" "gtkrc. לפי כך, אם שיניתם משהו במסך ההגדרות ואתם רוצים להחזיר את המצב להגדרות " "הגלובליות, זה ניתן להיעשות בקלות על ידי מחיקת הקובץ $HOME/.efax-gtkrc , או " "על ידי לחצן ה'איפוס' במסך ההגדרות, שיטען את ההגדרות מהקובץ הגלובלי " "($sysconfdir/efax-gtkrc או /etc/efax-gtkrc).\n" "\n" "אפשר להשיג עזרה בשעת מילוי ההגדרות על ידי החזקת העכבר מעל לחצן העזרה הרצויה " "(?), אשר יעלה את חלון ה\"טיפ\", או ללחוץ על הכפתור, שיעלה בתורו מידע עזרה.\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr "שקע רץ על פיתחה" #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr "עבודה הדפסה התקבלה על שקע\n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "סוגר את השקע\n" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: פקסים בתור מהשקע" #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr "עבודות הדפסה בתור" #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr "הכנס פקס מסומן לשליחה" #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr "סמן את הפקס הנבחר לשליחה" #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr "עבודת הדפסה:" #: src/socket_list.cpp:501 msgid "Remove " msgstr "הסר" #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: הסר פקס מתור" #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: עבודה הדפסה התקבלה בשקע" #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr "הכנס פקס לתור " #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr " התקבל משקע. שלח פקס או הכנס לתור?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr "רשימת פקסים שהתקבלו" #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr "רשימת פקסים שנשלחו" #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr "ממתין לקבלה" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "יציאה" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr "הצלחה" #: efax/efax.c:380 msgid "number busy or modem in use" msgstr "המספר תפוס או שהמודם בשימוש" #: efax/efax.c:381 msgid "unrecoverable error" msgstr "שגיאה ללא אפשרות התאוששות" #: efax/efax.c:382 msgid "invalid modem response" msgstr "תגובת מודם לא תקינה" #: efax/efax.c:383 msgid "no response from modem" msgstr "אין תגובה מהמודם" #: efax/efax.c:385 msgid "internal error" msgstr "תקלה פנימית" #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "" #: efax/efax.c:419 msgid "DCS - session format" msgstr "" #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "" #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "" #: efax/efax.c:430 msgid "MPS - not done" msgstr "" #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "" #: efax/efax.c:436 msgid "EOP - done" msgstr "" #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "" #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "" #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "" #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "" #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "" #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "" #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "" #: efax/efax.c:472 msgid "UNKNOWN" msgstr "לא ידוע" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr "יכולות מרוחקות ומקומיות לא תואמות" #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr "לא יכול למחוק קובץ %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "הקובץ הוסר: %s" #: efax/efax.c:784 msgid "header:" msgstr "כותרת:" #: efax/efax.c:868 msgid "characters received while sending" msgstr "התקבלו תווים בעת השליחה" #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr "" #: efax/efax.c:915 msgid "flow control did not work" msgstr "בקרת זרימה לא הצליחה" #: efax/efax.c:954 msgid "modem response in data" msgstr "" #: efax/efax.c:973 msgid "run length buffer overflow" msgstr "" #: efax/efax.c:1036 msgid "file write:" msgstr "קובץ נכתב:" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "" #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr "שגיאות קבלה" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr "התקבלו %d שורות עם %d שגיאות" #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr "" #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "פסק זמן בזמן מידע בדיקה" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr "הבית האחרון של המסגרת הוא NULL" #: efax/efax.c:1222 msgid "sent" msgstr "נשלח" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "למסגרת HDLC חסרה תחילית 0xff" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr "" #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr "פסק זמן בקריאת מידע מסגרת" #: efax/efax.c:1291 msgid "frame error" msgstr "שגיאת מסגרת" #: efax/efax.c:1294 msgid "no response after frame data" msgstr "אין תגובה לאחר מידע מסגרת" #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr "תגובה שגויה אחרי מידע מסגרת" #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr "" #: efax/efax.c:1371 msgid "wrong carrier" msgstr "נושא (carrier) שגוי" #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr "תגובה שגויה לפקודה לקבלת מסגרת" #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr "" #: efax/efax.c:1391 msgid "received" msgstr "התקבל" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "המזהה המרוחק הוא" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "אין תשובה מהפקס המרוחק" #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr "לא יכול לפתוח דף" #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "למכשיר המרוחק יש מסמך אחד או יותר לשלוח ויכול לקבל" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "למכשיר המרוחק יש מסמך אחד או יותר לשלוח ולא יכול לקבל" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "למכשיר המרוחק אין מסמך לשלוח ויכול לקבל" #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "למכשיר המרוחק אין מסמך לשלוח ולא יכול לקבל" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "המכשיר המרוחק לא יכול לקבל, מנסה בכל זאת" #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "למכשיר המרוחק אין מה לשלוח, מנסה בכל זאת" #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr "הערוץ לא שמיש במהירות %d" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr "הערוץ לא שמיש במהירות נמוכה" #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr "תגובה לא תקינה אל DCS" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr "נשלח דף %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr "תגובת קדם־דף לא תקינה" #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr "התעלמות מבקשת פסיקה" #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr "פסק זמן בזמן המתנה לפקודה" #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr "הדף נשמר אל %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr "פקודה לא מוכרת" #: efax/efax.c:1843 msgid "no command or response from remote" msgstr "אין פקודה או תגובה ממכשיר מרוחק" #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr "" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr "" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "" #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "" #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr "" #: efax/efax.c:2081 msgid "too many page send retries" msgstr "יותר מידי נסיונות שליחת דפים" #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr "" #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr "מחייג %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "המזהה המרוחק הוא%s" #: efax/efax.c:2216 msgid "called" msgstr "חייג" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "התחבר" #: efax/efax.c:2224 msgid "number is busy" msgstr "המספר תפוס" #: efax/efax.c:2226 msgid "dial command failed" msgstr "פעולת חיוג נכשלה" #: efax/efax.c:2304 msgid "waiting for activity" msgstr "מחכה לפעילות" #: efax/efax.c:2306 msgid "activity detected" msgstr "פעילות זוהתה" #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr "לא יכול לענות: אי אפשר לנעול התקן" #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr "" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr "קריאה ל- exec() נכשלה:" #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "לא הוגדרה פקודת getty עבור שיחת נתונים" #: efax/efax.c:2353 msgid "fax call answered" msgstr "שיחת פקס נענתה" #: efax/efax.c:2356 msgid "voice call answered" msgstr "שיחת קול נענתה" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr "לא הוגדרה פקודת שיחת קול עבור שיחת קול" #: efax/efax.c:2384 msgid "unable to answer call" msgstr "לא יכול לענות לשיחה" #: efax/efax.c:2425 msgid "modem does not support fax" msgstr "המודם לא תומך בפקס" #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "לא יכול לקבוע מחלקת (class) תמיכת מודם־פקס" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr "" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr "" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr "הסתיימה - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr "" #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr "" #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr "משתמש בחוצץ שורות לפלט הסטנדרטי" #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "" #: efax/efaxmsg.c:215 msgid " Error: " msgstr " שגיאה: " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " תקלה: " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "לא יכול לפתוח קובץ %s:" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "לא יכול לקבל תבנית קובץ %s" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "לא יכול להחזיר קובץ לאחור %s:" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "לא יכול לפתוח קובץ פלט %s:" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr "תקלת שגיאה התקן פקס:" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr "תגובה לא צפוייה \"%s" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr "פקודת מודם \"%s\" ארוכה מידי" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr "פסק זמן אחרי פקודה: %s" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr "פסק זמן אחרי המתנה" #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr "תגובה שגויה אחרי פקודה: %s" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr "תגובה שגויה אחרי המתנה" #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "סנכרון: מוריד DTR" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "סנכרון: שולח escapes" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "סנכרון: המודם לא מגיב" #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr "פקודת מודם (%s) נכשלה" #: efax/efaxio.c:419 msgid "modem command failed" msgstr "פקודת מודם נכשלה" #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "התקן %s נעול או תפוס - מחכה" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr "התקן %s נפתח" #~ msgid "New faxes: " #~ msgstr "פקסים חדשים: " #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ "כל הזכויות שמורות © 2001 - 2008 כריס וין\n" #~ "\n" #~ "תכנית זו מופצת תחת רישיון\n" #~ "GNU General Public License, version 2" #~ msgid "No valid printer selected\n" #~ msgstr "לא נבחרה מדפסת תקינה\n" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " בקובץ התצורה\n" #~ "ו '/dev/modem' לא קיים\n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " בקובץ בתצורה\n" #~ "משתמש בברירת מחדל של '/dev/modem'\n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr "מאמץ תכנית הדפסה 'lpr' כברירת מחדל\n" #~ msgid "Put the name to appear on the fax top header on sent faxes here" #~ msgstr "כתוב כאן את השם שיופיע בקצה העליון של הפקס בפקסים שאתה שולח." #~ msgid "From" #~ msgstr "מאת" #~ msgid "?\n" #~ msgstr "?\n" #~ msgid "Refresh fax list" #~ msgstr "רענן רשימת פקסים" efax-gtk-3.2.8/po/sv.gmo0000644000175000001440000016771411544574532011753 00000000000000D 3l8#B9#(|#[#_ +a8Px<@> D DD0.D_D,dDDD#D6D' G 2G >GIGYGhGoG%GGG&G GG+H!CH1eHH HHHHH II,IAI^TI*II#IJJ !J +Jn8JJJJJK KK(KAKUK lK xKBKK K{KiLp|LLMM63MjM MMM MMM MMM&MgN}N#NNN,NO'O0O:6OqO8O:OGODP=`PLPP: QDQcQ=QQ(?R>hR9RR%SG&SnSU NU ZUeU mU{UU UUUU UUUVV3VIVNVTV [VLfVTV#W,WAW;`WWWWW WW-X/X!MX oX yXX XX!XgX'Y)@Y'jY*YYYY ZZ Z7ZUZhZ|ZZZZ[T\ d]n]]] ]]]] ]]^ ^ ^'^F^L^[^q^ ^^^_^__[{_U_c-``` `````` aaa a+a$Cahaqayaaaaa aa%aMbgbxbGbcd!aef g(ghPjmkhBlldTnoxNqqMrcrJtOtUt]t/6ufuku}uSu4v w'w:w@wFwWw ]w gwuww,wwww'x8xTxhxxxx"x!x yy )y4yPyfy0y"y(yyz-zHz\zrzzzz(zz{6{T{t{ {"{){${| ,|7|M|b|-y|||||}}1}@}"T}w}}}}}}& ~3~F~Z~z~~~ ~ ~~ ~#~*$Jo~)(' P]yÀ?ڀ!<"V&y'ԁ '17Hf o26Â%+/Q2*8߃;)T~6$  3Ndy$҅$ 2Mc|ن  1Q,ngE4I~ *:k8I P[:j*!ت#c + έ ڭ,-B4U 2,?Slrįӯw *( jڱ( > JNV ²sͲAhQ̳:; OYi´$ǴjW&o +ѵ =T?q8H38NQٷ7,KKjy40KeD-MD_9M` s }  ؼ 2>YoGO ?`wG߾" /0M~# Ͽ߿ i-'*!! Cdy!fjH2 1;Sh%p    !,!Npjl8j_kp  %2 Abio v!$4 D RIs vS2~c38QaU`Q0|)QxP +2. ;@ RD`,  &8Q,e$-%+#Cg|$+  .8Vm5'& &?[q#0!( Jk'"-,$!Qs 5 &<Sl ""B]r* 5 L Zg%0$ 9Nk&% 7Rp9#,,*Wr,$ #9B8]<-6,;c1AF3Z 8(*;DWo#!#'5!]&* @Lk+H_%/|Xk3v UU[*BynY V,5!*r12=Y~9q8D(mxX {SuaEG" wMrh1LJMfc`:}b'T9l&I-@ 7+!pVO5 Ns"4tZCIi>08\kAj^2]e Li>dOxvB@/A#Po {K?P6H=&WZ w};E'.?(J\;)hzz <6qm%csD Q-0~ WS^)R,_nK<G4Q:|NR$][p`$udbf#Fl.37C+TgoyjeFtag (NOTE: This will permanently delete the fax from the file system) *** Stopping send/receive session *** Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed, and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed when a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax or print a fax to a user automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path such as /usr/local/bin, and then specify the script name in the settings dialog.) Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript or PDF format (formats produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see the README file which comes with the distribution. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item (see the "Address Book" tag in this help dialog). However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See "Using the fax lists" further below. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the `tooltips' for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. Error: Warning: from the list? has been received on socket. Send or queue fax? or %d characters received while waiting to send%s locked or busy - waiting?A fax has been received by efax-gtkA postscript viewer is used to view sent and received faxes via the fax lists, and also to view faxes to be sent identified via the "Files to fax" file selector dialog. Specify here the command to be used to view postscript files. If none is specified, the program will default to 'gv'. Other possibilities you may want to specify are 'evince' (the Gnome image viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may need to use the '-media A4' or '-media Letter' option to select correct paper size. evince and kghostview do this automaticallyA print job has been received on socketAbout _efaxAbout efaxAbout efax-_gtkAbout efax-gtkAcceptAdd files to listAdd files to the file list for faxingAdd new addressAdd new folderAdd/amend description for selected faxAddress BookAddresses allowed to connectAdopting default fax resolution of 204x196 Adopting default page size of a4 Adopting default postscript view command of 'gv' Albanian - Besnik Bleta Answer callAnswering callAutoBulgarian - Zdravko Nikolov CAN: data reception cancelledCFR - channel OKCIG - poller IDCRP - repeat commandCSI - answering IDCan't change settings unless the program is inactive Press the Stop button to make it inactiveCannot send fax - a fax is being received Capabilities: Choose the selected fax for sendingClass 1Class 2Class 2.0Config ErrorCopyright (C) 2001 - 2011 Chris Vine This program is released under the GNU General Public License, version 2 DCN - disconnectDCS - session formatDIS - answering capabilitiesDTC - poller capabilitiesDateDelete addressDelete folder: Delete selected address?Delete selected faxDelete selected folderDescriptionDial Mode: Do you accept the Conditions, Notices and Disclaimers shown above?EOM - not done, new formatEOP - doneEmpty the folder by deleting any child folders and drag-and-dropping or deleting any contained faxes before deleting folderEmpty trash folderEmpty trash folder? (NOTE: This will permanently delete all the faxes in the Trash folder from the file system)Enter _multiple filesEnter selected fax to sendEnter settings from Execute a program or script when fax received by modemFTT - channel not OKFax ListsFax description?Fax entry method: Fax to sendFile File does not exist Files to faxFineFolderFolder name cannot contain character: Folder name? (Note this will be placed in the top level and can be drag-and-dropped into other folders)German - Steffen Wagner Greek - Hellenic Linux Users Group HDLC frame missing initial 0xffHebrew - Assaf Gillat Hungarian - Gergely Szakats, Laszlo Csordas IdentityInactiveInboxInclude destination fax number on fax page top header lineInitialization Params:Invalid Utf8 received in EfaxController::read_pipe_cb() Invalid Utf8 received in MainWindow::read_error_pipe_cb() Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored Invalid dial mode specifiedInvalid dialmode specified Adopting default of tone dialling Invalid fax resolution specified Adopting default fax resolution of 204x196 Invalid modem class specifiedInvalid modem class specified Adopting default of Class 2 Invalid option. Options are: Invalid page size specifiedInvalid page size specified Adopting default page size of a4 Invalid port for the socket server has been specified, so the server will not be started. It needs to be between 1024 and 65535 Invalid print shrink parameter specifiedInvalid print shrink specified: adopting default value of 100 Invalid ring number specified Will answer after one ring Invalid rings number specifiedInvalid sent fax resolution specifiedInvalid socket port number specified. It must be between 1024 and 65535Invalid user name specified - it must be in plain ASCII characters. No user name will be shown on the fax top header line, but don't worry as the fax station number will always be given on the top header Invalid user name specified in "Identity" tab - it must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerItalian - Luca De Rugeriis List _received faxesList received faxesList sent faxesLock File: Log File: LoggingMCF - page OKMPS - not doneModemModem Class: Move address downMove address upMove file downMove file upMulti-Tech bit order setMultiple filesNSC - poller featuresNSF - answering featuresNSS - caller featuresNameName:Name: New faxes:No fax number specified. Do you want to send the fax on an open connection?No port for the socket server has been specified, so the server will not be started No serial port device specified in Not valid file name Not valid postscript/PDF file Note: pressing the OK button will save the settings in fileNumberNumber:Number: Other Params: PIN - page not OK, call operatorPIP - page OK, call operatorPRI-EOM - not done, new format, call operatorPRI-EOP - done, call operatorPRI-MPS - not done, call operatorPRINT JOBPRINT JOB: PagePage Size: ParamsPermanently delete selected fax? Permanently delete selected faxes? (NOTE: This will permanently delete the faxes from the file system)Polish - Pawel Suwinski Popup confirmation dialog before printingPopup dialog when fax received by modemPopup dialog when fax received from socketPort to which faxes to be sent:Postscript viewer program:Press F1 for helpPrintPrint Program: Print Shrink (50-100):Print job received on socket Print selected faxPrint selected fax?PulsePut the lock file directory here. If none is specified, the program defaults to /var/lockPut the name to appear on the fax top header on sent faxes here. It must be in plain ASCII characters. If this is a problem, leave it blank as the fax station number will always be given on the top headerPut the number to appear on the fax top header on sent faxes here. This will also comprise the fax station ID reported to the sending fax machine when receiving faxesPut the serial device to which the modem is connected here (if none is given, the program defaults to /dev/modem). Do not include the `/dev/' part of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, ttyS0 equates to COM 1, ttyS1 to COM 2, and so onQueue faxQueued _faxes from socketQueued print jobsQuitRTN - page not OK, check channelRTP - page OK, check channelReceiveReceive standbyReceivingRejectRemove Remove fileRemove file Remove selected file from listResetReset Params: Reset new faxes countReset settingsRings (1-9): Run socket serverRussian - Pavel Vainerman SERIOUS SYSTEM ERROR: Can't create directory to save received fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't create directory to save received faxes. Faxes cannot be received! SERIOUS SYSTEM ERROR: Can't create directory to save sent fax. This fax will not be saved! SERIOUS SYSTEM ERROR: Can't open received fax directory. This fax will not be saved! SERIOUS SYSTEM ERROR: Cannot save all of the received fax. All or part of the fax will be missing! Send faxSendingSending faxSent Fax Resolution:Sent boxSerial Device: SettingsSimplified Chinese - Kite Lau Single fileSocketSocket Socket listSocket running on port Specify the page size for faxes hereStandardStandbyStanding by to receive callsStopSwedish - Daniel Nylander TSI - caller IDTake over callTel number: Telephone numberThe following folder already exists: The program has been started with the -s option but there is no system tray! The remote ID isThe remote ID is %sThis can be used to pass any other parameter to efax (do `man efax' to see what is available). Specify as many of these as are needed, separated by spaces for different parameters -- eg include `-or' to do a bit reversal during receive for Multitech modems which require it. Unless you have an unusual modem, leave this blankThis defines the number of rings the modem allows to pass before answering the telephone when in Standby mode. Acceptable values are 1 to 9. If none is specified, the program defaults to 1This is the command which prints and takes postscript input on standard input. If none is specified, the program will default to `lpr'. This has no effect if the "Use GTK+ Print System" button is checkedThis parameter specifies a log file to which progress on negotiations and fax status, and errors and warnings, are logged. If none is specified, then no log file will be maintained. (A log file can also be kept by redirecting stdout and stderr -- see the README file for further details)This parameter specifies whether a pop-up dialog will appear when a fax is received from a modem. Check the box if you want a pop-up.This program (efax-gtk) is a front end for efax. efax is a program released under the GNU General Public License, version 2 by Ed CasasThis specifies the `AT' commands that will reset the modem. Specify as many commands as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z', which will be correct for practically all modemsThis specifies the capabilities of the modem. To see what these mean do `man efax', and look at the operation of the `-c' flag. With efax-0.9 and a Class 2 modem, you usually won't need to specify this and should leave it blank, as the program will interrogate the modem. If using an older version of efax or a different class of modem, values which will work with practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for slower onesThis specifies the initializing `AT' commands for the modem when in fax mode. Specify as many of these as are needed, separated by spaces for commands which need to be separated, but without a prepended `AT'. If none is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which will be correct for practically all modemsThis specifies the port number on which the socket server is to listen. It should be between 1024 and 65535.This specifies the resolution to which faxes are sent. "Standard" gives 204x98 and "Fine" gives 204x196This specifies whether a confirmatory pop-up dialog is to appear before printing whenever the "Print selected fax" button is pressed in the Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a dialog (if you have specified an external print manager such as 'kprinter' in the Print Program box, then you will not want this checked). This has no effect if the "Use GTK+ Print System" button is checkedThis specifies whether a pop-up dialog is to appear whenever a fax is received by the socket server from the print system. Check the box if you want a dialog (this has no effect unless you have also checked the box for the socket server to run). If the program is inactive or is standing by to receive faxes, the fax can be sent directly from this dialogThis specifies whether a program or script is to be executed when a fax is received from a modem. Check the box if you want to execute a program, and enter the program name. efax-gtk comes with two scripts, print_fax and mail_fax, which can be used automatically to print a received fax or to mail it to a user (so to mail a fax you can enter `mail_fax' here). See the README file for further details.This specifies whether a socket server is to be run for CUPS or some other print system. Check the box if it is to runThis specifies whether the destination fax number is included in the top fax header line for sent faxes. Uncheck the box if you do not want this to be shown (say because it includes a pay card access number)This specifies whether tone or pulse dialling will be used when sending faxesThis will determine the extent to which a printed page will be reduced to fit within a printer's print area. It is a percentage -- eg 98 will shrink the page to 98 per cent of its size. If none is specified no shrink will take place (ie you can, but there is no need to, specify 100). This has no effect if the "Use GTK+ Print System" button is checkedToneTrashUNKNOWNUsage: efax-gtk [options] [filename] Options: -r Start the program in receive standby mode -s Start the program hidden in the system tray See the README file which comes with the distribution for further details User does not have read permission on the file ViewView selected faxView selected fileWith efax-0.9 or higher you should usually pick "Auto", as then efax will work out the class of the modem by itself, but you can also force a class by picking one of the specified ones if you want. However, with efax-0.8 the program defaults to Class 2, so if you are using a Class 1 modem with old versions of efax specify the Class hereYou don't have the $HOME environmental variable set _Address book_Enter single file_File_Help_List sent faxes_Quit_Settings_Translationsabnormal termination (code %d)activity detectedbit-reversed HDLC frame, reversing bit ordercalledcan't answer: can't lock devicecan't delete file %s:can't determine fax modem class supportcan't get format of file %scan't open file %s:can't open output file %s:can't open pagecan't rewind file %s:channel not usable at %d bpschannel not usable at lowest speedcharacters received while sendingconnecteddial command faileddialing %sefax-gtk help: Capabilitiesefax-gtk help: Deviceefax-gtk help: Dial Modeefax-gtk help: Execute program when fax receivedefax-gtk help: Fax top header lineefax-gtk help: Initialization Parametersefax-gtk help: Lock Fileefax-gtk help: Log Fileefax-gtk help: Modem Classefax-gtk help: Nameefax-gtk help: Numberefax-gtk help: Other Parametersefax-gtk help: Page Sizeefax-gtk help: Popupefax-gtk help: Portefax-gtk help: Postscript Viewer Programefax-gtk help: Print Programefax-gtk help: Print Shrinkefax-gtk help: Receive pop-upefax-gtk help: Reset Parametersefax-gtk help: Ringsefax-gtk help: Run socket serverefax-gtk help: Sent Fax Resolutionefax-gtk help: Socket connections allowedefax-gtk help: Use GTK+ print systemefax-gtk socketefax-gtk: efax-gtk: Add addressefax-gtk: Add folderefax-gtk: Address bookefax-gtk: Conditions, Notices and Disclaimersefax-gtk: Delete addressefax-gtk: Delete faxefax-gtk: Delete folderefax-gtk: Fax descriptionefax-gtk: File listefax-gtk: File to faxefax-gtk: Helpefax-gtk: Print faxefax-gtk: Queued faxes from socketefax-gtk: Received fax listefax-gtk: Remove queued faxefax-gtk: Sent fax listefax-gtk: Translationsefax-gtk: Trash folderefax-gtk: fax receivedefax-gtk: print job received on socketefax-gtk: settingsexec() call failed:executing command /bin/sh -c %sfailed page %sfax call answeredfax device write error:file write:finished - %sflow control did not workframe errorframe too long (%d, > %d max bytes)header:incompatible local and remote capabilitiesincorrect quality (-q) argument (%s)internal errorinterrupt request ignoredinvalid modem responseinvalid post-page responseinvalid response to DCSlast byte of frame is NULLlocal ID (%s) has non-standard characterslocal ID (%s) truncated to %d characterslocalhost modem command "%s" too longmodem command (%s) failedmodem command failedmodem does not support faxmodem response in datano +FPTS response obtained, it is assumed that fax was receivedno XON/DC2 received after CONNECTno answer from remote faxno command or response from remoteno getty command defined for data callno response after frame datano response from modemno voice command defined for voice callnumber busy or modem in usenumber is busyopened %sotherpage saved to %sreceive (+FDR) command failedreceivedreceived %d lines with %d errorsreceived TCF - channel check (OK: run of %d in %d)received TCF - channel check (not OK: run of %d in %d)received short frame (%d bytes)reception errorsremote cannot receive, trying anywaysremote has no documents to send and can receiveremote has no documents to send and cannot receiveremote has nothing to send, trying anywaysremote has one or more documents to send and can receiveremote has one or more documents to send and cannot receiveremote has one or more documents to send.removed file: %srun length buffer overflowsentsent %d+%d lines and %d+%d bytes, in %d secs at %d bpssent TCF - channel check of %d bytessent page %ssuccesssync: dropping DTRsync: modem not respondingsync: sending escapesterminated by signaltimed out after command: %stimed out after waitingtimed out during training check datatimed out reading frame datatimed out waiting for commandtoo many %%d escapes in command (%s)too many page send retriesunable to answer callunexpected response "%s"unrecognized commandunrecoverable errorusing %s in class %susing line buffering of stdoutvoice call answeredwaiting for activitywrong carrierwrong response after command: %swrong response after frame datawrong response after waitingwrong response to command to receive a frameProject-Id-Version: efax-gtk 3.0.8 Report-Msgid-Bugs-To: cvine@users.sourceforge.net POT-Creation-Date: 2011-03-30 10:35+0100 PO-Revision-Date: 2006-02-11 12:04+0100 Last-Translator: Daniel Nylander Language-Team: Swedish MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit (NOTERA: Detta kommer att ta bort faxet permanent från filsystemet) *** Stoppar session för sändning/mottagning *** Mottagning av fax ----------------- Det finns tre sätt att ta emot fax. Första sättet är att programmet kan ställas in att svara på ett faxsamtal som ringer men inte har blivit besvarat genom att trycka på "Svara"-knappen. Andra sättet är att programmet kan ta över ett samtal som redan har besvarats (till exempel med en vanlig telefon) genom att trycka på "Ta över samtal"-knappen. Tredje sättet är att programmet kan placeras i mottagningsläge genom att trycka på knappen "Mottagningsläge". Detta kommer att automatiskt svara på samtal efter ett förinställt antal signaler enligt filen efax-gtkrc, och ta emot faxet. Programmet kommer att fortsätta att ta emot fax tills knappen "Stopp" har tryckts på. Mottagna fax i formatet tiffg3 (en fil för varje sida) placeras i en katalog under $HOME/faxin som har ett namn som framställs av det år, månad, dag, timma och sekund som mottagning av faxet blev klar och är faxets id-nummer. Mottagna fax kan skrivas ut, visas, beskrivas och hanteras med den inbyggda faxlistefunktionen. Denna kan tas fram från menyposten "Arkiv/Lista mottagna fax". Se "Användning av faxlistor" nedan. När ett fax tas emot kan även en popup-dialog ställas in att visas (gå till inställningsdialogen för att göra detta). I inställningsdialogen kan du också ange ett program som ska startas när ett fax tas emot. Faxets id-nummer skickas som första (och enda) argument till programmet som gör att programmet kan hitta faxet i $HOME/faxin. Distributionen innehåller två startbara skript, mail_fax och print_fax som kan användas för att e-posta ett fax eller att skriva ut ett fax till en användare automatiskt när det tas emot. (Dessa skript blir inte installerade med "make install" - om du vill använda dem, gör dom startbara med "chmod +x" och kopiera dem till en katalog som finns i systemets sökväg, såsom /usr/local/bin och ange skriptets namn i inställningsdialogen.) Sändning av fax --------------- Före ett fax skickas måste det anges i "Fax att skicka"-rutan. Det måste vara i Postscript-format eller PDF-format (ett format som produceras av alla ord- och dokumentbehandlare i Unix/Linux) och kommer att konverteras av detta program till det korrekta faxformatet tiffg3. Det finns två ingångsmetoder för fax. Först, fax som ska sändas kan vara en fil sparad på filsystemet. Det kan manuellt anges i "Fax att skicka"-rutan eller genom filväljardialogen. Om filen består av en enda Postscript-fil eller PDF-fil kan du hitta den genom att trycka på "En fil"-knappen. Den kan lättare hittas med denna dialog om den är placerad i katalogen $HOME/faxout. När fler än en fil anges i "Fax att skicka"-rutan kommer de att skickas som ett enda fax och infogade i den ordning de angavs i rutan. Sådana multipla filer kan lätt väljas från fillistan som visas genom att trycka på "Flera filer"-knappen. Genom att trycka på "Flera filer"-knappen kan filer hittas och läggas till i fillistan och de kan sorteras genom upp- eller nedpilknapparna eller genom att dra och släppa dem med musen. Som ett alternativ kan fax tas emot direkt från utskriftssystemet genom att använda programmets uttagsserver. Efax-gtk underhåller en lista av köade fax som tagits emot från uttaget och som går att komma åt genom att välja "Uttag" som metod för att ta in fax och sedan ta upp listan över köade fax genom att trycka på knappen "Uttagslista". Det är ett behändigt sätt att skicka fax från en ordbehandlare och gör att ett fax kan skickas till utsändning till efax-gtk från ordbehandlingsprogrammet. När ett fax är köat för utskickning i uttagslistan visas en liten röd cirkel på höger sida av "Fax att skicka"-rutan i programmets huvudfönster. För information om hur man ställer in CUPS eller lpr/lprng för att skicka till efax-gtk, se filen README som kommer med distributionen. Telefonnumret till vilken faxet ska skickas anges i rutan "Telefonnummer". Detta kan anges direkt i rutan eller genom att använda den inbyggda adressboken. Adressboken kan hämtas upp genom att trycka på "Telefonnummer"-knappen eller från menyvalet "Arkiv/Adressbok" (se "Adressbok"-fliken i hjälpdialogen). Dock om en telefonanslutning redan har etablerats med fjärrmottagaren kan faxet skickas utan att ringa genom att lämna "Telefonnummer"-rutan blank (en dialog kommer att visas och fråga om du vill skicka faxet utan att ringa). När ett fax tas emot från utskriftssystemet via uttagsservern, kan programmets inställningar också konfigureras för att visa en dialogruta automatiskt. Om programmet är inaktivt eller i mottagningsläge kan faxet skickas direkt från denna dialog utan att behöva hämta upp listan över köade fax mottagna från uttaget. Fax som skickas korrekt kopieras till en katalog i $HOME/faxsent vilken har ett namn som fås från det år, månad, dag, timma och sekund faxet skickades och kommer att visas i listan över skickade fax. De inkluderas endast i den listan om de har skickats utan fel. Meddelandenrutan kommer att visa förloppet för ett fax som skickas. Faxlistan kan hämtas upp från menyvalet "Arkiv/Lista skickade fax". Se "Användning av faxlistor" nedan. Inställningar ------------- Programinställningar kan ändras genom att manuellt redigera konfigurationsfilen för efax-gtk som omfattar $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc eller /etc/efax-gtkrc. Filen söks efter i den ordningen så att $HOME/.efax-gtkrc gäller först av de tre. Konfigurationsfilen kan också ställas in genom inställningsdialogen som hämtas från menyposten "Arkiv/Inställningar". Inställningarna som anges i denna dialog lagras alltid som $HOME/.efax-gtkrc. Om inställningsdialogen har använts och du vill återgå till de globala inställningarna kan detta göras antingen genom att ta bort filen $HOME/.efax-gtkrc eller genom att trycka på "Återställ"-knappen i inställningsdialogen, som kommer att läsa om inställningsdialogen från den globala konfigurationsfilen ($sysconfdir/efax-gtkrc eller /etc/efax-gtkrc). Hjälp kan fås när inställningsdialogen fylls ut genom att hålla muspekaren över den relevanta hjälp-knappen (?), som visas en "Tips"-rutan eller genom att trycka på knappen vilken visar upp en informationsruta. Användning av adressboken ------------------------- För att välja ett telefonnummer från adressboken, markera den relevanta adressen genom att klicka på vänstra musknappen på det och tryck sedan på "OK"-knappen. Adresser kan läggas till i adressboken genom att trycka på "Lägg till"-knappen och sedan fylla i den relevanta dialogen som visas. För att ta bort en adress från adressboken, markera den relevanta adressen och tryck på borttagningsknappen (Papperskorg). Adressboken kan sorteras genom att använda upp- och nedpilknapparna på en markerad adress eller genom att dra och släppa med musen. Användning av faxlistor ----------------------- För att visa faxlistorna, gå till "Arkiv"-menyn och välj menyposterna "Lista mottagna fax" eller "Lista skickade fax". Markera faxet som ska skrivas ut eller visas genom att trycka på vänstra musknappen. Programmen som ska användas för att skriva ut eller visa faxet anges i konfigurationsfilen efax-gtkrc eller om inga är angivna kommer programmet att skriva ut med lpr (som fungerar för de flesta Unix-system) och visa med gv. För att skriva ut fax kan en parameter kallas PRINT_SHRINK anges i efax-gtkrc för att göra så att faxsida minskas för att passa inom skrivarens utskriftsmarginaler. En parameter på 98 fungerar för de flesta skrivare. Detta kan ändras när programmet körs genom att hämta upp "Inställningar"-dialogen och ange det i "Utskrift/Minska utskrift"-rutan. En beskrivning kan läggas till ett mottaget fax när det dyker upp i en faxlista (eller därpå förbättras) genom att trycka på relevant knapp -- detta gör att fax lättare kan identifieras. Listan över mottagna fax visas, längst till höger av verktygslisten, antalet fax mottagna sedan programmet senast startades. Om efax-gtk är i mottagningsläge kommer "verktygstips" för programmets ikon i systembrickan och att indikera detta antal. Räknaren kan återställas till 0 utan att starta om programmet genom att trycka på återställningsknappen i listan för mottagna fax. Fel: Varning: från listan? har tagits emot på uttag. Sänd eller placera fax i kö? eller %d tecken togs emot vid väntan att sända%s låst eller upptagen - väntar?Ett fax har tagits emot av efax-gtkEn Postscript-visare används för att visa skickade och mottagna fax via faxlistorna och även för att visa fax som ska skickas via filväljaren "Filer att faxa". Ange kommandot här som ska användas för att visa Postscript-filer. Om inget är angivet kommer programmet att välja förvalet "gv". Andra möjligheter du kanske vill ange är "evince" (Gnomes Postscript-visare) eller "kghostview" (KDE:s Postscript-visare). Om du använder gc, kan du behöva använda flaggorna "-media A4" eller "-media Letter" för att välja korrekt pappersstorlek. Programmen evince och kghostview gör detta automatisktEtt utskriftsjobb har tagits emot på uttagOm _efaxOm efaxOm efax-_gtkOm efax-gtkAccepteraLägg till filer till listaLägg till filer till fillistan för faxningLägg till ny adressLägg till ny mappLägg till/Rätta till beskrivning för markerat faxAdressbokAdresser tillåtna att anslutaAnvänder den förvalda faxupplösningen 204×196 Använder den förvalda pappersstorleken A4 Använder det förvalda visningskommandot för Postscript "gv" Albanska - Besnik Bleta SvaraSvarar på samtalAutoBulgariska - Zdravko Nikolov CAN: datamottagning avbrutenCFR - kanal OKCIG - hämtnings-idCRP - upprepa kommandoCSI - svars-idKan inte ändra inställningar såvida inte programmet är inaktivt Tryck på Stopp-knappen för att göra det inaktivtKan inte skicka fax - ett fax tas emot nu Färdigheter: Välj det markerade faxet för sändningKlass 1Klass 2Klass 2.0KonfigurationsfelCopyright © 2001 - 2011 Chris Vine Detta program är utgivet under GNU General Public License, version 2 DCN - koppla nedDCS - sessionsformatDIS - svarsfärdigheterDTC - hämtningsfärdigheterDatumTa bort adressTa bort mapp: Ta bort vald adress?Ta bort markerat faxTa bort markerad mappBeskrivningRingläge: Accepterar du de villkor, noteringar och ansvarsfriskrivningar som visas ovan?EOM - inte klar, nytt formatEOP - klarTöm mappen genom att ta bort alla barnmappar och dra-och-släpp eller ta bort eventuella fax före mappen tas bortTöm skräpmappTöm skräpmapp? (NOTERA: Detta kommer att permanent ta bort alla fax i Skräpmappen från filsystemet)Ange _flera filerAnge valt fax att skickaAnge inställningar från Starta ett program eller skript när fax tas emot av modemFTT - kanal inte OKFaxlistorFaxbeskrivning?Metod för att ta in fax: Fax att skickaFil Filen existerar inte Filer att faxaFinMappMappnamn kan inte innehåll tecken: Mappnamn? (Notera att detta kommer att placeras på toppnivån och kan dra-och-släppas till andra mappar)Tyska - Steffen Wagner Grekiska - Hellenic Linux Users Group HDLC-paket saknar inledande 0xffHebreiska - Assaf Gillat Ungerska - Gergely Szakats, Laszlo Csordas IdentitetInaktivInkorgInkludera mottagarens faxnummer på faxets översta rubrikradParametrar för initiering: Ogiltigt UTF-8-tecken mottogs i EfaxController::read_pipe_cb() Ogiltig Utf8 mottogs i MainWindow::read_error_pipe_cb() Ogiltig WORK_SUBDIR: katalog angiven. WORK_SUBDIR: kommer att ignoreras Ogiltigt ringläge angivetOgiltigt ringläge angivet Använder förvalet tonläge Ogiltig faxupplösning angiven Använder den förvalda faxupplösningen 204×196 Ogiltig modemklass angivenOgiltig modemklass angiven Använder förvalet Klass 2 Ogiltig flagga. Flaggor är: Ogiltig pappersstorlek angivenOgiltig pappersstorlek angiven Använder den förvalda pappersstorleken A4 Ogiltig port för uttagsservern har angivits så servern kommer inte att startas. Det måste vara mellan 1024 och 65535 Ogiltig parameter för minskning av utskrift angivenOgiltig minskning av utskrift angiven: använder det förvalda värdet 100 Ogiltigt antal ringsignaler angavs Kommer att svara efter en signal Ogiltigt antal signaler angivetOgiltig upplösning för skickade fax angivetOgiltigt portnummer för uttag angivet. Det måste vara mellan 1024 och 65535Ogiltigt användarnamn angavs - det måste vara i rena ASCII-tecken. Inget användarnamn kommer att visas på faxets övre rubrikrad men var lugn eftersom faxmaskinens nummer alltid anges i topprubriken Ogiltigt användarnamn angivet i "Identitet"-fliken - det måste vara i rena ASCII-tecken. Om detta är ett problem, lämna det blankt eftersom faxnumret alltid anges på övre rubriken.Italienska - Luca De Rugeriis Lista _mottagna faxLista mottagna faxLista skickade faxLåsfil: Loggfil: LoggningMCF - sida OKMPS - inte klarModemModemklass: Flytta adressen nedåtFlytta adressen uppåtFlytta filen nedåtFlytta filen uppåtMulti-Tech-bitordning sattFlera filerNSC - hämtningsfunktionerNSF - svarsfunktionerNSS - uppringningsfunktionerNamnNamn:Namn: Nya fax:Inget faxnummer angivet. Vill du skicka faxet på en öppen anslutning?Ingen port för uttagsservern har angivits så servern kommer inte att startas Ingen serieportsenhet angiven i Inget giltigt filnamn Ingen giltig postscript/PDFfil Notera: tryck på OK-knappen för att spara inställningarna till filenNummerNummer:Nummer: Övriga parametrar: PIN - sida inte OK, ring operatörPIP - sida OK, ring operatörPRI-EOM - inte klar, nytt format, ring operatörPRI-EOP - klar, ring operatörPRI-MPS - inte klar, ring operatörUTSKRIFTSJOBBUTSKRIFTSJOBB: SidaSidstorlek: ParametrarTa permanent bort markerat fax? Ta permanent bort markerat fax? (NOTERA: Detta kommer att permanent ta bort dessa fax från filsystemet)Polska - Pawel Suwinski Popup-dialog för bekräftelse före utskriftPopup-dialog när fax tas emot av modemPopup-dialog när fax tas emot från uttagPort till vilken fax ska skickas:Visningsprogram för Postscript:Tryck F1 för hjälpSkriv utUtskriftsprogram: Minska utskrift (50-100):Utskriftsjobb mottagna på uttag Skriv ut markerat faxSkriv ut markerat fax?PulsAnge katalog för låsfil här. Om ingen är angiven kommer programmet att välja förvalet /var/lockAnge namnet här som ska visas på faxets övre rubrik på skickade fax. Det måste vara i rena ASCII-tecken. Om detta är ett problem, lämna det blankt eftersom faxmaskinens nummer alltid anges på faxets övre rubrikAnge numret här som ska visas på faxets övre rubrik på skickade fax. Detta utgör även faxets stations-id som rapporteras till den sändande faxmaskinen vid mottagning av fax Ange serieenhet till vilken modemet är anslutet till (om ingen är angiven kommer programmet att välja förvalet /dev/modem). Inkludera inte "/dev"-delen av enhetsnamnet -- skriv det alltså som "ttyS1" eller "cua2" och så vidare. I Linux är ttyS0 det samma som COM 1, ttyS1 och COM 2 och så vidare.Köat faxKöade _fax från uttagKöade utskriftsjobbAvslutaRTN - sida inte OK, kontrollera kanalRTP - sida OK, kontrollera kanalTa emotMottagningslägeMottagningVägraTa bort Ta bort filTa bort filTa bort vald fil från listaÅterställParametrar för återställning: Återställ räknare för nya faxÅterställ inställningarAntal signaler (1-9): Kör uttagsserverRyska - Pavel Vainerman ALLVARLIGT SYSTEMFEL: Kan inte skapa katalog för att spara mottagna fax i. Detta fax kommer inte sparas! ALLVARLIGT SYSTEMFEL: Kan inte skapa katalog för att spara mottaget fax i. Fax kommer inte kunna tas emot! ALLVARLIGT SYSTEMFEL: Kan inte skapa katalog för att spara skickade fax i. Detta fax kommer inte sparas! ALLVARLIGT SYSTEMFEL: Kan inte öppna katalog för mottagna fax. Detta fax kommer inte sparas! ALLVARLIGT SYSTEMFEL: Kan inte spara hela det mottagna faxet. Hela eller delar av faxet kommer att saknas! Skicka faxSändningSkickar faxUpplösning för skickade fax:SkickadeSerieenhet: InställningarFörenklad kinesiska - Kite Lau En filUttagUttag UttagslistaUttag körs på port Ange pappersstorlek för fax härStandardMottagningslägeKlar för att ta emot samtalStoppSvensk - Daniel Nylander TSI - avsändar-idTa över samtalTelefonnummer: TelefonnummerFöljande mapp existerar redan: Programmet har startats med flaggan -s men det finns ingen systembricka! Fjärr-id ärFjärr-id är %sDetta kan användas för att skicka övriga parametrar till efax (kör "man efax" för att se vad som är möjligt). Ange så många av dessa som behövs, separerade med blanksteg för olika parametrar -- exempelvis inkludera "-or" för att göra en bitomvändning vid mottagning för Multitech-modem som kräver det. Om du inte har ett ovanligt modem, lämna detta blanktDetta anger antalet signaler som modemet låter ringa före den svarar när den står i mottagningsläge. Giltiga värden är 1 till 9. Om "none" angivits kommer programmet att välja förvalet "1"Detta är kommandot som skriver ut och tar emot Postscript-indata på standard in. Om ingen är angivet kommer programmet att välja förvalet "lpr"Denna parameter anger en loggfil till vilken förloppet för förhandlingar och faxstatus, fel och varningar loggas. Om ingen är angiven, kommer ingen loggfil att underhållas. (En loggfil kan också behållas genom att omdirigera standard ut och standard fel -- se filen README för ytterligare detaljer)Denna parameter anger om en popup-dialog ska visas när ett fax tas emot från ett modem. Kryssa rutan om du vill ha en popup.Det här programmet (efax-gtk) är ett grafiskt gränssnitt för efax. Efax är ett program som utgetts under GNU General Public License, version 2 by Ed Casas.Detta anger de "AT"-kommandon som återställer modemet. Ange så många kommandon som behövs, separerade med blanksteg för kommandon som behöver vara separerade men utan det inledande "AT". Om inget är angivet kommer programmet att välja förvalet "Z", som är korrekt för praktiskt taget alla modemDetta anger färdigheterna för modemet. För att se vad detta betyder, kör "man efax" och se på operationen för flaggan "-c". Med efax-0.9 och ett Klass 2-modem behöver du inte ange detta och bör lämna den blank eftersom programmet frågar modemet. Om du använder en äldre version av efax eller en annan modemklass kan värden som fungerar för praktiskt sett alla 14400 b/s modem vara 1,5,0,2,0,0,0,0, eller 1,3,0,2,0,0,0,0 för långsammare modemDetta anger "AT"-kommandon för initiering av modemet i faxläge. Ange så många av dessa som behövs, separerade med blanksteg för kommandon som behöver vara separerade men utan det inledande "AT". Om inget är angivet kommer programmet att välja förvalet "Z &FE&D2S7=120 &C0 M1L0", som är korrekt för praktiskt taget alla modemDetta anger portnumret på vilken uttagsservern lyssnar på. Det ska vara mellan 1024 och 65535.Detta anger vilken upplösning som fax skickas i. "Standard" är 204×98 och "Fin" är 204×196Detta anger om en popup-dialog med en bekräftelse ska visas före utskrift av mottagna eller skickade fax från listan. Avkryssa rutan om du inte vill ha en dialog (om du anger en extern utskriftshanterare såsom "kprinter" i utskriftsprogramrutan, vill du inte denna kryssad).Detta anger om en popup-dialog ska visas när ett fax tas emot av uttagsserver från utskriftssystemet. Kryssa rutan om du vill ha en dialog (denna har ingen effekt om du inte även har kryssat rutan för att köra uttagsservern). Om programmet är inaktivt eller det är i mottagningsläge, kan faxet skickas direkt från denna dialog.Detta anger om ett program eller skript ska startas när ett fax tagits emot från ett modem. Kryssa i rutan om du vill starta ett program och ange programmets namn.Detta anger om en uttagsserver ska köras för CUPS eller för något annat utskriftssystem. Kryssa rutan om den ska körasDetta anger om mottagarens faxnummer ska inkluderas på faxets övre rubrikrad för skickade fax. Kryssa bort om du inte vill att detta ska visas (exempelvis att det kanske innehåller ett kontantkortsnummer)Detta anger om ton eller puls ska användas för uppringning och sändning av faxDetta kommer att fastställa till den grad en utskriven sida ska minskas för att passa inom skrivarens utskriftsarea. Detta är ett procenttal -- exempelvis 98 kommer att minska sidan till 98 procent av dess storlek. Om inget är angivet kommer inte minskning att göras (alltså du kan, men det finns inget behov för det, ange 100)TonPapperskorgOKÄNDAnvändning: efax-gtk [flaggor] [filnamn] Flaggor: -r Starta programmet i mottagningsläge -s Starta programmet och göm det i systembrickan Se filen README som kommer med distributionen för ytterligare detaljer Användaren har inte läsrättighet på filen VisaVisa markerat faxVisa vald filMed efax-0.9 eller högre bör du vanligtvis välja "Auto" eftersom efax kommer att hitta modemklassen själv men du kan också tvinga fram en klass genom att välja en av de angivna om du vill. Dock är förvalet Klass 2 i efax-0.8 så om du använder ett Klass 1-modem med äldre versioner av efax bör du ange klass härDu har inte miljövariabeln $HOME inställd _Adressbok_Ange en fil_Arkiv_Hjälp_Lista skickade faxA_vsluta_Inställningar_Översättningaronormalt avslut (kod %d)activitet upptäcktbitomvänt HDLC-paket, vänder om bitordningringdekan inte svara: kan inte låsa enhetkan inte ta bort fil %s:kan inte fastställa stöd för faxmodemklasskan inte läsa av format på filen %skan inte öppna fil %s:kan inte öppna fil för utdata %s:kan inte öppna sidakan inte spola tillbaka fil %s:kanal är inte användbar på %d b/skanal inte användbar på lägsta hastighettecken mottagna vid sändninganslutenringkommando misslyckadesringer %sefax-gtk-hjälp: Färdigheterefax-gtk-hjälp: Enhetefax-gtk-hjälp: Ringlägeefax-gtk-hjälp: Starta program när fax är mottagetefax-gtk-hjälp: Faxets övre rubrikradefax-gtk-hjälp: Initieringsparametrarefax-gtk-hjälp: Låsfilefax-gtk-hjälp: Loggfilefax-gtk-hjälp: Modemklassefax-gtk-hjälp: Namnefax-gtk-hjälp: Nummerefax-gtk-hjälp: Övriga parametrarefax-gtk-hjälp: Sidstorlekefax-gtk-hjälp: Pop-upefax-gtk-hjälp: Portefax-gtk-hjälp: Visningsprogram för Postscriptefax-gtk-hjälp: Utskriftsprogramefax-gtk-hjälp: Minska utskriftefax-gtk-hjälp: Ta emot pop-upefax-gtk-hjälp: Återställ parametrarefax-gtk-hjälp: Antal signalerefax-gtk-hjälp: Kör uttagsserverefax-gtk-hjälp: Upplösning på skickade faxefax-gtk-hjälp: Uttagsanslutningar tillåtsefax-gtk-hjälp: Utskriftsprogramefax-gtk uttagefax-gtk: efax-gtk: Lägg till adressefax-gtk: Lägg till mappefax-gtk: Adressbokefax-gtk: Villkor, noteringar och ansvarsfriskrivningefax-gtk: Ta bort adressefax-gtk: Ta bort faxefax-gtk: Ta bort mappefax-gtk: Faxbeskrivningefax-gtk: Fillistaefax-gtk: Fil att faxaefax-gtk: Hjälpefax-gtk: Skriv ut faxefax-gtk: Köade fax från uttagefax-gtk: Lista över mottagna faxefax-gtk: Ta bort köade faxefax-gtk: Lista över skickade faxefax-gtk: Översättningarefax-gtk: Skräpmappefax-gtk: fax mottagetefax-gtk: utskriftsjobb mottaget på uttagefax-gtk: inställningarexec() anrop misslyckades:startar kommando /bin/sh -c %smisslyckades med sida %sfaxsamtal besvaradesskrivfel mot faxenhet:filskrivning:färdig - %sflödeskontroll fungerade intepaketfelpaket för långt (%d, > %d max byte)huvud:ej kompatibla färdigheter för lokal och fjärrfelaktig kvalité (-q) argument (%s)internt felavbrottsbegäran ignorerasogiltig modemresponsogiltigt svar på efter-sidaogiltigt svar till DCSsista byte i paket är NOLLlokalt id (%s) har icke-standardteckenlokalt id (%s) minskat till %d teckenlocalhost modemkommando "%s" för långtmodemkommando (%s) misslyckadesmodemkommando misslyckadesmodem har inte stöd för faxmodemrespons i datainget +FPTS svar togs emot, det antas att faxet togs emotingen XON/DC2 mottogs efter CONNECTinget svar från fjärrfaxinget kommando eller respons från mottagareinget getty-kommando angivet för datasamtalinget svar efter paketdatainget svar från modeminget röstkommando angivet för röstsamtalnumret upptaget eller modem användsnumret var upptagetöppnade %sandrasida sparad till %smottag (+FDR) kommando misslyckadesmottagetmottog %d rader med %d feltog emot TCF - kanalkontroll (OK: körning av %d på %d)tog emotTCF - kanalkontroll (inte OK: körning av %d på %d)mottog kort paket (%d byte)mottagningsfelmottagare kan inte ta emot, försöker ändåmottagare har inga dokument att skicka och kan ta emotmottagare har inga dokument att skicka och kan inte ta emotmottagare har inget att skicka, försöker ändåfjärrfax har ett eller flera dokument att skicka och kan ta emotmottagare har ett eller flera dokument att skicka och kan inte ta emotfjärrsida har ett eller flera dokument att sända.tog bort fil: %söverflöde i körlängdsbuffertskickatskickade %d+%d rader och %d+%d byte, på %d s med %d b/sskickade TCF - kanalkontroll på %d byteskickade sida %slyckadessynk: släpper DTRsynk: modem svarar intesynk: skickar avbrottterminerad av signaltimeout efter kommando: %stimeout efter väntantimeout under träningskontrolldatatimeout vid läsning av paketdatatimeout för väntan efter kommandoför många %%d avbrott i kommando (%s)för många sidsändningsförsökkunde inte svara på samtaloväntat svar "%s"okänt kommandoej återhämtbart felanvänder %s i klass %sanvänder radbuffring för standard utröstsamtal besvaradesväntar på aktivitetfel bärarefel respons efter kommando: %sfel svar efter paketdatafel respons efter väntetidfel svar på kommando att ta emot ett paketefax-gtk-3.2.8/po/remove-potcdate.sin0000644000175000001440000000066011466007654014411 00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } efax-gtk-3.2.8/po/insert-header.sin0000644000175000001440000000124011466007654014040 00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } efax-gtk-3.2.8/po/Makefile.in.in0000644000175000001440000003552411466007654013261 00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.17 GETTEXT_MACRO_VERSION = 0.17 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: check-macro-version all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. check-macro-version: @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ package_gnu='GNU '; \ else \ package_gnu=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_gnu}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo 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 stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$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; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && $(SHELL) ./config.status $(subdir)/$@.in po-directories force: # 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: efax-gtk-3.2.8/po/ru.po0000644000175000001440000024021311544574527011573 00000000000000# Russian translation of efax-gtk # This file is distributed under the same license as the efax-gtk package. # Copyright (C) 2001-2005 Chris Vine. # Vitaly Lipatov , 2004. # Pavel Vainerman , 2004. # Vitaly Lipatov , 2005. # msgid "" msgstr "" "Project-Id-Version: efax-gtk-3.0.6\n" "Report-Msgid-Bugs-To: cvine@users.sourceforge.net\n" "POT-Creation-Date: 2011-03-30 10:35+0100\n" "PO-Revision-Date: 2005-11-09 02:00+0300\n" "Last-Translator: Vitaly Lipatov \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=KOI8-R\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.10.1\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: src/addressbook.cpp:75 msgid "efax-gtk: Address book" msgstr "efax-gtk: " #: src/addressbook.cpp:122 msgid "Name" msgstr "" #: src/addressbook.cpp:128 src/redial_queue.cpp:156 msgid "Number" msgstr "" #: src/addressbook.cpp:196 msgid "Add new address" msgstr " " #: src/addressbook.cpp:197 msgid "Delete address" msgstr " " #: src/addressbook.cpp:198 msgid "Move address up" msgstr " " #: src/addressbook.cpp:199 msgid "Move address down" msgstr " " #: src/addressbook.cpp:311 msgid "Delete selected address?" msgstr " ?" #: src/addressbook.cpp:312 msgid "efax-gtk: Delete address" msgstr "efax-gtk: " #: src/addressbook.cpp:567 msgid "efax-gtk: Add address" msgstr "efax-gtk: " #: src/addressbook.cpp:574 msgid "Name:" msgstr ":" #: src/addressbook.cpp:575 msgid "Number:" msgstr ":" #: src/dialogs.cpp:52 msgid "efax-gtk: File to fax" msgstr "efax-gtk: " #: src/dialogs.cpp:57 src/settings.cpp:2024 msgid "View" msgstr "" #: src/dialogs.cpp:292 msgid "efax-gtk: Conditions, Notices and Disclaimers" msgstr "efax-gtk: , " #: src/dialogs.cpp:298 msgid "Accept" msgstr "" #: src/dialogs.cpp:299 msgid "Reject" msgstr "" #: src/dialogs.cpp:301 msgid "Do you accept the Conditions, Notices and Disclaimers shown above?" msgstr " , ?" #: src/dialogs.cpp:501 msgid "About efax-gtk" msgstr " efax-gtk" #: src/dialogs.cpp:517 msgid "Copyright (C) 2001 - 2011 Chris Vine" msgstr "" #: src/dialogs.cpp:521 msgid "" "This program was written by Chris Vine and is released under the GNU General " "Public License, version 2. It is a front end for efax. efax was written by " "Ed Casas" msgstr "" #: src/dialogs.cpp:541 msgid "About efax" msgstr " " #: src/dialogs.cpp:564 msgid "efax is copyright (C) 1999 Ed Casas" msgstr "" #: src/dialogs.cpp:566 msgid "" "This program (efax-gtk) is a front end for efax. efax is a program released " "under the GNU General Public License, version 2 by Ed Casas" msgstr "" " (efax-gtk) efax. efax " "- , GNU General Public License " "2 Ed Casas." #: src/efax_controller.cpp:73 src/mainwindow.cpp:2110 src/tray_icon.cpp:201 msgid "Inactive" msgstr "" #: src/efax_controller.cpp:74 src/efax_controller.cpp:78 #: src/efax_controller.cpp:79 msgid "Sending fax" msgstr " " #: src/efax_controller.cpp:75 src/efax_controller.cpp:76 msgid "Answering call" msgstr " " #: src/efax_controller.cpp:77 msgid "Standing by to receive calls" msgstr " " #: src/efax_controller.cpp:156 src/efax_controller.cpp:230 msgid "" "Cannot send fax - the modem is in use.\n" "Adding the fax to the redial queue\n" msgstr "" #: src/efax_controller.cpp:161 msgid "Cannot send fax - a fax is being received\n" msgstr " - \n" #: src/efax_controller.cpp:414 msgid "Not valid file name\n" msgstr " \n" #: src/efax_controller.cpp:418 msgid "File does not exist\n" msgstr " \n" #: src/efax_controller.cpp:422 msgid "User does not have read permission on the file\n" msgstr " \n" #: src/efax_controller.cpp:503 src/efax_controller.cpp:540 msgid "Not valid postscript/PDF file\n" msgstr " PostScript/PDF\n" #: src/efax_controller.cpp:578 msgid "You don't have the $HOME environmental variable set\n" msgstr " $HOME \n" #: src/efax_controller.cpp:590 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received faxes.\n" "Faxes cannot be received!\n" msgstr "" " : " ".\n" " !\n" #: src/efax_controller.cpp:769 msgid "" "\n" "*** Stopping send/receive session ***\n" "\n" msgstr "" "\n" "*** ɣ/ ***\n" "\n" #: src/efax_controller.cpp:934 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save received fax.\n" "This fax will not be saved!\n" msgstr "" " : " ".\n" " Σ!\n" #: src/efax_controller.cpp:954 msgid "" "SERIOUS SYSTEM ERROR: Can't open received fax directory.\n" "This fax will not be saved!\n" msgstr "" " : .\n" " Σ!\n" #: src/efax_controller.cpp:990 msgid "" "SERIOUS SYSTEM ERROR: Cannot save all of the received fax.\n" "All or part of the fax will be missing!\n" msgstr "" " : .\n" " !\n" #: src/efax_controller.cpp:1028 msgid "Invalid Utf8 received in EfaxController::read_pipe_cb()\n" msgstr "" #: src/efax_controller.cpp:1122 msgid "" "SERIOUS SYSTEM ERROR: Can't create directory to save sent fax.\n" "This fax will not be saved!\n" msgstr "" " : " " \n" " Σ!\n" #: src/efax_controller.cpp:1230 msgid "PRINT JOB" msgstr " " #: src/fax_list.cpp:192 msgid "Print page setup" msgstr "" #: src/fax_list.cpp:200 msgid "Print selected fax" msgstr " " #: src/fax_list.cpp:212 msgid "View selected fax" msgstr " " #: src/fax_list.cpp:223 msgid "Add/amend description for selected fax" msgstr " " #: src/fax_list.cpp:230 msgid "Delete selected fax" msgstr " " #: src/fax_list.cpp:237 msgid "Empty trash folder" msgstr " " #: src/fax_list.cpp:248 msgid "Add new folder" msgstr " " #: src/fax_list.cpp:259 msgid "Delete selected folder" msgstr " " #: src/fax_list.cpp:314 msgid "Reset new faxes count" msgstr " ޣ " #: src/fax_list.cpp:362 msgid "efax-gtk: Received fax list" msgstr "efax-gtk: " #: src/fax_list.cpp:363 msgid "efax-gtk: Sent fax list" msgstr "efax-gtk: " #: src/fax_list.cpp:489 msgid "Permanently delete selected fax?\n" msgstr " ?\n" #: src/fax_list.cpp:490 msgid "" "\n" "(NOTE: This will permanently delete the fax\n" "from the file system)" msgstr "" "\n" "(: )" #: src/fax_list.cpp:494 msgid "" "Permanently delete selected faxes?\n" "\n" "(NOTE: This will permanently delete the faxes\n" "from the file system)" msgstr "" " ?\n" "\n" "(: )" #: src/fax_list.cpp:499 msgid "efax-gtk: Delete fax" msgstr "efax-gtk: " #: src/fax_list.cpp:526 msgid "" "Empty trash folder?\n" "\n" "(NOTE: This will permanently delete all the faxes\n" "in the Trash folder from the file system)" msgstr "" " ?\n" "\n" " (: )" #: src/fax_list.cpp:529 msgid "efax-gtk: Trash folder" msgstr "efax-gtk: " #: src/fax_list.cpp:548 src/fax_list.cpp:1470 msgid "efax-gtk: Add folder" msgstr "efax-gtk: " #: src/fax_list.cpp:567 msgid "" "Empty the folder by deleting any child folders\n" "and drag-and-dropping or deleting any contained\n" "faxes before deleting folder" msgstr "" " \n" " \n" " " #: src/fax_list.cpp:570 src/fax_list.cpp:584 msgid "efax-gtk: Delete folder" msgstr "efax-gtk: " #: src/fax_list.cpp:578 msgid "Delete folder: " msgstr " : " #: src/fax_list.cpp:582 src/settings.cpp:3105 msgid "?" msgstr "?" #: src/fax_list.cpp:607 msgid "Print selected fax?" msgstr " ?" #: src/fax_list.cpp:608 msgid "efax-gtk: Print fax" msgstr "efax-gtk: " #: src/fax_list.cpp:1321 src/tray_icon.cpp:221 msgid "New faxes:" msgstr " :" #: src/fax_list.cpp:1462 msgid "efax-gtk: Fax description" msgstr "efax-gtk: " #: src/fax_list.cpp:1463 msgid "Fax description?" msgstr " ?" #: src/fax_list.cpp:1471 msgid "" "Folder name?\n" "(Note this will be placed in the top\n" "level and can be drag-and-dropped\n" "into other folders)" msgstr "" " ?\n" "(, ݣ \n" " ӣ )" #: src/fax_list_manager.cpp:65 msgid "Folder name cannot contain character: " msgstr " : " #: src/fax_list_manager.cpp:74 msgid "The following folder already exists: " msgstr " : " #: src/fax_list_manager.cpp:485 msgid "Folder" msgstr "" #: src/fax_list_manager.cpp:516 msgid "Date" msgstr "" #: src/fax_list_manager.cpp:527 msgid "Description" msgstr "" #: src/fax_list_manager.cpp:635 src/fax_list_manager.cpp:638 #: src/fax_list_manager.cpp:639 src/fax_list_manager.cpp:812 msgid "Inbox" msgstr "" #: src/fax_list_manager.cpp:644 src/fax_list_manager.cpp:647 #: src/fax_list_manager.cpp:648 src/fax_list_manager.cpp:813 msgid "Sent box" msgstr "" #: src/fax_list_manager.cpp:657 src/fax_list_manager.cpp:662 #: src/fax_list_manager.cpp:663 msgid "Trash" msgstr "" #: src/file_list.cpp:98 msgid "efax-gtk: File list" msgstr "efax-gtk: " #: src/file_list.cpp:142 msgid "Files to fax" msgstr " " #: src/file_list.cpp:170 src/socket_list.cpp:198 msgid "View selected file" msgstr " " #: src/file_list.cpp:180 src/socket_list.cpp:208 msgid "Remove selected file from list" msgstr " " #: src/file_list.cpp:188 msgid "Add files to list" msgstr " " #: src/file_list.cpp:194 msgid "Add files to the file list for faxing" msgstr " " #: src/file_list.cpp:205 msgid "Move file up" msgstr " " #: src/file_list.cpp:206 msgid "Move file down" msgstr " " #: src/file_list.cpp:593 msgid "Remove file " msgstr " " #: src/file_list.cpp:595 src/socket_list.cpp:503 msgid " from the list?" msgstr " ?" #: src/file_list.cpp:601 msgid "Remove file" msgstr " " #: src/main.cpp:139 msgid "" "Copyright (C) 2001 - 2011 Chris Vine\n" "This program is released under the GNU General Public License, version 2\n" msgstr "" " (C) 2001 - 2011 Chris Vine\n" " GNU General Public License, version " "2\n" #: src/main.cpp:155 msgid "" "Usage: efax-gtk [options] [filename]\n" "Options:\n" "\t-r Start the program in receive standby mode\n" "\t-s Start the program hidden in the system tray\n" "See the README file which comes with the distribution\n" "for further details\n" msgstr "" ": efax-gtk [] [ ]\n" ":\n" "\t -r \n" "\t -s \n" " README \n" #: src/main.cpp:228 msgid "Invalid option. Options are:\n" msgstr " . : \n" #: src/main.cpp:545 msgid "" "Invalid user name specified - it must be in plain\n" "ASCII characters. No user name will be shown on\n" "the fax top header line, but don't worry as the\n" "fax station number will always be given on the\n" "top header\n" msgstr "" " - \n" " . \n" " ,\n" " , \n" " .\n" #: src/main.cpp:612 msgid "" "Invalid modem class specified\n" "Adopting default of Class 2\n" msgstr "" " \n" " 2\n" #: src/main.cpp:621 src/main.cpp:626 msgid "No serial port device specified in " msgstr " , " #: src/main.cpp:679 msgid "Adopting default fax resolution of 204x196\n" msgstr " 204x196\n" #: src/main.cpp:687 msgid "" "Invalid fax resolution specified\n" "Adopting default fax resolution of 204x196\n" msgstr "" " \n" " 204x196\n" #: src/main.cpp:695 msgid "" "Invalid ring number specified\n" "Will answer after one ring\n" msgstr "" " \n" " \n" #: src/main.cpp:702 msgid "Adopting default page size of a4\n" msgstr " A4\n" #: src/main.cpp:712 msgid "" "Invalid page size specified\n" "Adopting default page size of a4\n" msgstr "" " \n" " A4\n" #: src/main.cpp:725 msgid "" "Invalid dialmode specified\n" "Adopting default of tone dialling\n" msgstr "" " \n" " \n" #: src/main.cpp:761 msgid "Invalid print shrink specified: adopting default value of 100\n" msgstr " : 100\n" #: src/main.cpp:770 msgid "Adopting default postscript view command of 'gv'\n" msgstr "" " postscript 'gv'\n" #: src/main.cpp:784 msgid "" "No port for the socket server has been specified, so the server will not be " "started\n" msgstr " , \n" #: src/main.cpp:790 msgid "" "Invalid port for the socket server has been specified, so the server will " "not be started. It needs to be between 1024 and 65535\n" msgstr "" " , . " " 1024 65535\n" #: src/main.cpp:822 msgid "" "Invalid ip family for socket server specified: adopting default of ipv4\n" msgstr "" #: src/main.cpp:848 msgid "" "Invalid redial interval has been specified. It needs to be between 5 and " "1440 minutes\n" msgstr "" #: src/main.cpp:861 msgid "" "Invalid WORK_SUBDIR: directory specified. WORK_SUBDIR: will be ignored\n" msgstr "" " WORK_SUBDIR. \n" #: src/main.cpp:995 msgid "" "DBUS error: Cannot start efax-gtk.\n" "\n" "Make sure the DBUS session message bus is running" msgstr "" #: src/main.cpp:997 msgid "efax-gtk: DBUS error" msgstr "" #: src/mainwindow.cpp:295 msgid "File " msgstr " " #: src/mainwindow.cpp:297 msgid "Socket " msgstr " " #: src/mainwindow.cpp:299 msgid "Fax entry method: " msgstr " : " #: src/mainwindow.cpp:300 src/mainwindow.cpp:1617 msgid "Single file" msgstr " " #: src/mainwindow.cpp:301 src/mainwindow.cpp:1618 msgid "Multiple files" msgstr " " #: src/mainwindow.cpp:302 src/mainwindow.cpp:1619 msgid "Socket list" msgstr " " #: src/mainwindow.cpp:303 src/mainwindow.cpp:1620 src/socket_notify.cpp:57 msgid "Tel number: " msgstr " : " #: src/mainwindow.cpp:304 src/mainwindow.cpp:1621 src/socket_notify.cpp:58 msgid "Send fax" msgstr " " #: src/mainwindow.cpp:305 src/mainwindow.cpp:1622 src/tray_icon.cpp:147 msgid "Answer call" msgstr " " #: src/mainwindow.cpp:306 src/mainwindow.cpp:1623 src/tray_icon.cpp:142 msgid "Take over call" msgstr " " #: src/mainwindow.cpp:307 src/mainwindow.cpp:1624 msgid "Standby" msgstr " ɣ" #: src/mainwindow.cpp:308 src/mainwindow.cpp:1625 src/tray_icon.cpp:158 msgid "Stop" msgstr "" #: src/mainwindow.cpp:352 msgid "Fax to send" msgstr " " #: src/mainwindow.cpp:480 msgid "List _received faxes" msgstr " _ " #: src/mainwindow.cpp:487 msgid "_List sent faxes" msgstr " _ " #: src/mainwindow.cpp:498 msgid "Queued _faxes from socket" msgstr "_ " #: src/mainwindow.cpp:504 msgid "_Enter single file" msgstr " _ " #: src/mainwindow.cpp:511 msgid "Enter _multiple files" msgstr " _ " #: src/mainwindow.cpp:522 msgid "_Address book" msgstr "_ " #: src/mainwindow.cpp:533 msgid "Re_dial queue" msgstr "" #: src/mainwindow.cpp:545 msgid "_Settings" msgstr "_" #: src/mainwindow.cpp:557 msgid "_Quit" msgstr "_" #: src/mainwindow.cpp:568 msgid "_Print logfile" msgstr "" #: src/mainwindow.cpp:601 msgid "Print logfile page _setup" msgstr "" #: src/mainwindow.cpp:611 msgid "_View logfile" msgstr "" #: src/mainwindow.cpp:628 msgid "About efax-_gtk" msgstr " efax-_gtk" #: src/mainwindow.cpp:635 msgid "About _efax" msgstr " _efax" #: src/mainwindow.cpp:641 msgid "_Translations" msgstr "_" #: src/mainwindow.cpp:652 src/mainwindow.cpp:660 msgid "_Help" msgstr "_" #: src/mainwindow.cpp:658 msgid "_File" msgstr "_" #: src/mainwindow.cpp:659 msgid "_Log" msgstr "" #: src/mainwindow.cpp:910 msgid "" "The program has been started with the -s option but there is no system " "tray!\n" msgstr " -s, !\n" #: src/mainwindow.cpp:1006 msgid "" "No fax number specified. Do you want to send the fax on an open connection?" msgstr " . ?" #: src/mainwindow.cpp:1008 msgid "Telephone number" msgstr " " #: src/mainwindow.cpp:1295 src/mainwindow.cpp:1301 msgid "A print job has been received on socket" msgstr " " #: src/mainwindow.cpp:1296 src/mainwindow.cpp:1302 msgid "efax-gtk socket" msgstr "efax-gtk " #: src/mainwindow.cpp:1361 src/mainwindow.cpp:1367 msgid "A fax has been received by efax-gtk" msgstr " efax-gtk" #: src/mainwindow.cpp:1362 src/mainwindow.cpp:1368 msgid "efax-gtk: fax received" msgstr "efax-gtk: " #: src/mainwindow.cpp:1492 msgid "" "Can't change settings unless the program is inactive\n" "Press the Stop button to make it inactive" msgstr "" " \n" " \"\", ţ " #: src/mainwindow.cpp:1594 msgid "Italian - Luca De Rugeriis\n" msgstr "" #: src/mainwindow.cpp:1595 msgid "Polish - Pawel Suwinski\n" msgstr "" #: src/mainwindow.cpp:1596 msgid "Bulgarian - Zdravko Nikolov\n" msgstr "" #: src/mainwindow.cpp:1597 msgid "Russian - Pavel Vainerman\n" msgstr " - , \n" #: src/mainwindow.cpp:1598 msgid "Hebrew - Assaf Gillat\n" msgstr "" #: src/mainwindow.cpp:1599 msgid "Greek - Hellenic Linux Users Group\n" msgstr "" #: src/mainwindow.cpp:1600 msgid "Albanian - Besnik Bleta\n" msgstr "" #: src/mainwindow.cpp:1601 msgid "Hungarian - Gergely Szakats, Laszlo Csordas\n" msgstr "" #: src/mainwindow.cpp:1602 msgid "Simplified Chinese - Kite Lau\n" msgstr "" #: src/mainwindow.cpp:1603 msgid "German - Steffen Wagner\n" msgstr "" #: src/mainwindow.cpp:1604 msgid "Swedish - Daniel Nylander\n" msgstr "" #: src/mainwindow.cpp:1605 msgid "Catalan - Jordi Sayol Salomo\n" msgstr "" #: src/mainwindow.cpp:1606 msgid "Traditional Chinese - Wei-Lun Chao\n" msgstr "" #: src/mainwindow.cpp:1608 msgid "efax-gtk: Translations" msgstr "efax-gtk: " #: src/mainwindow.cpp:1736 src/mainwindow.cpp:2111 msgid "Press F1 for help" msgstr " F1 " #: src/mainwindow.cpp:1924 msgid "Invalid Utf8 received in MainWindow::read_error_pipe_cb()\n" msgstr "" #: src/mainwindow.cpp:2003 efax/efax.c:384 msgid "terminated by signal" msgstr " " #: src/settings.cpp:68 msgid "Name: " msgstr ": " #: src/settings.cpp:69 msgid "Number: " msgstr ": " #: src/settings.cpp:190 msgid "Serial Device: " msgstr ": " #: src/settings.cpp:191 msgid "Lock File: " msgstr " : " #: src/settings.cpp:192 msgid "Capabilities: " msgstr ": " #: src/settings.cpp:193 msgid "Rings (1-9): " msgstr " (1-9): " #: src/settings.cpp:194 msgid "Modem Class: " msgstr " : " #: src/settings.cpp:195 msgid "Dial Mode: " msgstr " : " #: src/settings.cpp:211 msgid "Auto" msgstr "" #: src/settings.cpp:213 msgid "Class 1" msgstr "1" #: src/settings.cpp:215 msgid "Class 2" msgstr "2" #: src/settings.cpp:217 msgid "Class 2.0" msgstr "2.0" #: src/settings.cpp:233 msgid "Tone" msgstr "" #: src/settings.cpp:235 msgid "Pulse" msgstr "" #: src/settings.cpp:508 msgid "Initialization Params:" msgstr " :" #: src/settings.cpp:509 msgid "Reset Params: " msgstr " : " #: src/settings.cpp:510 msgid "Other Params: " msgstr " : " #: src/settings.cpp:662 msgid "Use GTK+ Print System" msgstr "" #: src/settings.cpp:663 msgid "Print Program: " msgstr " : " #: src/settings.cpp:664 msgid "Print Shrink (50-100):" msgstr " (50-100):" #: src/settings.cpp:665 msgid "" "Popup confirmation dialog\n" "before printing" msgstr "" " \n" " " #: src/settings.cpp:890 msgid "" "Postscript viewer\n" "program:" msgstr "" " \n" "Postscript: " #: src/settings.cpp:976 msgid "Run socket server" msgstr " -" #: src/settings.cpp:977 msgid "" "Popup dialog when fax\n" "received from socket" msgstr "" " \n" " " #: src/settings.cpp:978 msgid "" "Port to which faxes to\n" "be sent:" msgstr "" ", \n" " :" #: src/settings.cpp:979 msgid "" "Addresses allowed to\n" "connect" msgstr "" "ۣ \n" " " #: src/settings.cpp:980 msgid "" "IP family for socket\n" "server" msgstr "" #: src/settings.cpp:1013 msgid "localhost " msgstr "localhost " #: src/settings.cpp:1016 msgid "other" msgstr "" #: src/settings.cpp:1039 msgid "IPv4 " msgstr "" #: src/settings.cpp:1041 msgid "IPv6" msgstr "" #: src/settings.cpp:1307 msgid "" "Popup dialog when fax\n" "received by modem" msgstr "" " ɣ\n" " " #: src/settings.cpp:1308 msgid "" "Execute a program or script\n" "when fax received by modem" msgstr "" " \n" " " #: src/settings.cpp:1494 msgid "Sent Fax Resolution:" msgstr " :" #: src/settings.cpp:1495 msgid "" "Include destination\n" "fax number on fax\n" "page top header line" msgstr "" " \n" " \n" "" #: src/settings.cpp:1496 msgid "Automatic redial" msgstr "" #: src/settings.cpp:1497 msgid "Interval (minutes):" msgstr "" #: src/settings.cpp:1498 msgid "Dial Prefix:" msgstr "" #: src/settings.cpp:1512 msgid "Standard" msgstr "" #: src/settings.cpp:1514 msgid "Fine" msgstr "" #: src/settings.cpp:1767 msgid "Log File: " msgstr " : " #: src/settings.cpp:1830 msgid "Page Size: " msgstr " :" #: src/settings.cpp:1936 msgid "efax-gtk: settings" msgstr "efax-gtk: " #: src/settings.cpp:1972 msgid "Note: pressing the OK button will save the settings in file" msgstr ": OK " #: src/settings.cpp:1979 msgid "Reset" msgstr "" #: src/settings.cpp:2012 msgid "Identity" msgstr "" #: src/settings.cpp:2015 msgid "Modem" msgstr "" #: src/settings.cpp:2018 msgid "Params" msgstr "" #: src/settings.cpp:2021 msgid "Print" msgstr "" #: src/settings.cpp:2027 msgid "Socket" msgstr "" #: src/settings.cpp:2030 msgid "Receive" msgstr "" #: src/settings.cpp:2033 msgid "Send" msgstr "" #: src/settings.cpp:2036 msgid "Logging" msgstr "" #: src/settings.cpp:2039 msgid "Page" msgstr "" #: src/settings.cpp:2103 msgid "" "Invalid user name specified in \"Identity\" tab - it must be in plain ASCII " "characters. If this is a problem, leave it blank as the fax station number " "will always be given on the top header" msgstr "" " \"\" - " " . , , " " ." #: src/settings.cpp:2107 src/settings.cpp:2145 src/settings.cpp:2164 #: src/settings.cpp:2183 src/settings.cpp:2211 src/settings.cpp:2230 #: src/settings.cpp:2303 src/settings.cpp:2359 src/settings.cpp:2451 msgid "Config Error" msgstr " " #: src/settings.cpp:2144 msgid "Invalid modem class specified" msgstr " " #: src/settings.cpp:2163 msgid "Invalid page size specified" msgstr " " #: src/settings.cpp:2182 msgid "Invalid sent fax resolution specified" msgstr " " #: src/settings.cpp:2210 msgid "Invalid rings number specified" msgstr " " #: src/settings.cpp:2229 msgid "Invalid dial mode specified" msgstr " " #: src/settings.cpp:2302 msgid "Invalid print shrink parameter specified" msgstr " " #: src/settings.cpp:2357 msgid "Invalid socket port number specified. It must be between 1024 and 65535" msgstr " . 1024 65535" #: src/settings.cpp:2449 msgid "" "Invalid redial interval specified. It must be between 5 and 1440 minutes" msgstr "" #: src/settings.cpp:3099 msgid "Enter settings from " msgstr " " #: src/settings.cpp:3102 msgid " or\n" msgstr " \n" #: src/settings.cpp:3107 msgid "Reset settings" msgstr " " #: src/settings_help.cpp:35 msgid "" "Put the name to appear on the fax top header on sent faxes here. It must be " "in plain ASCII characters. If this is a problem, leave it blank as the fax " "station number will always be given on the top header" msgstr "" " . " ". , " " ." #: src/settings_help.cpp:39 msgid "efax-gtk help: Name" msgstr "efax-gtk : " #: src/settings_help.cpp:41 msgid "" "Put the number to appear on the fax top header on sent faxes here. This " "will also comprise the fax station ID reported to the sending fax machine " "when receiving faxes" msgstr "" " , " ". -, " " ɣ " #: src/settings_help.cpp:44 msgid "efax-gtk help: Number" msgstr "efax-gtk : " #: src/settings_help.cpp:49 msgid "" "Put the serial device to which the modem is connected here (if none is " "given, the program defaults to /dev/modem). Do not include the `/dev/' part " "of the device name -- ie state it as `ttyS1' or `cua2', etc. With Linux, " "ttyS0 equates to COM 1, ttyS1 to COM 2, and so on" msgstr "" " , Σ ( , " " /dev/modem). " " /dev/ - ttyS1 cua2... Linux, " "ttyS0 - COM1, ttyS1 - COM2 ." #: src/settings_help.cpp:54 msgid "efax-gtk help: Device" msgstr "efax-gtk : " #: src/settings_help.cpp:56 msgid "" "Put the lock file directory here. If none is specified, the program " "defaults to /var/lock" msgstr "" " . , " " /var/lock" #: src/settings_help.cpp:58 msgid "efax-gtk help: Lock File" msgstr "efax-gtk : " #: src/settings_help.cpp:60 msgid "" "With efax-0.9 or higher you should usually pick \"Auto\", as then efax will " "work out the class of the modem by itself, but you can also force a class by " "picking one of the specified ones if you want. However, with efax-0.8 the " "program defaults to Class 2, so if you are using a Class 1 modem with old " "versions of efax specify the Class here" msgstr "" " efax-0.9 \"\", " " efax , " " , . , " " efax-0.8 2, " " 1 efax, " #: src/settings_help.cpp:66 msgid "efax-gtk help: Modem Class" msgstr "efax-gtk : " #: src/settings_help.cpp:68 msgid "" "This specifies whether tone or pulse dialling will be used when sending faxes" msgstr "" " , " " ." #: src/settings_help.cpp:70 msgid "efax-gtk help: Dial Mode" msgstr "efax-gtk : " #: src/settings_help.cpp:72 msgid "" "This specifies the capabilities of the modem. To see what these mean do " "`man efax', and look at the operation of the `-c' flag. With efax-0.9 and a " "Class 2 modem, you usually won't need to specify this and should leave it " "blank, as the program will interrogate the modem. If using an older version " "of efax or a different class of modem, values which will work with " "practically any 14,400 bps modem are 1,5,0,2,0,0,0,0, or 1,3,0,2,0,0,0,0 for " "slower ones" msgstr "" " . , , " " `man efax', -c. 2 efax-0.9 " " . " " efax , " " 14400 bps - " "1,5,0,2,0,0,0,0, 1,3,0,2,0,0,0,0 ." #: src/settings_help.cpp:80 msgid "efax-gtk help: Capabilities" msgstr "efax-gtk help: " #: src/settings_help.cpp:82 msgid "" "This defines the number of rings the modem allows to pass before answering " "the telephone when in Standby mode. Acceptable values are 1 to 9. If none " "is specified, the program defaults to 1" msgstr "" " , , " " . 1 9. " ", 1." #: src/settings_help.cpp:85 msgid "efax-gtk help: Rings" msgstr "efax-gtk : " #: src/settings_help.cpp:90 msgid "" "This specifies the initializing `AT' commands for the modem when in fax " "mode. Specify as many of these as are needed, separated by spaces for " "commands which need to be separated, but without a prepended `AT'. If none " "is specified, the program will default to `Z &FE&D2S7=120 &C0 M1L0', which " "will be correct for practically all modems" msgstr "" " . " " ӣ, , , " " 'AT'. , " " `Z &FE&D2S7=120 &C0 M1L0', " " " #: src/settings_help.cpp:96 msgid "efax-gtk help: Initialization Parameters" msgstr "efax-gtk : " #: src/settings_help.cpp:98 msgid "" "This specifies the `AT' commands that will reset the modem. Specify as many " "commands as are needed, separated by spaces for commands which need to be " "separated, but without a prepended `AT'. If none is specified, the program " "will default to `Z', which will be correct for practically all modems" msgstr "" " AT- . ӣ, , " " , 'AT'. " " , `Z', " " " #: src/settings_help.cpp:103 msgid "efax-gtk help: Reset Parameters" msgstr "efax-gtk : " #: src/settings_help.cpp:105 msgid "" "This can be used to pass any other parameter to efax (do `man efax' to see " "what is available). Specify as many of these as are needed, separated by " "spaces for different parameters -- eg include `-or' to do a bit reversal " "during receive for Multitech modems which require it. Unless you have an " "unusual modem, leave this blank" msgstr "" " efax ( " " man efax). , " " . - , " " " #: src/settings_help.cpp:111 msgid "efax-gtk help: Other Parameters" msgstr "efax-gtk : " #: src/settings_help.cpp:116 msgid "" "If this is checked, the program will use the GTK+ print system rather than " "the command line argument specified below to print faxes" msgstr "" #: src/settings_help.cpp:119 msgid "efax-gtk help: Use GTK+ print system" msgstr "" #: src/settings_help.cpp:121 msgid "" "This is the command which prints and takes postscript input on standard " "input. If none is specified, the program will default to `lpr'. This has " "no effect if the \"Use GTK+ Print System\" button is checked" msgstr "" " , PostScript, " " . , " " 'lpr'" #: src/settings_help.cpp:125 msgid "efax-gtk help: Print Program" msgstr "efax-gtk : " #: src/settings_help.cpp:127 msgid "" "This will determine the extent to which a printed page will be reduced to " "fit within a printer's print area. It is a percentage -- eg 98 will shrink " "the page to 98 per cent of its size. If none is specified no shrink will " "take place (ie you can, but there is no need to, specify 100). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" " , , " " . " ", 98 98 ţ " ". , (, " " 100, )" #: src/settings_help.cpp:133 msgid "efax-gtk help: Print Shrink" msgstr "efax-gtk : " #: src/settings_help.cpp:135 msgid "" "This specifies whether a confirmatory pop-up dialog is to appear before " "printing whenever the \"Print selected fax\" button is pressed in the " "Received Faxes list or Sent Faxes list. Uncheck the box if you don't want a " "dialog (if you have specified an external print manager such as 'kprinter' " "in the Print Program box, then you will not want this checked). This has no " "effect if the \"Use GTK+ Print System\" button is checked" msgstr "" " , " " \" \" " " . , " "(, , kprinter, " " ' ')" #: src/settings_help.cpp:141 src/settings_help.cpp:170 msgid "efax-gtk help: Popup" msgstr "efax-gtk : " #: src/settings_help.cpp:146 msgid "" "A postscript viewer is used to view sent and received faxes via the fax " "lists, and also to view faxes to be sent identified via the \"Files to fax\" " "file selector dialog. Specify here the command to be used to view " "postscript files. If none is specified, the program will default to 'gv'. " "Other possibilities you may want to specify are 'evince' (the Gnome image " "viewer) or 'kghostview' (the KDE postscript viewer). If using gv, you may " "need to use the '-media A4' or '-media Letter' option to select correct " "paper size. evince and kghostview do this automatically" msgstr "" " PostScript, " " , , " " \" \". , " " PostScript, , " " 'gv'. , " " 'evince' ( PostScript Gnome) kghostview " "( PostScript KDE). gv, " " '-media A4' '-media Letter' " " . evince khostview " #: src/settings_help.cpp:155 msgid "efax-gtk help: Postscript Viewer Program" msgstr "efax-gtk : Postscript" #: src/settings_help.cpp:160 msgid "" "This specifies whether a socket server is to be run for CUPS or some other " "print system. Check the box if it is to run" msgstr "" " , - CUPS " ". , " #: src/settings_help.cpp:162 msgid "efax-gtk help: Run socket server" msgstr "efax-gtk : -" #: src/settings_help.cpp:164 msgid "" "This specifies whether a pop-up dialog is to appear whenever a fax is " "received by the socket server from the print system. Check the box if you " "want a dialog (this has no effect unless you have also checked the box for " "the socket server to run). If the program is inactive or is standing by to " "receive faxes, the fax can be sent directly from this dialog" msgstr "" " , ɣ -" " . , " " ( , " "-). , " " ." #: src/settings_help.cpp:172 msgid "" "This specifies the port number on which the socket server is to listen. It " "should be between 1024 and 65535." msgstr " , -." #: src/settings_help.cpp:174 msgid "efax-gtk help: Port" msgstr "efax-gtk : " #: src/settings_help.cpp:176 #, fuzzy msgid "" "This determines whether addresses other than localhost and your machine's " "own host name will be allowed to make a connection to the socket. Unless you " "have unusual requirements (that is, unless the CUPS or lpd daemons are " "running on another machine), you should choose localhost. If you want other " "machines to be able to connect, pick \"other\" and specify the hostnames of " "the computers which may connect (separating different hostnames by spaces, " "but you do not need to specify localhost and your machine's hostname, as " "those are always permitted). Such hostnames may be specified as an ordinary " "host name or in numeric notation. Numeric notation may have * as a trailing " "wildcard, so for example 10.1.* will permit access for addresses 10.1.0.0 to " "10.1.255.255. IPv6 numeric addresses may also have a trailing wildcard, but " "if so '::' may not be used in the address (but other forms of 0 suppression " "are acceptable). You should run efax-gtk behind a firewall if you choose " "\"other\"." msgstr "" " , , " " localhost . " "(, CUPS lpd ), " " localhost. , " ", \"\" , " " ( ; " " locahost , " "). efax-gtk " ", \"\"." #: src/settings_help.cpp:189 msgid "efax-gtk help: Socket connections allowed" msgstr "efax-gtk : " #: src/settings_help.cpp:190 msgid "This specifies the IP family to be used by the socket server." msgstr "" #: src/settings_help.cpp:191 msgid "efax-gtk help: IP family" msgstr "" #: src/settings_help.cpp:196 msgid "" "This parameter specifies whether a pop-up dialog will appear when a fax is " "received from a modem. Check the box if you want a pop-up." msgstr "" " , ɣ " ". , ." #: src/settings_help.cpp:198 msgid "efax-gtk help: Receive pop-up" msgstr "efax-gtk : ɣ " #: src/settings_help.cpp:200 msgid "" "This specifies whether a program or script is to be executed when a fax is " "received from a modem. Check the box if you want to execute a program, and " "enter the program name. efax-gtk comes with two scripts, print_fax and " "mail_fax, which can be used automatically to print a received fax or to mail " "it to a user (so to mail a fax you can enter `mail_fax' here). See the " "README file for further details." msgstr "" " , ɣ " " . , , " " ." #: src/settings_help.cpp:206 msgid "efax-gtk help: Execute program when fax received" msgstr "efax-gtk : ɣ " #: src/settings_help.cpp:211 msgid "" "This specifies the resolution to which faxes are sent. \"Standard\" gives " "204x98 and \"Fine\" gives 204x196" msgstr "" " , . \"\" " " 20498 \"\" 204x196 " #: src/settings_help.cpp:213 msgid "efax-gtk help: Sent Fax Resolution" msgstr "efax-gtk : " #: src/settings_help.cpp:215 msgid "" "This specifies whether the destination fax number is included in the top fax " "header line for sent faxes. Uncheck the box if you do not want this to be " "shown (say because it includes a pay card access number)" msgstr "" #: src/settings_help.cpp:219 msgid "efax-gtk help: Fax top header line" msgstr "efax-gtk : " #: src/settings_help.cpp:221 msgid "" "This specifies whether the program is to redial automatically when sending a " "fax if the modem is in use or the recipient is busy. Check the box if you " "want want automatic redial" msgstr "" #: src/settings_help.cpp:224 msgid "efax-gtk help: Redial" msgstr "" #: src/settings_help.cpp:226 msgid "" "This specifies a prefix to be prepended to any dialed number - for example " "you can specify '9,' here to dial through a switchboard which needs 9 to " "obtain an outside line followed by a delay." msgstr "" #: src/settings_help.cpp:229 msgid "efax-gtk help: Dial Prefix" msgstr "" #: src/settings_help.cpp:234 msgid "" "This parameter specifies a log file to which progress on negotiations and " "fax status, and errors and warnings, are logged. If none is specified, then " "no log file will be maintained. (A log file can also be kept by redirecting " "stdout and stderr -- see the README file for further details)" msgstr "" " , " " , . " " , ģ. ( " " stdout stderr -- . " "README)" #: src/settings_help.cpp:238 msgid "efax-gtk help: Log File" msgstr "efax-gtk : " #: src/settings_help.cpp:243 msgid "Specify the page size for faxes here" msgstr " " #: src/settings_help.cpp:244 msgid "efax-gtk help: Page Size" msgstr "efax-gtk : " #: src/helpfile.cpp:53 msgid "efax-gtk: Help" msgstr "efax-gtk: " #: src/helpfile.cpp:73 msgid "Sending" msgstr "" #: src/helpfile.cpp:80 msgid "Auto redialing" msgstr "" #: src/helpfile.cpp:87 msgid "Receiving" msgstr "ɣ" #: src/helpfile.cpp:94 msgid "Address Book" msgstr " " #: src/helpfile.cpp:101 msgid "Fax Lists" msgstr " " #: src/helpfile.cpp:108 msgid "Settings" msgstr "" #: src/helpfile.cpp:184 msgid "" "\n" "Sending faxes\n" "-------------\n" "\n" "Before sending a fax, it must be specified in the \"Fax to send\" box. It " "must be in postscript or PDF format (formats produced by all Unix/Linux word " "and document processors), and will be converted by the program into the " "correct tiffg3 fax format.\n" "\n" "There are two fax entry methods. First, the fax to be sent can be a file " "saved on the filesystem. It can be entered manually in the \"Fax to send\" " "box, or entered by means of the file selection dialog. If the file " "comprises a single postscript or PDF file, then you can find it by pressing " "the \"Single File\" button. It can be more easily found with this dialog if " "it is placed in the $HOME/faxout directory.\n" "\n" "Where more than one file is specified in the \"Fax to send\" box, they will " "be sent as a single fax appended in the order in which they are entered in " "the box. Such multiple files can be more easily selected using the file " "list brought up by pressing the \"Multiple Files\" button. Pressing the " "\"Multiple Files\" button enables files to be found and added to the file " "list, and they can be reordered by using the Up or Down arrow buttons, or by " "dragging and dropping with the mouse.\n" "\n" "As an alternative, faxes can be received directly from the print system by " "means of a socket server provided by the program. Efax-gtk maintains a list " "of queued faxes received from the socket which can be accessed by choosing " "\"Socket\" as the fax entry method, and then bringing up the queued faxes " "list by pressing the \"Socket list\" button. This is a more convenient way " "of sending faxes from a word processor, and enables a fax to be sent for " "faxing to efax-gtk by printing from the word processor program. Where a fax " "is queued for sending in the socket list, a small red circle will appear in " "the main program window on the right hand side of the \"Fax to send\" box. " "For particulars of how to set up CUPS or lpr/lprng to send to efax-gtk, see " "the README file which comes with the distribution.\n" "\n" "The telephone number to which the fax is to be sent is entered into the " "\"Tel number\" box. This can be entered directly into the box, or by using " "the built-in addressbook. The addressbook can be invoked by pressing the " "\"Tel number\" button, or from the `File/Address book' pull-down menu item " "(see the \"Address Book\" tag in this help dialog). However, if a telephone " "connection has already been established with the remote fax receiver, then " "the fax can be sent without dialing by leaving the \"Tel number\" box blank " "(a dialog will come up asking if you would like to send the fax without " "dialing).\n" "\n" "When a fax is received from the print system via the socket server, the " "program settings can also be configured to bring up a dialog automatically. " "If the program is inactive or is standing-by to receive faxes the fax can be " "sent directly from this dialog without the need to invoke the list of queued " "faxes received from the socket.\n" "\n" "Successfully sent faxes are copied to a directory in the $HOME/faxsent " "directory, which has a name derived from the year, month, day, hour and " "seconds when the sending of the fax was completed, and will appear in the " "faxes sent list. They are only included in that list if they have been sent " "without error. The efax message display box will report on the progress of " "a fax being sent. The fax list can be brought up from the `File/List sent " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" msgstr "" "\n" " \n" "-------------\n" "\n" " , \" \". " " PostScript/PDF (, " "Unix/Linux ), " " tiffg3.\n" "\n" " . , " " , \" " "\" . PostScript/" "PDF, \" \". " ", $HOME/faxout.\n" "\n" " \" \" " " , , , " " . " " \" \". " " , " " , .\n" "\n" " -" ", . Efax-gtk " " , . " " , \"\" , " ", \" \". " " , " "efax-gtk . " ", ݣ , " " \" \" " ".\n" "\n" " , , " "\" \". ģ " " . " "\" \" '/ '( " " \" \" ). , " "̣ - , " ", \" \" ( " " , , " " ).\n" "\n" " $HOME/faxsent, " " , , , , " ", . " ", . " " '/ '. . \" " " \".\n" #: src/helpfile.cpp:250 msgid "" "\n" "Automatic redialing\n" "-------------------\n" "\n" "The program settings have an option for automatic redialing of a fax to be " "sent if the modem was in use or the receiving station was busy when the " "first attempt to send it was made. A list of the faxes queued for redialing " "can be brought up from the 'File' pull-down menu or from the icon in the " "system tray.\n" "\n" "If the program settings have been set to provide for automatic redialing, " "the program will keep trying to send the fax at the intervals chosen in the " "settings until either (a) the sending of the fax is successful, (b) there " "has been a failure arising from something other than the modem being in use " "or the recipient station being busy (such as a modem error, or the remote " "number ringing out without answering), (c) the fax is removed by the user " "from the list of faxes queued for redialing, (d) if the fax to be sent is a " "print job received from the print system, the print job is removed by the " "user from the dialog showing the list of queued faxes from the print socket, " "(e) if the fax to be sent comprises file(s) on the file system, the file(s) " "are deleted or moved (or their permissions changed to make them unreadable), " "or (f) the 'Stop' button is pressed while an attempt is being made to send " "the fax concerned which is queued for redialing.\n" "\n" "A fax queued for redialing will not be sent while the Settings dialog is " "open. Instead, if the interval for resending such a fax has passed, a " "further sending attempt will take place once the Settings dialog has been " "closed.\n" "\n" "The list of queued faxes for redialing is not preserved when the program is " "terminated. However, if any unsent faxes are print jobs received from the " "print system, they can still be found in the dialog showing the list of " "queued faxes from the print socket (assuming they have not been explicitly " "removed from that list by the user).\n" msgstr "" #: src/helpfile.cpp:291 msgid "" "\n" "Receiving faxes\n" "---------------\n" "\n" "Three ways of receiving faxes are provided for.\n" "\n" "First, the program can be set to answer a fax call which is ringing but has " "not been answered, by pressing the \"Answer call\" button.\n" "\n" "Secondly, the program can take over a call which has already been answered " "(say, by a telephone hand set) by pressing the \"Take over call\" button.\n" "\n" "Thirdly, the program can be placed in standby mode by pressing the \"Standby" "\" button. This will automatically answer any call after the number of " "rings specified in the efax-gtkrc file, and receive the fax. The program " "will keep on receiving faxes until the \"Stop\" button is pressed.\n" "\n" "Received faxes in tiffg3 format (one file for each page) are placed in a " "directory in the $HOME/faxin directory, which has a name derived from the " "year, month, day, hour and seconds when reception of the fax was completed, " "and is the fax ID number.\n" "\n" "Received faxes can be printed, viewed, described and managed using the built " "in fax list facility. This can be brought up from the `File/List received " "faxes' pull down menu item. See \"Using the fax lists\" further below.\n" "\n" "When a fax is received, a pop-up dialog can also be set to appear (go to the " "Settings dialog to do this). In the settings dialog you can also specify a " "program to be executed when a fax is received. The fax ID number is passed " "as the first (and only) argument to the program, which enables the program " "to find the fax in $HOME/faxin. The distribution contains two executable " "scripts, mail_fax and print_fax, which can be used to e-mail a fax or print " "a fax to a user automatically when it is received. (These scripts are not " "installed by 'make install' - if you want to use them, make them executable " "with 'chmod +x' and copy them to a directory which is in the system path " "such as /usr/local/bin, and then specify the script name in the settings " "dialog.)\n" msgstr "" "\n" "ɣ \n" "---------------\n" "\n" " ɣ .\n" "\n" ". \" \" " " .\n" "\n" ". ɣ (, " " ) \" " "\".\n" "\n" ". " " \" ɣ\". ̣ , " " , , Σ ɣ . " " \"\".\n" "\n" " tiffg3 ( ) " " $HOME/faxin, , , " ", , , ɣ " " , ID .\n" "\n" " , , " " , " "'/ '. \" " "\".\n" "\n" " ɣ ( " "). , " " ɣ . " " , which enables the program to find the fax in $HOME/" "faxin. The distribution contains two executable scripts, mail_fax and " "print_fax, which can be used to e-mail a fax or print a fax to a user " "automatically when it is received. (These scripts are not installed by " "'make install' - if you want to use them, make them executable with 'chmod " "+x' and copy them to a directory which is in the system path such as /usr/" "local/bin, and then specify the script name in the settings dialog.)\n" #: src/helpfile.cpp:336 msgid "" "\n" "Using the address book\n" "----------------------\n" "\n" "To pick a telephone number from the address book, highlight the relevant " "address by pressing the left mouse button over it, and then press the \"OK\" " "button.\n" "\n" "Addresses can be added to the address book by pressing the add button, and " "then completing the relevant dialog which will appear. To delete an address " "from the address book, highlight the relevant address and press the delete " "(trashcan) button. The addressbook can be sorted by using the up and down " "arrow buttons on a highlighted address, or by dragging and dropping using " "the mouse.\n" msgstr "" "\n" " \n" "----------------------\n" "\n" " , " " Σ \"OK\".\n" "\n" " \"" "\", . " " , \"\" (). " " " " .\n" #: src/helpfile.cpp:354 msgid "" "\n" "Using the fax lists\n" "-------------------\n" "\n" "To bring up the fax lists, go to the the `File' menu and pick the `List " "received faxes' or `List sent faxes' menu item. Highlight the fax to " "printed or viewed by pressing the left mouse button. The programs to be " "used to print and view the fax are specifed in the efax-gtkrc configuration " "file, or if none are specified, the program will print using lpr (which will " "work for most Unix systems) and view with gv.\n" "\n" "To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to " "enable the fax page to fit within the printer margins. A parameter of 98 " "will work with most printers. This can be changed while the program is " "running by bringing up the `Settings' dialog and entering it into the `Print/" "Print Shrink' box.\n" "\n" "A description can be added to a received fax when appearing in a fax list " "(or subsequently amended) by pressing the relevant button -- this will " "enable faxes to be more easily identified.\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" msgstr "" "\n" " \n" "-----------------------------\n" "\n" " , `' ` " "' ` '. , " " . , " " , , " " , lpr ( " " Unix-) gv .\n" "\n" " " "PRINT_SHRINK, , . " " 98 . " " Σ `', , " "` '.\n" "\n" " " ". ..\n" "\n" "The received faxes list will show, at the far right of the tool bar, the " "number of faxes received since the program was last started. If efax-gtk is " "in receive standby mode, the `tooltips' for the program's icon in the system " "tray will also indicate this number. The count can be reset to 0 without " "restarting the program by pressing the reset button in the received faxes " "list.\n" #: src/helpfile.cpp:386 msgid "" "\n" "Settings\n" "--------\n" "\n" "The program settings can be changed by manually editing the efax-gtk " "configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /" "etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-" "gtkrc takes precedence over the other two.\n" "\n" "The configuration file can also be set by using the Settings dialog launched " "from the `File/Settings' pull down menu item. The settings entered using " "this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the " "Settings dialog has been used, and you want to revert to the global " "settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or " "by pressing the `Reset' button in the Settings dialog, which will reload the " "Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc " "or /etc/efax-gtkrc).\n" "\n" "Help can be obtained when filling out the Settings dialog by holding the " "mouse over the relevant help (?) button, which will bring up a \"Tips\" " "display, or by pressing the button, which will bring up an information " "display.\n" msgstr "" "\n" "\n" "--------\n" "\n" " , " " $HOME/.efax-gtkrc, /etc/efax-gtkrc or /etc/efax-" "gtkrc. , $HOME/.efax-gtkrc " " .\n" "\n" " , " " '/'. " " $HOME/.efax-gtkrc. , , " " , " " $HOME/.efax-gtkrc, `' , " " (/etc/efax-" "gtkrc or /etc/efax-gtkrc).\n" "\n" " " " , " ", , " ".\n" #: src/socket_server.cpp:119 msgid "Socket running on port " msgstr " " #: src/socket_server.cpp:294 msgid "Print job received on socket\n" msgstr " , \n" #: src/socket_server.cpp:341 msgid "Closing the socket\n" msgstr "" #: src/socket_list.cpp:129 msgid "efax-gtk: Queued faxes from socket" msgstr "efax-gtk: , " #: src/socket_list.cpp:173 msgid "Queued print jobs" msgstr " " #: src/socket_list.cpp:216 msgid "Enter selected fax to send" msgstr " " #: src/socket_list.cpp:222 msgid "Choose the selected fax for sending" msgstr " " #: src/socket_list.cpp:346 src/socket_notify.cpp:74 msgid "PRINT JOB: " msgstr " : " #: src/socket_list.cpp:501 msgid "Remove " msgstr " " #: src/socket_list.cpp:508 msgid "efax-gtk: Remove queued fax" msgstr "efax-gtk: " #: src/socket_notify.cpp:53 msgid "efax-gtk: print job received on socket" msgstr "efax-gtk: , " #: src/socket_notify.cpp:59 msgid "Queue fax" msgstr " " #: src/socket_notify.cpp:76 msgid "" " has been received on socket.\n" "Send or queue fax?" msgstr "" " .\n" " ?" #: src/logger.cpp:90 src/logger.cpp:245 msgid "Beginning fax log: " msgstr "" #: src/logger.cpp:144 src/logger.cpp:196 msgid "Ending fax log: " msgstr "" #: src/logger.cpp:282 msgid "Cannot open log file for reading" msgstr "" #: src/logger.cpp:283 msgid "efax-gtk: print logfile" msgstr "" #: src/logger.cpp:334 msgid "Cannot open log file for viewing" msgstr "" #: src/logger.cpp:335 msgid "efax-gtk: view logfile" msgstr "" #: src/logger.cpp:405 msgid "efax-gtk: View log" msgstr "" #: src/tray_icon.cpp:110 msgid "List received faxes" msgstr " " #: src/tray_icon.cpp:118 msgid "List sent faxes" msgstr " " #: src/tray_icon.cpp:131 msgid "Redial queue" msgstr "" #: src/tray_icon.cpp:152 msgid "Receive standby" msgstr " ɣ" #: src/tray_icon.cpp:171 msgid "Quit" msgstr "" #: src/tray_icon.cpp:217 msgid "efax-gtk: " msgstr "efax-gtk: " #: src/redial_queue.cpp:114 msgid "efax-gtk: Redial queue" msgstr "" #: src/redial_queue.cpp:180 msgid "Remove fax from redial list" msgstr "" #: src/redial_queue.cpp:255 msgid "Remove fax to " msgstr "" #: src/redial_queue.cpp:257 msgid " from the redial queue?" msgstr "" #: src/redial_queue.cpp:262 msgid "efax-gtk: Remove fax for redialling?" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:289 #: src/utils/mono_tiff_print_manager.cpp:274 msgid "No file to print specified" msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:568 msgid "Font: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:569 msgid "Font size: " msgstr "" #: src/internal/c++-gtk-utils/text_print_manager.cpp:610 msgid "Print font" msgstr "" #: efax/efax.c:379 msgid "success" msgstr " " #: efax/efax.c:380 msgid "number busy or modem in use" msgstr " " #: efax/efax.c:381 msgid "unrecoverable error" msgstr " " #: efax/efax.c:382 msgid "invalid modem response" msgstr " " #: efax/efax.c:383 msgid "no response from modem" msgstr " " #: efax/efax.c:385 msgid "internal error" msgstr " " #: efax/efax.c:395 msgid "NSC - poller features" msgstr "" #: efax/efax.c:398 msgid "CIG - poller ID" msgstr "" #: efax/efax.c:401 msgid "DTC - poller capabilities" msgstr "" #: efax/efax.c:404 msgid "NSF - answering features" msgstr "" #: efax/efax.c:407 msgid "CSI - answering ID" msgstr "" #: efax/efax.c:410 msgid "DIS - answering capabilities" msgstr "" #: efax/efax.c:413 msgid "NSS - caller features" msgstr "" #: efax/efax.c:416 msgid "TSI - caller ID" msgstr "TSI - " #: efax/efax.c:419 msgid "DCS - session format" msgstr "DCS - " #: efax/efax.c:423 msgid "CFR - channel OK" msgstr "CFR - " #: efax/efax.c:426 msgid "FTT - channel not OK" msgstr "FTT - " #: efax/efax.c:430 msgid "MPS - not done" msgstr "MPS - " #: efax/efax.c:433 msgid "EOM - not done, new format" msgstr "EOM - , " #: efax/efax.c:436 msgid "EOP - done" msgstr "EOP - " #: efax/efax.c:440 msgid "PRI-MPS - not done, call operator" msgstr "" #: efax/efax.c:443 msgid "PRI-EOM - not done, new format, call operator" msgstr "" #: efax/efax.c:446 msgid "PRI-EOP - done, call operator" msgstr "" #: efax/efax.c:450 msgid "MCF - page OK" msgstr "MCF - " #: efax/efax.c:453 msgid "RTP - page OK, check channel" msgstr "RTP - , " #: efax/efax.c:456 msgid "PIP - page OK, call operator" msgstr "PIP - , " #: efax/efax.c:459 msgid "RTN - page not OK, check channel" msgstr "RTN - , " #: efax/efax.c:462 msgid "PIN - page not OK, call operator" msgstr "PIN - , " #: efax/efax.c:466 msgid "CRP - repeat command" msgstr "CRP - " #: efax/efax.c:469 msgid "DCN - disconnect" msgstr "DCN - " #: efax/efax.c:472 msgid "UNKNOWN" msgstr "" #: efax/efax.c:629 msgid "incompatible local and remote capabilities" msgstr " ̣ " #: efax/efax.c:710 efax/efax.c:720 efax/efax.c:732 #, c-format msgid "can't delete file %s:" msgstr " %s:" #: efax/efax.c:713 efax/efax.c:723 efax/efax.c:735 #, c-format msgid "removed file: %s" msgstr "̣ : %s" #: efax/efax.c:784 msgid "header:" msgstr ":" #: efax/efax.c:868 msgid "characters received while sending" msgstr ", " #: efax/efax.c:906 #, c-format msgid "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" msgstr " %d+%d %d+%d , %d %d bps" #: efax/efax.c:915 msgid "flow control did not work" msgstr " " #: efax/efax.c:954 msgid "modem response in data" msgstr " " #: efax/efax.c:973 msgid "run length buffer overflow" msgstr " " #: efax/efax.c:1036 msgid "file write:" msgstr " :" #: efax/efax.c:1038 msgid "CAN: data reception cancelled" msgstr "CAN: ɣ " #: efax/efax.c:1044 efax/efax.c:1045 efax/efax.c:2157 msgid "reception errors" msgstr " ɣ" #: efax/efax.c:1055 #, c-format msgid "received %d lines with %d errors" msgstr " %d %d " #: efax/efax.c:1107 #, c-format msgid "sent TCF - channel check of %d bytes" msgstr " TCF - %d " #: efax/efax.c:1143 msgid "timed out during training check data" msgstr "" #: efax/efax.c:1156 #, c-format msgid "received TCF - channel check (OK: run of %d in %d)" msgstr "" #: efax/efax.c:1159 #, c-format msgid "received TCF - channel check (not OK: run of %d in %d)" msgstr "" #: efax/efax.c:1214 msgid "last byte of frame is NULL" msgstr " " #: efax/efax.c:1222 msgid "sent" msgstr "" #: efax/efax.c:1253 msgid "HDLC frame missing initial 0xff" msgstr "" #: efax/efax.c:1260 msgid "bit-reversed HDLC frame, reversing bit order" msgstr " HDLC , " #: efax/efax.c:1281 msgid "timed out reading frame data" msgstr " " #: efax/efax.c:1291 msgid "frame error" msgstr " " #: efax/efax.c:1294 msgid "no response after frame data" msgstr " " #: efax/efax.c:1297 msgid "wrong response after frame data" msgstr " " #: efax/efax.c:1304 #, c-format msgid "frame too long (%d, > %d max bytes)" msgstr " ( (%d, > %d )" #: efax/efax.c:1371 msgid "wrong carrier" msgstr " " #: efax/efax.c:1376 msgid "wrong response to command to receive a frame" msgstr " ɣ " #: efax/efax.c:1384 #, c-format msgid "received short frame (%d bytes)" msgstr " (%d )" #: efax/efax.c:1391 msgid "received" msgstr "" #: efax/efax.c:1409 msgid "The remote ID is" msgstr "̣ ID" #: efax/efax.c:1459 msgid "no answer from remote fax" msgstr "̣ " #: efax/efax.c:1464 efax/efax.c:1505 efax/efax.c:1576 msgid "can't open page" msgstr " " #: efax/efax.c:1482 msgid "remote has one or more documents to send and can receive" msgstr "" "̣ " "" #: efax/efax.c:1484 msgid "remote has one or more documents to send and cannot receive" msgstr "" "̣ " "" #: efax/efax.c:1488 msgid "remote has no documents to send and can receive" msgstr "̣ , " #: efax/efax.c:1490 msgid "remote has no documents to send and cannot receive" msgstr "̣ ɣ" #: efax/efax.c:1495 msgid "remote cannot receive, trying anyways" msgstr "̣ , ӣ " #: efax/efax.c:1498 msgid "remote has nothing to send, trying anyways" msgstr "̣ , ӣ " #: efax/efax.c:1552 #, c-format msgid "channel not usable at %d bps" msgstr " %d bps" #: efax/efax.c:1561 msgid "channel not usable at lowest speed" msgstr " " #: efax/efax.c:1569 msgid "invalid response to DCS" msgstr " DCS" #: efax/efax.c:1623 efax/efax.c:2053 #, c-format msgid "sent page %s" msgstr " %s" #: efax/efax.c:1651 msgid "invalid post-page response" msgstr " " #: efax/efax.c:1695 msgid "interrupt request ignored" msgstr " " #: efax/efax.c:1745 msgid "timed out waiting for command" msgstr " " #: efax/efax.c:1790 efax/efax.c:2126 #, c-format msgid "page saved to %s" msgstr " %s" #: efax/efax.c:1837 msgid "unrecognized command" msgstr " " #: efax/efax.c:1843 msgid "no command or response from remote" msgstr " ̣ " #: efax/efax.c:1869 #, c-format msgid "abnormal termination (code %d)" msgstr " ( %d)" #: efax/efax.c:1918 msgid "no XON/DC2 received after CONNECT" msgstr " XON/DC2 CONNECT" #: efax/efax.c:1927 #, c-format msgid "%d characters received while waiting to send" msgstr "%d " #: efax/efax.c:1975 msgid "remote has one or more documents to send." msgstr "̣ " #: efax/efax.c:2043 msgid "no +FPTS response obtained, it is assumed that fax was received" msgstr " +FPTS , " #: efax/efax.c:2081 msgid "too many page send retries" msgstr " " #: efax/efax.c:2171 msgid "receive (+FDR) command failed" msgstr " ɣ (+FDR) " #: efax/efax.c:2198 #, c-format msgid "dialing %s" msgstr " %s" #: efax/efax.c:2208 #, c-format msgid "The remote ID is %s" msgstr "̣ ID - %s" #: efax/efax.c:2216 msgid "called" msgstr "" #: efax/efax.c:2219 efax/efax.c:2222 msgid "connected" msgstr "Σ" #: efax/efax.c:2224 msgid "number is busy" msgstr " " #: efax/efax.c:2226 msgid "dial command failed" msgstr " " #: efax/efax.c:2304 msgid "waiting for activity" msgstr " " #: efax/efax.c:2306 msgid "activity detected" msgstr " " #: efax/efax.c:2313 msgid "can't answer: can't lock device" msgstr " : " #: efax/efax.c:2332 #, c-format msgid "too many %%d escapes in command (%s)" msgstr "" #: efax/efax.c:2339 efax/efax.c:2362 #, c-format msgid "executing command /bin/sh -c %s" msgstr " /bin/sh -c %s" #: efax/efax.c:2345 efax/efax.c:2368 msgid "exec() call failed:" msgstr " exec(): " #: efax/efax.c:2348 msgid "no getty command defined for data call" msgstr "" #: efax/efax.c:2353 msgid "fax call answered" msgstr "" #: efax/efax.c:2356 msgid "voice call answered" msgstr "" #: efax/efax.c:2371 msgid "no voice command defined for voice call" msgstr " " #: efax/efax.c:2384 msgid "unable to answer call" msgstr " " #: efax/efax.c:2425 msgid "modem does not support fax" msgstr " ɣ/ " #: efax/efax.c:2430 msgid "can't determine fax modem class support" msgstr "" #: efax/efax.c:2453 msgid "Multi-Tech bit order set" msgstr "" #: efax/efax.c:2460 #, c-format msgid "using %s in class %s" msgstr " %s in %s" #: efax/efax.c:2545 #, c-format msgid "failed page %s" msgstr " %s" #: efax/efax.c:2556 #, c-format msgid "finished - %s" msgstr " - %s" #: efax/efax.c:2662 #, c-format msgid "local ID (%s) truncated to %d characters" msgstr " ID (%s) %d " #: efax/efax.c:2669 #, c-format msgid "local ID (%s) has non-standard characters" msgstr " ID (%s) " #: efax/efax.c:2705 msgid "using line buffering of stdout" msgstr " " #: efax/efax.c:2727 #, c-format msgid "incorrect quality (-q) argument (%s)" msgstr "" #: efax/efaxmsg.c:215 msgid " Error: " msgstr " : " #: efax/efaxmsg.c:216 msgid " Warning: " msgstr " : " #: efax/efaxlib.c:1231 efax/efaxlib.c:1323 efax/efaxlib.c:1345 #, c-format msgid "can't open file %s:" msgstr "" #: efax/efaxlib.c:1368 #, c-format msgid "can't get format of file %s" msgstr "" #: efax/efaxlib.c:1389 #, c-format msgid "can't rewind file %s:" msgstr "" #: efax/efaxlib.c:1991 #, c-format msgid "can't open output file %s:" msgstr "" #: efax/efaxio.c:133 msgid "fax device write error:" msgstr " :" #: efax/efaxio.c:262 #, c-format msgid "unexpected response \"%s\"" msgstr " \"%s\"" #: efax/efaxio.c:272 #, c-format msgid "modem command \"%s\" too long" msgstr " \"%s\"" #: efax/efaxio.c:320 #, c-format msgid "timed out after command: %s" msgstr " : %s" #: efax/efaxio.c:326 msgid "timed out after waiting" msgstr " " #: efax/efaxio.c:330 #, c-format msgid "wrong response after command: %s" msgstr " : %s" #: efax/efaxio.c:336 msgid "wrong response after waiting" msgstr " " #: efax/efaxio.c:365 msgid "sync: dropping DTR" msgstr "sync: DTR" #: efax/efaxio.c:371 msgid "sync: sending escapes" msgstr "sync: escapes" #: efax/efaxio.c:383 msgid "sync: modem not responding" msgstr "sync: " #: efax/efaxio.c:413 #, c-format msgid "modem command (%s) failed" msgstr " (%s)" #: efax/efaxio.c:419 msgid "modem command failed" msgstr " " #: efax/efaxio.c:470 #, c-format msgid "%s locked or busy - waiting" msgstr "%s - ģ" #: efax/efaxio.c:495 #, c-format msgid "opened %s" msgstr " %s" #~ msgid "New faxes: " #~ msgstr " : " #, fuzzy #~ msgid "" #~ "Copyright (C) 2001 - 2009 Chris Vine\n" #~ "\n" #~ "This program is released under the GNU General Public License, version 2" #~ msgstr "" #~ " (C) 2001 - 2008 Chris Vine\n" #~ "\n" #~ " GNU General Public License, " #~ "version 2" #~ msgid "" #~ " configuration file\n" #~ "and /dev/modem does not exist\n" #~ msgstr "" #~ " \n" #~ " /dev/modem \n" #~ msgid "" #~ " configuration file\n" #~ "Using default of /dev/modem\n" #~ msgstr "" #~ " \n" #~ " /dev/modem \n" #~ msgid "Adopting default printer command of 'lpr'\n" #~ msgstr " 'lpr'\n" efax-gtk-3.2.8/acinclude.m40000644000175000001440000005202011536141256012343 00000000000000dnl acinclude.m4 -- various bits of this have been borrowed from the m4 dnl configuration files for KDE and GNOME AC_DEFUN([AC_INSTALL_DIRS], [ AC_MSG_CHECKING(the fax spool directory) dnl set up the defaults SPOOLDIR="/var/spool/fax" AC_ARG_WITH(spooldir, [ --with-spooldir=DIR Where fax printer filter is installed (default is /var/spool/fax)], [ if test "$withval" != "no"; dnl then SPOOLDIR="$withval" fi ]) AC_MSG_RESULT([SPOOLDIR is $SPOOLDIR]) AC_SUBST(SPOOLDIR) ]) dnl By checking for the libraries to be linked against this dnl only checks for dynamic linking and therefore may not dnl be very useful AC_DEFUN([AC_CHECK_GTHREAD_HAS_PTHREADS], [ AC_CACHE_VAL(ac_cv_gthread_has_pthreads, [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(whether glib compiled against pthreads) GT_LIBS=`$PKG_CONFIG --libs "gthread-2.0"` T_STRING=${GT_LIBS%pthread*} if test ${#GT_LIBS} -gt ${#T_STRING}; then succeeded=yes fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then ac_cv_gthread_has_pthreads="yes" AC_MSG_RESULT(yes) else ac_cv_gthread_has_pthreads="no" AC_MSG_ERROR([glib does not appear to be compiled against pthreads]) fi ]) ]) AC_DEFUN([AC_CHECK_HAVE_IOS_NOCREATE], [ AC_MSG_CHECKING(for fstream ios::nocreate flag) AC_CACHE_VAL(ac_cv_have_ios_nocreate, [ AC_LANG_CPLUSPLUS AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [ #include ], [ std::fstream strm("dummy.txt", std::ios::in | std::ios::nocreate); ]) ], [ac_cv_have_ios_nocreate="yes"], [ac_cv_have_ios_nocreate="no"] ) dnl end AC_COMPILE_IFELSE ]) AC_MSG_RESULT([$ac_cv_have_ios_nocreate]) if test "$ac_cv_have_ios_nocreate" = "yes" ; then AC_DEFINE(HAVE_IOS_NOCREATE, 1, [ Define if the C++ fstream object has ios::nocreate ]) fi ]) AC_DEFUN([AC_CHECK_HAVE_STREAM_IMBUE], [ AC_MSG_CHECKING(whether streams may have a locale imbued) AC_CACHE_VAL(ac_cv_have_stream_imbue, [ AC_LANG_CPLUSPLUS AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM([ #include #include ], [ std::cout.imbue(std::locale::classic()); ]) ], [ac_cv_have_stream_imbue="yes"], [ac_cv_have_stream_imbue="no"] ) dnl end AC_COMPILE_IFELSE ]) AC_MSG_RESULT([$ac_cv_have_stream_imbue]) if test "$ac_cv_have_stream_imbue" = "yes" ; then AC_DEFINE(HAVE_STREAM_IMBUE, 1, [ Define if the C++ library can imbue stream objects with a locale ]) fi ]) AC_DEFUN([AC_CHECK_SOCKLEN_T], [ AC_CHECK_TYPES(socklen_t, , , [ #include #include #include #include ]) ]) AC_DEFUN([AC_CHECK_IN_ADDR_T], [ AC_CHECK_TYPES(in_addr_t, , , [ #include #include #include #include ]) ]) AC_DEFUN([AC_CHECK_COMPILERS], [ AC_ARG_ENABLE(debug,[ --enable-debug creates debugging code [default=no]], [ if test $enableval = "no"; dnl then ac_use_debug_code="no" else ac_use_debug_code="yes" fi ], [ac_use_debug_code="no"]) dnl Just for configure --help dnl this prevents stupid AC_PROG_CC from adding "-g" to the default CFLAGS c_flags_in=$CFLAGS AC_PROG_CC AC_PROG_CPP CFLAGS=$c_flags_in if test -z "$CFLAGS"; then if test "$GCC" = "yes"; then if test "$ac_use_debug_code" = "yes"; then CFLAGS="-g $CFLAGS" else CFLAGS="-O2 $CFLAGS" fi else if test "$ac_use_debug_code" = "yes"; then AC_CHECK_C_COMPILER_FLAG(g, [ CFLAGS="-g $CFLAGS" ]) else AC_CHECK_C_COMPILER_FLAG(O2, [ CFLAGS="-O2 $CFLAGS" ]) fi fi AC_CHECK_C_COMPILER_FLAG(pthread, [ CFLAGS="$CFLAGS -pthread" ]) if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall" fi fi dnl this prevents stupid AC_PROG_CXX from adding "-g" to the default CXXFLAGS cxx_flags_in=$CXXFLAGS AC_PROG_CXX AC_PROG_CXXCPP CXXFLAGS=$cxx_flags_in if test -z "$CXXFLAGS"; then if test "$GXX" = "yes"; then if test "$ac_use_debug_code" = "yes"; then CXXFLAGS="-g $CXXFLAGS" else CXXFLAGS="-O2 $CXXFLAGS" if test -z "$LDFLAGS"; then LDFLAGS="-s" fi fi else if test "$ac_use_debug_code" = "yes"; then AC_CHECK_COMPILER_FLAG(g, [ CXXFLAGS="-g $CXXFLAGS" ]) else AC_CHECK_COMPILER_FLAG(O2, [ CXXFLAGS="-O2 $CXXFLAGS" ]) fi fi AC_CHECK_COMPILER_FLAG(fexceptions, [ CXXFLAGS="$CXXFLAGS -fexceptions" ]) AC_CHECK_COMPILER_FLAG(fsigned-char, [ CXXFLAGS="$CXXFLAGS -fsigned-char" ]) AC_CHECK_COMPILER_FLAG(fno-check-new, [ CXXFLAGS="$CXXFLAGS -fno-check-new" ]) AC_CHECK_COMPILER_FLAG(Wno-deprecated, [ CXXFLAGS="$CXXFLAGS -Wno-deprecated" ]) AC_CHECK_COMPILER_FLAG(pthread, [ CXXFLAGS="$CXXFLAGS -pthread" ]) if test "$GXX" = "yes"; then CXXFLAGS="$CXXFLAGS -Wall" fi fi ]) AC_DEFUN([AC_CHECK_COMPILER_FLAG], [ AC_MSG_CHECKING(whether $CXX supports -$1) flag_cache=`echo $1 | sed 'y%.=/+-%___p_%'` AC_CACHE_VAL(ac_cv_prog_cxx_$flag_cache, [ echo 'int main() { return 0; }' >conftest.cc eval "ac_cv_prog_cxx_$flag_cache=no" if test -z "`$CXX -$1 -c conftest.cc 2>&1`"; then if test -z "`$CXX -$1 -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_cxx_$flag_cache=yes" fi fi rm -f conftest* ]) if eval "test \"`echo '$ac_cv_prog_cxx_'$flag_cache`\" = yes"; then AC_MSG_RESULT(yes) : $2 else AC_MSG_RESULT(no) : $3 fi ]) AC_DEFUN([AC_CHECK_C_COMPILER_FLAG], [ AC_MSG_CHECKING(whether $CC supports -$1) flag_cache=`echo $1 | sed 'y%.=/+-%___p_%'` AC_CACHE_VAL(ac_cv_prog_c_$flag_cache, [ echo 'int main(void) { return 0; }' >conftest.c eval "ac_cv_prog_c_$flag_cache=no" if test -z "`$CC -$1 -c conftest.c 2>&1`"; then if test -z "`$CC -$1 -o conftest conftest.o 2>&1`"; then eval "ac_cv_prog_c_$flag_cache=yes" fi fi rm -f conftest* ]) if eval "test \"`echo '$ac_cv_prog_c_'$flag_cache`\" = yes"; then AC_MSG_RESULT(yes) : $2 else AC_MSG_RESULT(no) : $3 fi ]) AC_DEFUN([AC_CHECK_MKSTEMP], [ AC_LANG_C ac_cflags_safe=$CFLAGS ac_ldflags_safe=$LDFLAGS ac_libs_safe=$LIBS CFLAGS="" LDFLAGS="" LIBS="" AC_CHECK_FUNCS(mkstemp,, AC_MSG_ERROR([Library function mkstemp is required and cannot be found])) CFLAGS=$ac_cflags_safe LDFLAGS=$ac_ldflags_safe LIBS=$ac_libs_safe ]) AC_DEFUN([AC_CHECK_X11_XLIB_H], [ ac_cflags_safe=$CFLAGS if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then if $PKG_CONFIG --exists gdk-2.0; then CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gdk-2.0`" fi if $PKG_CONFIG --exists x11; then CFLAGS="$CFLAGS `$PKG_CONFIG --cflags x11`" PKG_CHECK_MODULES(X11, x11, [:], [:]) fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi AC_CHECK_HEADERS([X11/Xlib.h X11/XKBlib.h]) CFLAGS=$ac_cflags_safe ]) AC_DEFUN([AC_CLOSING_MESSAGE], [ echo echo " Configuration complete." echo echo " To compile, enter \`make', and then enter \`make install'" echo " -- \`make install' must be run as root." echo echo " To reconfigure, enter \`make clean' and then run \`./configure' again." echo ]) dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error AC_DEFUN([PKG_CHECK_MODULES], [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $2) if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) succeeded=yes AC_MSG_CHECKING($1_CFLAGS) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT($$1_CFLAGS) AC_MSG_CHECKING($1_LIBS) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT($$1_LIBS) else $1_CFLAGS="" $1_LIBS="" AC_MSG_RESULT([no]) fi AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then ifelse([$3], , :, [$3]) else ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) dnl PKG_CHECK_VERSION does the same as PKG_CHECK_MODULES except dnl that it does not set *_CFLAGS and *_LIBS variables dnl PKG_CHECK_VERSION(gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) AC_DEFUN([PKG_CHECK_VERSION], [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $1) if $PKG_CONFIG --exists "$1" ; then AC_MSG_RESULT(yes) succeeded=yes else AC_MSG_RESULT([no]) fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then ifelse([$2], , :, [$2]) else ifelse([$3], , AC_MSG_ERROR([Library requirements ($1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$3]) fi ]) AC_DEFUN([AC_CHECK_GTK_VERSION], [ AC_MSG_CHECKING(which version of gtk+ to compile against) AC_ARG_WITH(gtk-version, [ --with-gtk-version whether to use gtk2 or gtk3 [(gtk3, gtk2, auto)] [[default=auto]]], [ if test "x$withval" = "xgtk2" || test "x$withval" = "xgtk+2"; then AC_MSG_RESULT([gtk2]) CGU_GTK_VERSION=2 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.12.0) elif test "x$withval" = "xgtk3" || test "x$withval" = "xgtk+3"; then AC_MSG_RESULT([gtk3]) CGU_GTK_VERSION=3 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.99.0) elif test "x$withval" = "xauto"; then AC_MSG_RESULT([auto]) PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.99.0, [ CGU_GTK_VERSION=3 ], [ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.12.0) CGU_GTK_VERSION=2 ]) else AC_MSG_ERROR([incorrect gtk+ version specified - should be gtk2, gtk3 or auto]) fi ], [ AC_MSG_RESULT([auto]) PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.99.0, [ CGU_GTK_VERSION=3 ], [ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.12.0) CGU_GTK_VERSION=2 ]) ]) ]) AC_DEFUN([PKG_CHECK_DBUS_GLIB], [ PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.70, [ AC_DEFINE([HAVE_DBUS_GLIB], [1], [Define to 1 if you do not have gio dbus but do have dbus-glib.]) ], [ AC_MSG_ERROR([either glib >= 2.26.0 or dbus-glib >= 0.70 required; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them]) ]) ]) AC_DEFUN([PKG_CHECK_GIO], [ PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.26.0, [ AC_DEFINE([HAVE_GIO_DBUS], [1], [Define to 1 if you have the gio dbus implementation.]) DBUS_GLIB_CFLAGS="" DBUS_GLIB_LIBS="" AC_SUBST(DBUS_GLIB_CFLAGS) AC_SUBST(DBUS_GLIB_LIBS) ], [ PKG_CHECK_DBUS_GLIB ]) ]) AC_DEFUN([AC_CHECK_CXX_GTK_UTILS], [ COND_INTERNAL="" COND_INTERNAL_LIB="" COND_CXXFLAG="" SEARCH_FOR_CGU_2="no" AC_ARG_WITH(cgu-version-2, [ --with-cgu-version-2 whether to search for c++-gtk-utils-2.0 to compile efax-gtk [[default=no]]], [ if test "x$withval" = "xyes"; then SEARCH_FOR_CGU_2="yes" fi ]) if test $CGU_GTK_VERSION -eq 2; then if test "$SEARCH_FOR_CGU_2" = "yes"; then PKG_CHECK_MODULES(CXX_GTK_UTILS, c++-gtk-utils-2-2.0 >= 2.0.0, [ AC_DEFINE([HAVE_CXX_GTK_UTILS_2], [1], [Define to 1 if you have c++-gtk-utils-2.0.]) AC_CHECK_COMPILER_FLAG(std=c++11, [ CXXFLAGS="$CXXFLAGS -std=c++11" ], [ AC_CHECK_COMPILER_FLAG(std=c++0x, [ CXXFLAGS="$CXXFLAGS -std=c++0x" ]) ]) ], [ PKG_CHECK_MODULES(CXX_GTK_UTILS, c++-gtk-utils-1.2 >= 1.2.7, [ AC_DEFINE([HAVE_CXX_GTK_UTILS], [1], [Define to 1 if you have c++-gtk-utils-1.2.]) ], [ COND_INTERNAL=c++-gtk-utils COND_INTERNAL_LIB=internal/c++-gtk-utils/libcxx-gtk-utils.a COND_CXXFLAG="-I./internal -I../internal" ]) ]) else PKG_CHECK_MODULES(CXX_GTK_UTILS, c++-gtk-utils-1.2 >= 1.2.7, [ AC_DEFINE([HAVE_CXX_GTK_UTILS], [1], [Define to 1 if you have c++-gtk-utils-1.2.]) ], [ COND_INTERNAL=c++-gtk-utils COND_INTERNAL_LIB=internal/c++-gtk-utils/libcxx-gtk-utils.a COND_CXXFLAG="-I./internal -I../internal" ]) fi elif test $CGU_GTK_VERSION -eq 3; then if test "$SEARCH_FOR_CGU_2" = "yes"; then PKG_CHECK_MODULES(CXX_GTK_UTILS, c++-gtk-utils-3-2.0 >= 2.0.0, [ AC_DEFINE([HAVE_CXX_GTK_UTILS_2], [1], [Define to 1 if you have c++-gtk-utils-2.0.]) AC_CHECK_COMPILER_FLAG(std=c++11, [ CXXFLAGS="$CXXFLAGS -std=c++11" ], [ AC_CHECK_COMPILER_FLAG(std=c++0x, [ CXXFLAGS="$CXXFLAGS -std=c++0x" ]) ]) ], [ PKG_CHECK_MODULES(CXX_GTK_UTILS, c++-gtk-utils-1.3 >= 1.2.7, [ AC_DEFINE([HAVE_CXX_GTK_UTILS], [1], [Define to 1 if you have c++-gtk-utils-1.2.]) ], [ COND_INTERNAL=c++-gtk-utils COND_INTERNAL_LIB=internal/c++-gtk-utils/libcxx-gtk-utils.a COND_CXXFLAG="-I./internal -I../internal" ]) ]) else PKG_CHECK_MODULES(CXX_GTK_UTILS, c++-gtk-utils-1.3 >= 1.2.7, [ AC_DEFINE([HAVE_CXX_GTK_UTILS], [1], [Define to 1 if you have c++-gtk-utils-1.2.]) ], [ COND_INTERNAL=c++-gtk-utils COND_INTERNAL_LIB=internal/c++-gtk-utils/libcxx-gtk-utils.a COND_CXXFLAG="-I./internal -I../internal" ]) fi else AC_MSG_ERROR([incorrect gtk+ version specified]) fi AC_SUBST([COND_INTERNAL]) AC_SUBST([COND_INTERNAL_LIB]) AC_SUBST([COND_CXXFLAG]) AC_MSG_CHECKING(whether the system supports monotonic clocks) AC_CACHE_VAL(ac_cv_have_monotonic_clock, [ AC_RUN_IFELSE( [ AC_LANG_PROGRAM( [ #include ], [ if (_POSIX_MONOTONIC_CLOCK > 0 && _POSIX_CLOCK_SELECTION > 0) return 0; if (_POSIX_MONOTONIC_CLOCK == -1 || _POSIX_CLOCK_SELECTION == -1) return -1; if (sysconf(_SC_MONOTONIC_CLOCK) > 0 && sysconf(_SC_CLOCK_SELECTION) > 0) return 0; return -1; ]) ], [ ac_cv_have_monotonic_clock="yes" ], [ ac_cv_have_monotonic_clock="no" ], [ AC_MSG_RESULT([cross-compiling: ]) ac_cv_have_monotonic_clock="no" ]) ]) AC_MSG_RESULT([$ac_cv_have_monotonic_clock]) if test "$ac_cv_have_monotonic_clock" = "yes" ; then AC_DEFINE(HAVE_MONOTONIC_CLOCK, 1, [ Define if the system supports monotonic clocks ]) fi AC_MSG_CHECKING(for sched_yield) AC_CACHE_VAL(ac_cv_have_sched_yield, [ AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM([ #include ], [ sched_yield(); ]) ], [ ac_cv_have_sched_yield="yes" ], [ ac_cv_have_sched_yield="no" ]) ]) AC_MSG_RESULT([$ac_cv_have_sched_yield]) if test "$ac_cv_have_sched_yield" = "yes" ; then AC_USE_SCHED_YIELD="define CGU_USE_SCHED_YIELD 1" else AC_USE_SCHED_YIELD="undef CGU_USE_SCHED_YIELD" fi AC_SUBST(AC_USE_SCHED_YIELD) AC_MSG_CHECKING(whether headers include provision for recursive mutexes) AC_CACHE_VAL(ac_cv_have_recursive_mutex_headers, [ AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM([ #define _XOPEN_SOURCE 600 #include ], [ pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutexattr_destroy(&attr); ]) ], [ ac_cv_have_recursive_mutex_headers="yes" ], [ ac_cv_have_recursive_mutex_headers="no" ]) ]) AC_MSG_RESULT([$ac_cv_have_recursive_mutex_headers]) if test "$ac_cv_have_recursive_mutex_headers" = "yes" ; then AC_DEFINE(HAVE_RECURSIVE_MUTEX_HEADERS, 1, [ Define if headers include provision for recursive mutexes ]) AC_MSG_CHECKING(whether the runtime provides working recursive mutexes) AC_CACHE_VAL(ac_cv_have_recursive_mutex_runtime, [ lib_save=$LIBS echo 'int main(void) { return 0; }' >conftest.c cgu_pthread_flag=no if test -z "`$CC -pthread -c conftest.c 2>&1`"; then if test -z "`$CC -pthread -o conftest conftest.o 2>&1`"; then cgu_pthread_flag=yes fi fi rm -f conftest* if test "$cgu_pthread_flag" = "yes" ; then LIBS="-pthread" echo -n "using -pthread: " else dnl if -pthread (and so the gcc toolchain) isn't used dnl then -lpthread should be OK just for a run test LIBS="-lpthread" fi AC_RUN_IFELSE( [ AC_LANG_PROGRAM( [ #define _XOPEN_SOURCE 600 #include ], [ pthread_mutexattr_t attr; if (pthread_mutexattr_init(&attr)) return -1; if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) { pthread_mutexattr_destroy(&attr); return -1; } pthread_mutexattr_destroy(&attr); return 0; ]) ], [ ac_cv_have_recursive_mutex_runtime="yes" ], [ ac_cv_have_recursive_mutex_runtime="no" ], [ AC_MSG_RESULT([cross-compiling: ]) ac_cv_have_recursive_mutex_runtime="no" ]) LIBS=$lib_save ]) AC_MSG_RESULT([$ac_cv_have_recursive_mutex_runtime]) if test "$ac_cv_have_recursive_mutex_runtime" = "yes" ; then AC_HAVE_RECURSIVE_MUTEX_RUNTIME="define CGU_HAVE_RECURSIVE_MUTEX 1" else AC_HAVE_RECURSIVE_MUTEX_RUNTIME="undef CGU_HAVE_RECURSIVE_MUTEX" fi else AC_HAVE_RECURSIVE_MUTEX_RUNTIME="undef CGU_HAVE_RECURSIVE_MUTEX" fi AC_SUBST(AC_HAVE_RECURSIVE_MUTEX_RUNTIME) AC_USING_NAMESPACE="// do not include using directive" AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT="define CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT 1" AC_USE_GLIB_MEMORY_SLICES_COMPAT="undef CGU_USE_GLIB_MEMORY_SLICES_COMPAT" AC_USE_TYPE_TUPLE_ARGS="define CGU_USE_TYPE_TUPLE_ARGS 1" AC_USE_SMART_PTR_COMPARISON="undef CGU_USE_SMART_PTR_COMPARISON" AC_SUBST(AC_USING_NAMESPACE) AC_SUBST(AC_USE_GLIB_MEMORY_SLICES_NO_COMPAT) AC_SUBST(AC_USE_GLIB_MEMORY_SLICES_COMPAT) AC_SUBST(AC_USE_TYPE_TUPLE_ARGS) AC_SUBST(AC_USE_SMART_PTR_COMPARISON) ]) efax-gtk-3.2.8/aclocal.m40000644000175000001440000035443111544566722012035 00000000000000# 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.65],, [m4_warning([this file was generated for autoconf 2.65. 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'.])]) # gettext.m4 serial 60 (gettext-0.17) dnl Copyright (C) 1995-2007 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 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-2006. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) # iconv.m4 serial AM6 (gettext-0.17) dnl Copyright (C) 2000-2002, 2007 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 and HP-UX 11.11. 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; } } #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) ]) 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([$]{ac_t:- }[$]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 ]) # intlmacosx.m4 serial 1 (gettext-0.17) dnl Copyright (C) 2004-2007 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 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 Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], gt_cv_func_CFPreferencesCopyAppValue, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) # lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 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 13 (gettext-0.17) dnl Copyright (C) 2001-2007 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]) define([Name],[translit([$1],[./-], [___])]) define([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 undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 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. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl 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]) define([Name],[translit([$1],[./-], [___])]) define([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" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) 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 $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]) undefine([Name]) undefine([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_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]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Autoconf >= 2.61 supports dots in --with options. define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) 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]N_A_M_E[-prefix], [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib]N_A_M_E[-prefix don't search for lib$1 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 ]) 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= 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"; 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/"'*$,,'` LIB[]NAME[]_PREFIX="$basedir" 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"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; 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 ]) 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"; 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"; 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 5 (gettext-0.15) dnl Copyright (C) 2001-2005 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 a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib 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 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) # nls.m4 serial 3 (gettext-0.15) dnl Copyright (C) 1995-2003, 2005-2006 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 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) ]) # po.m4 serial 15 (gettext-0.17) dnl Copyright (C) 1995-2007 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 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) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; 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 INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. AC_PREREQ(2.50) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # 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 # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # 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. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done 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 ]) # 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"]) ]) # Copyright (C) 1996, 1997, 2000, 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. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # 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 ]) # 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([acinclude.m4]) efax-gtk-3.2.8/efax/0000755000175000001440000000000011544574525011166 500000000000000efax-gtk-3.2.8/efax/efax.1.orig0000644000175000001440000011734211466007655013060 00000000000000.TH EFAX 1 "February 1999" "" "" .UC 1 .SH NAME efax \- send/receive faxes with Class 1, 2 or 2.0 fax modem .ce 1 (Please read the \fBfax\fP man page first.) .SH SYNOPSIS .B efax [ \fIoptions\fP ] [ \fB-t\fP \fInum\fP [ \fIfile\fP... ] ] .SH OPTIONS Where \fIoptions\fP are: .TP 9 .B -a \fIcmd\fP use the command \fBATcmd\fP when answering the phone. The default is "A". .TP 9 .B -c \fIcaps\fP set the local modem capabilities. See the section on capabilities below for the format and meaning of \fIcaps\fP. For Class 1 the default is 1,n,0,2,0,0,0,0 where n is the highest speed supported by the modem. For Class 2 the default is determined by the modem. .TP 9 .B -d \fIdev\fP use the fax modem connected to device \fIdev\fP. The default is \fB/dev/modem\fP. .TP 9 .B -f \fIfnt\fP use font file \fIfnt\fP for generating the header. The default is a built-in 8x16 font. See the efix(1) -f option for the font file format. .TP 9 .B -g \fIcmd\fP if a \fBCONNECT\fP (or \fBDATA\fP) response indicates a data call, the shell \fB/bin/sh\fP is exec(2)'ed with \fIcmd\fP as its command. \fIcmd\fP is a printf(3) format that may contain up to 6 %d escapes which are replaced by the baud rate following the most recent \fBCONNECT\fP message. \fIcmd\fP typically exec's getty(8). .TP 9 .B -h \fIhdr\fP put string `hdr' at the top of each page. The first %d in `hdr' is replaced by the page number and the second, if any, is replaced by the number of pages being sent. .TP 9 .B -i \fIstr\fP .TP 9 .B -j \fIstr\fP .TP 9 .B -k \fIstr\fP send the command \fBAT\fP\fIstr\fP to the modem to initialize it. -i commands are sent before the modem is put into fax mode, -j commands after the modem is in fax mode, and -k commands just before efax exits. The only default is a hang-up (ATH) command that is sent before exiting only if no other -k options are given. Multiple options may be used. .TP 9 .B -l \fIid\fP set the local identification string to \fIid\fP. \fIid\fP should be the local telephone number in international format (for example "+1 800 555 1212"). This is passed to the remote fax machine. Some fax machines may not accept characters other than numbers, space, and '+'. .TP 9 .B -o \fIopt\fP use option \fIopt\fP to accommodate a non-standard fax modem protocol. See the MODEM REQUIREMENTS section below for more details. The \fIopt\fPions are: .TP 9 .B 0 Force use of Class 2.0 fax modem commands. The modem must support Class 2.0. .TP 9 .B 2 Force use of Class 2 fax modem commands. The modem must support Class 2. .TP 9 .B 1 Force use of Class 1 fax modem commands. The modem must support Class 1. By default efax queries the modem and uses the first of the three above classes which is supported by the modem. .TP 9 .B a use software adaptive answer method. If the first attempt to answer the call does not result in a data connection within 8 seconds the phone is hung up temporarily and answered again in fax mode (see "Accepting both fax and data calls" below). .TP 9 .B e ignore errors in modem initialization commands. .TP 9 .B f use "virtual flow control". efax tries to estimate the number of bytes in the modem's transmit buffer and pauses as necessary to avoid filling it. The modem's buffer is assumed to hold at least 96 bytes. This feature does not work properly with Class 2 modems that add redundant padding to scan lines. Use this option only if you have problems configuring flow control. .TP 9 .B h use hardware (RTS/CTS) in addition to software (XON/XOFF) flow control. Many modems will stop responding if this option is used. See the section `Resolving Problems' before using this option. .TP 9 .B l halve the time between testing lock files when waiting for other programs to complete. By default this is 8 seconds. For example -olll sets the interval to 1 second. .TP 9 .B n ignore requests for pages to be retransmitted. Use this option if you don't care about the quality of the received fax or if the receiving machine is too fussy. Otherwise each page may be retransmitted up to 3 times. .TP 9 .B r do not reverse bit order during data reception for Class 2 modems. Only Multitech modems require this option. Not normally required since efax detects these modems. .TP 9 .B x send XON (DC1) instead of DC2 to start data reception. Applies to a very few Class 2 modems only. .TP 9 .B z delay an additional 100 milliseconds before each modem initialization or reset command. The initial delay is 100 ms. For example, -ozzz produces a 400 ms delay. Use with modems that get confused when commands arrive too quickly. .TP 9 .B -q \fIn\fP ask for retransmission of pages received with more than \fIn\fP errors. Default is 10. .TP 9 .B -r \fIpat\fP each received fax page is stored in a separate file. The file name is created using \fIpat\fP as a strftime(3) format string. A page number of the form .001, .002, ... is appended to the file name. If \fIpat\fP is blank ("") or no -r option is given a default string of "%m%d%H%M%S" is used. .\" If a file already exists, efax terminates with an error. .TP 9 .B -s remove lock file(s) after initializing the modem. This allows outgoing calls to proceed when efax is waiting for an incoming call. If efax detects modem activity it will attempt to re-lock the device. If the modem has been locked by the other program efax will exit and return 1 (``busy''). Normally a new efax process is then started by init(8). The new efax process will then check periodically until the lock file disappears and then re-initialize the modem. .TP 9 .B -t \fInum [file\fP...] dial telephone number \fInum\fP and send the fax image files \fIfile\fP.... If used, this must be the last argument on the command line. The telephone number \fInum\fP is a string that may contain any dial modifiers that the modem supports such as a T prefix for tone dialing or commas for delays. If no file names are given the remote fax machine will be polled. If no -t argument is given efax will answer the phone and attempt to receive a fax. .TP 9 .B -v \fIstrng\fP select types of messages to be printed. Each \fIlower-case\fP letter in \fIstrng\fP enables one type of message: .RS 12 .B e - errors .br .B w - warnings .br .B i - session progress information .br .B n - capability negotiation information .br .B c - modem (AT) commands and responses .br .B h - HDLC frame data (Class 1 only) .br .B m - modem output .br .B a - program arguments .br .B r - reception error details .br .B t - transmission details .br .B f - image file details .br .B x - lock file processing .RE .RS 9 Up to two -v options may be used. The first is for messages printed to the standard error and the second is for messages to the standard output. The default is "ewin" to the standard error only. .RE .TP 9 .B -w wait for an OK or CONNECT prompt instead of issuing an answer (\fBATA\fP) command to receive a fax. Use this option when the modem is set to auto-answer (using S0=\fIn\fP) or if another program has already answered the call. .TP 9 .B -x \fIlkf\fP use a UUCP-style lock file \fIlkf\fP to lock the modem device before opening it. If the device is locked, efax checks every 15 seconds until it is free. Up to 16 -x options may be used if there are several names for the same device. A `#' prefix on the file name creates an binary rather than text (HDB-style) lock file. This is the reverse of what was used by previous efax versions. .SH FAX FILE FORMATS efax can read the same types of files as \fBefix(1)\fP including text, T.4 (Group 3), PBM, single- and multi-page TIFF (G3 and uncompressed). efax automatically determines the type of file from its contents. TIFF files are recommended as they contain information about the image size and resolution. Each page to be sent should be converted to a separate TIFF format file with Group 3 (G3) compression. Received files are also stored in this format. The EXAMPLES section below shows how efix and other programs can be used to create, view and print these files. .SH OPERATING SYSTEM REQUIREMENTS The operating system must provide short response times to avoid protocol timeouts. For Class 2 and 2.0 modems the delay should not exceed 1 or 2 seconds. When using Class 1 modems the program must respond to certain events within 55 milliseconds. Longer delays may cause the fax protocol to fail in certain places (between DCS and TCF or between RTC and MPS). Class 1 modems should therefore not be used on systems that cannot guarantee that the program will respond to incoming data in less than 55 milliseconds. In particular, some intelligent serial cards and terminal servers may introduce enough delay to cause problems with Class 1 operation. The operating system must also provide sufficient low-level buffering to allow uninterrupted transfer of data between the modem and a disk file at the selected baud rate, typically 9600 bps. Since the fax protocol does not provide end-to-end flow control the effectiveness of flow control while receiving is limited by the size of the modem's buffer. This can be less than 100 bytes. Efax does not use flow control during reception. .SH MODEM REQUIREMENTS The "Group" is the protocol used to send faxes between fax machines. Efax supports the Group 3 protocol used over the public telephone network. The "Class" is the protocol used by computers to control fax modems. Efax supports Class 1, 2 and 2.0 fax modems. Most fax modems use XON/XOFF flow control when in fax mode. This type of flow control adds very little overhead for fax use. Many modems have unreliable hardware (RTS/CTS) flow control in fax mode. By default efax enables only XON/XOFF flow control and the -oh option must be used to add hardware flow control. While some modems have serial buffers of about 1k bytes, many inexpensive modems have buffers of about one hundred bytes and are thus more likely to suffer overruns when sending faxes. A few older modems may need a delay between commands of more than the default value used by efax (100 milliseconds). If the delay is too short, commands may not echo properly, may time out, or may give inconsistent responses. Use one or more \fB-oz\fP options to increase the delay between modem initialization commands and use the E0 modem initialization command to disable echoing of modem commands. By default efax sends DC2 to start the data flow from the modem when receiving faxes from Class 2 modems. A few older modems require XON instead. Use of DC2 would cause the modem to give an error message and/or the program to time out. The \fB-ox\fP option should be used in this case. A few older Class 2 modems (e.g. some Intel models) don't send DC2 or XON to start the data flow to the modem when sending faxes. After waiting 2 seconds efax will print a warning and start sending anyways. A very few Class 2 modems do not reverse the bit order (MSB to LSB) by default on receive. This might cause errors when trying to display or print the received files. The \fB-or\fP option can be used in this case. Some inexpensive "9600 bps" fax modems only \fItransmit\fP at 9600 bps and reception is limited to 4800 bps. The following Class 1 modems have been reported to work with efax: AT&T DataPort, .\" Andrea Gozzi , v0.6, SCO 3.2.0, (Class 1) Cardinal Digital Fax Modem (14400), .\" awk0%navajo@gte.com, v0.6, linux 1.0, downloading fax144c.car Digicom Scout+, .\" umlin000@CC.UManitoba.CA, v 0.6, Linux 1.1.12 Motorola Lifestyle 28.8, .\" mortbay@ozemail.com.au Motorola Power 28.8, .\" danz@wv.mentorg.com, Linux 1.2.10 QuickComm Spirit II, .\" umlin000@CC.UManitoba.CA, v 0.6, Linux 1.1.12 .\" gsmith@softsmiths.oz.au, v 0.7a, add "*F1" for Xon/Xoff Smartlink 9614AV-Modem, .\" gt@sky.gun.de, v0.6, Linux 1.1.15 Supra Faxmodem 144LC, .\" john@johncon.johncon.com, v0.6, Consensys (ie., Unixware) 4.2 USR Courier V.32bis Terbo, .\" meyer@geomatic.no, v0.6, SunOS 4.1.3 USR Sportster (V.32 and V.34), .\" satyr!kayvan@apple.com (Kayvan Sylvan), v0.6, Linux (?) Zoom AFC 2.400, .\" hausutzu@pse.panic.bln.sub.org (Utz-Uwe Haus), v0.6, Linux Zoom VFX14.4V. .\" edc@ee.ubc.ca (me!), v0.6, Linux The following Class 2 modems have been reported to work with efax: 14k4 Amigo Communion fax/modem, .\" bekker@tn.utwente.nl, efax0.5 Adtech Micro Systems 14.4 Fax/modem, .\" gmaughan@grape.fcit.monash.edu.au, Linux 1.2.10, efax 07a askey modem type 1414VQE, .\" thowi@chiba.escape.de, efax06?, Linux? AT&T DataPort, .\" ingber@alumni.caltech.edu (Class 2) ATT/Paradyne, .\" john@johncon.johncon.com AT&T Paradyne PCMCIA, .\" jh@datanet.tele.fi (Juha Heinanen) Boca modem, .\" ? BOCA M1440E, .\" v0.6a, SunOS 4.1.1, Linux 1.0.9 .\" hsw1@papa.attmail.com Crosslink 9614FH faxmodem, .\" ? FuryCard DNE 5005, .\" a PCMCIA Class 3 faxmodem .\" ron@draconia.hacktic.nl GVC 14.4k internal, .\" jchen@ee.mcgill.ca, 0.6a w/ stty fax patch, Linux kernel 1.1.59 Intel 14.4 fax modem, .\" (matloff@cs.ucdavis.edu) Megahertz 14.4, ,\" norman@bellcore.com Microcom DeskPorte FAST ES 28.8, .\" Skip Montanaro (skip@automatrix.com), 0.6a, Linux Motorola UDS FasTalk II, .\" Raj Mathur (root@darbari.ncst.ernet.in), 0.6a, Linux 1.1.48 MultiTech 1432MU, .\"reb@pdsf.ssc.gov Practical Peripherals PM14400FXMT, .\" (DEC Alpha AXP 3000/500 running OSF/1 V1.3) Supra V32bis, .\" john@johncon.johncon.com, v0.5b, SysV R4.2 .\" tbucks!timothy@csn.org .\" (ROCKWELL) .\" Alec.Muffett@UK.Sun.COM (Alec Muffett), Linux 1.1.51, .\" Supra FAXModem v.32bis Telebit Worldblazer, .\" blurfl!jhood@Dartmouth.EDU .\" Telebit Worldblazer with ROM version LA7.02. (requires -or) .\" (my configuration required hardware flow control) .\" Dario_Ballabio@milano.europe.dg.com, v 0.6, Version LA7.05C. TKR DM-24VF+, .\" rainer.dorsch@student.uni-ulm.de Twincom 144/DFi, .\" (ROCKWELL, V.32AC, V1.270 TR14-Jxxx-001) ViVa 14.4/Fax modem, .\" Robert.Sprockeels@csc.be, v0.6a, Linux Vobis Fax-Modem (BZT-approved), .\" klein@pc-klein.zxa.basf-ag.de (Peter Klein), Linux, kernel 0.99.14 .\" beck@irs.inf.tu-dresden.de (Andre Beck), v 0.6, Ultrix 4.3, gcc V2.5.8: .\" gcc -ansi -D_XOPEN_SOURCE -O2 efax.c -o efax -lcP Zoom VFX14.4V, .\" edc@ee.ubc.ca (me!), v0.6, Linux ZyXEL U-1496E[+], .\" plph@umcc.umich.edu, v0.3 & faxmodem ROM version 5.05M) .\" requires -or .\" Marc@Synergytics.Com, v0.5a & ZyXEL 1496E Plus, ROM Version 6.11a) .\" -or -i '+FCLASS=2;+FCR=1' -c '+FDCC=1,5,2,2,0,0,0,0' ZyXEL Elite 2864I. .\" schlatt@dial.eunet.ch, v0.7a, using -Xn (n<4) .SH MODEM INITIALIZATION OPTIONS The required modem initialization commands are generated by efax. Additional commands may be supplied as command-line arguments. The modem must be set up to issue verbose(text) result codes. The following command does this and is sent by efax before trying to initialize the modem. .TP 9 .BR Q0V1 respond to commands with verbose result codes .PP The following commands may be useful for special purposes: .TP 9 .BR X3 don't wait for dial tone before dialing. This may be used to send a fax when the call has already been dialed manually. In this case use an empty string ("") as the first argument to the \fB-t\fP command. Use \fBX4\fP (usual default) to enable all result codes. .TP 9 .BR M2 leave the monitor speaker turned on for the duration of the call (use \fBM0\fP to leave it off). .TP 9 .BR L0 turn monitor speaker volume to minimum (use \fBL3\fP for maximum). .TP 9 .BR E0 disable echoing of modem commands. See the Resolving Problems section below. .TP 9 .BR &D2 returns the modem to command mode when DTR is dropped. The program drops DTR at the start and end of the call if it can't get a response to a modem command. You can use \fB&D3\fP to reset the modem when DTR is dropped. .TP 9 .BR S7=120 wait up to two minutes (120 seconds) for carrier. This may be useful if the answering fax machine takes a long time to start the handshaking operation (e.g. a combined fax/answering machine with a long announcement). .SH CAPABILITIES The capabilities of the local hardware and software can be set using a string of 8 digits separated by commas: .BR \fIvr\fP,\fIbr\fP,\fIwd\fP,\fIln\fP,\fIdf\fP,\fIec\fP,\fIbf\fP,\fIst\fP where: .TP 9 .I vr \fP (vertical resolution) = 0 for 98 lines per inch .br 1 for 196 lpi .TP 9 .I br \fP (bit rate) = 0 for 2400 bps .br 1 for 4800 .br 2 for 7200 .br 3 for 9600 .br 4 for 12000 (V.17) .br 5 for 14400 (V.17) .TP 9 .I wd \fP (width) = 0 for 8.5" (21.5 cm) page width .br 1 for 10" (25.5 cm) .br 2 for 12" (30.3 cm) .TP 9 .I ln \fP (length) = 0 for 11" (A4: 29.7 cm) page length .br 1 for 14" (B4: 36.4 cm) .br 2 for unlimited page length .TP 9 .I df \fP (data format) = 0 for 1-D coding .br 1 for 2-D coding (not supported) .TP 9 .I ec \fP (error correction) = 0 for no error correction .\" .br .\" 1 for EC mode with 64 byte frames (not supported) .\" .br .\" 2 for EC mode with 256 byte frames (not supported) .TP 9 .I bf \fP (binary file) = 0 for no binary file transfer .TP 9 .I st \fP (minimum scan time) = 0 for zero delay per line .br 1 for 5 ms per line .br 3 for 10 ms per line .br 5 for 20 ms per line .br 7 for 40 ms per line .PP When \fIreceiving\fP a fax the \fIvr\fP, \fIwd\fP, and \fIln\fP fields of the capability string should be set to the maximum values that your display software supports. The default is 196 lpi, standard (8.5"/21.5cm) width and unlimited length. When \fIsending\fP a fax efax will determine \fIvr\fP and \fIln\fP from the image file and set \fIwd\fP to the default. If the receiving fax machine does not support high resolution (\fIvr\fP=1) mode, efax will reduce the resolution by combining pairs of scan lines. If the receiving fax machine does not support the image's width then efax will truncate or pad as required. Most fax machines can receive \fIln\fP up to 2. Few machines support values of \fIwd\fP other than 0. .SH HEADERS efax adds blank scan lines at the top of each image when it is sent. This allows room for the page header but increases the length of the image (by default about 0.1" or 2.5mm of blank space is added). The header placed in this area typically includes the date and time, identifies the, and shows the page number and total pages. Headers cannot be disabled but the header string can be set to a blank line. The default font for generating the headers is the built-in 8x16 pixel font scaled to 12x24 pixels (about 9 point size). Note that both efax and efix have -f options to specify the font. efIx uses the font to generate text when doing text-to-fax conversions (during "fax make") while efAx uses the font to generate the header (during "fax send"). .SH SESSION LOG A session log is written to the standard error stream. This log gives status and error messages from the program as selected by the \fB-v\fP option. A time stamp showing the full time or just minutes and seconds is printed before each message. Times printed along with modem responses also show milliseconds. .SH RETURN VALUES The program returns an error code as follows: .TP 9 0 The fax was successfully sent or received. .TP 9 1 The dialed number was busy or the modem device was in use. Try again later. .TP 9 2 Something failed (e.g. file not found or disk full). Don't retry. Check the session log for more details. .TP 9 3 Modem protocol error. The program did not receive the expected response from the modem. The modem may not have been properly initialized, the correct \fB-o\fP options were not used, or a bug report may be in order. Check the session log for more details. .TP 9 4 The modem is not responding. Operator attention is required. Check that the modem is turned on and connected to the correct port. .TP 9 5 The program was terminated by a signal. .SH EXAMPLES .B Creating fax (G3) files The efix program can be used to convert text files to TIFF-G3 format. For example, the following command will convert the text file \fBletter\fP to the files \fBletter.001\fP, \fBletter.002\fP, etc,: .IP .nf .ft CW efix -nletter.%03d letter .ft P .fi .LP Ghostscript's \fBtiffg3\fP driver can generate fax files in TIFF-G3 format from postscript files. For example, the command: .IP .nf \f(CW gs -q -sDEVICE=tiffg3 -dNOPAUSE \\ -sOutputFile=letter.%03d letter.ps &1 >> fax.log .ft P .fi .LP .B Sharing the modem with outgoing calls The modem device can be shared by programs that use the UUCP device locking protocol. This includes pppd, chat, minicom, kermit, uucico, efax, cu, and many others others. However, locking will only work if all programs use the same lock file. efax will lock the modem device before opening it if one or more UUCP lock file names are given with \fB-x\fP options. Most programs place their lock files in the \fR/usr/spool/uucp\fP or \fR/var/lock\fP directories and use the name \fRLCK..\fP\fIdev\fP where \fIdev\fP is the name of the device file in the /dev directory that is to be locked. If the \fB-s\fP (share) option is used, the lock file is removed while waiting for incoming calls so other programs can use the same device. If efax detects another program using the modem while it is waiting to receive a fax, efax exits with a termination code of 1. A subsequent efax process using this device will wait until the other program is finished before re-initializing the modem and starting to wait for incoming calls again. Programs that try to lock the modem device by using device locking facilities other than UUCP lock files not be able to use this arbitration mechanism because the device will still be open to the efax process. In this case you will need to kill the efax process (e.g. "fax stop") before starting the other program. When efax is waiting for a fax it leaves the modem ready to receive in fax mode but removes the lock file. When a slip or PPP program takes over the modem port by setting up its own lock file efax cannot send any more commands to the modem -- not even to reset it. Therefore the other program has to set the modem back to data mode when it starts up. To do this add a modem reset command (send ATZ expect OK) to the beginning of your slip or PPP chat script. .B Accepting both fax and data calls Many modems have an adaptive data/fax answer mode that can be enabled using the \fB-j+FAE=1\fP (for Class 1) or \fB-jFAA=1\fP (for Class 2[.0]) initialization string. The type of call (data or fax) can then be deduced from the modem's responses. Some modems have limited adaptive answer features (e.g. only working properly at certain baud rates or only in Class 2) or none at all. In this case use the initialization string \fB-i+FCLASS=0\fP to answer in data mode first and the \fB-oa\fP option to then hang up and try again in fax mode if the first answer attempt was not successful. This method only works if your telephone system waits a few seconds after you hang up before disconnecting incoming calls. If the \fB-g\fP option is used then the option's argument will be run as a shell command when an incoming data call is detected. Typically this command will exec \fBgetty\fP(8). This program should expect to find the modem already off-hook and a lock file present so it should not try to hang up the line or create a lock file. Note that the modem should be set up to report the DCE-DTE (modem-computer, e.g. CONNECT 38400) speed, not the DCE-DCE (modem-modem, e.g. CONNECT 14400) speed. For many modems the initialization option -iW0 will set this. The following command will make efax answer incoming calls on \fB/dev/cua1\fP on the second ring. This device will be locked using two different lock files but these lock files will be removed while waiting for incoming calls (\fB-s\fP). If a data call is detected, the \fBgetty\fP program will be run to initialize the terminal driver and start a \fBlogin\fP(1) process. Received fax files will be stored using names like \fBDec02-12.32.33.001\fP, in the \fB/usr/spool/fax/incoming\fP directory and the log file will be appended to \fB/usr/spool/fax/faxlog.cua1\fP. .IP .nf .ft CW efax -d /dev/cua1 -j '+FAA=1' \\ -x /usr/spool/uucp/LCK..cua1 \\ -x /usr/spool/uucp/LCK..ttyS1 \\ -g "exec /sbin/getty -h /dev/cua1 %d" \\ -iS0=2 -w -s \\ -r "/usr/spool/fax/incoming/%b%d-%H.%I.%S" \\ >> /usr/spool/fax/faxlog.cua1 2>&1 .ft P .fi .LP Note that adaptive answer of either type will not work for all callers. For some data calls the duration of the initial data-mode answer may be too short for data handshaking to complete. In other cases this duration may be so long that incoming fax calls will time out before efax switches to fax mode. In addition, some calling fax modems mistake data-mode answering tones for fax signaling tones and initiate fax negotiation too soon. If you use software adaptive answer you can reduce the value of the initial data-mode answer (set by TO_DATAF in efax.c) to get more reliable fax handshaking or increase it for more reliable data handshaking. However, if you need to provide reliable fax and data service to all callers you should use separate phone numbers for the two types of calls. When a call is answered the modem goes on-line with the computer-to-modem baud rate fixed at the speed used for the most recent AT command. When efax is waiting for a fax or data call it sets the interface speed to 19200 bps since this is the speed required for fax operation. This prevents full use of 28.8kbps modem capabilities. .SH USING INIT TO RUN EFAX efax can answer all incoming calls if you place an entry for efax in \fB/etc/inittab\fP (for SysV-like systems) or \fB/etc/ttytab\fP (for BSD-like systems). The \fBinit\fP(8) process will run a new copy of efax when the system boots up and whenever the previous efax process terminates. The inittab or ttytab entry should invoke efax by running the \fBfax\fP script with an \fBanswer\fP argument. For example, placing the following line in \fB/etc/inittab\fP (and running "kill -1 1") will make init run the \fBfax\fP script with the argument \fBanswer\fP every time previous process terminates and \fBinit\fP is in runlevel 4 or 5. .IP .nf .ft CW s1:45:respawn:/bin/sh /usr/bin/fax answer .ft P .fi .LP For BSD-like systems (e.g. SunOS), a line such as the following in \fB/etc/ttytab\fP will have the same effect: .IP .nf .ft CW ttya "/usr/local/bin/fax answer" unknown on .ft P .fi .LP You should protect the fax script and configuration files against tampering since init will execute them as a privileged (root) process. If you will be allowing data calls via getty and login you should ensure that your system is reasonably secure (e.g. that all user id's have secure passwords). If efax exec()'s getty properly but you get a garbled login prompt then there is probably a baud rate mismatch between the modem and the computer. First, check the efax log file to make sure the modem's CONNECT response reported the serial port speed (e.g. 19200), \fBnot\fP the modem-modem speed (e.g. 14400). Next, check the getty options and/or configuration files (e.g. /etc/gettydefs) for that particular baud rate. Then run getty manually with the same arguments and verify the port settings using ``stty $LOCKF $BIN $* rm $LOCKF fi .ft P .fi .LP .SH DELIVERING RECEIVED FAXES BY E-MAIL The "fax answer" script described above can be configured to e-mail the fax files received by the previous fax answer process to a "fax manager" who can then forward the fax to the correct recipient. The received fax files are send as MIME attachments, one file per page, using the ``base64'' text encoding and the ``image/tiff'' file format. To view the fax images directly from your e-mail reader you will have to configure it with an application that can display files of type image/tiff. Typically this is specified in a ``mailcap'' file. For example, placing the following line in /etc/mailcap will cause the fax file attachments to be displayed using the ``fax view'' command. .ft CW image/tiff; fax view %s .ft P .SH SENDING FAXES USING THE PRINT SPOOLER You can configure a "fax" printer into the lpr print spooler that will fax a document out using efax instead of printing it. This allows a network server running efax to send faxes on behalf of other machines, including non-Unix clients. In the following steps use the directories specified in the fax script if they are different than /usr/bin and /var/spool/fax (FAXDIR). To set up a fax printer do the following as root: (1) Create a link to the fax script called ``faxlpr'' so the fax script can determine when it is being invoked from the print spooler: .ft CW ln -s /usr/bin/fax /usr/bin/faxlpr .ft P (2) Edit /etc/printcap and add an entry such as: .IP .nf .ft CW fax:lp=/dev/null:sd=/var/spool/fax:if=/usr/bin/faxlpr: .ft P .fi .LP to define a printer called "fax". Print files will be spooled to the /var/spool/fax (sd=) directory and then piped to the /usr/bin/faxlpr filter (if=). Error messages will appear on /dev/console. (3) Create and/or set the permissions to allow anyone to read and write in the fax spool directory. For example: .IP .nf .ft CW mkdir /var/spool/fax chmod 777 /var/spool/fax .ft P .fi .LP (4) Create a printer daemon lock file that is readable by anyone: .IP .nf .ft CW touch /var/spool/fax/lock chmod 644 /var/spool/fax/lock .ft P .fi .LP You should now be able to send a fax using the lpr interface by using a command such as: .IP .nf .ft CW lpr -P fax -J "555 1212" file.ps .ft P .fi .LP where the -J option is used to specify the phone number or alias to be dialed. Note that if more than one file is given on the command line they will be concatenated before being passed to "fax send". TIFF-G3, Postscript or PBM files must therefore be sent one file at a time although TIFF and Postscript files may contain multiple pages. Only multiple \fItext\fP files can be sent in one command. Page breaks in text files can be marked with form-feed characters. Files will be converted and sent at the default (high) resolution. You can use lpq(1) to check the fax queue, lprm(1) to remove fax jobs and lpc(8) to control the spooler. In each case use the -Pfax option to specify the fax ``printer.'' A log file will be mailed to the user when the fax is sent. You should also be able to send a fax from any networked computer that has lpr-compatible remote printing software and that allows you to set the job name (-J option) to an arbitrary string. Such software is available for most computers. See the lpd(8) and printcap(5) man pages for information on the print spooler and for restricting access by host name (/etc/host.lpd) or by user group (the `rg' printcap entry). .SH RESOLVING PROBLEMS Double check the configuration setup in the first part of the fax script, particularly the modem device name and the lock file names. If efax hangs when trying to open the modem device (typically /dev/ttyX), the device is either already in use by another process (e.g. pppd) or it requires the carrier detect line to be true before it can be opened. Many systems define an alternate device name for the same physical device (typically cuaX) that can be opened even if carrier is not present or other programs are already using it. If responses to modem initialization commands are being lost or generated at random, another processes (e.g. getty or an efax auto-answer process) may be trying to use the modem at the same time. Try running efax while this other program is running. If efax does not report "/dev/ttyX locked or busy. waiting." then the lock files names are not specified correctly. Attempt to send a fax. Check that the modem starts making the calling signal (CNG, a 0.5 second beep every 3 seconds) as soon as it's finished dialing. This shows the modem is in fax mode. You may need to set the SPKR variable to -iM2L3 to monitor the phone line to do this. Listen for the answering fax machine and check that it sends the answer signal (CED, a 3 second beep) followed by "warbling" sounds (DIS frames) every 3 seconds. If you hear a continuous sound (tones or noise) instead, then you've connected to a data modem instead. Your modem should send back its own warble (DCS frame) in response to DIS immediately followed by 1.5 seconds of noise (a channel check). If everything is OK, the receiving end will send another warble (CFR frame) and your modem will start to send data. If you have an external modem, check its LEDs. If flow control is working properly the modem's send data (SD) LED will turn off periodically while the fax data is sent. Check the message showing the line count and the average bit rate when the page transmission is done. Low line counts (under 1000 for a letter size image) or the warning "fax output buffer overflow" while sending indicate that the image data format is incorrect. Check the file being sent using the "fax view" command. If you get the error message ``flow control did not work'' then flow control was not active. This usually results in a garbled transmission and the receiving machine may reject the page, abort the call, print a distorted or blank image and/or hang up. The warning "characters received while sending" or an character appearing after the transmission means that the operating system ignored the modem's XOFF flow control character. Ensure that you are not running other programs such as getty or pppd at the same time as efax since they will turn off xon/xoff flow control. If you cannot get flow control to work properly then enable ``virtual flow control'' with the \fB-of\fP option or hardware flow control with the \fB-oh\fP option. Check that the remote machine confirms reception with a +FPTS:1 response (Class 2) or an MCF frame (Class 1). For Class 2 modems, the error message "abnormal call termination (code \fInn\fP)" indicates that the modem detected an error and hung up. Many companies advertise services that will fax back information on their products. These can be useful for testing fax reception. The message "run length buffer overflow" when receiving indicates an error with the image data format. You may need to use the \fB-or\fP option with certain Class 2 modems. If efax displays the message "can't happen (
)" please send a bug report to the author. Finally, don't play "option bingo," if you can't resolve the problem send a verbose log of the failed session (the output from \fBfax -v ...\fP) to the address below. .SH WEB PAGE A Web Page with pointers to the latest version, known bugs and patches is available at: .IP .ft CW http://casas.ee.ubc.ca/efax/ .ft P .LP .SH RELATED SOFTWARE For Linux Systems Independent packages provide more user-friendly interfaces to efax (xfax, tefax) and provide an e-mail-to-fax (Qfax) gateway using efax. All are available by anonymous FTP from metalab.unc.edu in /pub/Linux/apps/serialcomm/fax/. For Amiga Systems A port of an early version of efax for the Amiga is available as a component of a shareware voice mail package, AVM, distributed by Al Villarica (rvillari@cat.syr.edu). Other Ports efax is relatively easy to port. All system-dependent code is in \fBefaxos.c\fP. An early version of efax was ported to VMS. Version 0.8a was ported to Win32 by Luigi Capriotti. Contact the author if you would like to integrate the Win32 code into the current version. .SH AUTHOR Efax was written by Ed Casas. Please send comments or bug reports to edc@cce.com. .SH BUG REPORTS Bug reports should include the operating system, the type of the modem and a copy of a verbose session log that demonstrates the problem. It's usually impossible to help without a verbose log. Please do \fBnot\fP send fax image files. .SH COPYRIGHT efax is copyright 1993 -- 1999 Ed Casas. It may be used, copied and modified under the terms of the GNU Public License. .SH DISCLAIMER Although \fBefax\fP has been tested it may have errors that will prevent it from working correctly on your system. Some of these errors may cause serious problems including loss of data and interruptions to telephone service. .SH REFERENCES CCITT Recommendation T.30, "Procedures for Document Facsimile Transmission in the General Switched Telephone Network". 1988 CCITT Recommendation T.4, "Standardization of Group 3 Facsimile Apparatus for Document Transmission". 1988. For documentation on Class 1 and Class 2 fax commands as implemented by Connexant (formerly Rockwell) modems see http://www.conexant.com/techinfo. For the TIFF specification see http://partners.adobe.com/supportservice/devrelations/PDFS/TN/TIFF6.pdf or RFC 2301 (ftp://ftp.isi.edu/in-notes/rfc2301.txt). For information on Ghostscript see http://www.cs.wisc.edu/~ghost/. The pbm utilities can be obtained by ftp from wuarchive.wustl.edu in /graphics/graphics/packages/NetPBM/netpbm-1mar1994.tar.gz. PCX and many other file formats are described in: Gunter Born, The File Formats Handbook, International Thomson Computer Press, 1995. The "Fax Modem Source Book" by Andrew Margolis, published by John Wiley & Sons in 1994 (ISBN 0471950726), is a book on writing fax applications which includes source code. Dennis Bodson et. al., "FAX: Digital Facsimile Technology and Applications", Second Edition. Artech House, Boston. 1992. .SH SEE ALSO .BR fax(1), .BR efix(1), .BR gs(1), .BR init(8), .BR inittab(5), .BR ttytab(5), .BR printcap(5), .BR lpd(8), .BR printf(3), .BR strftime(3). .SH BUGS Can't read TIFF files with more than 1 strip Class 1 operation may fail if the program can't respond to certain data received from the modem within 55 milliseconds. May fail if multitasking delays cause the received data to overflow the computer's serial device buffer or if an under-run of transmit data exceeds 5 seconds. Polling does not work. Does not support 2-D coding, ECM, or BFT. efax-gtk-3.2.8/efax/efax.c.orig0000644000175000001440000017571011466007655013145 00000000000000#define Copyright "Copyright 1999 Ed Casas" #define Version "efax v 0.9a-001114" /* Copyright (C) 1999 Ed Casas 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 Please contact the author if you wish to use efax or efix in ways not covered by the GNU GPL. You may contact the author by e-mail at: edc@cce.com. */ const char *Usage = "Usage:\n" " %s [ option ]... [ -t num [ file... ] ]\n" "Options:\n" " -a str use command ATstr to answer\n" " -c cap set modem and receive capabilites to cap\n" " -d dev use modem on device dev\n" " -e cmd exec \"/bin/sh -c cmd\" for voice calls\n" " -f fnt use (PBM) font file fnt for headers\n" " -g cmd exec \"/bin/sh -c cmd\" for data calls\n" " -h hdr use page header hdr (use %%d's for current page/total pages)\n" " -i str send modem command ATstr at start\n" " -j str send modem command ATstr after set fax mode\n" " -k str send modem command ATstr when done\n" " -l id set local identification to id\n" " -o opt use protocol option opt:\n" " 0 use class 2.0 instead of class 2 modem commands\n" " 1 use class 1 modem commands\n" " 2 use class 2 modem commands\n" " a if first [data mode] answer attempt fails retry as fax\n" " e ignore errors in modem initialization commands\n" " f use virtual flow control\n" " h use hardware flow control\n" " l halve lock file polling interval\n" " n ignore page retransmission requests\n" " r do not reverse received bit order for Class 2 modems\n" " x use XON instead of DC2 to trigger reception\n" " z add 100 ms to pause before each modem comand (cumulative)\n" " -q ne ask for retransmission if more than ne errors per page\n" " -r pat save received pages into files pat.001, pat.002, ... \n" " -s share (unlock) modem device while waiting for call\n" " -v lvl print messages of type in string lvl (ewinchamr)\n" " -w don't answer phone, wait for OK or CONNECT instead\n" " -x fil use uucp-style lock file fil\n" "Commands:\n" " -t dial num and send fax image files file... \n" ; #include /* ANSI C */ #include #include #include #include #include #include "efaxio.h" /* EFAX */ #include "efaxlib.h" #include "efaxmsg.h" #include "efaxos.h" /* constants... */ /* delays and timeouts (t/o), in deciseconds */ #define T1 350 /* T.30 T1 - waiting for DIS/DCS before Phase B */ #define T2 60 /* T.30 T2 - waiting for frame in Phase B */ #define T3S 30 /* T.30 response timeout (not T3) */ #define T4 30 /* T.30 T4 - between [re]transmissions of DIS */ #define TCFSECS 1.5 /* TCF duration (seconds, nominally 1.5) */ #define TMOD 55 /* T.30 pause between v.21&v.29, 75-20 ms */ #define MODDLY "5" /* same as above, a string */ #define TO_A 1200 /* dial/answer (Phase A) - modem may t/o first */ #define TO_ABRT 20 /* max delay after sending abort sequence */ #define TO_CHAR 51 /* per data character (max FILL length) */ #define TO_DATAF 80 /* software adaptive answer data connect t/o */ #define TO_DRAIN_H 136 /* minimum HDLC buffer drain time (4k/300cps) */ #define TO_DRAIN_D 300 /* minimum data buffer drain time */ #define TO_FT 31 /* max delay after +F[TR][MH] command */ #define TO_RTCMD 20 /* return to command mode after DLE-ETX (rx) */ #define TO_C2B 450 /* Class 2 DIS to CONNECT:(DCS+TCF+CFR)xretries */ #define TO_C2X 20 /* Class 2 wait for XON: 2/5 of 5s timeout */ #define TO_C2PP 200 /* Class 2 wait for ppr: (ppm+ppr)x3retries + 2 */ #define TO_C2R 600 /* Class 2 receive: (TCF+FTT)x11 retrains + 5 */ #define TO_C2EOR 160 /* Class 2 end of data rx (4 retrans x 4 s) */ #define ANSCMD "A" /* default modem command to answer calls */ #define DCSLEN 3 /* length of FIF for DCS commands sent */ #define DEFDISLEN 3 /* length of DIS initially transmitted */ #define DEFCAP 1,3,0,2,0,0,0,0 /* default local capabilities */ #define DEFID " " /* default local ID */ #define DEFPAT "%m%d%H%M%S" /* default received file name pattern */ #define HDRSHFT 54 /* shift header right 6.7mm into image area */ #define HDRSPCE 20 /* number of scan lines inserted before image */ #define HDRSTRT 4 /* scan line where header is placed on image */ #define HDRCHRH 24 /* header character height (pels, at 196lpi) */ #define HDRCHRW 12 /* header character width (pels) */ #define IDLEN 20 /* length of T.30 ID strings, must be 20 */ #define MAXDIS 8 /* maximum DIS frames sent without response (T1) */ #define MAXERRPRT 32 /* maximum number of reception errors to report */ #define MAXFIFLEN 125 /* max FIF len = MAXFRLEN - (adx+ctl+FCF) - FCS */ #define MAXFRLEN 130 /* max frame length = 3.45s x 300 bps / 8 */ #define MAXGETTY 512 /* maximum length of exec'ed (-g, -e) commands */ #define MAXICMD 100 /* maximum # of modem setup/reset commands */ #define MAXLKFILE 16 /* maximum number of lock files */ #define MAXNULLS 2 /* maximum consecutive received nulls saved */ #define MAXPGERR 10 /* maximum received errors allowed per page */ #define MAXTRAIN 2 /* maximum training retries at lowest speed */ #define MAXRETRY 3 /* maximum retries of unacknowledged commands */ #define NCAP 8 /* number of fields in a capability string */ #define NTXRETRY 3 /* maximum re-sends per page */ typedef int cap [ NCAP ] ; /* remote/local capabilities */ /* capability fields... */ enum captype { VR, BR, WD, LN, DF, EC, BF, ST } ; int capmax [ NCAP ] = { 1, 7, 2, 2, 3, 2, 1, 7 } ; /* & maximum values */ /* vertical resolution, dpi */ int vresolution [ 2 ] = { 98, 196 } ; /* characters per second for br */ int cps [ 8 ] = { 300, 600, 900, 1200, 1500, 1800, 900, 1200 } ; /* next br = fallback [ br ] */ /* 0, 1, 2, 3, 4, 5, 6, 7 */ int fallback [ 8 ] = {-1, 0, 1, 2, 7, 4, 3, 6 } ; /* negotiation speed index */ /* 0, 1, 2, 3, 4, 5, 6, 7 */ int brindex [ 8 ] = { 0, 1, 2, 3, 4, 7, 5, 6 } ; /* minimum scan time in ms */ int mst [ 8 ] = { 0 , 5, 10, 10, 20, 20, 40, 40 } ; /* page width in pixels */ int pagewidth [ 5 ] = { 1728, 2048, 2432, 1216, 864 } ; /* Table to convert between T.30 DIS/DCS/DTC FIF and Class 2-like capability codes. Uses br=6, 7 for V.17 at 7200, 9600. */ typedef struct t30tabstruct { char *name ; uchar byte, shift, mask ; uchar safeval ; uchar captodis[8], distocap[16], captodcs[8], dcstocap[16] ; } t30tabst ; #define X 0xff /* invalid values */ t30tabst t30tab [ NCAP ] = { { "vr", 1, 1, 0x01, 0, { 0, 1 } , { 0, 1 } , { 0, 1 } , { 0, 1 } }, { "br", 1, 2, 0x0f, 0, { 0, 4, 12, 12, 13, 13 } , { 0, X, X, X, 1, X, X, X, 3, X, X, X, 3, 5, 3, X } , { 0, 4, 12, 8, 5, 1 } , { 0, 5, 5, X, 1, 4, 4, X, 3, 7, X, X, 2, 6, X, X } } , { "wd", 2, 6, 0x03, 0, { 0, 2, 1 } , { 0, 2, 1, 2 } , { 0, 2, 1 } , { 0, 2, 1, 2 } }, { "ln", 2, 4, 0x03, 0, { 0, 2, 1 } , { 0, 2, 1, X } , { 0, 2, 1 } , { 0, 2, 1, X } }, { "df", 1, 0, 0x01, 0, { 0, 1 } , { 0, 1 } , { 0, 1 } , { 0, 1 } }, { "ec", 3, 4, 0x03, 0, { 0, 2, 2 } , { 0, X, 2, X } , { 0, 3, 2 } , { 0, 0, 2, 1 } }, { "bf", 5, 5, 0x01, 0, { 0, 1 } , { 0, 1 } , { 0, 1 } , { 0, 1 } }, { "st", 2, 1, 0x07, 7, { 7, 4, 3, 2, 6, 0, 5, 1 } , { 5, 7, 3, 2, 1, 6, 4, 0 } , { 7, 4, X, 2, X, 0, X, 1 } , { 5, 7, 3, 1, X, X, X, 0 } } } ; /* values of capability fields */ char *capvaluestr [ NCAP ] [8] = { { " 98lpi", "196lpi" } , { " 2400bps", " 4800bps", " 7200bps", " 9600bps", " 12kbps", "14.4kbps", "7200V.17", "9600V.17" } , { "8.5\"/215mm", " 10\"/255mm", " 12\"/303mm", " 6\"/151mm", "4.2\"/107mm" } , { "11\"/A4", "14\"/B4", " any " } , { "1D" , "2D" }, { " - ", "ECM-256", "ECM-64 " }, { " - ", "BFT" }, { "0ms", "5ms", "10/5ms", "10ms", "20/10ms", "20ms", "40/20ms", "40ms" } } ; /* T.30 control frames */ enum frametype { DIS=0x01, CSI, NSF=0x04, CFR=0x21, FTT, MCF=0x31, RTN, RTP, PIN, PIP, DCS=0x41, TSI, NSS=0x44, CRP=0x58, DCN=0x5f, EOM=0x71, MPS, EOP=0x74, PRI_EOM=0x79, PRI_MPS, PRI_EOP=0x7c, DTC=0x81, CIG, NSC=0x84 } ; enum commanddtype { RCV=0, SND=1, DTA=0, TRN=1 } ; /* Class 1 commands to [receive=0/transmit=1] [data=0/training=1] for [baud rate=BR]. */ char *c1cmd [ 2 ] [ 2 ] [ 8 ] = { { { "+FRM=24", "+FRM=48", "+FRM=72", "+FRM=96", "+FRM=122", "+FRM=146" , "+FRM=74", "+FRM=98" } , { "+FRM=24", "+FRM=48", "+FRM=72", "+FRM=96", "+FRM=121", "+FRM=145" , "+FRM=73", "+FRM=97" } } , { { "+FTM=24", "+FTM=48", "+FTM=72", "+FTM=96", "+FTM=122", "+FTM=146" , "+FTM=74", "+FTM=98", } , { "+FTM=24", "+FTM=48", "+FTM=72", "+FTM=96", "+FTM=121", "+FTM=145" , "+FTM=73", "+FTM=97" } } } ; struct c2msgstruct { int min, max ; char *msg ; } c2msg [] = { { 0, 9, "Call Placement and Termination:" }, { 0, 0, " Normal and proper end of connection" }, { 1, 1, " Ring Detect without successful handshake" }, { 2, 2, " Call aborted, from +FK[S] or CAN" }, { 3, 3, " No Loop Current" }, { 4, 4, " Ringback Detected, no answer" }, { 5, 5, " Ringback Detected, answer without CED" }, { 10, 19, "Transmit Phase A & Miscellaneous Errors:" }, { 10, 10, " Unspecified Phase A error" }, { 11, 11, " No Answer (T.30 T1 timeout)" }, { 20, 39, "Transmit Phase B Hangup Codes:" }, { 20, 20, " Unspecified Transmit Phase B error" }, { 21, 21, " Remote cannot receive or send" }, { 22, 22, " COMREC error in transmit Phase B" }, { 23, 23, " COMREC invalid command received" }, { 24, 24, " RSPREC error" }, { 25, 25, " DCS sent three times without response" }, { 26, 26, " DIS/DTC received 3 times; DCS not recognized" }, { 27, 27, " Failure to train at 2400 bps or +FMINSP value" }, { 28, 28, " RSPREC invalid response received" }, { 40, 49, "Transmit Phase C Hangup Codes:" }, { 40, 40, " Unspecified Transmit Phase C error" }, { 41, 41, " Unspecified image format error" }, { 42, 42, " Image conversion error" }, { 43, 43, " DTE to DCE data underflow" }, { 44, 44, " Unrecognized transparent data command" }, { 45, 45, " Image error, line length wrong" }, { 46, 46, " Image error, page length wrong" }, { 47, 47, " Image error, wrong compression code" }, { 50, 69, "Transmit Phase D Hangup Codes:" }, { 50, 50, " Unspecified Transmit Phase D error" }, { 51, 51, " RSPREC error" }, { 52, 52, " No response to MPS repeated 3 times" }, { 53, 53, " Invalid response to MPS" }, { 54, 54, " No response to EOP repeated 3 times" }, { 55, 55, " Invalid response to EOP" }, { 56, 56, " No response to EOM repeated 3 times" }, { 57, 57, " Invalid response to EOM" }, { 58, 58, " Unable to continue after PIN or PIP" }, { 70, 89, "Receive Phase B Hangup Codes:" }, { 70, 70, " Unspecified Receive Phase B error" }, { 71, 71, " RSPREC error" }, { 72, 72, " COMREC error" }, { 73, 73, " T.30 T2 timeout, expected page not received" }, { 74, 74, " T.30 T1 timeout, after EOM received" }, { 90, 99, "Receive Phase C Hangup Codes:" }, { 90, 90, " Unspecified Receive Phase C error" }, { 91, 91, " Missing EOL after 5 seconds" }, { 92, 92, " Unused code" }, { 93, 93, " DCE to DTE buffer overflow" }, { 94, 94, " Bad CRC or frame (ECM or BFT modes)" }, { 100, 119, "Receive Phase D Hangup Codes:" }, { 100, 100, " Unspecified Receive Phase D errors" }, { 101, 101, " RSPREC invalid response received" }, { 102, 102, " COMREC invalid response received" }, { 103, 103, " Unable to continue after PIN or PIP" }, { 120, 255, "Reserved Codes" }, { -1, -1, "" } } ; /* meaning of efax return codes */ char *errormsg [] = { "success", "number busy or modem in use", "unrecoverable error", "invalid modem response", "no response from modem", "terminated by signal", "internal error" } ; /* Functions... */ /* Return name of frame of type 'fr'. */ char *frname ( int fr ) { static struct framenamestruct { int code ; char *name ; } framenames [] = { {NSC,"NSC - poller features"}, /* these 3 frames must be first */ {CIG,"CIG - poller ID"}, {DTC,"DTC - poller capabilities"}, {NSF,"NSF - answering features"}, {CSI,"CSI - answering ID"}, {DIS,"DIS - answering capabilities"}, {NSS,"NSS - caller features"}, {TSI,"TSI - caller ID"}, {DCS,"DCS - session format"}, {CFR,"CFR - channel OK"}, {FTT,"FTT - channel not OK"}, {MPS,"MPS - not done"}, {EOM,"EOM - not done, new format"}, {EOP,"EOP - done"}, {PRI_MPS,"PRI-MPS - not done, call operator"}, {PRI_EOM,"PRI-EOM - not done, new format, call operator"}, {PRI_EOP,"PRI-EOP - done, call operator"}, {MCF,"MCF - page OK"}, {RTP,"RTP - page OK, check channel"}, {PIP,"PIP - page OK, call operator"}, {RTN,"RTN - page not OK, check channel"}, {PIN,"PIN - page not OK, call operator"}, {CRP,"CRP - repeat command"}, {DCN,"DCN - disconnect"}, {0,0} }, *p ; for ( p=framenames ; p->code ; p++ ) if ( fr == p->code || ( fr & 0x7f ) == p->code) break ; return p->code ? p->name : "UNKNOWN" ; } /* Range-check capability. */ int checkcap ( cap c ) { int err=0, i ; for ( i=0 ; i capmax[i] || c[i] < 0 ) { err = msg ( "E3%s = %d out of range, set to 0", t30tab[i].name, c[i] ) ; c[i]=0 ; } return err ; } /* Print cap[ability] c using text values and prefix s. */ void printcap ( char *s , cap c ) { int i ; msg ( "N-+ %s" , s ) ; checkcap ( c ) ; for ( i=0 ; i DCSLEN ? DCSLEN : len ; fif[0] = 0 ; fif[1] = ( isdis && t4tx ? 0x80 : 0 ) | 0x40 ; for ( i=2 ; icaptodis : p->captodcs ) [ c [ i ] ] ) == X ) msg ( "E3mkdis: can't happen (invalid %s)", p->name ), k=0 ; if ( p->byte < len ) fif [ p->byte ] |= k << p->shift ; } } /* Return length of DIS/DTC FIF (counts extension bits). */ int dislen ( uchar *fif ) { int n ; for ( n=3 ; fif [ n-1 ] & 0x01 && n < MAXFIFLEN ; n++ ) ; return n ; } /* Convert received DIS/DCS/DTC FIF to cap. Returns 0 or 3 if bad DIS/DCS field. */ int mkcap ( uchar *fif, cap c, int dis ) { int err=0, i, j, k, len ; t30tabst *p ; len = dislen ( fif ) ; for ( i=0 ; ibyte >= len ) { c [ i ] = 0 ; } else { j = ( fif [ p->byte ] >> p->shift ) & p->mask ; k = ( dis ? p->distocap : p->dcstocap ) [ j ] ; if ( k == X ) { c [ i ] = p->safeval ; err = msg("E3mkcap: bad %s field (%d) set to %d", p->name, j, c [ i ] ) ; } else { c [ i ] = k ; } } } return err ; } /* Compute compatible local/remote capabilities. Used by the sending station only and only for Class 1. Returns 0 if OK or 3 if no compatible settings possible. */ int mincap ( cap local, cap remote, cap session ) { int err=0, i ; int msttab[2][8] = { { 0,1,3,3,5,5,7,7 } , { 0,1,1,3,3,5,5,7 } } ; printcap ( "local ", local ) ; printcap ( "remote ", remote ) ; for ( i=0 ; i session[LN] || local[DF] != session[DF] ) err = msg ("W3incompatible local and remote capabilities" ) ; return err ; } /* Skip to start of first/next page (or to start of previous page if dp is 0). If ppm in not null, it is then set to EOP if there are no pages following this one, MPS if the next page has the same format as `local' (assumed to be the format of the previous page), EOM if the page has a different format. If local is non-NULL its format fields are set according to the format of the new page. Currently only considers the file's y-resolution. This function is called before send_data() and obtains the ppm for that page. It can be called again with dp=0 if a PIN or RTN is received to restart the page. Returns 0 or 2 on errors. */ int rdpage ( IFILE *f, int dp, int *ppm, cap local, int *changed ) { int err=0, m=EOP, yres, fVR, nVR ; if ( nextipage ( f, dp ) ) err = msg ( "E2 can't happen (rdpage: can't go to %s page)", dp ? "next" : "same" ) ; if ( ! err ) { yres = f->page->yres ; fVR = ( yres > (196+98)/2 ) ? 1 : 0 ; if ( local && yres ) { if ( local [ VR ] != fVR ) { local [ VR ] = fVR ; if ( changed ) *changed = 1 ; } else { if ( changed ) *changed = 0 ; } } if ( lastpage ( f ) ) { m = EOP ; } else { PAGE *p = f->page + 1 ; nVR = ( p->yres > (196+98)/2 ) ? 1 : 0 ; m = ( nVR != fVR ) ? EOM : MPS ; } } if ( ppm ) { *ppm = err ? EOP : m ; } return err ; } /* Terminate previous page if page number is non-zero and start next output page if page number is non-negative. If page is -1 removes the most recently opened file. Returns 0 if OK, 2 on errors. */ int wrpage ( OFILE *f, int page ) { int err=0 ; err = nextopage ( f, page ) ; if ( ! err && page == -1 ) { if ( remove ( f->cfname ) ) { err = msg ( "ES2can't delete file %s:", f->cfname ) ; } else { msg ( "Fremoved %s", f->cfname ) ; } } return err ; } /* Send data for one page. Figures out required padding and 196->98 lpi decimation based on local and session capabilitites, substitutes page numbers in header string and enables serial port flow control. Inserts the page header before the input file data. Converts each scan line to T.4 codes and adds padding (FILL) and EOL codes before writing out. Sends RTC when done. Sends DLE-ETX and returns serial port to command mode when done. Returns 0 if OK, non-0 on errors. */ int send_data ( TFILE *mf, IFILE *f, int page, int pages, cap local, cap session, char *header, faxfont *font ) { int done=0, err=0, noise=0, nr=0, lastnr=0, line, pixels ; int i, decimate, pwidth, minlen, dcecps, inheader, skip=0 ; uchar buf [ MAXCODES + 2*EOLBITS/8 + 1 ], *p ; short runs [ MAXRUNS ], lastruns [ MAXRUNS ] ; char headerbuf [ MAXLINELEN ] ; ENCODER e ; newENCODER ( &e ) ; dcecps = cps[session[BR]] ; minlen = ( (long)dcecps * mst[session[ST]] - 1500 + 500 ) / 1000 ; pwidth = pagewidth [ session [ WD ] ] ; decimate = local[VR] > session[VR] ; msg ( "T padding to %d bytes/scan line.%s", minlen+1, decimate ? " reducing 196->98 lpi." : "" ) ; if ( vfc ) msg ( "T limiting output to %d bps for %d byte modem buffer", dcecps*8, MAXDCEBUF + MINWRITE ) ; if ( ckfmt ( header, 6 ) ) msg ( "W too many %%d escapes in header format string \"%s\"", header ) ; else sprintf ( headerbuf, header, page, pages, page, pages, page, pages ) ; msg ("I header:[%s]", headerbuf ) ; done = err = ttymode ( mf, SEND ) ; mf->start = time(0) ; mf->mstart = proc_ms() ; mf->bytes = mf->pad = mf->lines = 0 ; /* start T.4 data with some FILL and an EOL */ p = buf ; for ( i=0 ; i<32 ; i++ ) { p = putcode ( &e, 0, 8, p ) ; } p = putcode ( &e, EOLCODE, EOLBITS, p ) ; if ( ! f || ! f->f ) err = msg ( "E2can't happen(send_data)" ) ; mf->lines=0 ; for ( line=0 ; ! done && ! err ; line++ ) { if ( line < HDRSPCE ) { /* insert blank lines at the top */ runs[0] = pwidth ; pixels = pwidth ; nr = 1 ; } else { if ( ( nr = readline ( f, runs, &pixels ) ) < 0 ) { done = 1 ; continue ; } } /* generate and OR in header pixels */ if ( line >= HDRSTRT && line < HDRSTRT + HDRCHRH ) { int hnr ; short hruns [ MAXRUNS ] ; hnr = texttorun ( (uchar*) headerbuf, font, line-HDRSTRT, HDRCHRW, HDRCHRH, HDRSHFT, hruns, 0 ) ; nr = runor ( runs, nr, hruns, hnr, 0, &pixels ) ; } inheader = line < HDRSTRT + HDRCHRH ; if ( decimate || ( inheader && local[VR] == 0 ) ) { if ( ++skip & 1 ) { /* save the first of every 2 lines */ memcpy ( lastruns, runs, nr * sizeof(short) ) ; lastnr = nr ; continue ; /* get next line */ } else { /* OR previous line into current line */ nr = runor ( runs, nr, lastruns, lastnr, 0, &pixels ) ; } } if ( nr > 0 ) { if ( pixels ) { /* make line the right width */ if ( pixels != pwidth ) nr = xpad ( runs, nr, pwidth - pixels ) ; /* convert to MH coding */ p = runtocode ( &e, runs, nr, p ) ; /* zero pad to minimum scan time */ while ( p - buf < minlen ) { p = putcode ( &e, 0, 8, p ) ; mf->pad ++ ; } /* add EOL */ p = putcode ( &e, EOLCODE, EOLBITS, p ) ; sendbuf ( mf, buf, p - buf, dcecps ) ; mf->bytes += p - buf ; mf->lines++ ; } else { /* probably read an EOL as part of RTC */ } if ( tdata ( mf, 0 ) ) noise = 1 ; p = buf ; } } for ( i=0 ; i < RTCEOL ; i++ ) p = putcode ( &e, EOLCODE, EOLBITS, p ) ; p = putcode ( &e, 0, 0, p ) ; sendbuf ( mf, buf, p - buf, dcecps ) ; mf->bytes += p - buf ; if ( noise ) msg ("W- characters received while sending" ) ; return err ; } int end_data ( TFILE *mf, cap session, int ppm, int *good ) { int err=0, c ; uchar *p ; long dt, draintime ; if ( ! ppm ) p = DLE_ETX ; else if ( ppm == MPS ) p = "\020," ; else if ( ppm == EOM ) p = "\020;" ; else if ( ppm == EOP ) p = "\020." ; else { p = "" ; err = msg ( "E2 can't happen (end_data)" ) ; } tput ( mf, p, 2 ) ; dt = time(0) - mf->start ; /* time to drain buffers + 100% + 4s */ draintime = ( 2 * ( mf->bytes / cps[ session[BR] ] + 1 - dt ) + 4 ) * 10 ; draintime = draintime < TO_DRAIN_D ? TO_DRAIN_D : draintime ; c = ckcmd ( mf, 0, 0, (int) draintime, OK ) ; if ( good ) *good = ( c == OK ) ? 1 : 0 ; dt = time(0) - mf->start ; msg ( "Isent %d+%d lines, %d+%d bytes, %d s %d bps" , HDRSPCE, mf->lines-HDRSPCE, mf->bytes-mf->pad, mf->pad, (int) dt, (mf->bytes*8)/dt ) ; if ( mf->bytes / (dt+1) > cps[session[BR]] ) msg ( "E flow control did not work" ) ; if ( ! err ) err = ttymode ( mf, COMMAND ) ; return err ; } /* Read one scan line from fax device. If pointer pels is not null it is used to save pixel count. Returns number of runs stored, EOF on RTC, or -2 on EOF, DLE-ETX or other error. */ int readfaxruns ( TFILE *f, DECODER *d, short *runs, int *pels ) { int err=0, c=EOF, x, n ; dtab *tab, *t ; short shift ; short *p, *maxp, *q, len=0 ; uchar rd_state ; maxp = ( p = runs ) + MAXRUNS ; x = d->x ; shift = d->shift ; tab = d->tab ; /* restore decoder state */ rd_state = f->rd_state ; do { do { while ( shift < 0 ) { c = tgetd ( f, TO_CHAR ) ; rd_state = ( rd_state & rd_allowed[c] ) ? ( ( rd_state & rd_nexts[c] ) ? rd_state <<= 1 : rd_state ) : RD_BEGIN ; if ( rd_state == RD_END ) msg ( "W+ modem response in data" ) ; if ( c < 0 ) { x = ( x << 15 ) | 1 ; shift += 15 ; /* EOL pad at EOF */ } else { x = ( x << 8 ) | c ; shift += 8 ; } } t = tab + ( ( x >> shift ) & 0x1ff ) ; tab = t->next ; shift -= t->bits ; } while ( ! t->code ) ; if ( p < maxp ) *p++ = t->code ; } while ( t->code != -1 ) ; d->x = x ; d->shift = shift ; d->tab = tab ; /* save state */ f->rd_state = rd_state ; if ( p >= maxp ) msg ( "Wrun length buffer overflow" ) ; /* combine make-up and terminating codes and remove +1 offset in run lengths */ n = p - runs - 1 ; for ( p = q = runs ; n-- > 0 ; ) if ( *p > 64 && n-- > 0 ) { len += *q++ = p[0] + p[1] - 2 ; p+=2 ; } else { len += *q++ = *p++ - 1 ; } n = q - runs ; /* check for RTC and errors */ if ( len ) d->eolcnt = 0 ; else if ( ++(d->eolcnt) >= RTCEOL ) err = EOF ; if ( c < 0 ) err = - 2 ; if ( pels ) *pels = len ; return err ? err : n ; } /* Receive data. Reads scan lines from modem and writes to output file. Checks for errors by comparing received line width and session line width. Check that the output file is still OK and if not, send one CANcel character and wait for protocol to complete. Returns 0 if OK, 1 on DLE-ETX without RTC, or 2 if there was a file write error. */ int receive_data ( TFILE *mf, OFILE *f, cap session, int *nerr ) { int err=0, line, lines, nr, len ; int pwidth = pagewidth [ session [ WD ] ] ; short runs [ MAXRUNS ] ; DECODER d ; if ( ! f || ! f->f ) { msg ( "E2 can't happen (writeline)" ) ; } newDECODER ( &d ) ; lines=0 ; for ( line=0 ; ( nr = readfaxruns ( mf, &d, runs, &len ) ) >= 0 ; line++ ) { if ( nr > 0 && len > 0 && line ) { /* skip first line+EOL and RTC */ if ( len != pwidth ) { (*nerr)++ ; if ( *nerr <= MAXERRPRT ) msg ("R-+ (%d:%d)", line, len ) ; nr = xpad ( runs, nr, pwidth - len ) ; } writeline ( f, runs, nr, 1 ) ; lines++ ; } if ( ferror ( f->f ) ) { err = msg ("ES2file write:") ; tput ( mf, CAN_STR, 1 ) ; msg ("Wdata reception CANcelled") ; } } if ( *nerr ) { if ( *nerr > MAXERRPRT ) msg ("R-+ ....." ) ; msg ("R- : reception errors" ) ; msg ("W- %d reception errors", *nerr ) ; } if ( nr == EOF ) { while ( tgetd ( mf, TO_CHAR ) >= 0 ) ; /* got RTC, wait for DLE-ETX */ } else { err = 1 ; /* DLE-ETX without RTC - should try again */ } msg ( "I- received %d lines, %d errors", lines, *nerr ) ; return err ; } /* Send training check sequence of n zeroes. Returns 0 or 2 on error. */ int puttrain ( TFILE *f, char *s, int n ) { int i, m, err=0 ; uchar buf [ MINWRITE ] = { 0 } ; #ifdef ADDTCFRTC ENCODER e ; uchar *p ; #endif ckcmd ( f, &err, s, TO_FT, CONNECT ) ; if ( ! err ) { ttymode ( f, SEND ) ; /* send n bytes of zeros */ for ( i=0 ; i < n ; i += m ) { m = n-i < MINWRITE ? n-i : MINWRITE ; sendbuf ( f, buf, m, 0 ) ; } #ifdef ADDTCFRTC /* append RTC in case modem is looking for it */ newENCODER ( &e ) ; p = buf ; for ( i=0 ; i < RTCEOL ; i++ ) p = putcode ( &e, EOLCODE, EOLBITS, p ) ; p = putcode ( &e, 0, 0, p ) ; sendbuf ( f, buf, p - buf, 0 ) ; #endif tput ( f, DLE_ETX, 2 ) ; ckcmd ( f, &err, 0, TO_DRAIN_D, OK ) ; msg ( "I- sent TCF - channel check of %d bytes", n ) ; ttymode ( f, COMMAND ) ; } return err ; } /* Checks for an error-free run of at least n bytes in the received training check sequence. Sets good if it's not null, the run was long enough and there were no errors. Returns 0 or 3 on other errors. */ int gettrain ( TFILE *f, char *s, int n, int *good ) { int err=0, c, i=0, maxrunl=0, runl=0 ; ckcmd ( f, &err, s, T2, CONNECT ) ; if ( ! err ) { for ( i=0 ; ( c = tgetd ( f, T3S ) ) >= 0 ; i++ ) if ( c ) { if ( runl > maxrunl ) maxrunl = runl ; runl = 0 ; } else { runl ++ ; } if ( c == EOF ) err = msg ( "E3timed out during training check data" ) ; else ckcmd ( f, &err, 0, TO_RTCMD, NO ) ; } if ( runl > maxrunl ) maxrunl = runl ; if ( good ) *good = !err && maxrunl > n ; if ( !err ) { msg ( "I- received TCF - channel check (%sOK: run of %d in %d)", maxrunl > n ? "" : "not ", maxrunl, i ) ; } return err ; } /* Log a sent/received HDLC frame. Display of these messages is delayed to avoid possible timing problems. */ void logfr ( char *s , char *nm , uchar *p , int n ) { int i=0 ; msg ( n > 10 ? "H- %s %d bytes:" : "H-+ %s %d bytes:" , s, n ) ; for ( i=0 ; i= 1 ; i-- ) buf[i]=buf[i-1] ; buf[i] = 0xff ; msg ("W HDLC frame missing initial 0xff" ) ; n++ ; } if ( buf[1] == 0x03 || buf[1] == 0x13 ) { for ( i=0 ; i < n ; i++ ) buf[i]=normalbits[buf[i]] ; msg ("W bit-reversed HDLC frame, reversing bit order" ) ; f->ibitorder = f->ibitorder == normalbits ? reversebits : normalbits ; } return n ; } /* Read HDLC frame data. Returns 0 if OK, 1 on frame error, 3 on timeout, invalid response or too-long frame. */ int receive_frame_data ( TFILE *f, uchar *buf, int n, int *len ) { int err=0, c, i ; for ( i=0 ; ( c = tgetd ( f, T3S ) ) >= 0 ; i++ ) if ( i < n ) buf[ i ] = c ; if ( c == EOF ) { err = msg ( "E3timed out reading frame data" ) ; } else { switch ( cmd ( f, 0, TO_RTCMD ) ) { case OK: case CONNECT: break ; case ERROR: case NO: err = msg ( "W1frame error" ) ; break ; case EOF: err = msg ( "E3no response after frame data" ) ; break ; default: err = msg ( "E3wrong response after frame data" ) ; break ; } } if ( i >= n ) err = msg ( "E3frame too long (%d, > %d max bytes)", i, n ) ; if ( len ) *len = i ; return err ; } /* Get a Class 1 command or response frame. An attempt to match and combine T.30 "Response Received?" and "Command Received?" protocol flowcharts. When receiving commands returns after first correct non-optional frame or after the time given by getcmd has elapsed. This is instead of looping through main flowchart. When receiving responses returns on the first detected non-optional frame, after timeout T4, or on errors. Returns immediately if gets a +FCERROR response so can retry as data carrier. Returns DCN as a valid frame instead of hanging up. Returns the command/response received, or EOF on timeout or error. */ int getfr ( TFILE *mf, uchar *buf, int getcmd ) { int err=0, frame=0, frlen, c, t ; char remoteid [ IDLEN + 1 ] ; time_t start ; uchar *fif=buf+3 ; start = 10*time(0) ; t = getcmd ? ( getcmd > 1 ? getcmd : T2 ) : T4 ; Enter: err = 0 ; if ( nframes++ ) { c = cmd ( mf, "+FRH=3", t ) ; } else { c = CONNECT ; /* implied by ATA or ATD */ } switch ( c ) { case EOF: /* time out */ tput ( mf, CAN_STR, 1 ) ; ckcmd ( mf, 0, 0, TO_ABRT, OK ) ; err = 1 ; break ; case NO: /* S7 time out */ err = 1 ; break ; case MODULATION: /* data carrier (or DHS) */ return -msg ( "W-2 wrong carrier" ) ; break ; case CONNECT: /* frame */ break ; default: /* shouldn't happen */ err = msg ( "E3wrong response to receive-frame command" ) ; break ; } if ( ! err ) err = receive_frame_data ( mf, buf, MAXFRLEN, &frlen ) ; if ( ! err && frlen < 3 ) err = msg ( "E3received short frame (%d bytes)", frlen ) ; logfr ( "received", frname ( buf [ 2 ] ), buf, frlen ) ; if ( ! err ) { frlen = fixframe ( buf, frlen, mf ) ; frame = buf [ 2 ] & 0x7f ; switch ( frame ) { case CRP: err = 1 ; case NSF: case NSC: case NSS: goto Enter ; case CIG: case CSI: case TSI: revcpy ( fif , (uchar*) remoteid ) ; msg ( "I- remote ID -> %*.*s", IDLEN, IDLEN, remoteid ) ; goto Enter ; } } if ( err && getcmd && ( t -= 10*time(0) - start ) > 0 ) goto Enter ; return err ? EOF : frame ; } /* Class 1 send/receive. The logic in this function is a mess because it's meant to mirror the flowchart in ITU-T recommendation T.30 which is the protocol specification. */ int c1sndrcv ( TFILE *mf, cap local, char *localid, OFILE *outf, IFILE *inf, int pages, char *header, faxfont *font, int maxpgerr, int noretry, int calling ) { int err=0, rxpage=0, page=1, t, disbit, good, frame, last, nerr ; int rxdislen, ppm, try=0, pagetry=0, retry=0, remtx=0, remrx=0 ; int writepending=0, dp=0 ; cap remote = { DEFCAP }, session = { DEFCAP } ; char *fname=0 ; uchar buf [ MAXFRLEN ], *fif=buf+3 ; if ( ! calling ) goto RX ; /* Class 1 Transmitter: */ T: /* Transmitter Phase B - wait for DIS or DTC */ pagetry = 0 ; frame = getfr ( mf, buf, T1 ) ; if ( frame <= 0 ) { err = msg ( "E3no answer from remote fax" ) ; goto B ; } if ( frame != DIS && frame != DTC ) { msg ( "W2 can't open page" ) ; goto C ; } disbit = ( frame == DIS ) ? 0x80 : 0x00 ; try = 0 ; A: /* decide to send or receive after DIS/DTC */ if ( frame == DIS || frame == DTC ) { rxdislen = dislen ( fif ) ; mkcap ( fif, remote, 1 ) ; remtx = fif[1] & 0x80 ; remrx = fif[1] & 0x40 ; } msg ( "N remote has %sdocument(s) to send, and can %sreceive", remtx ? "" : "no ", remrx ? "" : "not " ) ; if ( pages > 0 ) { if ( ! remrx ) msg ( "W remote cannot receive, trying anyways" ) ; goto D ; } else { if ( ! remtx ) msg ( "W remote has nothing to send, trying anyways" ) ; goto R ; } D: /* send DCS */ if ( rdpage ( inf, dp, &ppm, local, 0 ) ) { err = msg ( "E2can't open page" ) ; goto B ; } D_2: mincap ( local, remote, session ) ; revcpy ( (uchar*) localid, fif ) ; if ( ! err ) err = putframe ( TSI | MORE_FR | disbit, buf, IDLEN, mf, -1 ) ; mkdis ( session, fif, DCSLEN, 0, pages ) ; if ( ! err ) err = putframe ( DCS | SUB_FR | disbit, buf, DCSLEN, mf, -1 ) ; #ifdef USEFTS if ( cmd ( mf, "+FTS=" MODDLY, T3S ) != OK ) #endif msleep ( TMOD ) ; /* if +FTS not supported */ if ( ! err ) err = puttrain ( mf, c1cmd[SND][TRN][session[BR]], TCFSECS*cps [ session[BR] ] ) ; try++ ; if ( ! err ) { cmd ( mf, "+FRS=1", T3S ) ; /* wait for TCF carrier to drop */ frame = getfr ( mf, buf, 0 ) ; } if ( err || frame < 0 ) { if ( try >= 3 ) { goto C_timeout ; } else { goto D_2 ; } } switch ( frame ) { case DIS: case DTC: if ( try >= 3 ) goto C_timeout ; else goto A ; case FTT: msg ( "I channel not usable at %d bps", 8*cps[session[BR]] ) ; remote[BR] = fallback[session[BR]] ; if ( remote[BR] >= 0 ) goto D_2 ; else { err = msg ( "E2 channel not usable at lowest speed" ) ; goto C ; } case CFR: goto I_2 ; default: err = msg ( "E3 invalid response to DCS (0x%02x)", frame ) ; goto C ; } I: /* send a page */ if ( rdpage ( inf, dp, &ppm, local, 0 ) ) { err = msg ( "E2can't open page" ) ; goto B ; } I_2: ckcmd ( mf, &err, c1cmd [SND][DTA][session[BR]], TO_FT, CONNECT ) ; if ( !err ) { msleep ( 1000 ) ; err = send_data ( mf, inf, page, pages, local, session, header, font ) ; } pagetry++ ; if ( !err ) err = end_data ( mf, session, 0, 0 ) ; #ifdef USEFTS if ( cmd ( mf, "+FTS=" MODDLY, T3S ) != OK ) #endif msleep ( TMOD ) ; /* if +FTS not supported */ /* fix ppm if on last page of stdin */ if ( lastpage ( inf ) ) ppm = EOP ; try = 0 ; sendppm: if ( !err ) err = putframe ( ppm | disbit, buf, 0, mf, -1 ) ; try++ ; frame = getfr ( mf, buf, 0 ) ; if ( frame < 0 ) { if ( try >= 3 ) { goto C_timeout ; } else { goto sendppm ; } } fname = inf->page->fname ; switch ( noretry ? MCF : frame ) { /* common retry logic */ case MCF: case RTP: case PIP: fname = inf->page->fname ; if ( fname ) msg ( "Isent -> %s", fname ) ; pagetry=0 ; page++ ; dp = 1 ; break ; case PIN: case RTN: dp = 0 ; retry = pagetry < NTXRETRY ; break ; default: err = msg ( "E3invalid post-page response (0x%02x)", frame ) ; goto C ; } switch ( ppm ) { case MPS: switch ( frame ) { case PIN: goto E ; case PIP: goto E ; case MCF: goto I ; case RTP: goto D ; case RTN: goto D ; } case EOP: switch ( frame ) { case PIN: goto E ; case PIP: goto E ; case MCF: case RTP: nextipage ( inf, 1 ) ; /* skip ahead to mark all files done */ if ( remtx ) goto R ; /* poll after sending */ else goto C ; case RTN: if ( retry ) goto D ; else goto C ; } case EOM: switch ( frame ) { case PIN: goto E ; case PIP: goto E ; case MCF: case RTP: case RTN: cmd ( mf, "+FRS=20", T3S ) ; /* wait for ppr carrier to drop */ if ( retry ) goto T ; else goto T ; } } E: /* ignore PIN and PIP */ msg ( "W interrupt request ignored" ) ; try=0 ; goto A ; /* Class 1 Receiver */ RX: R: /* Receiver Phase B */ if ( ! err ) err = wrpage ( outf, rxpage ) ; disbit=0x00 ; for ( t=0 ; !err && t 0 ) { disbit = ( frame == DIS ) ? 0x80 : 0x00 ; goto F_2 ; } } if ( err ) goto C ; else goto C_timeout ; F: /* get a command */ last = frame ; frame = getfr ( mf, buf, 1 ) ; if ( writepending ) { /* do postponed file close/open */ writepending=0 ; err = wrpage ( outf, rxpage ) ; if ( err ) goto C ; } if ( frame < 0 ) { if ( frame == -2 ) goto getdata ; /* data carrier detected */ if ( last == EOM ) goto R ; else { err = msg ("E3 timed out waiting for command" ) ; goto B ; } } F_2: switch ( frame ) { case DTC: goto D ; case DIS: try=0 ; goto A ; case DCS: mkcap ( fif, session, 0 ) ; printcap ( "session", session ) ; cmd ( mf, "+FTS=1", T3S ) ; /* make sure DCS is over */ gettrain ( mf, c1cmd [RCV][TRN][session[BR]], cps[session[BR]], &good ) ; if ( putframe ( ( good ? CFR : FTT ) | disbit, buf, 0, mf, -1 ) || ! good ) goto F ; getdata: outf->w=pagewidth[session[WD]]; outf->h=0; outf->xres=204.0; outf->yres=vresolution[session[VR]]; nerr = 0 ; re_getdata: if ( cmd ( mf, c1cmd [RCV][DTA][session[BR]], TO_FT ) != CONNECT ) goto F ; /* +FCERROR -> DCS resent */ switch ( receive_data ( mf, outf, session, &nerr ) ) { case 0: good = nerr < maxpgerr ; msg ( "I-received -> %s", outf->cfname ) ; writepending=1 ; /* ppm follows immediately, don't write yet */ rxpage++ ; break ; case 1: /* no RTC, re-issue +FRM command */ goto re_getdata ; default: good = 0 ; break ; } ckcmd ( mf, 0, 0, TO_RTCMD, NO ) ; goto F ; /* III: */ case PRI_EOM: case PRI_MPS: case PRI_EOP: frame &=0xf7 ; /* ignore PRocedure Interrupt bit */ case MPS: case EOP: case EOM: putframe ( ( good ? MCF : RTN ) | disbit, buf, 0, mf, -1 ) ; if ( good && frame == MPS ) goto getdata ; else goto F ; case DCN: goto B ; default: err = msg ( "E3 unrecognized command" ) ; goto B ; } C_timeout: err = msg ( "E3 no command/response from remote" ) ; C: putframe ( DCN, buf, 0, mf, -1 ) ; B: ckcmd ( mf, 0, "H", TO_RESET, OK ) ; /* hang up */ if ( rxpage > 0 ) wrpage ( outf, -1 ) ; /* remove last file */ return err ; } /* Check for hangup message. Assumes hsc is initialized to a negative value. Returns 0 if no hangup message, 1 if there was one. If perr is not null, sets it to 2 if the hsc was non-zero (error). */ int gethsc ( int *hsc, int *perr ) { int err=0, i ; if ( sresponse ( "+FHNG:", hsc ) || sresponse ( "+FHS:", hsc ) ) { if ( hsc && *hsc > 0 ) { err = msg ( "E2abnormal termination (code %d)", *hsc ) ; for ( i=0 ; c2msg[i].min >= 0 ; i++ ) { if ( *hsc >= c2msg[i].min && *hsc <= c2msg[i].max ) { msg ( "E %s", c2msg[i].msg ) ; } } if ( perr && ! *perr ) { *perr = 2 ; } } else { err = 1 ; } } return err ; } /* Print remote ID and store DCS values in session as per responses since last command. */ void getc2dcs ( cap session ) { char *p ; if ( ( p = sresponse ( "+FTI:", 0 ) ) != 0 || ( p = sresponse ( "+FTSI:", 0 ) ) != 0 ) { msg ( "I- remote ID -> %s", p ) ; } if ( ( p = sresponse ( "+FCS:", 0 ) ) != 0 || ( p = sresponse ( "+FDCS:", 0 ) ) != 0 ) { str2cap ( p, session ) ; printcap ( "session", session ) ; } } /* Wait for a starting character XON or DC2. Display & ignore any other characters received. */ void getstartc ( TFILE *mf ) { int c, noise ; for ( noise=0 ; ( c = tgetc ( mf, TO_C2X ) ) != XON && c != DC2 ; noise++ ) { if ( c == EOF ) { msg ( "Wno XON/DC2 received after CONNECT") ; break ; } else { msg ( "W-+%s", cname ( c ) ) ; noise++ ; } } if ( noise ) msg ( "W : %d characters received while waiting to send", noise ) ; } /* Class 2 send and receive. If calling, polls if no files to send, otherwise sends. If not calling sends documents if files to send, else receives. When sending, issues +FDIS to change session parameters if file format changes, then sends +FDT followed by data and a post-page message determined by format of next page, if any. Retransmits each page up to NTXRETRY times. When receiving extracts file format from responses to +FDR or ATA and saves them in the file. Receives data to a file and sets page transfer status if too many errors. Returns 0 if OK or 2 on errors. */ int c2sndrcv ( TFILE *mf, cap local, char *localid, OFILE *outf, IFILE *inf, int pages, char *header, faxfont *font, int maxpgerr, int noretry, int calling ) { int err=0, done=0, page, pagetry, nerr, c, dp=0 ; int ppm=0, good, hsc, changed ; int remtx=0 ; char *fname=0 ; cap session = { 0,0,0,0, 0,0,0,0 } ; char buf [ CMDBUFSIZE ] ; hsc=-1 ; /* will be set >= 0 on hangup */ if ( sresponse ( "+FPO", 0 ) ) { remtx = 1 ; msg ( "N remote has document(s) to send." ) ; } if ( calling ) { if ( pages ) goto send ; else goto poll ; } else { if ( pages ) goto pollserver ; else goto receive ; } /* Class 2 Send */ pollserver: /* with +FLP[L]=1 the modem should accept +FDT. */ send: page=1 ; pagetry=0 ; while ( ! err && ! done ) { err = rdpage ( inf, dp, &ppm, local, &changed ) ; if ( ! err && changed ) { sprintf ( buf, c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d", local[0], local[1], local[2], local[3] ) ; ckcmd ( mf, 0, buf, TO_FT, OK ) ; if ( gethsc ( &hsc, &err ) ) { continue ; } } ckcmd ( mf, &err, "+FDT", -TO_C2B, CONNECT ) ; if ( err || gethsc ( &hsc, &err ) ) { done=1 ; continue ; } getc2dcs ( session ) ; if ( ! c20 ) getstartc ( mf ) ; send_data ( mf, inf, page, pages, local, session, header, font ) ; pagetry++ ; if ( c20 ) { end_data ( mf, session, ppm, &good ) ; } else { end_data ( mf, session, 0, 0 ) ; gethsc ( &hsc, &err ) ; if ( ! err && hsc < 0 ) { ckcmd ( mf, &err, ppm == EOP ? "+FET=2" : ppm == EOM ? "+FET=1" : "+FET=0" , TO_C2PP, OK ) ; } gethsc ( &hsc, &err ) ; if ( ! err && hsc < 0 ) { if ( sresponse ( "+FPTS:", &good ) ) { good &= 1 ; /* odd values mean received OK */ } else { /* no +FPTS and +FHNG probably NG */ good = gethsc ( 0, 0 ) ? 0 : msg ( "W1no +FPTS response, assumed received" ) ; } } } if ( noretry ) good = 1; if ( good ) { fname = inf->page->fname ; if ( fname ) msg ( "Isent -> %s", fname ) ; pagetry=0 ; page++ ; dp = 1 ; if ( ppm == EOP ) { nextipage ( inf, 1 ) ; /* skip ahead to mark all files done */ done = 1 ; } } else { dp = 0 ; if ( pagetry >= NTXRETRY ) err = msg ( "E2too many page send retries" ) ; } if ( gethsc ( &hsc, &err ) ) done=1 ; if ( good && lastpage ( inf ) ) { done = 1 ; } } goto done ; /* Class 2 Receive */ poll: /* with +FSP[L]=1 and +FPO[LL]: the modem should now accept +FDR. */ receive: getc2dcs ( session ) ; /* get ATA responses */ done=0 ; for ( page=0 ; ! err && ! done ; page++ ) { if ( ! ( err = wrpage ( outf, page ) ) ) { c = cmd ( mf, "+FDR", -TO_C2R ) ; switch ( c ) { case CONNECT: getc2dcs ( session ) ; outf->w=pagewidth[session[WD]]; outf->h=0; outf->xres=204.0; outf->yres=vresolution[session[VR]]; nerr = 0 ; tput ( mf, &startchar, 1 ) ; if ( receive_data ( mf, outf, session, &nerr ) == 0 ) { good = nerr < maxpgerr ; msg ( "I-received -> %s", outf->cfname ) ; } else { good = 0 ; } ckcmd ( mf, &err, 0, TO_C2EOR, OK ) ; if ( err || gethsc ( &hsc, &err ) ) { wrpage ( outf, page+1 ) ; wrpage ( outf, -1 ) ; done=1 ; continue ; } if ( ! good ) { msg ( "Wreception errors" ) ; ckcmd ( mf, 0, c20 ? "+FPS=2" : "+FPTS=2", T3S, OK ) ; if ( gethsc ( &hsc, &err ) ) continue ; } break ; case OK: wrpage ( outf, -1 ) ; /* no more pages */ done=1 ; if ( gethsc ( &hsc, &err ) ) continue ; break ; default: wrpage ( outf, -1 ) ; /* oops */ err = msg ( "E3receive (+FDR) command failed") ; break ; } } } done: if ( hsc < 0 ) ckcmd ( mf, 0, c20 ? "+FKS" : "+FK", TO_RESET, OK ) ; return err ; } /* Dial the phone number given by string s. If nowait is true adds a ';' to the dial string to avoid waiting for a CONNECTion (might allow ersatz polling). Also resets the global "nframes" if appropriate so getfr() and putframe() know not to issue +FRH/+FTH. Returns 0 if dialed OK, 1 if busy, 2 on errors. */ int dial ( TFILE *f, char *s, int nowait ) { int err=0, hsc=-1 ; char c, dsbuf [ 128 ], *p ; sprintf ( dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ; msg ( "Idialing %s", dsbuf+1 ) ; c = cmd ( f, dsbuf, TO_A ) ; if ( ( p = sresponse ( "+FCSI:", 0 ) ) != 0 || ( p = sresponse ( "+FCI:", 0 ) ) != 0 ) { msg ( "I- remote ID -> %s", p ) ; } if ( nowait && c == OK ) { msg ( "Icalled" ) ; nframes = 1 ; } else if ( c1 && c == CONNECT ) { msg ( "Iconnected" ) ; nframes = 0 ; } else if ( !c1 && c == OK ) { msg ( "Iconnected" ) ; } else if ( c == BUSY ) { err = msg ( "W1number is busy" ) ; } else { err = msg ( "E2dial command failed" ) ; } gethsc ( &hsc, err ? 0 : &err ) ; return err ; } /* Figure out which mode the modem answered in (fax, data, voice or none) based on modem class and responses to the previous command. Sets crate (connect rate) for DATAMODE and hsc (hangup status code) if detects a class 2 hangup message. */ enum connectmode { NONE, DATAMODE, FAXMODE, VOICEMODE } ; enum connectmode ansmode ( int *crate, int *hsc ) { enum connectmode mode = NONE ; int x=0 ; if ( c1 && sresponse ( "CONNECT", &x ) ) { mode = x ? DATAMODE : FAXMODE ; } if ( !c1 && sresponse ( "OK", 0 ) ) { mode = FAXMODE ; } if ( !c1 && ( sresponse ( "CONNECT", &x ) || sresponse ( "+FDM", 0 ) ) ) { mode = DATAMODE ; } if ( sresponse ( "DATA", 0 ) || sresponse ( "CONNECT DATA", 0 ) ) { mode = DATAMODE ; sresponse ( "CONNECT", &x ) ; } if ( sresponse ( "FAX", 0 ) || sresponse ( "+FCO", 0 ) ) { mode = FAXMODE ; } if ( sresponse ( "VCON", 0 ) ) { mode = VOICEMODE ; } if ( gethsc ( hsc, 0 ) ) { mode = NONE ; } if ( DATAMODE && x ) *crate = x ; return mode ; } /* Answer the phone. Remove our lock if sharing device with outgoing calls. If waiting for call, wait for modem activity, else answer phone. Figure out what mode we answered in and handle call appropriately. Re-lock if necessary. Exec *getty or *vcmd for data or voice calls. */ int answer ( TFILE *f, char **lkfile, int wait, int share, int softaa, char *getty, char *vcmd, char *acmd ) { int err=0, c ; int crate=19200, hsc=-1, i ; enum connectmode mode=NONE ; if ( ! err && share ) { err = ttymode ( f, COMMAND ) ; if ( ! err ) err = unlockall ( lkfile ) ; } if ( ! err && wait ) { msg ( "Iwaiting for activity") ; tdata ( f, -1 ) ; msg ( "Iactivity detected") ; } if ( ! err && share ) { msleep ( 500 ) ; /* let other programs lock port */ err = lockall ( lkfile, 1 ) ; if ( err ) err = msg ( "W1can't answer: can't lock device" ) ; else err = ttymode ( f, COMMAND ) ; /* in case it was changed silently */ } for ( i=0 ; ! err && mode == NONE && ( i==0 || ( i==1 && softaa ) ) ; i++ ) { c = cmd ( f, wait ? 0 : acmd, ( i==0 && softaa ) ? TO_DATAF : TO_A ) ; if ( c == DATA ) cmd ( f, c1 ? "O" : 0, TO_A ) ; /* +FAE=1 weirdness */ mode = ansmode ( &crate, &hsc ) ; switch ( mode ) { case DATAMODE : msg ( "Idata call answered") ; if ( getty && *getty ) { char buf [ MAXGETTY ] ; if ( ckfmt ( getty, 6 ) ) { err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ; } else { sprintf ( buf, getty, crate, crate, crate, crate, crate, crate ) ; msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ; execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; err = msg ( "ES2exec failed:" ) ; } } else { err = msg ( "E2no getty command defined for data call" ) ; } break ; case FAXMODE : nframes = 0 ; msg ( "Ifax call answered") ; break ; case VOICEMODE : msg ( "Ivoice call answered") ; if ( vcmd && *vcmd ) { char buf [ MAXGETTY ] ; if ( ckfmt ( vcmd, 6 ) ) { } else { sprintf ( buf, vcmd, f->fd, f->fd, f->fd, f->fd, f->fd, f->fd ) ; msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ; execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; err = msg ( "ES2exec failed:" ) ; } } else { err = msg ( "E2no voice command defined for voice call" ) ; } break ; case NONE: if ( i==0 && softaa && hsc < 0 && getty && *getty ) { int j ; /* switch to fax for 2nd try */ for ( j=0 ; j<3 ; j++ ) if ( cmd ( f, c1 ? "+FCLASS=1" : ( c20 ? "+FCLASS=2.0" : "+FCLASS=2" ), -TO_RESET ) == OK ) break ; wait = 0 ; acmd = ANSCMD ; } else { err = msg ( "E3unable to answer call") ; } break ; default: err = msg ( "E3can't happen(answer)" ) ; break ; } } return err ; } /* Initialize modem. Determine class to use and issue class-specific fax initialization commands. If poll is true, issues commands to enable polling also. Returns 0 or 3 if a mandatory setup command fails. */ int modem_init ( TFILE *mf, cap c, char *id, int calling, int poll, int capsset, int *preverse ) { int err=0, t=-TO_RESET ; char buf [ CMDBUFSIZE ], model [ CMDBUFSIZE ] = "" ; char **p, *q, *modelq [2][4] = { { "+FMFR?", "+FMDL?", 0 }, { "+FMI?", "+FMM?", "+FMR?", 0 } } ; /* diasable command echo and get firmware revision */ cmd ( mf, "E0", t ) ; if ( cmd ( mf, "I3", t ) == OK ) { getresp ( "", model, CMDBUFSIZE-1 ) ; strcat ( model, " " ) ; } /* if not already chosen, pick safest class; set it */ if ( ! err && ! c1 && !c2 && ! c20 ) { if ( cmd ( mf, "+FCLASS=?", t ) != OK ) { err = msg ("E3 modem does not support fax" ) ; } else { if ( strinresp ( "2.0" ) ) c20 = 1 ; else if ( strinresp ( "2" ) ) ; else if ( strinresp ( "1" ) ) c1 = 1 ; else err = msg ("E3 can't determine fax modem class support" ) ; if ( strstr ( model, "Sportster" ) ) { /* USR Sporsters are buggy */ c1 = 1 ; c2 = c20 = 0 ; } } } ckcmd ( mf, &err, c1 ? "+FCLASS=1" : ( c20 ? "+FCLASS=2.0" : "+FCLASS=2" ), t, OK ) ; /* get make & model if using Class 2 or 2.0 */ if ( ! c1 ) { for ( p = modelq [ c20 ] ; ! err && *p ; p++ ) { if ( cmd ( mf, *p, t ) == OK ) { getresp ( "", model, CMDBUFSIZE-1 ) ; strcat ( model, " " ) ; } } if ( ! c1 && strstr ( model, "Multi-Tech" ) ) { *preverse = 0 ; msg ("I Multi-Tech bit order set" ) ; } } if ( ! err ) msg ( "I using %sin class %s", model, c1 ? "1" : c20 ? "2.0" : "2" ) ; /* get maximum modem speed if not already set (Class 1 only) */ if ( ! err && c1 && ! capsset ) { int i ; char *c1spstr [6] = { "24", "48", "72", "96", "121", "145" } ; ckcmd ( mf, &err, calling ? "+FTM=?" : "+FRM=?", t, OK ) ; for ( i=0 ; i < 6 && strinresp ( c1spstr[i] ) ; i++ ) ; c[1]=i?i-1:0; } /* issue essential commands and set/get modem capabilities (Class 2 only) */ if ( ! err && ! c1 ) { if ( c20 ) { ckcmd ( mf, 0, "+FIP", t, OK ) ; ckcmd ( mf, 0, "+FNR=1,1,1,0", t, OK ) ; ckcmd ( mf, 0, "+FLO=1", t, OK ) ; ckcmd ( mf, 0, "+FBO=0", t, OK ) ; } ckcmd ( mf, &err, "+FCR=1", t, OK ) ; if ( ! capsset ) { if ( cmd ( mf, c20 ? "+FIS?" : "+FDIS?", -t ) == OK && ( q = strinresp ( "," ) ) ) { str2cap ( q-1, c ) ; } else { msg ( "W can't get modem capabilities, set to default" ) ; capsset = 1 ; } } if ( capsset ) { sprintf ( buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" : "+FDCC=%d,%d,%d,%d,%d,%d,%d,%d", c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ; ckcmd ( mf, 0, buf, -t, OK ) ; } sprintf ( buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" , CMDBUFSIZE-9, id ) ; ckcmd ( mf, 0, buf, -t, OK ) ; if ( ! err && poll ) { ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ; sprintf ( buf, c20 ? "+FPI=\"%.*s\"" : "+FCIG=\"%.*s\"" , CMDBUFSIZE-9, id ) ; ckcmd ( mf, 0, buf, -t, OK ) ; } } return err ; } /* the following are global so can terminate properly on signal */ char *icmd[3][ MAXICMD+1 ] = {{0},{0},{0}} ; /* initialization commands */ TFILE faxdev = { -1, 0,0, {0}, 0, 0 } ; /* modem */ char *lkfile [ MAXLKFILE+1 ] = {0} ; /* lock file names */ IFILE ifile = { 0 } ; /* files being sent */ int locked = 0 ; /* modem locked */ /* print names of files not sent and reset modem before exiting. */ int cleanup ( int err ) { /* log names of files not sent */ logifnames ( &ifile, "I failed -> %s" ) ; if ( ! locked && faxdev.fd >= 0 ) end_session ( &faxdev, icmd[2], lkfile, err != 4 ) ; msg ( "Idone, returning %d (%s)", err, errormsg [ err >= 0 && err <= 5 ? err : 6 ] ) ; return err ; } /* signal handler */ void onsig ( int sig ) { msg ( "E terminating on signal %d", sig ) ; exit ( cleanup ( 5 ) ) ; } /* Fax send/receive program for Class 1, 2 and 2.0 fax modems. Returns 0 on success, 1 if number busy or device locked, 2 for errors, 3 for protocol errors, 4 if no modem response, 5 on signal. */ int main( int argc, char **argv) { int err=0, doneargs=0, c=0, i ; int testing=0, calling=0 ; int nicmd[3]={0,0,0}, nlkfile=0, nverb=0 ; char *faxfile = FAXFILE ; int softaa=0, share=0, wait=0, reverse=1, ignerr=0, noretry=0, hwfc=0 ; int capsset=0 ; char *getty = "", *vcmd = "", *acmd=ANSCMD ; cap local = { DEFCAP } ; char localid [ IDLEN + 1 ] = DEFID ; int maxpgerr = MAXPGERR ; time_t now ; char *header = 0, headerbuf [ MAXLINELEN ] ; char *fontname = 0 ; faxfont font ; OFILE ofile ; int pages = 0 ; char *phnum="", *ansfname = DEFPAT ; char fnamepat [ EFAX_PATH_MAX ] ; /* print initial message to both stderr & stdout */ argv0 = argv[0] ; verb[1] = "ewia" ; msg ( "I " Version " " Copyright ) ; argv0 = efaxbasename ( argv0 ) ; msg ( "A compiled "__DATE__ " " __TIME__ ) ; verb[1] = "" ; setlocale ( LC_ALL, "" ) ; while ( ! err && ! doneargs && ( c = nextopt ( argc,argv, "a:c:d:e:f:g:h:i:j:k:l:o:p:q:r:st:v:wx:T" ) ) != -1 ) { switch (c) { case 'a': acmd = nxtoptarg ; break ; case 'c': err = str2cap ( nxtoptarg, local ) ; capsset = 1 ; break ; case 'l': if ( strlen ( nxtoptarg ) > IDLEN ) msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ; if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) ) msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ; sprintf ( localid, "%*.*s", IDLEN, IDLEN, nxtoptarg ) ; break ; case 'i': if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ; else err = msg ( "E2too many '-i' options"); break ; case 'j': if ( nicmd[1] < MAXICMD ) icmd[1][ nicmd[1]++ ] = nxtoptarg ; else err = msg ( "E2too many '-j' options"); break ; case 'k': if ( nicmd[2] < MAXICMD ) icmd[2][ nicmd[2]++ ] = nxtoptarg ; else err = msg ( "E2too many '-k' options"); break ; case 'h': header = nxtoptarg ; break ; case 'f': fontname = nxtoptarg ; break ; case 'd': faxfile = nxtoptarg ; break ; case 'e': vcmd = nxtoptarg ; break ; case 'g': getty = nxtoptarg ; break ; case 'o': /* most protocol options are globals */ for ( ; *nxtoptarg ; nxtoptarg++ ) switch ( *nxtoptarg ) { case '0' : c20 = 1 ; break ; case '1' : c1 = 1 ; break ; case '2' : c2 = 1 ; break ; case 'a' : softaa = 1 ; break ; case 'e' : ignerr = 1 ; break ; case 'f' : vfc = 1 ; break ; case 'h' : hwfc = 1 ; break ; case 'l' : lockpolldelay /= 2 ; break ; case 'n' : noretry = 1 ; break ; case 'r' : reverse = 0 ; break ; case 'x' : startchar = XON ; break ; case 'z' : cmdpause += T_CMD ; break ; default : msg ( "Wunrecognized protocol option (%c)", *nxtoptarg ) ; } break ; case 'q': if ( sscanf ( nxtoptarg , "%d", &maxpgerr ) != 1 || maxpgerr < 0 ) err=msg ("E2bad quality (-q) argument (%s)", nxtoptarg ) ; break; case 'r': ansfname = nxtoptarg ; break; case 's': share = 1 ; break; case 't': calling=1; /* fall through */ case 'p': if ( argv [ argc ] ) err = msg ("E2can't happen(unterminated argv)") ; if ( ! err ) err = newIFILE ( &ifile, argv + nxtoptind ) ; pages = argc - nxtoptind - ( c == 'p' ? 1 : 0 ) ; pages = pages < 0 ? 0 : pages ; phnum = nxtoptarg ; doneargs=1 ; break; case 'v': verb[nverb] = nxtoptarg ; nverb=1; break ; case 'w': wait = 1 ; break ; case 'x': if ( nlkfile < MAXLKFILE ) lkfile[ nlkfile++ ] = nxtoptarg ; else err = msg ( "E2too many lock files" ) ; break ; case 'T': /* test: begin+end session */ testing=1; doneargs=1 ; break ; default : fprintf ( stderr, Usage, argv0 ) ; err = 2 ; break ; } } for ( i=0 ; i/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 $(PROGRAMS) $(MANS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; 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 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-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-man1 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 pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic 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-man1 \ 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 pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-man uninstall-man1 # 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: efax-gtk-3.2.8/efax/PATCHES0000644000175000001440000000450411466007655012121 00000000000000The standard distribution of efax-0.9a-001114 has a bug in both efax and efix. They make a call to setlocale(), which causes incorrect floating point representation in locales which use the comma instead of the full-stop as the decimal separator. This is corrected in the versions of efax.c and efix.c in this directory by setting the LC_NUMERIC locale facet to the "C" locale. In addition, internationalisation support has been added to efax so far as relevant to efax-gtk (messages from efax, if a suitable translation file has been provided, will be displayed in the language equating to the user's locale). CUPS-1.1.19 and above will not print multi-page PS files produced with efix correctly. In so doing CUPS is pedantic but correct, as efix includes an EPS reference in the PS header, and the EPS standard requires EPS files only to have one page. The PS header in const char PSBEGIN [] in efax/efaxlib.c in this directory has therefore been amended so as to exclude the EPS reference. A change has been made to the definition of MAXMSGBUF in efaxmsg.c, so that it does not exceed PIPE_BUF/2 in size. This is so that a message from efax does not overrun the pipe used to communicate with efax-gtk. In efaxmsg.c, the variable argument handling has been modified to avoid an invalid double call to vfprintf() on the same va_list value (this bug is triggered on some systems when using the 'fax' script but does not directly affect efax-gtk). To distinguish itself from the standard distribution, the binary of efax is installed as efax-0.9a and the binary of efix is installed as efix-0.9a. efax-gtk will look for these executables by those names. If you want to use the standard distribution of efax with efax-gtk, then make a symbolic link between efax and efax-0.9a, and between efix and efix-0.9a, and efax-gtk will then find them. In addition, the following patches from http://shino.pos.to/linux/efax/ have been applied: efax08a-time.patch (efaxio.c) efax-0.9-nullptr.patch (efax.c and efaxos.c) efax-0.9-numlines.patch (efix.c) efax-0.9a-frlen.patch (efax.c) And the following patch from Fedora 2: efax-0.9-misc.patch (efax.c) Fixes for (harmless) warnings issued by gcc-4.0, about pointer targets differing in signedness, have been added to efax.c, efaxio.c and efaxlib.c. Chris Vine, September 2005 efax-gtk-3.2.8/efax/efaxlib.c0000644000175000001440000020262511466007655012671 00000000000000/* efaxlib.c - utility routines for efax Copyright 1995 Ed Casas */ #include #include #include #include #include "efaxmsg.h" #include "efaxlib.h" #include /* For NLS */ #ifdef ENABLE_NLS #include #include #endif #ifndef SEEK_SET #define SEEK_SET 0 #endif #define DEFXRES 204.145 /* fax x and y resolution in dpi */ #define DEFYRES 195.58 #define DEFWIDTH 1728 /* 215x297 mm image at fax resolution */ #define DEFHEIGHT 2287 extern t4tab wtab [ ( 64 + 27 + 13 ) + 1 ] ; /* T.4 coding tables */ extern t4tab btab [ ( 64 + 27 + 13 ) + 1 ] ; short short256 = 256 ; /* for endian-ness detection */ /* Make sure printf strings have only %d escapes and n or fewer of them. Returns 0 if OK, 1 on error. */ int ckfmt ( char *p, int n ) { for ( ; *p ; p++ ) { if ( p[0] == '%' ) { if ( p[1] == 'd' ) n-- ; else if ( p[1] == '%' ) p++ ; else n=-1 ; } } return n < 0 ; } /* Provide dummy gettext() function if there is no internationalisation support */ #ifndef ENABLE_NLS static const char *gettext ( const char *text ) { return text; } #endif char *strdup2 ( const char *str1, const char *str2 ) { int str1_len=0, str2_len=0 ; char *out; str1_len = strlen ( str1 ) ; str2_len = strlen ( str2 ) ; out = malloc ( str1_len + str2_len + 1 ) ; if ( out ) { memcpy ( out , str1, str1_len ) ; memcpy ( out + str1_len, str2, str2_len + 1 ) ; } return out ; } /* Initialize state of variable-length code word encoder. */ void newENCODER ( ENCODER *e ) { e->x = 0 ; e->shift = -8 ; } /* Store a code word `code' of length `bits' (<=24) in buffer pointed to by `buf'. Bits that don't fit in complete bytes are saved between calls. To flush the remaining bits call the function with code=0 and bits=0. Returns pointer to next free element in output buffer. Calling function must ensure at least bits/8 bytes are available in buffer. */ uchar *putcode ( ENCODER *e, short code, short bits, uchar *buf ) { e->x = ( e->x << bits ) | code ; e->shift += bits ? bits : -e->shift ; while ( e->shift >= 0 ) { *buf++ = e->x >> e->shift ; e->shift -= 8 ; } return buf ; } /* Convert run lengths to 1-D T.4-codes. First run is white. Silently truncates run lengths that are too long. After using this function EOLs may need to be added and/or the putcode() buffer flushed. Returns pointer to next free element in output buffer. */ uchar *runtocode ( ENCODER *e, short *runs, int nr, uchar *codes ) { uchar col = 0, *maxcodes = codes + MAXCODES ; t4tab *ctab = wtab, *p ; short rlen ; long x ; short shift ; #define PUTCODE(p) { x = ( x << p->bits ) | p->code ; shift += p->bits ; \ while ( shift >= 0 ) { *codes++ = x >> shift ; shift -= 8 ; } } x = e->x ; shift = e->shift ; while ( nr-- > 0 ) { rlen = *runs++ ; if ( rlen > 63 ) { /* make-up code */ if ( rlen > MAXRUNLEN ) rlen = MAXRUNLEN ; p = ctab + 63 + ( rlen >> 6 ) ; if ( codes < maxcodes ) PUTCODE(p) ; } p = ctab + ( rlen & 0x3f ) ; /* terminating code */ if ( codes < maxcodes ) PUTCODE(p) ; ctab = ( col ^= 1 ) ? btab : wtab ; } e->x = x ; e->shift = shift ; return codes ; } /* Pad/truncate run-length coded scan line 'runs' of 'nr' runs by 'pad' pixels (truncate if negative). Returns the new number of runs. */ int xpad ( short *runs, int nr, int pad ) { if ( pad < 0 ) { /* truncate */ while ( pad < 0 ) pad += ( nr <= 0 ? -pad : runs [ --nr ] ) ; runs [ nr++ ] = pad ; } else { /* pad with white */ if ( nr & 1 ) runs [ nr - 1 ] += pad ; else runs [ nr++ ] = pad ; } return nr ; } /* Shift a run-length coded scan line right by s pixels (left if negative). If necessary, zero-length runs are created to avoid copying. Returns the pixel width change (+/-). */ int xshift ( short *runs, int nr, int s ) { int i=0, n=0 ; if ( s < 0 ) { for ( i = 0 ; s < 0 && i < nr ; i++ ) { s += runs [ i ] ; n -= runs [ i ] ; runs [ i ] = 0 ; } i-- ; } if ( i < nr ) { runs [ i ] += s ; n += s ; } return n ; } /* Scale nr run lengths in buffer pointed to by p to scale image horizontally. The scaling factor is xs/256. Returns new line width in pixels. */ int xscale ( short *p, int nr, int xs ) { int inlen=0, outlen=0 ; for ( ; nr-- > 0 ; p++ ) { inlen += *p ; *p = ( ( inlen * xs + 128 ) >> 8 ) - outlen ; outlen += *p ; } return outlen ; } /* Invert a run-length buffer by prepending or removing a zero-length initial run. */ int xinvert ( short *p, int nr ) { int i ; if ( ! *p ) { for ( i=0 ; i0 ; i-- ) { /* insert */ p[i] = p[i-1] ; } p[0] = 0 ; nr++ ; } return nr ; } /* Zero-terminated lists of run lengths for each byte. */ uchar byteruns [ 1408 + 1 ] = "8071061106205120511105210530413041210411110411204220421104310440" "3140313103121103122031112031111103112103113032303221032111032120" "3320331103410350215021410213110213202121202121110212210212302111" "3021112102111111021111202112202112110211310211402240223102221102" "2220221120221111022121022130233023210231110231202420241102510260" "1160115101141101142011312011311101132101133011213011212101121111" "0112112011222011221101123101124011114011113101111211011112201111" "1120111111110111112101111130111230111221011121110111212011132011" "1311011141011150125012410123110123201221201221110122210122301211" "3012112101211111012111201212201212110121310121401340133101321101" "3220131120131111013121013130143014210141110141201520151101610170" "1701610151101520141201411101421014301313013121013111101311201322" "0132110133101340121401213101212110121220121112012111110121121012" "1130122301222101221110122120123201231101241012501115011141011131" "1011132011121201112111011122101112301111130111112101111111101111" "1120111122011112110111131011114011240112310112211011222011211201" "1211110112121011213011330113210113111011312011420114110115101160" "2602510241102420231202311102321023302213022121022111102211202222" "0222110223102240211402113102112110211220211112021111110211121021" "1130212302122102121110212120213202131102141021503503410331103320" "3212032111032210323031130311210311111031112031220312110313103140" "4404310421104220411204111104121041305305210511105120620611071080" ; /* Convert byte-aligned bit-mapped n-byte scan line into array of run lengths. Run length array must have *more* than 8*n elements. First run is white. Returns number of runs coded. */ int bittorun ( uchar *bits, int n, short *runs ) { static uchar init=0, *rltab [ 256 ] ; register uchar *p, c, lastc = 0x00 ; short *runs0 = runs ; if ( ! init ) { /* initialize pointer and run tables */ int i = 0 ; for ( rltab[ 0 ] = p = byteruns ; *p ; p++ ) if ( ! ( *p -= '0' ) && i < 255 ) rltab [ ++i ] = p+1 ; init = 1 ; } *runs = 0 ; for ( ; n > 0 ; n-- ) { p = rltab [ c = *bits++ ] ; if ( ( lastc & 0x01 ) ? ! ( c & 0x80 ) : ( c & 0x80 ) ) *(++runs) = *p++ ; /* new run */ else *runs += *p++ ; /* continue run */ while ( *p ) *(++runs) = *p++ ; lastc = c ; } return runs - runs0 + 1 ; } /* Bitwise-OR two run-length coded scan lines. The run length vectors a and b are OR-ed into c. If c is null, the result is placed in a. The new image width is stored in pels if it is not null. Returns the number of runs in the result. */ int runor ( short *a, int na, short *b, int nb, short *c, int *pels ) { register short la, lb ; int ia, ib, ic, np=0 ; short tmp [ MAXRUNS ] ; if ( ! c ) c = tmp ; la = a [ ia = 0 ] ; lb = b [ ib = 0 ] ; c [ ic = 0 ] = 0 ; while ( 1 ) { if ( la <= lb ) { /* select shorter sub-run */ if ( ( ( ia | ib ) ^ ic ) & 1 ) /* OR of subruns same colour as c? */ c [ ++ic ] = la ; /* no, new output run */ else c [ ic ] += la ; /* yes, add it */ lb -= la ; /* align subruns */ if ( ++ia >= na ) break ; /* done */ la = a [ ia ] ; /* get new subrun */ } else { /* same for line b ... */ if ( ( ( ia | ib ) ^ ic ) & 1 ) c [ ++ic ] = lb ; else c [ ic ] += lb ; la -= lb ; if ( ++ib >= nb ) break ; lb = b [ ib ] ; } } if ( ia < na ) while ( 1 ) { if ( ( ia ^ ic ) & 1 ) c [ ++ic ] = la ; else c [ ic ] += la ; if ( ++ia >= na ) break ; la = a [ ia ] ; } else while ( 1 ) { if ( ( ib ^ ic ) & 1 ) c [ ++ic ] = lb ; else c [ ic ] += lb ; if ( ++ib >= nb ) break ; lb = b [ ib ] ; } if ( c == tmp ) for ( ia=0 ; ia <= ic ; ia++ ) np += a[ia] = c[ia] ; if ( pels ) *pels = np ; return ic + 1 ; } /* Get a number from a PBM file header while skipping whitespace and comments. Returns the number or 0 on EOF. Reads one more byte than used by the number. */ int pbmdim ( IFILE *f ) { int c, n=0 ; /* scan for first digit and skip comments */ while ( ! isdigit ( c = fgetc ( f->f ) ) && c >= 0 ) if ( c == '#' ) while ( ( c = fgetc ( f->f ) ) != '\n' && c >= 0 ) ; /* get the number */ if ( c >= 0 && isdigit( c ) ) { n = c - '0' ; while ( isdigit ( c = fgetc ( f->f ) ) && c >= 0 ) n = n * 10 + c - '0' ; } return n ; } /* Append nb bits from in[from] to bit-mapped scan line buffer where `from' is a bit (not byte) index. Bits in bytes are ordered from MS to LS bit. Initialize before each scan line by calling with nb=0 and in pointing to output buffer. Flush after each scan line by calling with nb=0 and in=NULL. */ #define putbits( c, b ) { x = ( x << (b) ) | (c) ; shift += (b) ; \ if ( shift >= 0 ) { *out++ = x >> shift ; shift -= 8 ; } } void copybits ( uchar *in, int from, short nb ) { uchar *f ; short bits ; static uchar *out ; static short x, shift ; static unsigned char right [ 9 ] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff } ; if ( ! nb ) { /* reset for new scan line */ if ( in ) out = in ; else putbits ( 0, -shift ) ; /* or flush bit buffer */ x = 0 ; shift = -8 ; } else { f = in + ( from >> 3 ) ; bits = 8 - ( from & 7 ) ; if ( nb >= bits ) { putbits ( *f++ & right [ bits ], bits ) ; nb -= bits ; } else { putbits ( ( *f >> ( bits - nb ) ) & right [ bits ], nb ) ; nb = 0 ; } while ( nb >= 8 ) { putbits ( *f++, 8 ) ; nb -= 8 ; } if ( nb > 0 ) putbits ( *f >> ( 8 - nb ), nb ); } } /* Generate scan line 'line' of string 'txt' using font `font' and store the runs in 'runs'. The font is scaled so it appears to have cells of width w and height h. lmargin pixels of white space are added at the left margin. Sets 'pels' to line width if not null. Returns number of runs coded. */ int texttorun ( uchar *txt, faxfont *font, short line, int w, int h, int lmargin, short *runs, int *ppels ) { uchar *in, out [ MAXLINELEN * MAXFONTW / 8 + 1 ] ; int i, nc = 0, cw, nr, pels ; line = ( line * font->h + h/2 ) / h ; cw = font->w ; if ( line >= font->h ) line = font->h - 1 ; in = font->buf + 256/8 * cw * line ; copybits ( out, 0, 0 ) ; for ( i=0 ; txt[i] && i < MAXLINELEN ; i++ ) { copybits ( in, font->offset [ txt[i] ], cw ) ; nc++ ; while ( ( txt[i] == HT ) && ( nc & 7 ) ) { /* tab */ copybits ( in, font->offset [ ' ' ], cw ) ; nc++ ; } } copybits ( 0, 0, 0 ) ; nr = bittorun ( out, ( nc*cw + 7 )/8, runs ) ; if ( font->w == w ) pels = nc*cw ; else pels = xscale ( runs, nr, ( w * 256 ) / font->w ) ; pels += xshift ( runs, nr, lmargin ) ; if ( ppels ) *ppels = pels ; return nr ; } /* Image File Input Functions */ /* Names of file formats */ char *iformatname [ NIFORMATS ] = IFORMATS ; char *oformatname [ NOFORMATS ] = OFORMATS ; char *pformatname [ NPFORMATS ] = PFORMATS ; /* Log the names of files still to be sent using the "msg()" format string s. */ void logifnames ( IFILE *f, char *s ) { PAGE *p ; char *fn ; #ifdef ENABLE_NLS gsize written = 0 ; #endif if ( f && f->page ) for ( p = f->page ; p <= f->lastpage ; p++ ) { fn = p->fname ; #ifdef ENABLE_NLS if ( fn ) { if ( use_utf8 && !g_utf8_validate ( fn, -1, NULL ) ) { fn = g_filename_to_utf8 ( fn, -1, NULL, &written, NULL ) ; if ( fn ) { msg ( s, fn ) ; g_free ( fn ) ; } } else { msg ( s, fn ) ; } } #else if ( fn ) msg ( s, fn ) ; #endif } } /* Read run lengths for one scan line from T.4-coded IFILE f into buffer runs. If pointer pels is not null it is used to save pixel count. Returns number of runs stored, EOF on RTC, or -2 on EOF or other error. */ int readruns ( IFILE *f, short *runs, int *pels ) { int err=0, c=EOF, n ; register int x ; dtab *tab, *t ; short shift ; short *p, *maxp, *q, len=0, npad=0 ; DECODER *d ; uchar reverse=f->page->revbits ; maxp = ( p = runs ) + MAXRUNS ; d = &f->d ; x = d->x ; shift = d->shift ; tab = d->tab ; /* restore decoder state */ do { do { while ( shift < 0 ) { if ( ( c = fgetc ( f->f ) ) == EOF ) { x = ( x << 15 ) | 1 ; shift += 15 ; /* EOL pad at EOF */ npad++ ; } else { if ( reverse ) c = normalbits [ c & 0xff ] ; x = ( x << 8 ) | c ; shift += 8 ; } } t = tab + ( ( x >> shift ) & 0x1ff ) ; tab = t->next ; shift -= t->bits ; } while ( ! t->code ) ; if ( p < maxp ) *p++ = t->code ; } while ( t->code != -1 ) ; d->x = x ; d->shift = shift ; d->tab = tab ; /* save state */ if ( npad > 1 ) msg ("W EOF before RTC" ) ; if ( p >= maxp ) msg ( "W run length buffer overflow" ) ; /* combine make-up and terminating codes and remove +1 offset in run lengths */ n = p - runs - 1 ; for ( p = q = runs ; n-- > 0 ; ) if ( *p > 64 && n-- > 0 ) { len += *q++ = p[0] + p[1] - 2 ; p+=2 ; } else { len += *q++ = *p++ - 1 ; } n = q - runs ; /* check for RTC and errors */ if ( len ) d->eolcnt = 0 ; else if ( ++(d->eolcnt) >= RTCEOL ) err = EOF ; if ( c == EOF ) { if ( ferror ( f->f ) ) { err = -msg ("ES2error reading fax file:") ; } else { err = -2 ; } } if ( pels ) *pels = len ; return err ? err : n ; } /* Read a PCX compressed bit-map */ int readpcx ( char *p, int len, IFILE *f ) { int err=0, n, c ; while ( !err && len > 0 ) { if ( ( c = fgetc ( f->f ) ) < 0 ) { err = msg ( "ES2 PCX read failed" ) ; } else { if ( ( c & 0xc0 ) == 0xc0 ) { /* a run count */ n = c & 0x3f ; c = fgetc ( f->f ) ; if ( ( c = fgetc ( f->f ) ) < 0 ) { err = msg ( "ES2 PCX read failed" ) ; } else { memset ( p, c, n <= len ? n : len ) ; p += n ; len -= n ; } } else { /* bits 0 to 7 are image data */ *p++ = c ; len-- ; } } } if ( len != 0 ) msg ( "W PCX run-length coding error" ) ; return err ; } /* Read a scan line from the current page of IFILE f. Stores number of runs in runs and line width in pels if not null. Pages ends at EOF. Text pages also end if a complete text line would not fit or if the line contains a formfeed character. PBM pages also end when all lines in the bitmap have been read. Fax pages also end at RTC. Returns number of runs stored or EOF at end of page. */ int readline ( IFILE *f, short *runs, int *pels ) { int nr = 0, nb ; uchar bits [ MAXBITS ] ; if ( f->lines != 0 ) { /* -1 allowed as well */ switch ( f->page->format ) { case P_TEXT : if ( f->txtlines <= 0 ) { /* need another text line */ if ( fgets ( f->text, MAXLINELEN, f->f ) ) { f->txtlines = f->charh ; if ( strchr ( f->text, FF ) ) { f->lines = 0 ; /* no more lines in this page */ nr = EOF ; /* don't return any */ } } else { nr = EOF ; } } if ( nr != EOF ) { nr = texttorun ( (uchar*) f->text, f->font, f->charh - f->txtlines, f->charw, f->charh, f->lmargin, runs, pels ) ; f->txtlines-- ; } break ; case P_RAW: case P_PBM: if ( fread ( bits, 1, f->page->w/8, f->f ) != f->page->w/8 ) { nr = EOF ; } else { nr = bittorun ( bits, f->page->w/8, runs ) ; if ( pels ) *pels = f->page->w ; } break ; case P_FAX: nr = readruns ( f, runs, pels ) ; break ; case P_PCX: nb = ( ( f->page->w + 15 ) / 16 ) * 2 ; /* round up */ if ( readpcx ( (char*) bits, nb, f ) != 0 ) { nr = EOF ; } else { nr = bittorun ( bits, nb, runs ) ; if ( pels ) *pels = f->page->w ; } break ; } } else { nr = EOF ; } if ( nr >= 0 && f->page->black_is_zero ) { /* invert */ nr = xinvert ( runs, nr ) ; } if ( nr >= 0 && f->lines > 0 ) f->lines-- ; return nr ; } /* Deduce the file type by scanning buffer p of n bytes. */ int getformat ( uchar *p, int n ) { int format = 0 ; /* figure out file type if not already set */ if ( ! format && n < 2 ) { format = I_TEXT ; msg ( "W only read %d byte(s) from input file, assuming text", n ) ; } if ( ! format && ! p[0] && ! ( p[1] & 0xe0 ) ) { format = I_FAX ; } if ( ! format && ! strncmp ( (char*) p, "P4", 2 ) ) { format = I_PBM ; } if ( ! format && n >= 128 && p[0] == 0x0a && strchr ("\02\03\05", p[1] ) && p[2] <= 1 ) { if ( p[65] != 1 ) { msg ( "E can't read colour PCX" ) ; } else { format = p[2] ? I_PCX : I_PCX ; } } if ( ! format && ! strncmp ( (char*) p, "%!", 2 ) ) { msg ( "W Postscript input file will be treated as text" ) ; } if ( ! format && ( p[0] == 'M' || p[1] == 'I' ) && ( p[1] == p[0] ) ) { format = I_TIFF ; } if ( ! format && ( p[0] == 0x3a && p[1] == 0xde && p[2] == 0x68 && p[3] == 0xb1) ) { format = I_DCX ; } if ( ! format && n ) { /* "90% printable" heuristic */ int i, nprint = 0 ; for ( i=0 ; i 0.90 ) { format = I_TEXT ; } } return format ; } /* initialize page descriptor */ void page_init ( PAGE *p, char *fn ) { p->fname = fn ; p->offset = 0 ; p->w = DEFWIDTH ; p->h = DEFHEIGHT ; p->xres = DEFXRES ; p->yres = DEFYRES ; p->format = P_FAX ; p->revbits = 0 ; p->black_is_zero = 0 ; } void page_report ( PAGE *p, int fmt, int n ) { msg ( "F page %d : %s + %ld : %dx%d @ %.fx%.f dpi %s/%s", n, p->fname, p->offset, p->w, p->h, p->xres, p->yres, iformatname [fmt], pformatname [p->format] ) ; } /* File handling for undefined file types */ #define auto_first 0 #define auto_next 0 /* File handling for TIFF files */ #define tiff_reset 0 /* Name of TIFF tag 'tag'. */ char *tagname ( int tag ) { static struct tagnamestruct { int code ; char *name ; } tagnames [] = { { 256, "width" }, { 257, "length" }, { 258, "bits/sample" }, { 259, "compresssion(g3=3)" }, { 262, "photometric(0-min=white)" }, { 266, "fill order(msb2lsb=1)" }, { 273, "strip offsets" }, { 274, "orientation(1=normal)" }, { 277, "samples/pixel" }, { 278, "rows/strip" }, { 279, "strip byte counts" }, { 282, "xresolution" }, { 283, "yresolution" }, { 284, "storage(1=single plane)" }, { 292, "g3options" }, { 296, "resolution units(2=in,3=cm)" }, { 297, "page number" }, { 327, "clean fax(0=clean/1=regen/2=errors)" }, {0,0} }, *p ; for ( p=tagnames ; p->code ; p++ ) if ( tag == p->code ) break ; return p->code ? p->name : "unknown tag" ; } /* Read 2- or 4-byte integers from a file and correct for file endianness. Returns 0 if OK, 1 on error. */ int fread2 ( unsigned short *p, IFILE *f ) { int err=0 ; uchar c[2] ; err = fread ( c, 1, 2, f->f ) == 2 ? 0 : 1 ; *p = f->bigend ? c[0] << 8 | c[1] << 0 : c[1] << 8 | c[0] << 0 ; return err ; } int fread4 ( unsigned long *p, IFILE *f ) { int err=0 ; uchar c[4] ; err = fread ( c, 1, 4, f->f ) == 4 ? 0 : 1 ; *p = f->bigend ? c[0] << 24 | c[1] << 16 | c[2] << 8 | c[3] << 0 : c[3] << 24 | c[2] << 16 | c[1] << 8 | c[0] << 0 ; return err ; } /* Read a TIFF directory at current file offset, save image format information and seek to next directory if any. Returns 0 if OK, 2 on errors. */ int tiff_next ( IFILE *f ) { int err=0 ; unsigned short ntag, tag, type ; unsigned long count, tv ; double ftv ; msg ( "F+ TIFF directory at %ld", ftell ( f->f ) ) ; if ( fread2 ( &ntag, f ) ) { err = msg ( "E2can't read TIFF tag count" ) ; } else { msg ( "F+ with %d tags", (int) ntag ) ; } for ( ; ! err && ntag > 0 ; ntag-- ) { err = err || fread2 ( &tag, f ) ; err = err || fread2 ( &type, f ) ; err = err || fread4 ( &count, f ) ; if ( type == 3 ) { /* left-aligned short */ unsigned short a, b ; err = err || fread2 ( &a, f ) ; err = err || fread2 ( &b, f ) ; tv = a ; } else { /* long or offset to data */ err = err || fread4 ( &tv, f ) ; } if ( type == 5 ) { /* float as ratio in directory data */ long a, b, where=0 ; err = err || ( ( where = ftell ( f->f ) ) < 0 ) ; err = err || fseek ( f->f, tv, SEEK_SET ) ; err = err || fread4 ( (unsigned long*) &a, f ) ; err = err || fread4 ( (unsigned long*) &b, f ) ; err = err || fseek ( f->f, where, SEEK_SET ) ; ftv = (float) a / ( b ? b : 1 ) ; } else { ftv = 0.0 ; } if ( err ) { err = msg ( "ES2can't read TIFF tag" ) ; continue ; } #ifdef TIFF_DEBUG { char *tagtype[] = { "none", "byte", "ascii", "short", "long", "ratio" } ; msg ( "F %3d %-5s tag %s %5ld (%3d:%s)", count, type <= 5 ? tagtype[type] : "other", count > 1 ? "@" : "=", type == 5 ? (long) ftv : tv, tag, tagname(tag) ) ; } #endif switch ( tag ) { case 256 : /* width */ f->page->w = tv ; break ; case 257 : /* height */ f->page->h = tv ; break ; case 259 : /* compression: 1=none, 3=G3 */ if ( tv == 1 ) { f->page->format = P_RAW ; } else if ( tv == 3 ) { f->page->format = P_FAX ; } else { err = msg ( "E2can only read TIFF/G3 or TIFF/uncompressed" ) ; } break ; case 262 : /* photometric interpretation */ f->page->black_is_zero = tv ; break ; case 266 : /* fill order */ f->page->revbits = ( tv == 2 ? 1 : 0 ) ; break ; case 273 : /* data offset */ if ( count != 1 ) err = msg ( "E2can't read multi-strip TIFF files" ) ; else f->page->offset = tv ; break ; case 282 : /* x resolution */ f->page->xres = ftv ; break ; case 283 : /* y resolution */ f->page->yres = ftv ; break ; case 292 : /* T4 options: 1=2D, 2=uncompressed */ if ( tv & 0x1 ) err = msg ( "E2can't read 2D compressed TIFF-F file" ) ; if ( tv & 0x2 ) err = msg ( "E2can't read uncompressed TIFF-F file" ) ; break ; case 296 : /* units: 2=in, 3=cm */ if ( tv == 3 ) { f->page->xres *= 2.54 ; f->page->yres *= 2.54 ; } break ; } } /* end of tag reading loop */ if ( f->page->format == I_AUTO ) { msg ( "W missing TIFF compression format, set to raw" ) ; f->page->format = P_RAW ; } if ( ! err ) { if ( fread4 ( (unsigned long*) &(f->next), f ) ) { err = msg ( "E2can't read offset to next TIFF directory" ) ; } else { if ( f->next ) { msg ( "F , next directory at %ld.", f->next ) ; if ( fseek ( f->f, f->next, SEEK_SET ) ) err = msg ( "ES2 seek to next TIFF directory failed" ) ; } else { msg ( "F , last image." ) ; } } } if ( ! f->page->offset ) err = msg ( "E2 missing offset to TIFF data" ) ; return err ; } int tiff_first ( IFILE *f ) { short magic, version ; fread ( (uchar*) &magic, 1, 2, f->f ) ; f->bigend = ( *(uchar*) &magic == 'M' ) ? 1 : 0 ; fread2 ( (unsigned short*) &version, f ) ; fread4 ( (unsigned long*) &(f->next), f ) ; msg ( "F TIFF version %d.%d file (%s-endian)", version/10, version%10, f->bigend ? "big" : "little" ) ; fseek ( f->f, f->next, SEEK_SET ) ; return tiff_next ( f ) ; } /* File handling for text files. */ int text_next ( IFILE *f ) { int err = 0, i, nc ; char buf [ MAXLINELEN ] ; f->page->offset = ftell ( f->f ) ; f->page->format = P_TEXT ; nc = ( f->page->w - f->lmargin ) / f->charw ; if ( nc > MAXLINELEN ) nc = MAXLINELEN ; for ( i = 0 ; i < f->pglines && fgets ( buf, nc, f->f ) ; i++ ) ; f->next = ! feof(f->f) ? ftell ( f->f ) : 0 ; err = ferror(f->f) ? 2 : 0 ; return err ; } int text_first ( IFILE *f ) { static faxfont defaultfont ; if ( ! f->font ) { /* use default font scaled 2X, 1 inch margin, 66 lines/page */ f->font = &defaultfont ; readfont ( 0, f->font ) ; if ( ! f->charw ) f->charw = 2 * f->font->w ; if ( ! f->charh ) f->charh = 2 * f->font->h ; if ( ! f->lmargin ) f->lmargin = 204 ; if ( ! f->pglines ) f->pglines = DEFPGLINES ; } /* if not set, take default values from font */ if ( ! f->charw ) f->charw = f->font->w ; if ( ! f->charh ) f->charh = f->font->h ; if ( ! f->lmargin ) f->lmargin = 0 ; if ( ! f->pglines ) f->pglines = f->page->h / f->charh - 6 ; return text_next ( f ) ; } /* File handling for PBM files */ int pbm_first ( IFILE *f ) { int err=0 ; fseek ( f->f, 2, SEEK_SET ) ; if ( ! ( f->page->w = pbmdim ( f ) ) || ! ( f->page->h = pbmdim ( f ) ) ) { err = msg ( "E2 EOF or 0 dimension in PBM header" ) ; } else if ( f->page->w % 8 ) { err = msg ( "E2 PBM width must be multiple of 8" ) ; } else { msg ( "F read %dx%d PBM header", f->page->w, f->page->h ) ; } f->page->offset = ftell ( f->f ) ; f->page->format = P_PBM ; f->next = 0 ; return err ; } #define pbm_next 0 /* File handling for FAX files */ #define fax_first 0 #define fax_next 0 /* File handling for PCX files */ /* get a 16-bit word in Intel byte order. */ int fgeti ( IFILE *f ) { return fgetc ( f->f ) + fgetc ( f->f ) * 256 ; } int pcx_first ( IFILE *f ) { int err=0, xmin, xmax, ymin, ymax, nc, nb ; long start ; start = ftell ( f->f ) ; fseek ( f->f, start+4, SEEK_SET ) ; xmin = fgeti ( f ) ; ymin = fgeti ( f ) ; xmax = fgeti ( f ) ; ymax = fgeti ( f ) ; f->page->w = xmax - xmin + 1 ; f->page->h = ymax - ymin + 1 ; f->page->xres = fgeti ( f ) ; f->page->yres = fgeti ( f ) ; fseek ( f->f, start+0x41, SEEK_SET ) ; nc = fgetc ( f->f ) ; nb = fgeti ( f ) ; if ( nc != 1 ) msg ( "W mono PCX file has %d colour planes", nc ) ; if ( nb != ( f->page->w + 15 ) / 16 * 2 ) msg ( "W PCX file has %d bytes per scan line for %d pels", nb, f->page->w ) ; f->page->offset = start + 128 ; f->page->format = P_PCX ; return err ; } #define pcx_next 0 /* File handling for DCX files */ int dcx_next ( IFILE *f ) { int err=0 ; long thisp, nextp ; /* get this and next pages' offsets */ fseek ( f->f, f->next, SEEK_SET ) ; fread4 ( (unsigned long*) &thisp, f ) ; fread4 ( (unsigned long*) &nextp, f ) ; /* save address of next directory entry, if any */ f->next = nextp ? f->next + 4 : 0 ; if ( ! thisp ) err = msg ( "E2 can't happen (dcx_next)" ) ; else fseek ( f->f, thisp, SEEK_SET ) ; return err ? err : pcx_first ( f ) ; } int dcx_first ( IFILE *f ) { f->bigend = 0 ; f->next = 4 ; return dcx_next ( f ) ; } #define raw_reset 0 #define raw_first 0 #define raw_next 0 /* input file state reset for different compression methods */ #define pcx_reset 0 #define pbm_reset 0 int text_reset ( IFILE *f ) { int err=0 ; f->lines = ( ( f->pglines * f->charh ) / f->charh ) * f->charh ; f->txtlines = 0 ; f->page->yres = f->lines > 1078 ? 196 : 98 ; /* BOGUS */ return err ; } int fax_reset ( IFILE *f ) { int pels ; short runs [ MAXRUNS ] ; newDECODER ( &f->d ) ; if ( readruns ( f, runs, &pels ) < 0 || pels ) /* skip first EOL */ msg ( "W first line has %d pixels: probably not fax data", pels ) ; f->lines = -1 ; return 0 ; } /* Skip to start of same (dp=0) or next (dp=1) page image. Returns 0 if OK, 1 if no more pages, 2 on errors. */ int nextipage ( IFILE *f, int dp ) { int err=0 ; char *message ; #ifdef ENABLE_NLS gsize written = 0 ; char *conv_fname ; #endif int ( *reset [NPFORMATS] ) ( IFILE * ) = { raw_reset, fax_reset, pbm_reset, text_reset, pcx_reset }, (*pf)(IFILE*) ; /* close current file if any and set to NULL */ if ( f->f ) { fclose ( f->f ) ; f->f = 0 ; } /* if requested, point to next page and check if done */ if ( dp ) { f->page++ ; } if ( f->page > f->lastpage ) { err = 1 ; } /* open the file and seek to start of image data */ if ( ! err ) { f->f = fopen ( f->page->fname, (f->page->format == P_TEXT) ? "r" : "rb" ) ; if ( ! f->f ) { message = strdup2 ( "ES2 ", gettext ( "can't open file %s:" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( f->page->fname, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( f->page->fname, -1, NULL, &written, NULL ) ; if ( conv_fname ) { err = msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { err = msg ( message, f->page->fname ) ; } #else err = msg ( message, f->page->fname ) ; #endif free ( message ) ; } } } if ( ! err && fseek ( f->f, f->page->offset, SEEK_SET ) ) err = msg ( "ES2 seek failed" ) ; /* default initializations */ f->lines = f->page->h ; /* coding-specific initializations for this page */ if ( ! err ) { pf = reset[f->page->format] ; if ( pf ) err = (*pf)(f) ; } return err ; } /* Returns true if on last file. */ int lastpage ( IFILE *f ) { return f->page >= f->lastpage ; } #define dfax_first 0 #define dfax_next 0 /* Initialize an input (IFILE) structure. This structure collects the data about images to be processed to allow a simple interface for functions that need to read image files. The IFILE is initialized by building an array of information for each page (image) in all of the files. The page pointer index is initialized so that the first call to nextipage with dp=1 actually opens the first file. */ int newIFILE ( IFILE *f, char **fnames ) { int err=0, i, n, fformat=0 ; char **p ; uchar buf[128] ; int ( *fun ) ( IFILE * ) ; char *message ; #ifdef ENABLE_NLS gsize written = 0 ; char *conv_fname ; #endif int ( *first [NIFORMATS] ) ( IFILE * ) = { auto_first, pbm_first, fax_first, text_first, tiff_first, dfax_first, pcx_first, raw_first, dcx_first } ; int ( *next [NIFORMATS] ) ( IFILE * ) = { auto_next, pbm_next, fax_next, text_next, tiff_next, dfax_next, pcx_next, raw_next, dcx_next } ; f->page = f->pages ; /* get info for all pages in all files */ for ( p=fnames ; ! err && *p ; p++ ) { if ( ! ( f->f = fopen ( *p, "rb" ) ) ) { message = strdup2 ( "ES2 ", gettext ( "can't open file %s:" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( *p, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( *p, -1, NULL, &written, NULL ) ; if ( conv_fname ) { err = msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { err = msg ( message, *p ) ; } #else err = msg ( message, *p ) ; #endif free ( message ) ; } } if ( ! err ) { n = fread ( buf, 1, 128, f->f ) ; if ( ferror ( f->f ) ) { message = strdup2 ( "ES2 ", gettext ( "can't open file %s:" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( *p, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( *p, -1, NULL, &written, NULL ) ; if ( conv_fname ) { err = msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { err = msg ( message, *p ) ; } #else err = msg ( message, *p ) ; #endif free ( message ) ; } } } if ( ! err ) { fformat = getformat ( buf, n ) ; if ( ! fformat ) { message = strdup2 ( "E2 ", gettext ( "can't get format of file %s" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( *p, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( *p, -1, NULL, &written, NULL ) ; if ( conv_fname ) { err = msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { err = msg ( message, *p ) ; } #else err = msg ( message, *p ) ; #endif free ( message ) ; } } } if ( ! err && fseek ( f->f, 0, SEEK_SET ) ) { message = strdup2 ( "ES2 ", gettext ( "can't rewind file %s:" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( *p, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( *p, -1, NULL, &written, NULL ) ; if ( conv_fname ) { err = msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { err = msg ( message, *p ) ; } #else err = msg ( message, *p ) ; #endif free ( message ) ; } } /* get format information for all pages in this file */ for ( i=0 ; ! err ; i++ ) { page_init ( f->page, *p ) ; if ( ( fun = i ? next[fformat] : first[fformat] ) ) err = (*fun)(f) ; if ( ! err ) { page_report ( f->page, fformat, f->page - f->pages + 1 ) ; f->page++ ; if ( f->page >= f->pages + MAXPAGE ) err = msg ( "E2 too many pages (max is %d)", MAXPAGE ) ; } if ( ! f->next ) break ; } if ( f->f ) { fclose ( f->f ) ; f->f = 0 ; } } f->lastpage = f->page - 1 ; f->page = f->pages ; if ( ! normalbits[1] ) initbittab() ; /* bit-reverse table initialization */ return err ; } /* Image File Output Functions */ /* Strings and function to write a bit map in HP-PCL format. The only compression is removal of trailing zeroes. Margins and resolution are set before first write. */ char *PCLBEGIN = "\033E" /* Printer reset. */ "\033&l0E" /* top margin = 0 */ "\033&a0L" /* left margin = 0 */ "\033*t%dR" /* Set raster graphics resolution */ "\033*r1A" ; /* Start raster graphics, rel. adressing */ char *PCLEND = "\033*rB" /* end raster graphics */ "\014" /* form feed */ "\033E" ; /* Printer reset. */ void pclwrite ( OFILE *f, unsigned char *buf, int n ) { while ( n > 0 && buf [ n-1 ] == 0 ) n-- ; fprintf( f->f, "\033*b%dW", n ) ; fwrite ( buf, n, 1, f->f ) ; } /* Write a bit map as (raw) Portable Gray Map (PGM) format after decimating by a factor of 4. Sums bits in each 4x4-pel square to compute sample value. This function reduces each dimension of a bit map by 4 (it writes n*8/4 pixels per scan line and one scan line for every 4 in). The 17 possible sample values are spread linearly over the range 0-255. */ void pgmwrite ( OFILE *f, uchar *buf, int n ) { static uchar gval [ MAXBITS * 8 / 4 ] ; static int init=0, lines=0 ; static uchar hbits [ 256 ], lbits [ 256 ] ; static int nybblecnt [ 16 ] = { 0,1,1,2, 1,2,2,3, 1,2,2,3, 2,3,3,4 } ; static uchar corr [ 17 ] = { 255, 239, 223, 207, 191, 175, 159, 143, 127, 111, 95, 79, 63, 47, 31, 15, 0 } ; int m ; uchar *p, *q ; if ( ! init ) { /* build table of bit counts in each nybble */ short i ; for ( i=0 ; i<256 ; i++ ) { hbits [ i ] = nybblecnt [ i >> 4 & 0x0f ] ; lbits [ i ] = nybblecnt [ i & 0x0f ] ; } init = 1 ; } for ( m=n, p=gval, q=buf ; m-- > 0 ; q++ ) { *p++ += hbits [ *q ] ; *p++ += lbits [ *q ] ; } if ( ( lines++ & 0x03 ) == 0x03 ) { for ( p=gval, m=2*n ; m-- > 0 ; p++ ) *p = corr [ *p ] ; fwrite ( gval, 1, 2*n, f->f ) ; memset ( gval, 0, 2*n ) ; } } /* Postscript image data is differentially coded vertically and run-length coded horizontally. A leading byte (n) defines the type of coding for subsequent data: 0 repeat previous line 1-127 n data bytes follow 128-254 copy n-127 bytes from previous line 255 n repeat the next character 'n' times The overhead for coding a copy is 2 bytes (copy count, data count), so copies > 2 bytes should be so coded. The overhead for coding a run is 4 bytes (255, count, byte, data count), so runs > 4 bytes should be so coded. Copies decode/execute faster and code more compactly so are preferred over runs. */ const char PSBEGIN [] = /* start of file */ /* This line is commented out, as multi-page files are invalid under the EPS specification. The text should be marked as PS if it is lawful to include more than one page "%%!PS-Adobe-2.0 EPSF-2.0 \n" */ "%%!PS-Adobe-2.0 \n" "%%%%Creator: efax (Copyright 1995 Ed Casas) \n" "%%%%Title: efix output\n" "%%%%Pages: (atend) \n" "%%%%BoundingBox: 0 0 %d %d \n" "%%%%BeginComments \n" "%%%%EndComments \n" "/val 1 string def \n" "/buf %d string def \n" "/getval { \n" " currentfile val readhexstring pop 0 get \n" "} bind def \n" "/readbuf { \n" " 0 %% => index \n" " { \n" " dup buf length ge { exit } if \n" " getval %% => index run_length \n" " dup 127 le { \n" " dup 0 eq { \n" " pop buf length \n" " } { \n" " currentfile buf 3 index 3 index getinterval readhexstring pop pop\n" " } ifelse \n" " } { \n" " dup 255 eq { \n" " pop getval getval %% => index run_length value \n" " 2 index 1 3 index 2 index add 1 sub %% => ... start 1 end \n" " { buf exch 2 index put } for \n" " pop \n" " } { \n" " 127 sub \n" " } ifelse \n" " } ifelse \n" " add %% => index \n" " } loop \n" " pop \n" " buf \n" "} bind def \n" "%%%%EndProlog \n" ; const char PSPAGE [] = /* start of page */ "%%%%Page: %d %d \n" "gsave \n" "%f %f translate \n" "%f %f scale \n" "%d %d %d [ %d %d %d %d %d %d ] { readbuf } image \n" ; const char PSPAGEEND [] = /* end of page */ "\n" "grestore \n" "showpage \n" ; const char PSEND [] = /* end of file */ "%%Trailer \n" "%%%%Pages: %d \n" ; void psinit ( OFILE *f, int newfile, int page, int w, int h, int n ) { float ptw, pth ; if ( ! f ) { msg ( "E2 can't happen (psinit)" ) ; return ; } ptw = w/f->xres * 72.0 ; /* convert to points */ pth = h/f->yres * 72.0 ; if ( newfile ) fprintf ( f->f, PSBEGIN, (int) ptw, (int) pth, /* Bounding Box */ n ) ; /* buffer string length */ fprintf ( f->f, PSPAGE, page, page, /* page number */ 0.0, 0.0, /* shift */ ptw, pth, /* scaling */ w, h, 1, /* image size */ w, 0, 0, -h, 0, h ) ; /* CTM */ f->pslines = 0 ; f->lastpageno = page ; } char nhexout = 0, hexchars [ 16 ] = "0123456789abcdef" ; #define hexputc( f, c ) ( \ putc ( hexchars [ (c) >> 4 ], f ), \ putc ( hexchars [ (c) & 0x0f ], f ), \ ( ( ( nhexout++ & 31 ) == 31 ) ? putc ( '\n', f ) : 0 ) ) void hexputs ( FILE *f, uchar *p, int n ) { uchar c ; if ( n > 0 ) { hexputc ( f, n ) ; while ( n-- ) { c = *p++ ^ 0xff ; hexputc ( f, c ) ; } } } /* Encode into postscript. If not a repeated line, test (using index j) from current position (i) for possible encodings as: copy of > 2 bytes, runs of > 4 or data >=127. Otherwise the byte is skipped. Uncoded bytes are output from the last uncoded byte (l) before output of runs/copies. */ void pswrite ( OFILE *f, unsigned char *buf, int n ) { int i, j, l ; static unsigned char last [ MAXBITS ] ; l=i=0 ; if ( ! f || ! buf || n<0 ) { msg ( "E2 can't happen (pswrite)" ) ; return ; } for ( j=0 ; jpslines ; j++ ) ; if ( j == n ) { /* repeat line */ hexputc ( f->f, 0 ) ; l=i=n ; } while ( ipslines ; j++ ) ; if ( j-i > 2 ) { /* skip */ hexputs ( f->f, buf+l, i-l ) ; hexputc ( f->f, j-i + 127 ) ; l=i=j ; } else { for ( j=i ; j 4 ) { /* run */ hexputs ( f->f, buf+l, i-l ) ; hexputc ( f->f, 255 ) ; hexputc ( f->f, j-i ) ; hexputc ( f->f, buf[i] ^ 0xff ) ; l=i=j ; } else { if ( i-l >= 127 ) { /* maximum data length */ hexputs ( f->f, buf+l, i-l ) ; l=i ; } else { /* data */ i++ ; } } } } hexputs ( f->f, buf+l, i-l ) ; if ( n >= 0 ) memcpy ( last, buf, n ) ; f->pslines++ ; } /* Write 2- and 4-byte integers to an image output file. Return as for fwrite. */ int fwrite2 ( short s, OFILE *f ) { uchar *p = (void*) &s ; return fwrite ( bigendian ? p + sizeof(short) - 2 : p, 2, 1, f->f ) ; } int fwrite4 ( long l, OFILE *f ) { uchar *p = (void*) &l ; return fwrite ( bigendian ? p + sizeof(long ) - 4 : p, 4, 1, f->f ) ; } /* Write a TIFF directory tag. Returns 0 if OK, 1 on errors. */ int wtag ( OFILE *f, int lng, short tag, short type, long count, long offset ) { int err=0 ; err = err || ! fwrite2 ( tag, f ) ; err = err || ! fwrite2 ( type, f ) ; err = err || ! fwrite4 ( count, f ) ; if ( lng ) { err = err || ! fwrite4 ( offset, f ) ; } else { err = err || ! fwrite2 ( offset, f ) ; err = err || ! fwrite2 ( 0, f ) ; } if ( err ) msg ( "ES2 can't write TIFF tag" ) ; return err ; } /* Write TIFF header and directory. File format based on Sam Leffler's tiff.h. Can only be used for single-image TIFFs because always seeks to start of file to re-write the header. */ #define NTAGS 17 /* number of tags in directory */ #define NRATIO 2 /* number of floats (as ratios) */ int tiffinit ( OFILE *f ) { int err=0, compr=1 ; long tdoff, doff ; fseek ( f->f, 0, SEEK_SET ) ; /* 0 ==> (start of TIFF file) */ /* write magic, TIFF version and offset to directory */ fwrite2 ( bigendian ? 0x4d4d : 0x4949, f ) ; fwrite2 ( 42, f ) ; fwrite4 ( 8, f ) ; /* 8 ==> directory */ fwrite2 ( NTAGS, f ) ; /* figure out offsets within file and compression code */ tdoff = 8 + 2 + NTAGS*12 + 4 ; /* offset to directory data */ doff = tdoff + NRATIO*8 ; /* offset to image data */ switch ( f->format ) { case O_TIFF_RAW: compr = 1 ; break ; case O_TIFF_FAX: compr = 3 ; break ; default: err = msg ( "E2can't happen(tiffinit)" ) ; break ; } /* write directory tags, 12 bytes each */ wtag( f, 1, 256, 4, 1, f->w ) ; /* width long */ wtag( f, 1, 257, 4, 1, f->h ) ; /* length long */ wtag( f, 0, 258, 3, 1, 1 ) ; /* bits/sample short */ wtag( f, 0, 259, 3, 1, compr ) ; /* compresssion(g3=3) short */ wtag( f, 0, 262, 3, 1, 0 ) ; /* photometric(0-min=white) short */ wtag( f, 0, 266, 3, 1, 1 ) ; /* fill order(msb2lsb=1) short */ wtag( f, 1, 273, 4, 1, doff ) ; /* strip offsets long */ wtag( f, 0, 274, 3, 1, 1 ) ; /* orientation(1=normal) short */ wtag( f, 0, 277, 3, 1, 1 ) ; /* samples/pixel short */ wtag( f, 1, 278, 4, 1, f->h ) ; /* rows/strip long */ wtag( f, 1, 279, 4, 1, f->bytes ) ; /* strip byte counts long */ wtag( f, 1, 282, 5, 1, tdoff+0 ) ; /* xresolution ratio */ wtag( f, 1, 283, 5, 1, tdoff+8 ) ; /* yresolution ratio */ wtag( f, 0, 284, 3, 1, 1 ) ; /* storage(1=single plane) short */ wtag( f, 1, 292, 4, 1, 0 ) ; /* g3options long */ wtag( f, 0, 296, 3, 1, 2 ) ; /* resolution units(2=in,3=cm) short */ wtag( f, 0, 327, 3, 1, 0 ) ; /* clean fax(0=clean) short */ fwrite4 ( 0, f ) ; /* offset to next dir (no more) */ /* ==> tdoff (tag data offset), write ratios for floats here */ fwrite4 ( f->xres+0.5, f ) ; fwrite4 ( 1, f ) ; fwrite4 ( f->yres+0.5, f ) ; fwrite4 ( 1, f ) ; /* ==> doff (strip data offset), image data goes here */ return err ; } /* Convert array 'runs' of 'nr' run lengths into a bit map 'buf'. Returns the number of bytes filled. */ int runtobit ( short *runs, int nr, uchar *buf ) { static uchar zerofill [ 9 ] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00 } ; static uchar onefill [ 9 ] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff } ; uchar col=0, *buf0 = buf ; register short len, b=8, bytes ; while ( nr-- > 0 ) { len = *runs++ ; if ( col ) *buf |= onefill [ b ] ; /* right bits of cur. byte */ else *buf &= zerofill [ b ] ; if ( b > len ) { /* done fill */ b -= len ; } else { /* continue to next byte */ len -= b ; buf++ ; b = 8 ; if ( ( bytes = len>>3 ) > 0 ) { /* fill >1 byte */ memset ( buf, col, bytes ) ; len -= bytes*8; buf += bytes ; } *buf = col ; /* flood the rest */ b -= len ; } col ^= 0xff ; } return buf - buf0 + ( b < 8 ) ; } /* Write a PCX file header. */ int fputi ( int i, OFILE *f ) { putc ( i & 0xff, f->f ) ; putc ( ( i >> 8 ) & 0xff, f->f ) ; return 0 ; } void pcxinit ( OFILE *f ) { uchar buf [ 60 ] = { 0x0a, 3, 1, 1 } ; /* magic, version, compr, BPP */ fwrite ( buf, 1, 4, f->f ) ; /* 4 */ fputi ( 0, f ) ; /* 8 xmin, ymin, xmax, ymax */ fputi ( 0, f ) ; fputi ( f->w-1, f ) ; fputi ( f->h-1, f ) ; fputi ( f->xres, f ) ; /* 4 x and y dpi */ fputi ( f->yres, f ) ; memset ( buf, 0, 48 ) ; /* 48 palette */ fwrite ( buf, 1, 48, f->f ) ; putc ( 0, f->f ) ; /* 1 reserved */ putc ( 1, f->f ) ; /* 1 planes per pixel */ fputi ( (f->w+15)/16*2, f ) ; /* 2 bytes per line */ memset ( buf, 0, 60 ) ; /* 60 zero */ fwrite ( buf, 1, 60, f->f ) ; } /* Write a PCX-compressed scan line. */ void pcxwrite ( OFILE *of, uchar *p, int nb ) { int c, n, runc ; FILE *f = of->f ; runc = *p++ ; n = 1 ; for ( nb-- ; nb > 0 ; nb-- ) { c = *p++ ; if ( c == runc && n < 63 ) { /* continue run */ n++ ; } else { /* terminate run */ if ( n > 1 || ( ( runc & 0xc0 ) == 0xc0 ) ) /* output as run */ putc ( n | 0xc0, f ) ; putc ( runc, f ) ; runc = c ; /* start new run */ n = 1 ; } } /* last run */ if ( n > 1 || ( ( runc & 0xc0 ) == 0xc0 ) ) /* output as run */ putc ( n | 0xc0, f ) ; putc ( runc, f ) ; } /* Begin/end output pages. If not starting first page (0), terminate previous page. If output filename pattern is defined, [re-]opens that file. If not terminating last page (page==EOF), writes file header. Returns 0 or 2 on errors. */ int nextopage ( OFILE *f, int page ) { int err = 0 ; int i, nb=0 ; uchar *p, codes [ ( RTCEOL * EOLBITS ) / 8 + 3 ] ; char *message ; #ifdef ENABLE_NLS gsize written = 0 ; char *conv_cfname ; #endif if ( f->f ) { /* terminate previous page */ switch ( f->format ) { case O_PBM: break ; case O_PGM: break ; case O_FAX: case O_TIFF_FAX: for ( p = codes, i=0 ; ie, EOLCODE, EOLBITS, p ) ; nb = putcode ( &f->e, 0, 0, p ) - codes ; fwrite ( codes, 1, nb, f->f ) ; f->bytes += nb ; if ( f->format == O_TIFF_FAX ) tiffinit ( f ) ; break ; case O_TIFF_RAW: tiffinit(f) ; /* rewind & update TIFF header */ break ; case O_PCL: fprintf ( f->f, PCLEND ) ; break ; case O_PS: fprintf ( f->f, PSPAGEEND ) ; if ( f->fname || page<0 ) fprintf ( f->f, PSEND, f->lastpageno ) ; break ; case O_PCX: case O_PCX_RAW: fseek ( f->f, 0, SEEK_SET ) ; pcxinit ( f ) ; break ; } if ( ferror ( f->f ) ) { err = msg ("ES2output error:" ) ; } else { msg ( "F+ wrote %s as %dx%d pixel %.fx%.f dpi %s page", f->cfname, f->w, f->h, f->xres, f->yres, oformatname [f->format] ) ; switch ( f->format ) { case O_PS: msg ( "F (%d lines)", f->pslines ) ; break ; case O_TIFF_RAW: case O_TIFF_FAX: msg ( "F (%d bytes)", f->bytes ) ; break ; default: msg ( "F " ) ; break ; } } } if ( ! err && page >= 0 ) { /* open new file */ if ( f->fname ) { sprintf ( f->cfname, f->fname, page+1, page+1, page+1 ) ; if ( ! f->f ) f->f = fopen ( f->cfname, ( f->format == O_PS ) ? "w" : "wb+" ) ; else f->f = freopen ( f->cfname, ( f->format == O_PS ) ? "w" : "wb+", f->f ) ; if ( ! f->f ) { message = strdup2 ( "ES2 ", gettext ( "can't open output file %s:" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( f->cfname, -1, NULL ) ) { conv_cfname = g_filename_to_utf8 ( f->cfname, -1, NULL, &written, NULL ) ; if ( conv_cfname ) { err = msg ( message, conv_cfname ) ; g_free ( conv_cfname ) ; } } else { err = msg ( message, f->cfname ) ; } #else err = msg ( message, f->cfname ) ; #endif free ( message ) ; } } } else { f->f = stdout ; strcpy ( f->cfname, "standard output" ) ; } } /* start new page */ if ( ! err && page >= 0 ) { switch ( f->format ) { case O_PBM: fprintf ( f->f, "P4 %d %d\n", f->w, f->h ) ; break ; case O_PGM: fprintf ( f->f, "P5 %d %d %d\n", f->w/4, f->h/4, 255 ) ; break ; case O_FAX: case O_TIFF_FAX: if ( f->format == O_TIFF_FAX ) tiffinit ( f ) ; p = putcode ( &f->e, EOLCODE, EOLBITS, codes ) ; nb = p - codes ; fwrite ( codes, 1, nb, f->f ) ; break ; case O_TIFF_RAW: tiffinit ( f ) ; break ; case O_PCL: fprintf ( f->f, PCLBEGIN, (int) f->xres ) ; break ; case O_PS: psinit ( f, ( f->fname || page==0 ), page+1, f->w, f->h, f->w/8 ) ; break ; case O_PCX: case O_PCX_RAW: fseek ( f->f, 0, SEEK_SET ) ; pcxinit ( f ) ; break ; } if ( ferror ( f->f ) ) err = msg ("ES2output error:" ) ; } /* only count lines/bytes for those formats that don't have headers or where we will update the headers on closing */ switch ( f->format ) { case O_FAX: case O_TIFF_FAX: case O_PCX: case O_PCX_RAW: f->h = 0 ; f->bytes = nb ; break ; } return err ; } /* Output scan line of nr runs no times to output file f. */ void writeline ( OFILE *f, short *runs, int nr, int no ) { int nb = 0 ; uchar *p, buf [ MAXCODES ] ; /* if line to be output, convert to right format */ if ( no > 0 ) switch ( f->format ) { case O_PBM: case O_PGM: case O_PCL: case O_PS: case O_TIFF_RAW: case O_PCX: case O_PCX_RAW: nb = runtobit ( runs, nr, buf ) ; break ; case O_FAX: case O_TIFF_FAX: break ; } /* output `no' times. */ while ( no-- > 0 ) { switch ( f->format ) { case O_PCX_RAW: case O_TIFF_RAW: case O_PBM: fwrite ( buf, 1, nb, f->f ) ; break ; case O_PGM: pgmwrite ( f, buf, nb ) ; break ; case O_TIFF_FAX: case O_FAX: p = runtocode ( &f->e, runs, nr, buf ) ; p = putcode ( &f->e, EOLCODE, EOLBITS, p ) ; nb = p - buf ; fwrite ( buf, 1, nb, f->f ) ; break ; case O_PCL: pclwrite ( f, buf, nb ) ; break ; case O_PS: pswrite ( f, buf, nb ) ; break ; case O_PCX: pcxwrite ( f, buf, nb ) ; break ; } /* only count lines/bytes for those formats that don't have headers or where we will update the headers on closing */ switch ( f->format ) { case O_FAX: case O_TIFF_FAX: case O_TIFF_RAW: case O_PCX: case O_PCX_RAW: f->h++ ; f->bytes += nb ; break ; } } } /* Initialize new output file. If fname is NULL, stdout will be used for all images. */ void newOFILE ( OFILE *f, int format, char *fname, float xres, float yres, int w, int h ) { f->f = 0 ; f->format = format ; f->fname = fname ; f->xres = xres ; f->yres = yres ; f->w = w ; f->h = h ; f->bytes = 0 ; newENCODER ( &f->e ) ; } /* Read a bitmap to use as a font and fill in the font data. If the file name is null, empty, or there are errors, the font is initialized to the built-in font. Returns 0 if OK, 2 on errors. */ int readfont ( char *fname, faxfont *font ) { int err=0, i, j, n=0, nr, nb, fontok=0, pels ; char *fnames [2] = { 0, 0 } ; short runs [ MAXRUNS ] ; IFILE f; if ( fname && *fname ) { fnames[0] = fname ; newIFILE ( &f, fnames ) ; if ( nextipage ( &f, 0 ) ) { err = msg ( "E2 can't open font file %s", fnames[0] ) ; } nb = 0 ; while ( ! err && ( nr = readline ( &f, runs, &pels ) ) >= 0 ) { if ( nb+pels/8 < MAXFONTBUF ) { nb += runtobit ( runs, nr, font->buf+nb ) ; } else { err = msg ("E2font file %s too large (max %d bytes)", fnames[0], MAXFONTBUF ) ; } } if ( ! err && nb != f.page->w * f.page->h / 8 ) err = msg ( "E2 read %d bytes of font data for %dx%d bitmap", nb, f.page->w, f.page->h ) ; if ( ! err && ( f.page->w / 256 > MAXFONTW || f.page->h > MAXFONTH ) ) { err = msg ( "E2font size (%dx%d) too large", f.page->w, f.page->h ) ; } if ( err ) { font->w = font->h = 0 ; } else { font->w = f.page->w / 256 ; font->h = f.page->h ; for ( i=0 ; i<256 ; i++ ) font->offset[i] = i*font->w ; msg ("Iread %dx%d font %s (%d bytes)", font->w, font->h, fname, nb ) ; fontok = 1 ; } if ( f.f ) { fclose ( f.f ) ; f.f = 0 ; } } if ( ! fontok ) { /* use built-in font */ font->w = STDFONTW ; font->h = STDFONTH ; for ( i=j=0 ; j 0 ; n-- ) font->buf [ j++ ] = 0 ; else font->buf [ j++ ] = stdfont [ i ] ; if ( i != 1980 ) err = msg ( "E2can't happen(readfont)" ) ; for ( i=0 ; i<256 ; i++ ) font->offset[i] = i*font->w ; } return err ; } /* Initialize bit reversal lookup tables (note that the `normalbits' array is the one actually used for the bit reversal. */ void initbittab ( void ) { int i ; for ( i=0 ; i<256 ; i++ ) normalbits [ reversebits [ i ] = i ] = ( i& 1 ? 128:0 ) | ( i& 2 ? 64:0 ) | ( i& 4 ? 32:0 ) | ( i& 8 ? 16:0 ) | ( i&16 ? 8:0 ) | ( i&32 ? 4:0 ) | ( i&64 ? 2:0 ) | ( i&128 ? 1:0 ) ; } /* T.4 Encoding/Decoding */ /* Table-lookup decoder for variable-bit-length codewords. The table index is the N most recently undecoded bits with the first (oldest) undecoded bit as the MS bit. If the N bits uniquely identify a codeword then the indexed 'code' member identifies the code, otherwise it is zero. The 'bits' member gives the number of bits to be considered decoded (to be removed from the bit stream) and the 'next' element is a pointer to the table to use for decoding the next part of the bit sequence. For T.4 decoding the longest T.4 codeword is 13 bits. The implementation below uses two tables of 512 elements (N=9 bits) for each colour. Codewords longer than 9 bits require a second lookup. Since all codewords longer than than 9 bits have a 4-bit zero prefix it is possible to use only one secondary 9-bit lookup table by dropping only the first 4 bits after the first lookup. The code indentifier is the run length + 1. A separate table is used for decoding the variable-length FILL patterns. For undefined codewords, one bit is skipped and decoding continues at the white code table. */ /* the lookup tables for each colour and the fill lookup table */ dtab tw1 [ 512 ], tw2 [ 512 ], tb1 [ 512 ], tb2 [ 512 ], fill [ 512 ] ; char tabinit=0 ; /* Add code cword shifted left by shift to decoding table tab. */ void addcode ( dtab *tab, int cword, int shift, short code, short bits, dtab *next ) { int i, n = 1 << shift ; for ( i = cword << shift ; n-- > 0 ; i++ ) { tab[i].code = code ; tab[i].bits = bits ; tab[i].next = next ; } } /* Initialize the decoding table for one colour using the codes in the T.4 table p0. t1 and t2 are the two decoding tables and ot is the first table of the other colour. */ void init1dtab ( t4tab *p0, dtab *t1, dtab *t2, dtab *ot ) { t4tab *p ; for ( p = p0 ; p->code ; p++ ) if ( p->bits <= 9 ) { addcode ( t1, p->code, 9 - p->bits, p->rlen + 1, p->bits, ( p - p0 ) > 63 ? t1 : ot ) ; } else { addcode ( t1, p->code >> ( p->bits - 9 ), 0, 0, 4, t2 ) ; addcode ( t2, p->code, 13 - p->bits, p->rlen + 1, p->bits - 4, ( p - p0 ) > 63 ? t1 : ot ) ; } } /* Initialize a T.4 decoder. */ void newDECODER ( DECODER *d ) { int i ; if ( ! tabinit ) { /* undefined codes */ addcode ( tw1, 0, 9, 0, 1, tw1 ) ; addcode ( tw2, 0, 9, 0, 1, tw1 ) ; addcode ( tb1, 0, 9, 0, 1, tw1 ) ; addcode ( tb2, 0, 9, 0, 1, tw1 ) ; addcode ( fill, 0, 9, 0, 1, tw1 ) ; /* fill and EOL */ addcode ( tw1, 0, 0, 0, 4, tw2 ) ; addcode ( tw2, 0, 2, 0, 7, fill ) ; addcode ( tb1, 0, 0, 0, 4, tb2 ) ; addcode ( tb2, 0, 2, 0, 7, fill ) ; addcode ( fill, 0, 0, 0, 9, fill ) ; for ( i=0 ; i<=8 ; i++ ) addcode ( fill, 1, i, -1, 9-i, tw1 ) ; /* white and black runs */ init1dtab ( wtab, tw1, tw2, tb1 ) ; init1dtab ( btab, tb1, tb2, tw1 ) ; tabinit=1 ; } /* initialize decoder to starting state */ d->x = 0 ; d->shift = -9 ; d->tab = tw1 ; d->eolcnt = 0 ; } /* T.4 coding table and default font for efax/efix */ /* T.4 1-D run-length coding tables. codes must be in run length order for runtocode(). */ t4tab wtab [ ( 64 + 27 + 13 ) + 1 ] = { /* runs of white */ /* Terminating White Codes */ {53,8,0}, {7,6,1}, {7,4,2}, {8,4,3}, {11,4,4}, {12,4,5}, {14,4,6}, {15,4,7}, {19,5,8}, {20,5,9}, {7,5,10}, {8,5,11}, {8,6,12}, {3,6,13}, {52,6,14}, {53,6,15}, {42,6,16}, {43,6,17}, {39,7,18}, {12,7,19}, {8,7,20}, {23,7,21}, {3,7,22}, {4,7,23}, {40,7,24}, {43,7,25}, {19,7,26}, {36,7,27}, {24,7,28}, {2,8,29}, {3,8,30}, {26,8,31}, {27,8,32}, {18,8,33}, {19,8,34}, {20,8,35}, {21,8,36}, {22,8,37}, {23,8,38}, {40,8,39}, {41,8,40}, {42,8,41}, {43,8,42}, {44,8,43}, {45,8,44}, {4,8,45}, {5,8,46}, {10,8,47}, {11,8,48}, {82,8,49}, {83,8,50}, {84,8,51}, {85,8,52}, {36,8,53}, {37,8,54}, {88,8,55}, {89,8,56}, {90,8,57}, {91,8,58}, {74,8,59}, {75,8,60}, {50,8,61}, {51,8,62}, {52,8,63}, /* Make Up White Codes */ {27,5,64}, {18,5,128}, {23,6,192}, {55,7,256}, {54,8,320}, {55,8,384}, {100,8,448}, {101,8,512}, {104,8,576}, {103,8,640}, {204,9,704}, {205,9,768}, {210,9,832}, {211,9,896}, {212,9,960}, {213,9,1024},{214,9,1088},{215,9,1152}, {216,9,1216},{217,9,1280},{218,9,1344},{219,9,1408},{152,9,1472},{153,9,1536}, {154,9,1600},{24,6,1664}, {155,9,1728}, /* Extended Make Up Codes (Black and White) */ {8,11,1792}, {12,11,1856},{13,11,1920},{18,12,1984},{19,12,2048},{20,12,2112}, {21,12,2176},{22,12,2240},{23,12,2304},{28,12,2368},{29,12,2432},{30,12,2496}, {31,12,2560}, {0,0,0} } ; t4tab btab [ ( 64 + 27 + 13 ) + 1 ] = { /* runs of black */ /* Terminating Black Codes */ {55,10,0}, {2,3,1}, {3,2,2}, {2,2,3}, {3,3,4}, {3,4,5}, {2,4,6}, {3,5,7}, {5,6,8}, {4,6,9}, {4,7,10}, {5,7,11}, {7,7,12}, {4,8,13}, {7,8,14}, {24,9,15}, {23,10,16}, {24,10,17}, {8,10,18}, {103,11,19}, {104,11,20}, {108,11,21}, {55,11,22}, {40,11,23}, {23,11,24}, {24,11,25}, {202,12,26}, {203,12,27}, {204,12,28}, {205,12,29}, {104,12,30}, {105,12,31}, {106,12,32}, {107,12,33}, {210,12,34}, {211,12,35}, {212,12,36}, {213,12,37}, {214,12,38}, {215,12,39}, {108,12,40}, {109,12,41}, {218,12,42}, {219,12,43}, {84,12,44}, {85,12,45}, {86,12,46}, {87,12,47}, {100,12,48}, {101,12,49}, {82,12,50}, {83,12,51}, {36,12,52}, {55,12,53}, {56,12,54}, {39,12,55}, {40,12,56}, {88,12,57}, {89,12,58}, {43,12,59}, {44,12,60}, {90,12,61}, {102,12,62}, {103,12,63}, /* Make Up Black Codes */ {15,10,64}, {200,12,128},{201,12,192},{91,12,256}, {51,12,320}, {52,12,384}, {53,12,448}, {108,13,512},{109,13,576},{74,13,640}, {75,13,704}, {76,13,768}, {77,13,832}, {114,13,896},{115,13,960},{116,13,1024},{117,13,1088}, {118,13,1152}, {119,13,1216},{82,13,1280},{83,13,1344},{84,13,1408},{85,13,1472},{90,13,1536}, {91,13,1600},{100,13,1664},{101,13,1728}, /* Extended Make Up Codes (Black and White) */ {8,11,1792}, {12,11,1856},{13,11,1920},{18,12,1984},{19,12,2048},{20,12,2112}, {21,12,2176},{22,12,2240},{23,12,2304},{28,12,2368},{29,12,2432},{30,12,2496}, {31,12,2560}, {0,0,0} } ; /* The built-in 8x16 font. Runs of zeroes are coded as 0 followed by the repetition count. */ uchar stdfont [ 1980 ] = { 0,255,0,255,0,194,8,4,12,10,18,0,3,16,4,8,20,8,4,8,20,0,1,10,8,4, 4,10,18,0,2,16,4,8,20,4,0,68,20,0,1,8,0,2,12,6,48,0,5,2,0,43,14,32, 56,0,2,12,0,1,32,0,1,2,0,1,14,0,1,32,8,4,32,56,0,14,6,8,48,0,40,8, 0,1,18,0,6,30,0,4,4,0,11,4,8,18,20,18,12,0,2,8,8,20,20,4,8,20,20, 0,1,20,4,8,10,20,18,0,2,8,8,20,20,8,0,1,24,8,4,8,10,20,12,0,2,8,4, 8,20,16,8,8,20,54,10,8,4,8,10,20,0,2,16,4,8,20,4,0,1,20,0,33,12,20, 18,28,48,12,12,8,8,8,0,4,2,28,8,28,28,4,62,28,62,28,28,0,5,60,28, 12,60,14,56,62,30,14,34,62,62,33,16,33,34,12,60,12,60,30,127,34,33, 65,34,34,62,8,32,8,8,0,1,24,0,1,32,0,1,2,0,1,16,0,1,32,8,4,32,8,0, 7,16,0,6,8,8,8,0,36,4,14,0,1,34,8,12,18,28,24,0,3,28,0,1,24,0,1,28, 28,8,0,1,30,0,2,8,28,0,1,100,100,98,0,6,18,31,14,0,8,56,0,7,13,0, 5,32,36,4,8,20,20,20,18,0,2,4,8,20,20,8,16,20,20,8,20,4,8,20,20,20, 0,2,8,8,20,20,8,32,20,0,33,12,20,18,42,73,18,24,8,8,42,8,0,3,4,34, 24,34,34,12,32,34,2,34,34,0,2,2,0,1,16,2,34,12,34,18,36,32,16,18, 34,8,8,34,16,51,50,18,34,18,34,32,8,34,33,73,34,34,2,8,16,8,8,0,1, 24,0,1,32,0,1,2,0,1,16,0,1,32,0,2,32,8,0,7,16,0,6,8,8,8,0,36,15,16, 65,34,8,18,0,1,34,4,0,3,34,0,1,36,8,2,2,0,2,58,0,2,56,34,0,1,36,36, 18,0,1,12,12,12,12,12,12,24,18,62,62,62,62,62,62,62,62,36,34,12,12, 12,12,12,0,1,18,34,34,34,34,34,32,36,0,5,12,0,10,52,0,6,8,0,6,32, 0,34,12,0,1,63,40,74,18,0,1,16,4,20,8,0,3,4,34,40,2,2,20,32,32,2, 34,34,24,24,4,0,1,8,2,78,18,34,32,34,32,16,32,34,8,8,36,16,51,50, 33,34,33,34,32,8,34,33,73,20,34,4,8,16,8,20,0,2,28,44,14,30,28,62, 30,44,56,60,34,8,82,44,28,44,30,22,30,62,34,34,65,34,34,62,8,8,8, 0,35,12,20,16,62,34,8,16,0,1,77,4,0,3,93,0,1,24,8,2,12,0,1,34,58, 0,2,8,34,0,1,40,40,100,4,12,12,12,12,12,12,40,32,32,32,32,32,8,8, 8,8,34,50,18,18,18,18,18,34,35,34,34,34,34,34,60,40,28,28,28,28,28, 28,54,14,28,28,28,28,56,56,56,56,2,44,28,28,28,28,28,8,29,34,34,34, 34,34,44,34,0,33,12,0,1,18,24,52,12,0,1,16,4,42,8,0,3,8,34,8,2,2, 36,60,32,4,34,34,24,24,8,127,4,2,82,18,34,32,34,32,16,32,34,8,8,40, 16,45,42,33,34,33,34,48,8,34,33,73,20,20,4,8,8,8,20,0,2,34,50,16, 34,34,16,34,50,8,4,36,8,109,50,34,50,34,24,32,16,34,34,73,34,34,2, 4,8,16,57,0,34,12,36,16,34,20,0,1,40,0,1,81,28,18,127,0,1,89,0,2, 127,12,2,0,1,34,58,28,0,1,8,34,36,40,40,24,4,18,18,18,18,18,18,40, 32,32,32,32,32,8,8,8,8,34,50,33,33,33,33,33,20,37,34,34,34,34,20, 34,40,34,34,34,34,34,34,9,16,34,34,34,34,8,8,8,8,30,50,34,34,34,34, 34,0,1,34,34,34,34,34,34,50,34,0,33,12,0,1,18,12,8,25,0,1,16,4,8, 127,0,1,127,0,1,8,34,8,4,12,68,2,60,8,28,30,0,2,16,0,1,2,28,82,18, 60,32,34,60,30,32,62,8,8,56,16,45,42,33,34,33,60,28,8,34,18,85,8, 20,8,8,8,8,34,0,2,2,34,32,34,34,16,34,34,8,4,40,8,73,34,34,34,34, 16,32,16,34,34,73,20,34,4,24,8,12,78,0,35,36,60,34,62,0,1,36,0,1, 81,36,36,1,28,85,0,2,8,16,2,0,1,34,26,28,0,1,8,34,18,18,22,106,0, 1,18,18,18,18,18,18,47,32,60,60,60,60,8,8,8,8,122,42,33,33,33,33, 33,8,45,34,34,34,34,20,34,36,2,2,2,2,2,2,9,32,34,34,34,34,8,8,8,8, 34,34,34,34,34,34,34,127,38,34,34,34,34,34,34,34,0,33,8,0,1,63,10, 22,37,0,1,16,4,0,1,8,0,3,8,34,8,8,2,126,2,34,8,34,2,0,2,8,127,4,16, 86,63,34,32,34,32,16,34,34,8,8,36,16,45,38,33,60,33,36,6,8,34,18, 54,20,8,16,8,8,8,34,0,2,30,34,32,34,62,16,34,34,8,4,56,8,73,34,34, 34,34,16,28,16,34,20,85,8,20,8,4,8,16,0,35,8,36,16,34,8,8,18,0,1, 81,26,72,1,0,1,34,0,2,8,30,28,0,1,34,10,28,0,1,8,28,9,22,17,22,4, 63,63,63,63,63,63,120,32,32,32,32,32,8,8,8,8,34,42,33,33,33,33,33, 20,41,34,34,34,34,8,34,34,30,30,30,30,30,30,63,32,62,62,62,62,8,8, 8,8,34,34,34,34,34,34,34,0,1,42,34,34,34,34,20,34,20,0,35,18,10,41, 34,0,1,16,4,0,1,8,0,3,16,34,8,16,2,4,2,34,16,34,2,0,2,4,0,1,8,0,1, 73,33,34,32,34,32,16,34,34,8,8,34,16,33,38,33,32,33,34,2,8,34,18, 34,20,8,16,8,4,8,0,3,34,34,32,34,32,16,38,34,8,4,36,8,73,34,34,34, 34,16,2,16,34,20,34,20,20,16,8,8,8,0,35,12,20,16,62,62,8,10,0,1,77, 0,1,36,1,0,1,28,0,6,34,10,0,4,18,42,34,42,28,33,33,33,33,33,33,72, 32,32,32,32,32,8,8,8,8,34,38,33,33,33,33,33,34,49,34,34,34,34,8,60, 34,34,34,34,34,34,34,72,32,32,32,32,32,8,8,8,8,34,34,34,34,34,34, 34,8,50,34,34,34,34,20,34,20,0,33,12,0,1,18,42,73,34,0,1,8,8,0,1, 8,12,0,1,24,16,34,8,32,34,4,34,34,16,34,34,24,24,2,0,1,16,16,32,33, 34,16,36,32,16,18,34,8,8,33,16,33,34,18,32,18,34,2,8,34,12,34,34, 8,32,8,4,8,0,3,34,34,16,38,34,16,26,34,8,4,34,8,73,34,34,34,38,16, 2,16,38,8,34,34,8,32,8,8,8,0,35,12,15,16,65,8,8,4,0,1,34,0,1,18,0, 5,127,0,3,54,10,0,4,36,79,68,79,32,33,33,33,33,33,33,72,16,32,32, 32,32,8,8,8,8,36,38,18,18,18,18,18,0,1,18,34,34,34,34,8,32,34,34, 34,34,34,34,34,72,16,34,34,34,34,8,8,8,8,34,34,34,34,34,34,34,8,34, 38,38,38,38,8,34,8,0,33,12,0,1,18,28,6,29,0,1,8,8,0,2,12,0,1,24,32, 28,8,62,28,4,28,28,16,28,28,24,24,0,3,16,28,33,60,14,56,62,16,14, 34,62,112,33,30,33,34,12,32,12,34,60,8,28,12,34,34,8,62,8,2,8,0,3, 29,60,14,26,28,16,2,34,8,4,33,8,73,34,28,60,26,16,60,14,26,8,34,34, 8,62,8,8,8,0,35,12,4,62,0,1,8,8,36,0,1,28,0,11,42,10,0,5,66,71,66, 32,33,33,33,33,33,33,79,14,62,62,62,62,62,62,62,62,56,34,12,12,12, 12,12,0,1,44,28,28,28,28,8,32,36,29,29,29,29,29,29,55,14,28,28,28, 28,8,8,8,8,28,34,28,28,28,28,28,0,1,92,26,26,26,26,8,60,8,0,36,8, 0,3,6,48,0,2,24,0,2,32,0,11,48,0,21,6,0,9,14,2,56,0,1,127,0,7,2,0, 2,4,0,5,32,2,0,7,16,0,1,6,8,48,0,35,12,0,4,8,24,0,13,32,10,0,1,4, 0,6,32,0,7,4,0,31,4,0,21,16,32,16,0,81,3,0,21,28,0,2,56,0,5,32,2, 0,7,48,0,39,12,0,19,32,0,2,24,0,6,30,0,7,24,0,31,24,0,21,48,32,48, 0,255,0,1 } ; efax-gtk-3.2.8/efax/efaxio.c0000644000175000001440000003370211466007655012530 00000000000000#include /* ANSI C */ #include #include #include #include #include #include /* For NLS */ #ifdef ENABLE_NLS #include #include #endif #include "efaxio.h" /* EFAX */ #include "efaxmsg.h" #include "efaxos.h" #include "efaxlib.h" #define MAXRESPB 1024 /* maximum bytes of modem responses saved */ char *prompts[] = { /* modem responses that are prompts */ "OOK", "-CONNECT FAX", "CCONNECT", "NNO CARRIER", "EERROR", "NNO DIALTONE", "BBUSY", "NNO ANSWER", "M+FCERROR", "VVCON", "DDATA", 0 } ; int lockpolldelay = 8000 ; /* milliseconds between checks of lock files */ /* signals to be caught so can hang up phone */ int catch [] = { CATCHSIGS, 0 } ; /* Modem features */ int c1=0, c20=0 ; /* use class 1/class 2.0 */ int c2=0 ; /* force class 2 */ int cmdpause = T_CMD ; /* delay before each init command */ int vfc = 0 ; /* virtual flow control */ uchar startchar = DC2 ; /* character to start reception */ /* response detector lookup tables */ uchar rd_nexts [ 256 ] = { 0 }, rd_allowed [ 256 ] = { 0 } ; /* Provide dummy gettext() function if there is no internationalisation support */ #ifndef ENABLE_NLS static const char *gettext ( const char *text ) { return text; } #endif /* Initialize two lookup tables used by a state machine to detect modem responses embedded in data. The first shows which characters are allowed in each state. The second shows which characters in each state increment the state. Each table is indexed by character. The detector sequences through 6 states corresponding to sequences of the form: AX... where A is an upper-case letter and X is an u.c. letter or space. The state values are 01, 02, 04, 08, 10 and 20 (hex) and are used to mask in a bit from the tables. When the state reaches 0x20 a modem response has been detected. With random data there is a small O(10^-10) chance of spurious detection. */ void rd_init ( void ) { int c ; rd_nexts[CR] = rd_allowed[CR] = 0x01 | 0x08 ; rd_nexts[LF] = rd_allowed[LF] = 0x02 | 0x10 ; for ( c='A' ; c<'Z' ; c++ ) { rd_allowed[c] = 0x04 | 0x08 ; rd_nexts[c] = 0x04 ; } rd_allowed[' '] = 0x08 ; } /* Get a modem response into buffer s, storing up to n bytes. The response includes characters from the most recent control character until the first LF following some text. Returns s or null if times-out in t deciseconds or on i/o error. Trace messages are buffered to reduce possible timing problems. */ char *tgets( TFILE *f, char *s, int len, int t ) { int i, n, c ; for ( i=n=0 ; 1 ; i++ ) { if ( ( c = tgetc ( f, t ) ) == EOF ) break ; if ( i == 0 ) msg ( "M-+ .%03d [", time_ms ( ) ) ; msg ( "M-+ %s", cname ( c ) ) ; if ( n > 0 && c == LF ) break ; if ( ! iscntrl ( c ) && n < len ) s[n++] = c ; } if ( n >= len ) msg ( "W- modem response overflow" ) ; s[ n < len ? n : len-1 ] = '\0' ; if ( i > 0 ) { if ( c == EOF ) msg ( "M- <...%.1f s>]", (float)t/10 ) ; else msg ( "M- ]" ) ; } return c == EOF ? 0 : s ; } /* Send bytes to the modem, doing bit-reversal and escaping DLEs. Returns 0 or 2 on errors. */ int sendbuf ( TFILE *f, uchar *p, int n, int dcecps ) { int err=0, c, over ; uchar *order = f->obitorder ; uchar buf [ MINWRITE+1 ] ; int i ; for ( i=0 ; ! err && n > 0 ; n-- ) { c = order [ *p++ ] ; if ( c == DLE ) buf[i++] = DLE ; buf[i++] = c ; if ( i >= MINWRITE || n == 1 ) { /* ``virtual'' flow control */ if ( vfc && dcecps > 0 ) { over = f->bytes - ( proc_ms ( ) - f->mstart ) * dcecps / 1000 - MAXDCEBUF ; if ( over > 0 ) msleep ( over * 1000 / dcecps ) ; } if ( tput ( f, buf, i ) < 0 ) err = msg ( "ES2 %s", gettext ( "fax device write error:" ) ) ; i = 0 ; } } return err ; } /* Scan responses since giving previous command (by cmd()) for a match to string 's' at start of response. If a matching response is found it finds the start of the data field which is defined as the next non-space character in the current or any subsequent responses. If ip is not null, reads one integer (decimal format) into ip. [problem: Class 2.0 status responses are in hex.] Returns pointer to start of data field of response string or NULL if not found. */ char responses [ MAXRESPB ], *lresponse = responses ; char *sresponse ( char *s, int *ip ) { char *p, *r = 0 ; int lens, lenr ; lens = strlen ( s ) ; for ( p=responses ; p 0 ) msg ( "R read value %d from \"%s\"", *ip, r ) ; } } return r ; } /* Search for the string s in responses since last command. Skips lines beginning with "AT" (command echo) and removes trailing spaces. Returns pointer to the string or NULL if not found. */ char *strinresp ( char *s ) { char *p, *r = 0 ; for ( p=responses ; p= CMDBUFSIZE-4 ) { message = strdup2 ( "E ", gettext ( "modem command \"%s\" too long" ) ) ; if ( message ) { msg ( message, s ) ; free ( message ) ; } } else { sprintf ( buf, "AT%s\r", s ) ; tput ( f, (uchar*) buf, strlen(buf) ) ; } } if ( t ) { msg ( "C- waiting %.1f s", ((float) t)/10 ) ; while ( ( p = tgets ( f, buf, CMDBUFSIZE, t ) ) ) { if ( ( resplen += strlen ( buf ) + 1 ) <= MAXRESPB ) { strcpy ( lresponse, buf ) ; lresponse += strlen ( buf ) + 1 ; } if ( ( p = strtabmatch ( (char**) prompts, buf ) ) ) { msg ( "C- response \"%s\"", buf ) ; break ; } if ( ! strcmp ( buf, "RING" ) ) { msleep ( 100 ) ; goto retry ; } } } return p ? *p : EOF ; } /* Send command to modem and wait for reply after testing (and possibly setting) current error status via err pointer. Returns 0 if err is already set, command response, or EOF on timeout. */ int ckcmd ( TFILE *f, int *err, char *s, int t, int r ) { int c=0 ; char *message ; if ( ( ! err || ! *err ) && ( c = cmd ( f, s, t ) ) != r && r ) { if ( c == EOF ) { if ( s ) { message = strdup2 ( err ? "E " : "W ", gettext ( "timed out after command: %s" ) ) ; if ( message ) { msg ( message, s ) ; free ( message ) ; } } else { msg ( err ? "E %s" : "W %s", gettext ( "timed out after waiting" ) ) ; } } else { if ( s ) { message = strdup2 ( err ? "E " : "W ", gettext ( "wrong response after command: %s" ) ) ; if ( message ) { msg ( message, s ) ; free ( message ) ; } } else { msg ( err ? "E %s" : "W %s", gettext ( "wrong response after waiting" ) ) ; } } if ( err ) *err = 3 ; } return c ; } /* Resynchronize modem from an unknown state. If no immediate response, try pulsing DTR low (needs &D{2,3,4}), and then cancelling data or fax data modes. In each case, discards any responses for about 2 seconds and then tries command ATQ0V1 to enable text responses. Returns 0 if OK or 4 if no response. */ int modemsync ( TFILE *f ) { int err=0, method=0 ; for ( method=0 ; ! err ; method++ ) { switch ( method ) { case 0 : break ; case 1 : ttymode ( f, VOICECOMMAND ) ; break ; case 2 : msg ("I %s", gettext ( "sync: dropping DTR" ) ) ; ttymode ( f, COMMAND ) ; msleep ( 200 ) ; ttymode ( f, DROPDTR ) ; msleep ( 200 ) ; ttymode ( f, COMMAND ) ; break ; case 3 : msg ("I %s", gettext ( "sync: sending escapes" ) ) ; ttymode ( f, VOICECOMMAND ) ; tput ( f, (uchar*) CAN_STR, 1 ) ; tput ( f, (uchar*) DLE_ETX, 2 ) ; msleep ( 100 ) ; ttymode ( f, COMMAND ) ; tput ( f, (uchar*) CAN_STR, 1 ) ; tput ( f, (uchar*) DLE_ETX, 2 ) ; msleep ( 1500 ) ; tput ( f, (uchar*) "+++", 3 ) ; break ; case 4 : err = msg ("E4 %s", gettext ( "sync: modem not responding" ) ) ; continue ; } while ( method && cmd ( f, 0, 20 ) != EOF ) ; if ( cmd ( f, "Q0V1", -20 ) == OK ) break ; } return err ; } /* Set up modem by sending initialization/reset commands. Accepts either OK or CONNECT responses. Optionally changes baud rate if a command begins with a number. Returns 0 if OK, 3 on errors. */ int setup ( TFILE *f, char **cmds, int ignerr ) { int err=0 ; char c, *message ; for ( ; ! err && *cmds ; cmds++ ) { #if 0 if ( *cmds && isdigit( (unsigned char) **cmds ) ) { } #endif if ( ( c = cmd ( f, *cmds, -TO_RESET ) ) != OK && c != VCONNECT && ! ignerr ) { if ( *cmds ) { /* Translator: the %s format item refers to the text of the failed command */ message = strdup2 ( "E3 ", gettext ( "modem command (%s) failed" ) ) ; if ( message ) { err = msg ( message, *cmds ) ; free ( message ) ; } } else { err = msg ( "E3 %s", gettext ( "modem command failed" ) ) ; } } } return err ; } /* Terminate session. Makes sure modem is responding, sends modem reset commands or hang-up command if none, removes lock files. Returns 0 if OK, 3 on error.*/ int end_session ( TFILE *f, char **zcmd, char **lkfile, int sync ) { int err = 0 ; if ( f && sync ) err = modemsync ( f ) ; if ( f && zcmd && ! err && sync ) err = setup ( f, zcmd, 0 ) ; if ( f ) ttymode ( f, ORIGINAL ) ; if ( lkfile ) unlockall ( lkfile ) ; return err ; } /* Initialize session. Try locking and opening fax device until opened or get error. Then set tty modes, register signal handler, set up modem. Returns 0 if OK, 2 on errors, 3 if initialization failed, 4 if no modem response. */ int begin_session ( TFILE *f, char *fname, int reverse, int hwfc, char **lkfile, ttymodes mode, void (*onsig) (int) ) { int i, err=0, busy=0, minbusy=0 ; char *message ; #ifdef ENABLE_NLS gsize written = 0 ; char *conv_fname ; #endif do { err = lockall ( lkfile, busy >= minbusy ) ; if ( ! err ) err = ttyopen ( f, fname, reverse, hwfc ) ; if ( err == 1 ) { if ( busy++ >= minbusy ) { /* Translator: the %s formatting item refers to the device name which is locked or busy */ message = strdup2 ( "W ", gettext ( "%s locked or busy - waiting" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( fname, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( fname, -1, NULL, &written, NULL ) ; if ( conv_fname ) { msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { msg ( message, fname ) ; } #else msg ( message, fname ) ; #endif free ( message ) ; } minbusy = minbusy ? minbusy*2 : 1 ; } msleep ( lockpolldelay ) ; } } while ( err == 1 ) ; if ( ! err ) { /* Translator: the %s formatting item refers to the device name which has been opened */ message = strdup2 ( "I ", gettext ( "opened %s" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( fname, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( fname, -1, NULL, &written, NULL ) ; if ( conv_fname ) { msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { msg ( message, fname ) ; } #else msg ( message, fname ) ; #endif free ( message ) ; } } if ( ! err ) err = ttymode ( f, mode ) ; if ( ! err ) { rd_init ( ) ; f->rd_state = RD_BEGIN ; } for ( i=0 ; ! err && catch [ i ] ; i++ ) if ( signal ( catch [ i ], onsig ) == SIG_ERR ) err = msg ( "ES2can't set signal %d handler:", catch [ i ] ) ; if ( !err ) err = modemsync ( f ) ; return err ; } efax-gtk-3.2.8/efax/efaxio.c.orig0000644000175000001440000002660211466007655013470 00000000000000#include /* ANSI C */ #include #include #include #include "efaxio.h" /* EFAX */ #include "efaxmsg.h" #include "efaxos.h" #define MAXRESPB 1024 /* maximum bytes of modem responses saved */ char *prompts[] = { /* modem responses that are prompts */ "OOK", "-CONNECT FAX", "CCONNECT", "NNO CARRIER", "EERROR", "NNO DIALTONE", "BBUSY", "NNO ANSWER", "M+FCERROR", "VVCON", "DDATA", 0 } ; int lockpolldelay = 8000 ; /* milliseconds between checks of lock files */ /* signals to be caught so can hang up phone */ int catch [] = { CATCHSIGS, 0 } ; /* Modem features */ int c1=0, c20=0 ; /* use class 1/class 2.0 */ int c2=0 ; /* force class 2 */ int cmdpause = T_CMD ; /* delay before each init command */ int vfc = 0 ; /* virtual flow control */ uchar startchar = DC2 ; /* character to start reception */ /* response detector lookup tables */ uchar rd_nexts [ 256 ] = { 0 }, rd_allowed [ 256 ] = { 0 } ; /* Initialize two lookup tables used by a state machine to detect modem responses embedded in data. The first shows which characters are allowed in each state. The second shows which characters in each state increment the state. Each table is indexed by character. The detector sequences through 6 states corresponding to sequences of the form: AX... where A is an upper-case letter and X is an u.c. letter or space. The state values are 01, 02, 04, 08, 10 and 20 (hex) and are used to mask in a bit from the tables. When the state reaches 0x20 a modem response has been detected. With random data there is a small O(10^-10) chance of spurious detection. */ void rd_init ( void ) { int c ; rd_nexts[CR] = rd_allowed[CR] = 0x01 | 0x08 ; rd_nexts[LF] = rd_allowed[LF] = 0x02 | 0x10 ; for ( c='A' ; c<'Z' ; c++ ) { rd_allowed[c] = 0x04 | 0x08 ; rd_nexts[c] = 0x04 ; } rd_allowed[' '] = 0x08 ; } /* Get a modem response into buffer s, storing up to n bytes. The response includes characters from the most recent control character until the first LF following some text. Returns s or null if times-out in t deciseconds or on i/o error. Trace messages are buffered to reduce possible timing problems. */ char *tgets( TFILE *f, char *s, int len, int t ) { int i, n, c ; for ( i=n=0 ; 1 ; i++ ) { if ( ( c = tgetc ( f, t ) ) == EOF ) break ; if ( i == 0 ) msg ( "M-+ .%03d [", time_ms ( ) ) ; msg ( "M-+ %s", cname ( c ) ) ; if ( n > 0 && c == LF ) break ; if ( ! iscntrl ( c ) && n < len ) s[n++] = c ; } if ( n >= len ) msg ( "W- modem response overflow" ) ; s[ n < len ? n : len-1 ] = '\0' ; if ( i > 0 ) { if ( c == EOF ) msg ( "M- <...%.1f s>]", (float)t/10 ) ; else msg ( "M- ]" ) ; } return c == EOF ? 0 : s ; } /* Send bytes to the modem, doing bit-reversal and escaping DLEs. Returns 0 or 2 on errors. */ int sendbuf ( TFILE *f, uchar *p, int n, int dcecps ) { int err=0, c, over ; uchar *order = f->obitorder ; uchar buf [ MINWRITE+1 ] ; int i ; for ( i=0 ; ! err && n > 0 ; n-- ) { c = order [ *p++ ] ; if ( c == DLE ) buf[i++] = DLE ; buf[i++] = c ; if ( i >= MINWRITE || n == 1 ) { /* ``virtual'' flow control */ if ( vfc && dcecps > 0 ) { over = f->bytes - ( proc_ms ( ) - f->mstart ) * dcecps / 1000 - MAXDCEBUF ; if ( over > 0 ) msleep ( over * 1000 / dcecps ) ; } if ( tput ( f, buf, i ) < 0 ) err = msg ( "ES2fax device write error:" ) ; i = 0 ; } } return err ; } /* Scan responses since giving previous command (by cmd()) for a match to string 's' at start of response. If a matching response is found it finds the start of the data field which is defined as the next non-space character in the current or any subsequent responses. If ip is not null, reads one integer (decimal format) into ip. [problem: Class 2.0 status responses are in hex.] Returns pointer to start of data field of response string or NULL if not found. */ char responses [ MAXRESPB ], *lresponse = responses ; char *sresponse ( char *s, int *ip ) { char *p, *r = 0 ; int lens, lenr ; lens = strlen ( s ) ; for ( p=responses ; p 0 ) msg ( "R read value %d from \"%s\"", *ip, r ) ; } } return r ; } /* Search for the string s in responses since last command. Skips lines beginning with "AT" (command echo) and removes trailing spaces. Returns pointer to the string or NULL if not found. */ char *strinresp ( char *s ) { char *p, *r = 0 ; for ( p=responses ; p= CMDBUFSIZE-4 ) { msg ( "E modem command \"%s\" too long", s ) ; } else { sprintf ( buf, "AT%s\r", s ) ; tput ( f, buf, strlen(buf) ) ; } } if ( t ) { msg ( "C- waiting %.1f s", ((float) t)/10 ) ; while ( ( p = tgets ( f, buf, CMDBUFSIZE, t ) ) ) { if ( ( resplen += strlen ( buf ) + 1 ) <= MAXRESPB ) { strcpy ( lresponse, buf ) ; lresponse += strlen ( buf ) + 1 ; } if ( ( p = strtabmatch ( (char**) prompts, buf ) ) ) { msg ( "C- response \"%s\"", buf ) ; break ; } if ( ! strcmp ( buf, "RING" ) ) { msleep ( 100 ) ; goto retry ; } } } return p ? *p : EOF ; } /* Send command to modem and wait for reply after testing (and possibly setting) current error status via err pointer. Returns 0 if err is already set, command response, or EOF on timeout. */ int ckcmd ( TFILE *f, int *err, char *s, int t, int r ) { int c=0 ; if ( ( ! err || ! *err ) && ( c = cmd ( f, s, t ) ) != r && r ) { msg ( err ? "E %s %s %s" : "W %s %s %s", c == EOF ? "timed out" : "wrong response", s ? "after command: " : "after waiting", s ? s : "" ) ; if ( err ) *err = 3 ; } return c ; } /* Resynchronize modem from an unknown state. If no immediate response, try pulsing DTR low (needs &D{2,3,4}), and then cancelling data or fax data modes. In each case, discards any responses for about 2 seconds and then tries command ATQ0V1 to enable text responses. Returns 0 if OK or 4 if no response. */ int modemsync ( TFILE *f ) { int err=0, method=0 ; for ( method=0 ; ! err ; method++ ) { switch ( method ) { case 0 : break ; case 1 : ttymode ( f, VOICECOMMAND ) ; break ; case 2 : msg ("Isync: dropping DTR") ; ttymode ( f, COMMAND ) ; msleep ( 200 ) ; ttymode ( f, DROPDTR ) ; msleep ( 200 ) ; ttymode ( f, COMMAND ) ; break ; case 3 : msg ("Isync: sending escapes") ; ttymode ( f, VOICECOMMAND ) ; tput ( f, CAN_STR, 1 ) ; tput ( f, DLE_ETX, 2 ) ; msleep ( 100 ) ; ttymode ( f, COMMAND ) ; tput ( f, CAN_STR, 1 ) ; tput ( f, DLE_ETX, 2 ) ; msleep ( 1500 ) ; tput ( f, "+++", 3 ) ; break ; case 4 : err = msg ("E4sync: modem not responding") ; continue ; } while ( method && cmd ( f, 0, 20 ) != EOF ) ; if ( cmd ( f, "Q0V1", -20 ) == OK ) break ; } return err ; } /* Set up modem by sending initialization/reset commands. Accepts either OK or CONNECT responses. Optionally changes baud rate if a command begins with a number. Returns 0 if OK, 3 on errors. */ int setup ( TFILE *f, char **cmds, int ignerr ) { int err=0 ; char c ; for ( ; ! err && *cmds ; cmds++ ) { #if 0 if ( *cmds && isdigit( **cmds ) ) { } #endif if ( ( c = cmd ( f, *cmds, -TO_RESET ) ) != OK && c != VCONNECT && ! ignerr ) { err = msg ( "E3modem command (%s) failed", *cmds ? *cmds : "none" ) ; } } return err ; } /* Terminate session. Makes sure modem is responding, sends modem reset commands or hang-up command if none, removes lock files. Returns 0 if OK, 3 on error.*/ int end_session ( TFILE *f, char **zcmd, char **lkfile, int sync ) { int err = 0 ; if ( f && sync ) err = modemsync ( f ) ; if ( f && zcmd && ! err && sync ) err = setup ( f, zcmd, 0 ) ; if ( f ) ttymode ( f, ORIGINAL ) ; if ( lkfile ) unlockall ( lkfile ) ; return err ; } /* Initialize session. Try locking and opening fax device until opened or get error. Then set tty modes, register signal handler, set up modem. Returns 0 if OK, 2 on errors, 3 if initialization failed, 4 if no modem response. */ int begin_session ( TFILE *f, char *fname, int reverse, int hwfc, char **lkfile, ttymodes mode, void (*onsig) (int) ) { int i, err=0, busy=0, minbusy=0 ; do { err = lockall ( lkfile, busy >= minbusy ) ; if ( ! err ) err = ttyopen ( f, fname, reverse, hwfc ) ; if ( err == 1 ) { if ( busy++ >= minbusy ) { msg ( "W %s locked or busy. waiting.", fname ) ; minbusy = minbusy ? minbusy*2 : 1 ; } msleep ( lockpolldelay ) ; } } while ( err == 1 ) ; if ( ! err ) msg ( "Iopened %s", fname ) ; if ( ! err ) err = ttymode ( f, mode ) ; if ( ! err ) { rd_init ( ) ; f->rd_state = RD_BEGIN ; } for ( i=0 ; ! err && catch [ i ] ; i++ ) if ( signal ( catch [ i ], onsig ) == SIG_ERR ) err = msg ( "ES2can't set signal %d handler:", catch [ i ] ) ; if ( !err ) err = modemsync ( f ) ; return err ; } efax-gtk-3.2.8/efax/efaxos.c0000644000175000001440000002763011466007655012545 00000000000000/* efaxos.c - O/S-dependent routines Copyright 1995, Ed Casas */ #include #include #include #include #include #include #include #include #include #include #ifndef FD_SET #include /* for AIX */ #endif #include "efaxlib.h" #include "efaxmsg.h" #include "efaxos.h" #ifdef USE_TERMIO #include #include #define termios termio #define tcgetattr(fd, pt) ioctl(fd, TCGETA, pt) #define tcsetattr(fd, x, pt) ioctl(fd, TCSETAW, pt) #define cfsetospeed(pt, b) ((pt)->c_cflag = ((pt)->c_cflag & ~CBAUD) | b) #define cfsetispeed(pt, b) #define tcdrain(fd) #else #include #endif #ifdef TIOCSSOFTCAR #include #endif #ifndef CRTSCTS #define CRTSCTS 0 #endif /* The milliseconds portion of the current time. If your system does not provide gettimeofday(3) you can safely substitute a dummy function that returns 0. This will cause the milliseconds portion of time stamps to be printed as 0. */ int time_ms ( void ) { struct timeval tv ; gettimeofday ( &tv, NULL ) ; return (int) ( tv.tv_usec / 1000 ) ; } /* Process elapsed time in milliseconds. This is used for ``virtual flow control'' only. */ long proc_ms ( void ) { struct timeval t ; static int init=0 ; static struct timeval s ; if ( ! init ) { gettimeofday ( &s, 0 ) ; init = 1 ; } gettimeofday ( &t, 0 ) ; return ( t.tv_sec - s.tv_sec ) * 1000 + ( t.tv_usec - s.tv_usec ) / 1000 ; } /* Wait for t millisecond (for systems without usleep). */ void msleep ( int t ) { struct timeval timeout ; timeout.tv_sec = t / 1000 ; timeout.tv_usec = ( t % 1000 ) * 1000 ; if ( select ( 1 , 0 , 0 , 0 , &timeout ) < 0 ) msg ("ES2select failed in msleep:") ; } /* Return number of characters ready to read or < 0 on error. t is tenths of a second of idle time before timing out. If t is negative, waits forever. */ int tdata ( TFILE *f, int t ) { int n, err=0 ; fd_set fds ; struct timeval timeout ; if ( f->fd < 0 ) msg ( "Ecan't happen (faxdata)" ) ; timeout.tv_sec = t / 10 ; timeout.tv_usec = ( t % 10 ) * 100000 ; FD_ZERO ( &fds ) ; FD_SET ( f->fd, &fds ) ; do { n = select ( f->fd + 1, &fds, 0, 0, t<0 ? 0 : &timeout ) ; if ( n < 0 ) { if ( errno == EINTR ) { msg ( "W0 select() interrupted in tdata()" ) ; } else { err = msg ( "ES2 select() failed in tdata():" ) ; } } } while ( n < 0 && ! err ) ; return n ; } /* tundrflw is called only by the tgetc() macro when the buffer is empty. t is maximum idle time before giving up. Returns number of characters read or EOF on timeout or errors. */ int tundrflw ( TFILE *f, int t ) { int n ; n = tdata ( f, t ) ; if ( n > 0 ) if ( ( n = read( f->fd, f->ibuf, IBUFSIZE ) ) < 0 ) msg ( "ES2fax device read:" ) ; f->iq = ( f->ip = f->ibuf ) + ( n > 0 ? n : 0 ) ; return n > 0 ? n : EOF ; } /* tgetd returns the next data character after removing DLE escapes, DLE-ETX terminators and fixing bit order. Evaluates to the next character, EOF on error/timeout, or -2 on DLE-ETX. */ int tgetd ( TFILE *f, int t ) { int c ; if ( ( c = tgetc(f,t) ) < 0 ) c = EOF ; else if ( c != DLE ) c = f->ibitorder[c] ; else { /* escape sequence */ c = tgetc(f,t) ; if ( c == ETX ) c = -2 ; else if ( c == DLE || c == SUB ) c = f->ibitorder [ DLE ] ; else c = msg ( "W0invalid escape sequence (DLE-%s) in data", cname(c) ) ; } return c ; } /* Write buffer to modem. Returns 0 or EOF on error. */ int tput ( TFILE *f, uchar *p, int n ) { int m=0 ; while ( n > 0 && ( m = write( f->fd, p, n ) ) > 0 ) { if ( m != n ) msg ( "Wonly wrote %d of %d bytes", m, n ) ; n -= m ; p += m ; } if ( m < 0 ) msg ( "ES2fax device write:" ) ; return m ; } /* Compare current termios state with termios struct t. Returns 0 if equal, 1 otherwise. */ int ckfld ( char *field, int set, int get ) { return set == get ? 0 : msg ( "W1 termios.%s is 0%08o, not 0%08o", field, get, set ) ; } int checktermio ( struct termios *t, TFILE *f ) { struct termios s ; int err=0 ; s.c_iflag=s.c_oflag=s.c_lflag=s.c_cflag=s.c_cc[VMIN]=s.c_cc[VTIME]=0 ; if ( tcgetattr ( f->fd , &s ) ) err = msg ("ES2tcgetattr failed:") ; if ( ! err ) return ckfld ( "iflag" , t->c_iflag, s.c_iflag ) || ckfld ( "oflag" , t->c_oflag , s.c_oflag ) || ckfld ( "lflag" , t->c_lflag , s.c_lflag ) || ckfld ( "cflag" , t->c_cflag , s.c_cflag ) || ckfld ( "START" , t->c_cc[VSTART] , s.c_cc[VSTART] ) || ckfld ( "STOP" , t->c_cc[VSTOP] , s.c_cc[VSTOP] ) || ckfld ( "MIN" , t->c_cc[VMIN] , s.c_cc[VMIN] ) || ckfld ( "TIME" , t->c_cc[VTIME] , s.c_cc[VTIME] ) ; return err ; } /* Set serial port mode. Sets raw, 8-bit, 19.2 kbps mode with no flow control or as required. Break and parity errors are ignored. CLOCAL means DCD is ignored since some modems apparently drop it during the fax session. Flow control is only used when sending. Returns 0 or 2 on error. */ int ttymode ( TFILE *f, enum ttymodes mode ) { int err=0, i ; static struct termios t, oldt, *pt ; static int saved=0 ; if ( ! saved ) { if ( tcgetattr ( f->fd, &oldt ) ) err = msg ( "ES2tcgetattr on fd=%d failed:", f->fd ) ; else saved=1 ; } t.c_iflag = IGNBRK | IGNPAR ; t.c_oflag = 0 ; t.c_cflag = CS8 | CREAD | CLOCAL ; t.c_lflag = 0 ; for ( i=0 ; ihwfc ? CRTSCTS : 0 ; case VOICECOMMAND : cfsetospeed ( pt, B38400 ) ; cfsetispeed ( pt, B38400 ) ; break ; case SEND : t.c_iflag |= IXON ; t.c_cflag |= f->hwfc ? CRTSCTS : 0 ; case COMMAND : cfsetospeed ( pt, B19200 ) ; cfsetispeed ( pt, B19200 ) ; break ; case DROPDTR : cfsetospeed ( pt, B0 ) ; break ; case ORIGINAL : if ( saved ) pt = &oldt ; break ; default : err = msg ("E2can't happen(ttymode)") ; break ; } if ( ! err && tcsetattr ( f->fd, TCSADRAIN, pt ) ) err = msg ( "ES2tcsetattr on fd=%d failed:", f->fd ) ; if ( ! err && checktermio ( pt, f ) ) msg ( "Wterminal mode not set properly" ) ; tcflow ( f->fd, TCOON ) ; /* in case XON got lost */ return err ; } /* Initialize TFILE data structure. Bit ordering: serial devices transmit LS bit first. T.4/T.30 says MS bit is sent first. `Normal' order therefore reverses bit order. */ void tinit ( TFILE *f, int fd, int reverse, int hwfc ) { f->ip = f->iq = f->ibuf ; f->obitorder = normalbits ; f->ibitorder = reverse ? reversebits : normalbits ; f->fd = fd ; f->hwfc = hwfc ; if ( ! normalbits[1] ) initbittab () ; } /* Open a serial fax device as a TFILE. Returns 0 if OK, 1 if busy, 2 on error. */ int ttyopen ( TFILE *f, char *fname, int reverse, int hwfc ) { int flags, err=0 ; tinit ( f, open ( fname, O_RDWR | O_NDELAY | O_NOCTTY ), reverse, hwfc ) ; if ( f->fd < 0 ) { if ( errno == EBUSY ) { err = 1 ; } else { err = msg ( "ES2can't open serial port %s:", fname ) ; } } if ( ! err ) { if ( ( flags = fcntl( f->fd, F_GETFL, 0 ) ) < 0 || fcntl( f->fd, F_SETFL, ( flags & ~O_NDELAY ) ) < 0 ) err = msg ( "ES2fax device fcntl failed %s:", fname ) ; } #ifdef TIOCSSOFTCAR { int arg = 1 ; if ( ! err ) if ( ioctl ( f->fd, TIOCSSOFTCAR, &arg ) ) msg ("WS unable to set software carrier:" ) ; } #endif return err ; } /* UUCP-style device locking using lock files */ /* Test for UUCP lock file & remove stale locks. Returns 0 on null file name or if no longer locked, 1 if locked by another pid, 2 on error, 3 if locked by us. */ int ttlocked ( char *fname, int log ) { int err=0, ipid ; FILE *f ; pid_t pid = 0 ; char buf [ EFAX_PATH_MAX ] = "" ; if ( fname && *fname == BINLKFLAG ) fname++ ; if ( fname && ( f = fopen ( fname , "r" ) ) ) { if ( fread ( buf, sizeof(char), EFAX_PATH_MAX-1, f ) == sizeof(pid_t) || sscanf ( buf, "%d" , &ipid ) != 1 ) { pid = * (pid_t *) buf ; if ( log ) msg ("X+ read binary pid %d from %s", (int) pid, fname ) ; } else { char *p ; pid = (pid_t) ipid ; if ( log ) { msg ( "X+ read HDB pid %d [", (int) pid ) ; for ( p=buf ; *p ; p++ ) msg ( "X+ %s", cname ( *p ) ) ; msg ( "X+ ] from %s", fname ) ; } } if ( kill ( pid, 0 ) && errno == ESRCH ) { if ( log ) msg ("X - stale" ) ; if ( remove ( fname ) ) err = msg ( "ES2can't remove stale lock %s from pid %d:", fname, pid ) ; else err = msg ( "I0removed stale lock %s from pid %d", fname, pid ) ; } else { if ( pid != getpid() ) { err = 1 ; if ( log ) msg ( "X1 (not our pid)" ) ; } else { err = 3 ; if ( log ) msg ( "X3 (our pid)" ) ; } } fclose ( f ) ; } return err ; } /* Create UUCP (text or binary) lock file. Returns 0 on null file name or if created, 1 if locked by another pid, 2 on error, 3 if locked by us. */ int ttlock ( char *fname, int log ) { int err=0, dirlen, bin=0 ; FILE *f=0 ; pid_t pid = getpid ( ) ; char *p , buf [ EFAX_PATH_MAX ] = "" ; if ( fname && *fname == BINLKFLAG ) { fname++ ; bin = 1 ; } err = ttlocked ( fname, log ) ; if ( ! err ) { dirlen = ( p = strrchr( fname , '/' ) ) ? p-fname+1 : strlen ( fname ) ; sprintf ( buf , "%.*sTMP..%05d" , dirlen , fname , (int) pid ) ; if ( ! ( f = fopen( buf, "w" ) ) ) err = msg ( "ES2can't open pre-lock file %s:", buf ) ; } if ( ! err && f ) { if ( bin ) { if ( fwrite ( &pid, sizeof(pid_t), 1, f ) < 1 ) err = msg ( "ES2can't write pre-lock file %s:", buf ) ; } else { if ( fprintf ( f, "%10d\n", (int) pid ) < 0 ) err = msg ( "ES2can't write pre-lock file %s:", buf ) ; } } if ( ! err && f ) { if ( rename ( buf , fname ) == 0 ) { chmod ( fname , 0444 ) ; msg ( "Xcreated %s lock file %s", bin ? "binary" : "text", fname ) ; } else { err = ttlocked ( fname, log ) ; if ( ! err ) err = msg ( "ES2can't rename lock file %s to %s:", buf, fname ) ; } } if ( f ) { fclose ( f ) ; if ( err ) remove ( buf ) ; } return err ; } /* Remove lock file. Returns 0 on null file name, doesn't exist, or was removed, 1 if the lock is to another pid, 2 on errors. */ int ttunlock ( char *fname ) { int err = 0 ; if ( fname && *fname == BINLKFLAG ) fname++ ; switch ( ttlocked ( fname, 1 ) ) { case 0: break ; case 1: err = msg ( "E1won't remove lock %s (not ours)" , fname ) ; break ; case 2: err = 2 ; break ; case 3: if ( remove ( fname ) ) { err = msg ( "ES2can't remove lock %s:", fname ) ; } else { err = msg ( "X0removed lock file %s", fname ) ; } break ; default: err = msg ( "E2can't happen (ttunlock)" ) ; break ; } return err ; } /* Lock all lock files and possibly log attempt if log=1. Returns 0 if all locks [already] applied, 1 if any are locked to other pids, 2 on any errors. */ int lockall ( char **lkfiles, int log ) { int err = 0 ; char **p = lkfiles ; while ( *p && **p && ! err ) if ( ( err = ttlock ( *p++, log ) ) == 3 ) err = 0 ; return err ; } /* Remove all lock files. Returns 0 if all locks removed, 2 on errors. */ int unlockall ( char **lkfiles ) { int err = 0, i ; char **p = lkfiles ; while ( *p && **p ) if ( ( i = ttunlock ( *p++ ) ) != 0 ) err = i ; return err ; } /* Return basename of the argument or the whole thing if can't find it. */ char *efaxbasename ( char *p ) { return strrchr ( p , '/' ) ? strrchr ( p , '/' ) + 1 : p ; } efax-gtk-3.2.8/efax/efaxmsg.c0000644000175000001440000001562511466007655012713 00000000000000#include /* ANSI C */ #include #include #include #include #include #include #include /* For NLS */ #ifdef ENABLE_NLS #include #include #endif #include "efaxmsg.h" // there can be certain circumstances where PIPE_BUF is not // defined in . If so, just define the minimum // required by POSIX #ifndef PIPE_BUF #define PIPE_BUF 512 #endif #define MAXTSTAMP 80 /* maximum length of a time stamp */ #if PIPE_BUF>8192 #define MAXMSGBUF 4096 /* maximum status/error message bytes held */ #else #define MAXMSGBUF PIPE_BUF/2 #endif #define NLOG 2 char *verb[NLOG] = { "ewin", "" } ; char *argv0 = "" ; int nxtoptind = 1 ; /* for communication with nextopt() */ char *nxtoptarg ; int use_utf8 = 0 ; int line_buffered = 0 ; /* For systems without strerror(3) */ #ifdef NO_STRERROR extern int sys_nerr; extern char *sys_errlist[]; extern char *strerror( int i ) { return ( i >= 0 && i < sys_nerr ) ? sys_errlist[i] : "Unknown Error" ; } #endif /* Provide dummy gettext() function if there is no internationalisation support */ #ifndef ENABLE_NLS static const char *gettext ( const char *text ) { return text; } #endif /* Print time stamp. */ time_t tstamp ( time_t last, FILE *f ) { time_t now ; char tbuf [ MAXTSTAMP ] ; #ifdef ENABLE_NLS gsize written = 0 ; char *message ; #endif now = time ( 0 ) ; strftime ( tbuf, MAXTSTAMP, ( now - last > 600 ) ? "%c" : "%H:%M:%S", localtime( &now ) ) ; #ifdef ENABLE_NLS if ( use_utf8 ) { if ( g_utf8_validate ( tbuf, -1, NULL ) ) { fputs ( tbuf, f ) ; } else { message = g_locale_to_utf8 ( tbuf, -1, NULL, &written, NULL ) ; if ( message ) { fputs ( message, f ) ; g_free ( message ) ; } } } else fputs ( tbuf, f ) ; #else fputs ( tbuf, f ) ; #endif return now ; } /* Return string corresponding to character c. */ char *cname ( uchar c ) { #define CNAMEFMT "<0x%02x>" #define CNAMELEN 6+1 static char *cnametab [ 256 ] = { /* character names */ "","","","", "","","","", "", "", "", "", "", "", "", "", "","","","","","","","", "","", "","", "", "", "", "" } ; static char names[ (127-32)*2 + 129*(CNAMELEN) ] ; char *p=names ; static int i=0 ; if ( ! i ) { for ( i=32 ; i<256 ; i++ ) { cnametab [ i ] = p ; sprintf ( p, i<127 ? "%c" : CNAMEFMT, i ) ; p += strlen ( p ) + 1 ; } } return cnametab [ c ] ; } /* Print a message with a variable number of printf()-type arguments if the first character appears in the global verb[ose] string. Other leading characters and digits do additional actions: + allows the message to be continued on the same line, '-' buffers the message instead of printing it, E, and W expand into strings, S prints the error message for the most recent system error, a digit sets the return value, a space ends prefix but isn't printed. Returns 0 if no prefix digit. */ enum msgflags { E=0x01, W=0x02, S=0x04, NOFLSH=0x08, NOLF=0x10 } ; int msg ( char *fmt, ... ) { static int init=0 ; static FILE *logfile [ NLOG ] ; static char msgbuf [ NLOG ] [ MAXMSGBUF ] ; static time_t logtime [ NLOG ] = { 0, 0 } ; static int atcol1 [ NLOG ] = { 1, 1 } ; int err=0, i, flags=0 ; char *p; va_list ap ; #ifdef ENABLE_NLS gsize written = 0 ; char *message ; #endif if ( ! init ) { logfile[0] = stderr ; logfile[1] = stdout ; for ( i=0 ; i= argc || *(a = argv[nxtoptind]) != '-' ) return -1 ; nxtoptind++ ; if ( ! *(a+1) || ( ( p = strchr ( args, *(a+1) ) ) == 0 ) ) return msg ( "Eunknown option (%s)", a ), '?' ; if ( *(p+1) != ':' ) nxtoptarg = 0 ; else if ( *(a+2) ) nxtoptarg = a+2 ; else if ( nxtoptind >= argc ) return msg ( "Eno argument for (%s)", a ), '?' ; else nxtoptarg = argv [ nxtoptind++ ] ; return *(a+1) ; } efax-gtk-3.2.8/efax/efaxos.h0000644000175000001440000000454411466007655012551 00000000000000#ifndef _EFAXOS_H #define _EFAXOS_H #include #include "efaxlib.h" /* signals to be caught */ #define ANSISIGS SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM #define UNIXSIGS SIGHUP, SIGQUIT, SIGIOT, SIGALRM #define CATCHSIGS ANSISIGS, UNIXSIGS /* Bit order reversal table. */ extern unsigned char normalbits [ ] ; typedef enum ttymodes /* serial port modes: */ { COMMAND, /* 19200 8N1, no f/c, DTR high */ SEND, /* 19200 send-only XON/XOFF f/c */ VOICECOMMAND, /* 38400 8N1, no f/c, DTR high */ VOICESEND, /* 38400 send-only XON/XOFF f/c*/ DROPDTR, /* ", DTR low */ ORIGINAL /* restore original settings */ } ttymodes ; /* OS-specific i/o & delay functions */ /* We define new stream i/o macros because it's not possible to do non-blocking reads/writes with C stream i/o [UNIX select() gives the status of the file, not the stream buffer].*/ #define IBUFSIZE 1024 /* read up to this many bytes at a time from fax */ #define OBUFSIZE 1024 /* maximum bytes to write at a time to fax */ typedef struct tfilestruct { int fd ; unsigned char *ip, *iq ; unsigned char ibuf [ IBUFSIZE ] ; unsigned char *ibitorder, *obitorder ; int bytes, pad, lines ; int hwfc ; time_t start ; long mstart ; int rd_state ; } TFILE ; /* tgetc() is a macro like getc(). It evaluates to the next character from the fax device or EOF after idle time t. */ #define tgetc(f,t) ( (f)->ip >= (f)->iq && tundrflw(f,t) == EOF ? EOF : \ *(unsigned char*)(f)->ip++ ) int tundrflw ( TFILE *f, int t ) ; int tgetd ( TFILE *f, int t ) ; int tput ( TFILE *f, unsigned char *p, int n ) ; int tdata ( TFILE *f, int t ) ; void tinit ( TFILE *f, int fd, int reverse, int hwfc ) ; int ttyopen ( TFILE *f, char *fname, int reverse, int hwfc ) ; int ttymode ( TFILE *f, ttymodes mode ) ; void msleep ( int t ) ; long proc_ms ( void ) ; int time_ms ( void ) ; /* POSIX execl */ extern int execl ( const char *path, const char *arg , ... ) ; /* UUCP-style device locks */ #define BINLKFLAG '#' /* prefix to force binary lock files */ /* [un]lock serial port using named files */ int lockall ( char **lkfiles, int log ) ; int unlockall ( char **lkfiles ) ; /* extract program name to be used in messages from argv0 */ char *efaxbasename ( char *p ) ; /* default fax modem device */ #define FAXFILE "/dev/modem" #endif efax-gtk-3.2.8/efax/efix.c0000644000175000001440000003203711466007655012210 00000000000000#define Copyright "Copyright 1999 Ed Casas" #define Version "efix v 0.3" /* Copyright (C) 1999 Ed Casas 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 Please contact the author if you wish to use efax or efix in ways not covered by the GNU GPL. You may contact the author by e-mail at: edc@cce.com. */ /* The call to setlocale(LC_NUMERIC, "C") was added by Chris Vine 13 September 2005 to avoid incorrect floating point representation in locales which use the comma instead of the full-stop as the decimal separator. The following patche from http://shino.pos.to/linux/efax/ also applied: efax-0.9-numlines.patch */ const char *Usage = "Usage:\n" " %s [ option ]... file... \n" "Options (defaults):\n" " -i f input format (auto):\n" " fax fax (\"Group3\") 1-D coded image\n" " text text\n" " pbm raw PBM (portable bit map)\n" " tiffg3 TIFF, Group 3 fax compression\n" " tiffraw TIFF, no compression\n" " pcx mono PCX\n" " dcx mono DCX\n" " -o f output format (tiffg3):\n" " fax fax (\"Group3\") 1-D coded image\n" " pbm Portable Bit Map\n" " pgm Portable Gray Map (decimated by 4)\n" " pcl HP-PCL (e.g. HP LaserJet)\n" " ps Postscript (e.g. Apple Laserwriter)\n" " tiffg3 TIFF, Group 3 fax compression\n" " tiffraw TIFF, no compression\n" " pcx mono PCX\n" " dcx mono DCX\n" " -n pat printf() pattern for output file name (ofile)\n" " -f fnt use PBM font file fnt for text (built-in)\n" " -l n lines per text page (66)\n" " -v lvl print messages of type in string lvl (ewi)\n" " -s XxY scale input by X and Y (Y optional) (1x1)\n" " -r XxY resolution of output is X by Y (dpi, Y optional) (204x196)\n" " -R XxY resolution of input is X by Y (dpi, Y optional) (204x196)\n" " -p WxH pad/truncate output to width W by height H (215x297mm)\n" " -d R,D displace output right R, down D (opposite if -ve) (0,0)\n" " -O f overlay file f (none)\n" " -M ignore other options and base64 (MIME) encode stdin to stdout\n" "\n" "Add 'in', 'cm', 'mm', or 'pt' to -p and -d arguments (default in[ches]).\n" "Default output size and resolution is same as input (if known).\n" ; #include /* ANSI C */ #include #include #include #include #include #include "efaxlib.h" #include "efaxmsg.h" #ifndef INT_MAX #define INT_MAX 32767 #endif /* Allowed input and output formats. *** MUST match enum *** */ char *iformatstr[] = { " 3text", " 1pbm", " 2fax", " 4tiffg3", " 4tiffraw", " 6pcx", " 6pcxraw", " 8dcx", 0 } ; char *oformatstr[] = { " 1pbm" , " 2fax", " 3pcl", " 4ps", " 5pgm", " 7tiffg3", " 8tiffraw", "11pcx", "12pcxraw", "13dcx", 0 } ; /* Look up a string in a NULL-delimited table where the first character of each string is the digit to return if the rest of the string matches. Returns the value of the digit for the matching string or -1 if no matches. */ int lookup ( char **tab, char *s ) { char **p ; for ( p=tab ; p && *p && strcmp ( *p+2, s ) ; p++ ) ; return p && *p ? atoi ( *p ) : -1 ; } /* Extract pair of values from string. If it's a `dim'ension, two values are required and they are converted to inches, else the y value is optional. Returns 0 or 2 on error. */ int getxy ( char *arg, float *x, float *y, int dim ) { int i, n, nc=0, err=0 ; char c ; static char *unitstr[] = { " 0in", " 1cm", " 2mm", " 3pt", 0 } ; static float unitval[] = { 1.0, 2.54, 25.4, 72.0, 1.0 } ; if ( ! arg ) err = msg ( "E2 missing argument" ) ; if ( !x || !y ) err = msg ( "E2 can't happen (getxy)" ) ; if ( ! err ) { n = sscanf ( arg , "%f%c%f%n", x, &c, y, &nc ) ; switch ( n ) { case 0 : err = msg ( "E2bad X value in (%s)", arg ) ; break ; case 2 : err = msg ( "E2bad Y value in (%s)", arg ) ; break ; } } if ( ! err ) { if ( dim ) { if ( n != 3 ) { err = msg ( "Emissing Y dimension in (%s)", arg ) ; } else { while ( arg [ nc ] && isspace ( arg [ nc ] ) ) nc++ ; if ( arg [ nc ] ) { if ( ( i = lookup ( unitstr, arg+nc ) ) >= 0 ) { *x /= unitval [ i ] ; *y /= unitval [ i ] ; } else { err = msg ( "E2bad units: `%s'", arg+nc ) ; } } } } else { if ( n == 1 ) *y = *x ; } } if ( ! err ) msg ( "Aconverted (%s) into %f x %f", arg, *x, *y ) ; return err ; } /* Copy stdin to stdout while applying base64 (RFC 1521) encoding. This encoding must be applied after the file is complete since some output formats (e.g. TIFF) require seeking backwards within the (binary) file. */ int base64encode ( void ) { int err=0, c ; uchar n=0, m=0, bits=0 ; static uchar chartab[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/" ; while ( ( c = fgetc ( stdin ) ) >= 0 ) { switch ( n ) { case 0: putc ( chartab [ c >> 2 ], stdout ) ; bits = c & 0x3 ; n = 1 ; break ; case 1: putc ( chartab [ (bits << 4) | ( c >> 4 ) ], stdout ) ; bits = c & 0xf ; n = 2 ; break ; case 2: putc ( chartab [ (bits << 2) | ( c >> 6 ) ], stdout ) ; putc ( chartab [ c & 0x3f ], stdout ) ; n = 0 ; if ( ++m >= 18 ) { putc ( '\n', stdout ) ; m = 0 ; } break ; } } switch ( n ) { case 0: break ; case 1: putc ( chartab [ (bits << 4) | ( 0 >> 4 ) ], stdout ) ; putc ( '=', stdout ) ; putc ( '=', stdout ) ; break ; case 2 : putc ( chartab [ (bits << 2) | ( 0 >> 6 ) ], stdout ) ; putc ( '=', stdout ) ; break ; } putc ( '\n', stdout ) ; return err ; } int main( int argc, char **argv) { int err=0, done=0, i, c ; int nr, pels, ovnr, ovpels, no ; /* run/pixel/repeat counts */ int linesout ; int page, ilines, olines ; /* page & line counts */ int xs, ys, w, h, ixsh, iysh ; /* integer scale, size & shift */ short runs [ MAXRUNS ] , ovruns [ MAXRUNS ] ; float /* defaults: */ xsc=1.0, ysc=1.0, /* scale */ xsh=0.0, ysh=0.0, /* shift */ dxres = 204.145, /* o/p res'n: 1728/215mm * 25.4 x */ dyres = 195.58, /* 7.7 * 25.4 */ dxsz = 215 / 25.4, /* o/p size: 8.5" x A4 */ dysz = 297 / 25.4 ; float /* arguments: */ axres = 0, ayres = 0, axsz = 0, aysz = 0, ainxres=0, ainyres=0 ; float /* values used: */ xres = 0, yres = 0, xsz = 0, ysz = 0 ; IFILE ifile, ovfile ; OFILE ofile ; char **ifnames, *ovfnames [ 2 ] = { 0, 0 } ; int iformat=I_AUTO, oformat=O_TIFF_FAX, pglines=0 ; char *ofname=0 ; faxfont font, *pfont=0 ; /* text font */ /* initialize */ argv0 = argv[0] ; setlocale ( LC_ALL, "" ) ; /* efix uses formatted text functions for floating point numbers, so restore the C locale for that */ setlocale ( LC_NUMERIC, "C" ) ; /* process arguments */ while ( !err && (c=nextopt(argc,argv,"n:i:o:O:v:l:f:r:s:p:d:R:M") ) != -1) { switch ( c ) { case 'n': ofname = nxtoptarg ; break ; case 'i': if ( ( iformat = lookup ( iformatstr, nxtoptarg ) ) < 0 ) err = msg ( "E2invalid input type (%s)", nxtoptarg ) ; break ; case 'o': if ( ( oformat = lookup ( oformatstr, nxtoptarg ) ) < 0 ) err = msg ( "E2invalid output type (%s)", nxtoptarg ) ; break ; case 'O': ovfnames[0] = nxtoptarg ; break ; case 'v': verb[0] = nxtoptarg ; msg ( "A " Version ) ; for ( i=0 ; i 0 ) ifile.page->xres = ainxres ; if ( ainyres > 0 ) ifile.page->yres = ainyres ; if ( ifile.page->xres <= 0 ) ifile.page->xres = dxres ; if ( ifile.page->yres <= 0 ) ifile.page->yres = dyres ; xres = axres > 0 ? axres : ifile.page->xres ; yres = ayres > 0 ? ayres : ifile.page->yres ; xsz = axsz > 0 ? axsz : ( ifile.page->w > 0 ? ifile.page->w / ifile.page->xres : dxsz ) ; ysz = aysz > 0 ? aysz : ( ifile.page->h > 0 ? ifile.page->h / ifile.page->yres : dysz ) ; w = xsz * xres + 0.5 ; /* output dimensions in pixels */ h = ysz * yres + 0.5 ; ixsh = xsh * xres ; /* x/y shifts in pixels/lines */ iysh = ysh * yres ; if ( ( w & 7 ) != 0 ) /* just about everything requires... */ msg ("Iimage width rounded to %d pixels", w = ( w + 7 ) & ~7 ) ; if ( ofile.format == O_PGM && h & 3 ) /* PGM x4 decimation requires... */ msg ("I PGM image height rounded up to %d lines", h = ( h + 3 ) & ~3 ) ; if ( w <= 0 || h <= 0 || xres < 0 || yres < 0 ) err = msg ( "E2negative/zero scaling/size/resolution" ) ; if ( ofile.format == O_PCL && /* check for strange PCL resolutions */ ( xres != yres || ( xres != 300 && xres != 150 && xres != 75 ) ) ) msg ( "Wstrange PCL resolution (%.0fx%.0f)", xres, yres ) ; if ( w > MAXBITS*8 ) /* make sure output will fit... */ err = msg( "E2requested output width too large (%d pixels)", w ) ; ofile.w = w ; ofile.h = h ; ofile.xres = xres ; ofile.yres = yres ; /* scale according to input file resolution */ xs = 256 * xsc * xres / ifile.page->xres + 0.5 ; ys = 256 * ysc * yres / ifile.page->yres + 0.5 ; if ( xs <= 0 || ys <= 0 ) err = msg ( "E2negative/zero scaling" ) ; if ( *ovfnames ) /* [re-]open overlay file */ if ( nextipage ( &ovfile , 0 ) ) { err=2 ; continue ; } if ( nextopage ( &ofile, page ) ) { err=2 ; continue ; } linesout=0 ; /* y-shift */ if ( iysh > 0 ) { writeline ( &ofile, ( ( *runs = w ), runs ), 1, iysh ) ; linesout += iysh ; } else { for ( i=0 ; i < -iysh ; i++ ) readline ( &ifile, runs, 0 ) ; } /* copy input to output */ olines = ilines = 0 ; while ( linesout < h ) { if ( ! ifile.lines || ( nr = readline ( &ifile, runs, &pels ) ) < 0 ) { break ; } else { ilines++ ; } if ( *ovfnames ) { if ( ( ovnr = readline ( &ovfile, ovruns, &ovpels ) ) >= 0 ) nr = runor ( runs, nr, ovruns, ovnr, 0, &pels ) ; } /* x-scale, x-shift & x-pad input line */ pels = ( xs == 256 ) ? pels : xscale ( runs, nr, xs ) ; pels += ( ixsh == 0 ) ? 0 : xshift ( runs, nr, ixsh ) ; nr = ( pels == w ) ? nr : xpad ( runs, nr, w - pels ) ; /* y-scale by deleting/duplicating lines. */ no = ( ( ilines * ys ) >> 8 ) - olines ; if ( linesout + no > h ) no = h - linesout ; olines += no ; writeline ( &ofile, runs, nr, no ) ; linesout += no ; } /* y-pad */ if ( linesout < h ) writeline ( &ofile, ( ( *runs = w ), runs ), 1, h - linesout ) ; if ( ferror ( ifile.f ) ) err = msg ( "ES2input error:" ) ; } nextopage ( &ofile, EOF ) ; return err ; } efax-gtk-3.2.8/efax/efaxlib.c.orig0000644000175000001440000017255711466007655013642 00000000000000/* efaxlib.c - utility routines for efax Copyright 1995 Ed Casas */ #include #include #include #include "efaxmsg.h" #include "efaxlib.h" #ifndef SEEK_SET #define SEEK_SET 0 #endif #define DEFXRES 204.145 /* fax x and y resolution in dpi */ #define DEFYRES 195.58 #define DEFWIDTH 1728 /* 215x297 mm image at fax resolution */ #define DEFHEIGHT 2287 extern t4tab wtab [ ( 64 + 27 + 13 ) + 1 ] ; /* T.4 coding tables */ extern t4tab btab [ ( 64 + 27 + 13 ) + 1 ] ; short short256 = 256 ; /* for endian-ness detection */ /* Make sure printf strings have only %d escapes and n or fewer of them. Returns 0 if OK, 1 on error. */ int ckfmt ( char *p, int n ) { for ( ; *p ; p++ ) { if ( p[0] == '%' ) { if ( p[1] == 'd' ) n-- ; else if ( p[1] == '%' ) p++ ; else n=-1 ; } } return n < 0 ; } /* Initialize state of variable-length code word encoder. */ void newENCODER ( ENCODER *e ) { e->x = 0 ; e->shift = -8 ; } /* Store a code word `code' of length `bits' (<=24) in buffer pointed to by `buf'. Bits that don't fit in complete bytes are saved between calls. To flush the remaining bits call the function with code=0 and bits=0. Returns pointer to next free element in output buffer. Calling function must ensure at least bits/8 bytes are available in buffer. */ uchar *putcode ( ENCODER *e, short code, short bits, uchar *buf ) { e->x = ( e->x << bits ) | code ; e->shift += bits ? bits : -e->shift ; while ( e->shift >= 0 ) { *buf++ = e->x >> e->shift ; e->shift -= 8 ; } return buf ; } /* Convert run lengths to 1-D T.4-codes. First run is white. Silently truncates run lengths that are too long. After using this function EOLs may need to be added and/or the putcode() buffer flushed. Returns pointer to next free element in output buffer. */ uchar *runtocode ( ENCODER *e, short *runs, int nr, uchar *codes ) { uchar col = 0, *maxcodes = codes + MAXCODES ; t4tab *ctab = wtab, *p ; short rlen ; long x ; short shift ; #define PUTCODE(p) { x = ( x << p->bits ) | p->code ; shift += p->bits ; \ while ( shift >= 0 ) { *codes++ = x >> shift ; shift -= 8 ; } } x = e->x ; shift = e->shift ; while ( nr-- > 0 ) { rlen = *runs++ ; if ( rlen > 63 ) { /* make-up code */ if ( rlen > MAXRUNLEN ) rlen = MAXRUNLEN ; p = ctab + 63 + ( rlen >> 6 ) ; if ( codes < maxcodes ) PUTCODE(p) ; } p = ctab + ( rlen & 0x3f ) ; /* terminating code */ if ( codes < maxcodes ) PUTCODE(p) ; ctab = ( col ^= 1 ) ? btab : wtab ; } e->x = x ; e->shift = shift ; return codes ; } /* Pad/truncate run-length coded scan line 'runs' of 'nr' runs by 'pad' pixels (truncate if negative). Returns the new number of runs. */ int xpad ( short *runs, int nr, int pad ) { if ( pad < 0 ) { /* truncate */ while ( pad < 0 ) pad += ( nr <= 0 ? -pad : runs [ --nr ] ) ; runs [ nr++ ] = pad ; } else { /* pad with white */ if ( nr & 1 ) runs [ nr - 1 ] += pad ; else runs [ nr++ ] = pad ; } return nr ; } /* Shift a run-length coded scan line right by s pixels (left if negative). If necessary, zero-length runs are created to avoid copying. Returns the pixel width change (+/-). */ int xshift ( short *runs, int nr, int s ) { int i=0, n=0 ; if ( s < 0 ) { for ( i = 0 ; s < 0 && i < nr ; i++ ) { s += runs [ i ] ; n -= runs [ i ] ; runs [ i ] = 0 ; } i-- ; } if ( i < nr ) { runs [ i ] += s ; n += s ; } return n ; } /* Scale nr run lengths in buffer pointed to by p to scale image horizontally. The scaling factor is xs/256. Returns new line width in pixels. */ int xscale ( short *p, int nr, int xs ) { int inlen=0, outlen=0 ; for ( ; nr-- > 0 ; p++ ) { inlen += *p ; *p = ( ( inlen * xs + 128 ) >> 8 ) - outlen ; outlen += *p ; } return outlen ; } /* Invert a run-length buffer by prepending or removing a zero-length initial run. */ int xinvert ( short *p, int nr ) { int i ; if ( ! *p ) { for ( i=0 ; i0 ; i-- ) { /* insert */ p[i] = p[i-1] ; } p[0] = 0 ; nr++ ; } return nr ; } /* Zero-terminated lists of run lengths for each byte. */ uchar byteruns [ 1408 + 1 ] = "8071061106205120511105210530413041210411110411204220421104310440" "3140313103121103122031112031111103112103113032303221032111032120" "3320331103410350215021410213110213202121202121110212210212302111" "3021112102111111021111202112202112110211310211402240223102221102" "2220221120221111022121022130233023210231110231202420241102510260" "1160115101141101142011312011311101132101133011213011212101121111" "0112112011222011221101123101124011114011113101111211011112201111" "1120111111110111112101111130111230111221011121110111212011132011" "1311011141011150125012410123110123201221201221110122210122301211" "3012112101211111012111201212201212110121310121401340133101321101" "3220131120131111013121013130143014210141110141201520151101610170" "1701610151101520141201411101421014301313013121013111101311201322" "0132110133101340121401213101212110121220121112012111110121121012" "1130122301222101221110122120123201231101241012501115011141011131" "1011132011121201112111011122101112301111130111112101111111101111" "1120111122011112110111131011114011240112310112211011222011211201" "1211110112121011213011330113210113111011312011420114110115101160" "2602510241102420231202311102321023302213022121022111102211202222" "0222110223102240211402113102112110211220211112021111110211121021" "1130212302122102121110212120213202131102141021503503410331103320" "3212032111032210323031130311210311111031112031220312110313103140" "4404310421104220411204111104121041305305210511105120620611071080" ; /* Convert byte-aligned bit-mapped n-byte scan line into array of run lengths. Run length array must have *more* than 8*n elements. First run is white. Returns number of runs coded. */ int bittorun ( uchar *bits, int n, short *runs ) { static uchar init=0, *rltab [ 256 ] ; register uchar *p, c, lastc = 0x00 ; short *runs0 = runs ; if ( ! init ) { /* initialize pointer and run tables */ int i = 0 ; for ( rltab[ 0 ] = p = byteruns ; *p ; p++ ) if ( ! ( *p -= '0' ) && i < 255 ) rltab [ ++i ] = p+1 ; init = 1 ; } *runs = 0 ; for ( ; n > 0 ; n-- ) { p = rltab [ c = *bits++ ] ; if ( ( lastc & 0x01 ) ? ! ( c & 0x80 ) : ( c & 0x80 ) ) *(++runs) = *p++ ; /* new run */ else *runs += *p++ ; /* continue run */ while ( *p ) *(++runs) = *p++ ; lastc = c ; } return runs - runs0 + 1 ; } /* Bitwise-OR two run-length coded scan lines. The run length vectors a and b are OR-ed into c. If c is null, the result is placed in a. The new image width is stored in pels if it is not null. Returns the number of runs in the result. */ int runor ( short *a, int na, short *b, int nb, short *c, int *pels ) { register short la, lb ; int ia, ib, ic, np=0 ; short tmp [ MAXRUNS ] ; if ( ! c ) c = tmp ; la = a [ ia = 0 ] ; lb = b [ ib = 0 ] ; c [ ic = 0 ] = 0 ; while ( 1 ) { if ( la <= lb ) { /* select shorter sub-run */ if ( ( ( ia | ib ) ^ ic ) & 1 ) /* OR of subruns same colour as c? */ c [ ++ic ] = la ; /* no, new output run */ else c [ ic ] += la ; /* yes, add it */ lb -= la ; /* align subruns */ if ( ++ia >= na ) break ; /* done */ la = a [ ia ] ; /* get new subrun */ } else { /* same for line b ... */ if ( ( ( ia | ib ) ^ ic ) & 1 ) c [ ++ic ] = lb ; else c [ ic ] += lb ; la -= lb ; if ( ++ib >= nb ) break ; lb = b [ ib ] ; } } if ( ia < na ) while ( 1 ) { if ( ( ia ^ ic ) & 1 ) c [ ++ic ] = la ; else c [ ic ] += la ; if ( ++ia >= na ) break ; la = a [ ia ] ; } else while ( 1 ) { if ( ( ib ^ ic ) & 1 ) c [ ++ic ] = lb ; else c [ ic ] += lb ; if ( ++ib >= nb ) break ; lb = b [ ib ] ; } if ( c == tmp ) for ( ia=0 ; ia <= ic ; ia++ ) np += a[ia] = c[ia] ; if ( pels ) *pels = np ; return ic + 1 ; } /* Get a number from a PBM file header while skipping whitespace and comments. Returns the number or 0 on EOF. Reads one more byte than used by the number. */ int pbmdim ( IFILE *f ) { int c, n=0 ; /* scan for first digit and skip comments */ while ( ! isdigit ( c = fgetc ( f->f ) ) && c >= 0 ) if ( c == '#' ) while ( ( c = fgetc ( f->f ) ) != '\n' && c >= 0 ) ; /* get the number */ if ( c >= 0 && isdigit( c ) ) { n = c - '0' ; while ( isdigit ( c = fgetc ( f->f ) ) && c >= 0 ) n = n * 10 + c - '0' ; } return n ; } /* Append nb bits from in[from] to bit-mapped scan line buffer where `from' is a bit (not byte) index. Bits in bytes are ordered from MS to LS bit. Initialize before each scan line by calling with nb=0 and in pointing to output buffer. Flush after each scan line by calling with nb=0 and in=NULL. */ #define putbits( c, b ) { x = ( x << (b) ) | (c) ; shift += (b) ; \ if ( shift >= 0 ) { *out++ = x >> shift ; shift -= 8 ; } } void copybits ( uchar *in, int from, short nb ) { uchar *f ; short bits ; static uchar *out ; static short x, shift ; static unsigned char right [ 9 ] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff } ; if ( ! nb ) { /* reset for new scan line */ if ( in ) out = in ; else putbits ( 0, -shift ) ; /* or flush bit buffer */ x = 0 ; shift = -8 ; } else { f = in + ( from >> 3 ) ; bits = 8 - ( from & 7 ) ; if ( nb >= bits ) { putbits ( *f++ & right [ bits ], bits ) ; nb -= bits ; } else { putbits ( ( *f >> ( bits - nb ) ) & right [ bits ], nb ) ; nb = 0 ; } while ( nb >= 8 ) { putbits ( *f++, 8 ) ; nb -= 8 ; } if ( nb > 0 ) putbits ( *f >> ( 8 - nb ), nb ); } } /* Generate scan line 'line' of string 'txt' using font `font' and store the runs in 'runs'. The font is scaled so it appears to have cells of width w and height h. lmargin pixels of white space are added at the left margin. Sets 'pels' to line width if not null. Returns number of runs coded. */ int texttorun ( uchar *txt, faxfont *font, short line, int w, int h, int lmargin, short *runs, int *ppels ) { uchar *in, out [ MAXLINELEN * MAXFONTW / 8 + 1 ] ; int i, nc = 0, cw, nr, pels ; line = ( line * font->h + h/2 ) / h ; cw = font->w ; if ( line >= font->h ) line = font->h - 1 ; in = font->buf + 256/8 * cw * line ; copybits ( out, 0, 0 ) ; for ( i=0 ; txt[i] && i < MAXLINELEN ; i++ ) { copybits ( in, font->offset [ txt[i] ], cw ) ; nc++ ; while ( ( txt[i] == HT ) && ( nc & 7 ) ) { /* tab */ copybits ( in, font->offset [ ' ' ], cw ) ; nc++ ; } } copybits ( 0, 0, 0 ) ; nr = bittorun ( out, ( nc*cw + 7 )/8, runs ) ; if ( font->w == w ) pels = nc*cw ; else pels = xscale ( runs, nr, ( w * 256 ) / font->w ) ; pels += xshift ( runs, nr, lmargin ) ; if ( ppels ) *ppels = pels ; return nr ; } /* Image File Input Functions */ /* Names of file formats */ char *iformatname [ NIFORMATS ] = IFORMATS ; char *oformatname [ NOFORMATS ] = OFORMATS ; char *pformatname [ NPFORMATS ] = PFORMATS ; /* Log the names of files still to be sent using the "msg()" format string s. */ void logifnames ( IFILE *f, char *s ) { PAGE *p ; char *fn ; if ( f && f->page ) for ( p = f->page ; p <= f->lastpage ; p++ ) { fn = p->fname ; if ( fn ) msg ( s, fn ) ; } } /* Read run lengths for one scan line from T.4-coded IFILE f into buffer runs. If pointer pels is not null it is used to save pixel count. Returns number of runs stored, EOF on RTC, or -2 on EOF or other error. */ int readruns ( IFILE *f, short *runs, int *pels ) { int err=0, c=EOF, n ; register int x ; dtab *tab, *t ; short shift ; short *p, *maxp, *q, len=0, npad=0 ; DECODER *d ; uchar reverse=f->page->revbits ; maxp = ( p = runs ) + MAXRUNS ; d = &f->d ; x = d->x ; shift = d->shift ; tab = d->tab ; /* restore decoder state */ do { do { while ( shift < 0 ) { if ( ( c = fgetc ( f->f ) ) == EOF ) { x = ( x << 15 ) | 1 ; shift += 15 ; /* EOL pad at EOF */ npad++ ; } else { if ( reverse ) c = normalbits [ c & 0xff ] ; x = ( x << 8 ) | c ; shift += 8 ; } } t = tab + ( ( x >> shift ) & 0x1ff ) ; tab = t->next ; shift -= t->bits ; } while ( ! t->code ) ; if ( p < maxp ) *p++ = t->code ; } while ( t->code != -1 ) ; d->x = x ; d->shift = shift ; d->tab = tab ; /* save state */ if ( npad > 1 ) msg ("W EOF before RTC" ) ; if ( p >= maxp ) msg ( "W run length buffer overflow" ) ; /* combine make-up and terminating codes and remove +1 offset in run lengths */ n = p - runs - 1 ; for ( p = q = runs ; n-- > 0 ; ) if ( *p > 64 && n-- > 0 ) { len += *q++ = p[0] + p[1] - 2 ; p+=2 ; } else { len += *q++ = *p++ - 1 ; } n = q - runs ; /* check for RTC and errors */ if ( len ) d->eolcnt = 0 ; else if ( ++(d->eolcnt) >= RTCEOL ) err = EOF ; if ( c == EOF ) { if ( ferror ( f->f ) ) { err = -msg ("ES2error reading fax file:") ; } else { err = -2 ; } } if ( pels ) *pels = len ; return err ? err : n ; } /* Read a PCX compressed bit-map */ int readpcx ( char *p, int len, IFILE *f ) { int err=0, n, c ; while ( !err && len > 0 ) { if ( ( c = fgetc ( f->f ) ) < 0 ) { err = msg ( "ES2 PCX read failed" ) ; } else { if ( ( c & 0xc0 ) == 0xc0 ) { /* a run count */ n = c & 0x3f ; c = fgetc ( f->f ) ; if ( ( c = fgetc ( f->f ) ) < 0 ) { err = msg ( "ES2 PCX read failed" ) ; } else { memset ( p, c, n <= len ? n : len ) ; p += n ; len -= n ; } } else { /* bits 0 to 7 are image data */ *p++ = c ; len-- ; } } } if ( len != 0 ) msg ( "W PCX run-length coding error" ) ; return err ; } /* Read a scan line from the current page of IFILE f. Stores number of runs in runs and line width in pels if not null. Pages ends at EOF. Text pages also end if a complete text line would not fit or if the line contains a formfeed character. PBM pages also end when all lines in the bitmap have been read. Fax pages also end at RTC. Returns number of runs stored or EOF at end of page. */ int readline ( IFILE *f, short *runs, int *pels ) { int nr = 0, nb ; uchar bits [ MAXBITS ] ; if ( f->lines != 0 ) { /* -1 allowed as well */ switch ( f->page->format ) { case P_TEXT : if ( f->txtlines <= 0 ) { /* need another text line */ if ( fgets ( f->text, MAXLINELEN, f->f ) ) { f->txtlines = f->charh ; if ( strchr ( f->text, FF ) ) { f->lines = 0 ; /* no more lines in this page */ nr = EOF ; /* don't return any */ } } else { nr = EOF ; } } if ( nr != EOF ) { nr = texttorun ( (uchar*) f->text, f->font, f->charh - f->txtlines, f->charw, f->charh, f->lmargin, runs, pels ) ; f->txtlines-- ; } break ; case P_RAW: case P_PBM: if ( fread ( bits, 1, f->page->w/8, f->f ) != f->page->w/8 ) { nr = EOF ; } else { nr = bittorun ( bits, f->page->w/8, runs ) ; if ( pels ) *pels = f->page->w ; } break ; case P_FAX: nr = readruns ( f, runs, pels ) ; break ; case P_PCX: nb = ( ( f->page->w + 15 ) / 16 ) * 2 ; /* round up */ if ( readpcx ( bits, nb, f ) != 0 ) { nr = EOF ; } else { nr = bittorun ( bits, nb, runs ) ; if ( pels ) *pels = f->page->w ; } break ; } } else { nr = EOF ; } if ( nr >= 0 && f->page->black_is_zero ) { /* invert */ nr = xinvert ( runs, nr ) ; } if ( nr >= 0 && f->lines > 0 ) f->lines-- ; return nr ; } /* Deduce the file type by scanning buffer p of n bytes. */ int getformat ( uchar *p, int n ) { int format = 0 ; /* figure out file type if not already set */ if ( ! format && n < 2 ) { format = I_TEXT ; msg ( "W only read %d byte(s) from input file, assuming text", n ) ; } if ( ! format && ! p[0] && ! ( p[1] & 0xe0 ) ) { format = I_FAX ; } if ( ! format && ! strncmp ( p, "P4", 2 ) ) { format = I_PBM ; } if ( ! format && n >= 128 && p[0] == 0x0a && strchr ("\02\03\05", p[1] ) && p[2] <= 1 ) { if ( p[65] != 1 ) { msg ( "E can't read colour PCX" ) ; } else { format = p[2] ? I_PCX : I_PCX ; } } if ( ! format && ! strncmp ( p, "%!", 2 ) ) { msg ( "W Postscript input file will be treated as text" ) ; } if ( ! format && ( p[0] == 'M' || p[1] == 'I' ) && ( p[1] == p[0] ) ) { format = I_TIFF ; } if ( ! format && ( p[0] == 0x3a && p[1] == 0xde && p[2] == 0x68 && p[3] == 0xb1) ) { format = I_DCX ; } if ( ! format && n ) { /* "90% printable" heuristic */ int i, nprint = 0 ; for ( i=0 ; i 0.90 ) { format = I_TEXT ; } } return format ; } /* initialize page descriptor */ void page_init ( PAGE *p, char *fn ) { p->fname = fn ; p->offset = 0 ; p->w = DEFWIDTH ; p->h = DEFHEIGHT ; p->xres = DEFXRES ; p->yres = DEFYRES ; p->format = P_FAX ; p->revbits = 0 ; p->black_is_zero = 0 ; } void page_report ( PAGE *p, int fmt, int n ) { msg ( "F page %d : %s + %ld : %dx%d @ %.fx%.f dpi %s/%s", n, p->fname, p->offset, p->w, p->h, p->xres, p->yres, iformatname [fmt], pformatname [p->format] ) ; } /* File handling for undefined file types */ #define auto_first 0 #define auto_next 0 /* File handling for TIFF files */ #define tiff_reset 0 /* Name of TIFF tag 'tag'. */ char *tagname ( int tag ) { static struct tagnamestruct { int code ; char *name ; } tagnames [] = { { 256, "width" }, { 257, "length" }, { 258, "bits/sample" }, { 259, "compresssion(g3=3)" }, { 262, "photometric(0-min=white)" }, { 266, "fill order(msb2lsb=1)" }, { 273, "strip offsets" }, { 274, "orientation(1=normal)" }, { 277, "samples/pixel" }, { 278, "rows/strip" }, { 279, "strip byte counts" }, { 282, "xresolution" }, { 283, "yresolution" }, { 284, "storage(1=single plane)" }, { 292, "g3options" }, { 296, "resolution units(2=in,3=cm)" }, { 297, "page number" }, { 327, "clean fax(0=clean/1=regen/2=errors)" }, {0,0} }, *p ; for ( p=tagnames ; p->code ; p++ ) if ( tag == p->code ) break ; return p->code ? p->name : "unknown tag" ; } /* Read 2- or 4-byte integers from a file and correct for file endianness. Returns 0 if OK, 1 on error. */ int fread2 ( unsigned short *p, IFILE *f ) { int err=0 ; uchar c[2] ; err = fread ( c, 1, 2, f->f ) == 2 ? 0 : 1 ; *p = f->bigend ? c[0] << 8 | c[1] << 0 : c[1] << 8 | c[0] << 0 ; return err ; } int fread4 ( unsigned long *p, IFILE *f ) { int err=0 ; uchar c[4] ; err = fread ( c, 1, 4, f->f ) == 4 ? 0 : 1 ; *p = f->bigend ? c[0] << 24 | c[1] << 16 | c[2] << 8 | c[3] << 0 : c[3] << 24 | c[2] << 16 | c[1] << 8 | c[0] << 0 ; return err ; } /* Read a TIFF directory at current file offset, save image format information and seek to next directory if any. Returns 0 if OK, 2 on errors. */ int tiff_next ( IFILE *f ) { int err=0 ; unsigned short ntag, tag, type ; unsigned long count, tv ; double ftv ; msg ( "F+ TIFF directory at %ld", ftell ( f->f ) ) ; if ( fread2 ( &ntag, f ) ) { err = msg ( "E2can't read TIFF tag count" ) ; } else { msg ( "F+ with %d tags", (int) ntag ) ; } for ( ; ! err && ntag > 0 ; ntag-- ) { err = err || fread2 ( &tag, f ) ; err = err || fread2 ( &type, f ) ; err = err || fread4 ( &count, f ) ; if ( type == 3 ) { /* left-aligned short */ unsigned short a, b ; err = err || fread2 ( &a, f ) ; err = err || fread2 ( &b, f ) ; tv = a ; } else { /* long or offset to data */ err = err || fread4 ( &tv, f ) ; } if ( type == 5 ) { /* float as ratio in directory data */ long a, b, where=0 ; err = err || ( ( where = ftell ( f->f ) ) < 0 ) ; err = err || fseek ( f->f, tv, SEEK_SET ) ; err = err || fread4 ( &a, f ) ; err = err || fread4 ( &b, f ) ; err = err || fseek ( f->f, where, SEEK_SET ) ; ftv = (float) a / ( b ? b : 1 ) ; } else { ftv = 0.0 ; } if ( err ) { err = msg ( "ES2can't read TIFF tag" ) ; continue ; } #ifdef TIFF_DEBUG { char *tagtype[] = { "none", "byte", "ascii", "short", "long", "ratio" } ; msg ( "F %3d %-5s tag %s %5ld (%3d:%s)", count, type <= 5 ? tagtype[type] : "other", count > 1 ? "@" : "=", type == 5 ? (long) ftv : tv, tag, tagname(tag) ) ; } #endif switch ( tag ) { case 256 : /* width */ f->page->w = tv ; break ; case 257 : /* height */ f->page->h = tv ; break ; case 259 : /* compression: 1=none, 3=G3 */ if ( tv == 1 ) { f->page->format = P_RAW ; } else if ( tv == 3 ) { f->page->format = P_FAX ; } else { err = msg ( "E2can only read TIFF/G3 or TIFF/uncompressed" ) ; } break ; case 262 : /* photometric interpretation */ f->page->black_is_zero = tv ; break ; case 266 : /* fill order */ f->page->revbits = ( tv == 2 ? 1 : 0 ) ; break ; case 273 : /* data offset */ if ( count != 1 ) err = msg ( "E2can't read multi-strip TIFF files" ) ; else f->page->offset = tv ; break ; case 282 : /* x resolution */ f->page->xres = ftv ; break ; case 283 : /* y resolution */ f->page->yres = ftv ; break ; case 292 : /* T4 options: 1=2D, 2=uncompressed */ if ( tv & 0x1 ) err = msg ( "E2can't read 2D compressed TIFF-F file" ) ; if ( tv & 0x2 ) err = msg ( "E2can't read uncompressed TIFF-F file" ) ; break ; case 296 : /* units: 2=in, 3=cm */ if ( tv == 3 ) { f->page->xres *= 2.54 ; f->page->yres *= 2.54 ; } break ; } } /* end of tag reading loop */ if ( f->page->format == I_AUTO ) { msg ( "W missing TIFF compression format, set to raw" ) ; f->page->format = P_RAW ; } if ( ! err ) { if ( fread4 ( &(f->next), f ) ) { err = msg ( "E2can't read offset to next TIFF directory" ) ; } else { if ( f->next ) { msg ( "F , next directory at %ld.", f->next ) ; if ( fseek ( f->f, f->next, SEEK_SET ) ) err = msg ( "ES2 seek to next TIFF directory failed" ) ; } else { msg ( "F , last image." ) ; } } } if ( ! f->page->offset ) err = msg ( "E2 missing offset to TIFF data" ) ; return err ; } int tiff_first ( IFILE *f ) { short magic, version ; fread ( (uchar*) &magic, 1, 2, f->f ) ; f->bigend = ( *(uchar*) &magic == 'M' ) ? 1 : 0 ; fread2 ( &version, f ) ; fread4 ( &(f->next), f ) ; msg ( "F TIFF version %d.%d file (%s-endian)", version/10, version%10, f->bigend ? "big" : "little" ) ; fseek ( f->f, f->next, SEEK_SET ) ; return tiff_next ( f ) ; } /* File handling for text files. */ int text_next ( IFILE *f ) { int err = 0, i, nc ; char buf [ MAXLINELEN ] ; f->page->offset = ftell ( f->f ) ; f->page->format = P_TEXT ; nc = ( f->page->w - f->lmargin ) / f->charw ; if ( nc > MAXLINELEN ) nc = MAXLINELEN ; for ( i = 0 ; i < f->pglines && fgets ( buf, nc, f->f ) ; i++ ) ; f->next = ! feof(f->f) ? ftell ( f->f ) : 0 ; err = ferror(f->f) ? 2 : 0 ; return err ; } int text_first ( IFILE *f ) { static faxfont defaultfont ; if ( ! f->font ) { /* use default font scaled 2X, 1 inch margin, 66 lines/page */ f->font = &defaultfont ; readfont ( 0, f->font ) ; if ( ! f->charw ) f->charw = 2 * f->font->w ; if ( ! f->charh ) f->charh = 2 * f->font->h ; if ( ! f->lmargin ) f->lmargin = 204 ; if ( ! f->pglines ) f->pglines = DEFPGLINES ; } /* if not set, take default values from font */ if ( ! f->charw ) f->charw = f->font->w ; if ( ! f->charh ) f->charh = f->font->h ; if ( ! f->lmargin ) f->lmargin = 0 ; if ( ! f->pglines ) f->pglines = f->page->h / f->charh - 6 ; return text_next ( f ) ; } /* File handling for PBM files */ int pbm_first ( IFILE *f ) { int err=0 ; fseek ( f->f, 2, SEEK_SET ) ; if ( ! ( f->page->w = pbmdim ( f ) ) || ! ( f->page->h = pbmdim ( f ) ) ) { err = msg ( "E2 EOF or 0 dimension in PBM header" ) ; } else if ( f->page->w % 8 ) { err = msg ( "E2 PBM width must be multiple of 8" ) ; } else { msg ( "F read %dx%d PBM header", f->page->w, f->page->h ) ; } f->page->offset = ftell ( f->f ) ; f->page->format = P_PBM ; f->next = 0 ; return err ; } #define pbm_next 0 /* File handling for FAX files */ #define fax_first 0 #define fax_next 0 /* File handling for PCX files */ /* get a 16-bit word in Intel byte order. */ int fgeti ( IFILE *f ) { return fgetc ( f->f ) + fgetc ( f->f ) * 256 ; } int pcx_first ( IFILE *f ) { int err=0, xmin, xmax, ymin, ymax, nc, nb ; long start ; start = ftell ( f->f ) ; fseek ( f->f, start+4, SEEK_SET ) ; xmin = fgeti ( f ) ; ymin = fgeti ( f ) ; xmax = fgeti ( f ) ; ymax = fgeti ( f ) ; f->page->w = xmax - xmin + 1 ; f->page->h = ymax - ymin + 1 ; f->page->xres = fgeti ( f ) ; f->page->yres = fgeti ( f ) ; fseek ( f->f, start+0x41, SEEK_SET ) ; nc = fgetc ( f->f ) ; nb = fgeti ( f ) ; if ( nc != 1 ) msg ( "W mono PCX file has %d colour planes", nc ) ; if ( nb != ( f->page->w + 15 ) / 16 * 2 ) msg ( "W PCX file has %d bytes per scan line for %d pels", nb, f->page->w ) ; f->page->offset = start + 128 ; f->page->format = P_PCX ; return err ; } #define pcx_next 0 /* File handling for DCX files */ int dcx_next ( IFILE *f ) { int err=0 ; long thisp, nextp ; /* get this and next pages' offsets */ fseek ( f->f, f->next, SEEK_SET ) ; fread4 ( &thisp, f ) ; fread4 ( &nextp, f ) ; /* save address of next directory entry, if any */ f->next = nextp ? f->next + 4 : 0 ; if ( ! thisp ) err = msg ( "E2 can't happen (dcx_next)" ) ; else fseek ( f->f, thisp, SEEK_SET ) ; return err ? err : pcx_first ( f ) ; } int dcx_first ( IFILE *f ) { f->bigend = 0 ; f->next = 4 ; return dcx_next ( f ) ; } #define raw_reset 0 #define raw_first 0 #define raw_next 0 /* input file state reset for different compression methods */ #define pcx_reset 0 #define pbm_reset 0 int text_reset ( IFILE *f ) { int err=0 ; f->lines = ( ( f->pglines * f->charh ) / f->charh ) * f->charh ; f->txtlines = 0 ; f->page->yres = f->lines > 1078 ? 196 : 98 ; /* BOGUS */ return err ; } int fax_reset ( IFILE *f ) { int pels ; short runs [ MAXRUNS ] ; newDECODER ( &f->d ) ; if ( readruns ( f, runs, &pels ) < 0 || pels ) /* skip first EOL */ msg ( "W first line has %d pixels: probably not fax data", pels ) ; f->lines = -1 ; return 0 ; } /* Skip to start of same (dp=0) or next (dp=1) page image. Returns 0 if OK, 1 if no more pages, 2 on errors. */ int nextipage ( IFILE *f, int dp ) { int err=0 ; int ( *reset [NPFORMATS] ) ( IFILE * ) = { raw_reset, fax_reset, pbm_reset, text_reset, pcx_reset }, (*pf)(IFILE*) ; /* close current file if any and set to NULL */ if ( f->f ) { fclose ( f->f ) ; f->f = 0 ; } /* if requested, point to next page and check if done */ if ( dp ) { f->page++ ; } if ( f->page > f->lastpage ) { err = 1 ; } /* open the file and seek to start of image data */ if ( ! err ) { f->f = fopen ( f->page->fname, (f->page->format == P_TEXT) ? "r" : "rb" ) ; if ( ! f->f ) err = msg ( "ES2can't open %s:", f->page->fname ) ; } if ( ! err && fseek ( f->f, f->page->offset, SEEK_SET ) ) err = msg ( "ES2 seek failed" ) ; /* default initializations */ f->lines = f->page->h ; /* coding-specific initializations for this page */ if ( ! err ) { pf = reset[f->page->format] ; if ( pf ) err = (*pf)(f) ; } return err ; } /* Returns true if on last file. */ int lastpage ( IFILE *f ) { return f->page >= f->lastpage ; } #define dfax_first 0 #define dfax_next 0 /* Initialize an input (IFILE) structure. This structure collects the data about images to be processed to allow a simple interface for functions that need to read image files. The IFILE is initialized by building an array of information for each page (image) in all of the files. The page pointer index is initialized so that the first call to nextipage with dp=1 actually opens the first file. */ int newIFILE ( IFILE *f, char **fnames ) { int err=0, i, n, fformat=0 ; char **p ; uchar buf[128] ; int ( *fun ) ( IFILE * ) ; int ( *first [NIFORMATS] ) ( IFILE * ) = { auto_first, pbm_first, fax_first, text_first, tiff_first, dfax_first, pcx_first, raw_first, dcx_first } ; int ( *next [NIFORMATS] ) ( IFILE * ) = { auto_next, pbm_next, fax_next, text_next, tiff_next, dfax_next, pcx_next, raw_next, dcx_next } ; f->page = f->pages ; /* get info for all pages in all files */ for ( p=fnames ; ! err && *p ; p++ ) { if ( ! ( f->f = fopen ( *p, "rb" ) ) ) err = msg ( "ES2 can't open %s:", *p ) ; if ( ! err ) { n = fread ( buf, 1, 128, f->f ) ; if ( ferror ( f->f ) ) err = msg ( "ES2 can't open %s:", *p ) ; } if ( ! err ) { fformat = getformat ( buf, n ) ; if ( ! fformat ) err = msg ( "E2 can't get format of %s", *p ) ; } if ( ! err && fseek ( f->f, 0, SEEK_SET ) ) err = msg ( "ES2 can't rewind %s:", *p ) ; /* get format information for all pages in this file */ for ( i=0 ; ! err ; i++ ) { page_init ( f->page, *p ) ; if ( ( fun = i ? next[fformat] : first[fformat] ) ) err = (*fun)(f) ; if ( ! err ) { page_report ( f->page, fformat, f->page - f->pages + 1 ) ; f->page++ ; if ( f->page >= f->pages + MAXPAGE ) err = msg ( "E2 too many pages (max is %d)", MAXPAGE ) ; } if ( ! f->next ) break ; } if ( f->f ) { fclose ( f->f ) ; f->f = 0 ; } } f->lastpage = f->page - 1 ; f->page = f->pages ; if ( ! normalbits[1] ) initbittab() ; /* bit-reverse table initialization */ return err ; } /* Image File Output Functions */ /* Strings and function to write a bit map in HP-PCL format. The only compression is removal of trailing zeroes. Margins and resolution are set before first write. */ char *PCLBEGIN = "\033E" /* Printer reset. */ "\033&l0E" /* top margin = 0 */ "\033&a0L" /* left margin = 0 */ "\033*t%dR" /* Set raster graphics resolution */ "\033*r1A" ; /* Start raster graphics, rel. adressing */ char *PCLEND = "\033*rB" /* end raster graphics */ "\014" /* form feed */ "\033E" ; /* Printer reset. */ void pclwrite ( OFILE *f, unsigned char *buf, int n ) { while ( n > 0 && buf [ n-1 ] == 0 ) n-- ; fprintf( f->f, "\033*b%dW", n ) ; fwrite ( buf, n, 1, f->f ) ; } /* Write a bit map as (raw) Portable Gray Map (PGM) format after decimating by a factor of 4. Sums bits in each 4x4-pel square to compute sample value. This function reduces each dimension of a bit map by 4 (it writes n*8/4 pixels per scan line and one scan line for every 4 in). The 17 possible sample values are spread linearly over the range 0-255. */ void pgmwrite ( OFILE *f, uchar *buf, int n ) { static uchar gval [ MAXBITS * 8 / 4 ] ; static int init=0, lines=0 ; static uchar hbits [ 256 ], lbits [ 256 ] ; static int nybblecnt [ 16 ] = { 0,1,1,2, 1,2,2,3, 1,2,2,3, 2,3,3,4 } ; static uchar corr [ 17 ] = { 255, 239, 223, 207, 191, 175, 159, 143, 127, 111, 95, 79, 63, 47, 31, 15, 0 } ; int m ; uchar *p, *q ; if ( ! init ) { /* build table of bit counts in each nybble */ short i ; for ( i=0 ; i<256 ; i++ ) { hbits [ i ] = nybblecnt [ i >> 4 & 0x0f ] ; lbits [ i ] = nybblecnt [ i & 0x0f ] ; } init = 1 ; } for ( m=n, p=gval, q=buf ; m-- > 0 ; q++ ) { *p++ += hbits [ *q ] ; *p++ += lbits [ *q ] ; } if ( ( lines++ & 0x03 ) == 0x03 ) { for ( p=gval, m=2*n ; m-- > 0 ; p++ ) *p = corr [ *p ] ; fwrite ( gval, 1, 2*n, f->f ) ; memset ( gval, 0, 2*n ) ; } } /* Postscript image data is differentially coded vertically and run-length coded horizontally. A leading byte (n) defines the type of coding for subsequent data: 0 repeat previous line 1-127 n data bytes follow 128-254 copy n-127 bytes from previous line 255 n repeat the next character 'n' times The overhead for coding a copy is 2 bytes (copy count, data count), so copies > 2 bytes should be so coded. The overhead for coding a run is 4 bytes (255, count, byte, data count), so runs > 4 bytes should be so coded. Copies decode/execute faster and code more compactly so are preferred over runs. */ const char PSBEGIN [] = /* start of file */ "%%!PS-Adobe-2.0 EPSF-2.0 \n" "%%%%Creator: efax (Copyright 1995 Ed Casas) \n" "%%%%Title: efix output\n" "%%%%Pages: (atend) \n" "%%%%BoundingBox: 0 0 %d %d \n" "%%%%BeginComments \n" "%%%%EndComments \n" "/val 1 string def \n" "/buf %d string def \n" "/getval { \n" " currentfile val readhexstring pop 0 get \n" "} bind def \n" "/readbuf { \n" " 0 %% => index \n" " { \n" " dup buf length ge { exit } if \n" " getval %% => index run_length \n" " dup 127 le { \n" " dup 0 eq { \n" " pop buf length \n" " } { \n" " currentfile buf 3 index 3 index getinterval readhexstring pop pop\n" " } ifelse \n" " } { \n" " dup 255 eq { \n" " pop getval getval %% => index run_length value \n" " 2 index 1 3 index 2 index add 1 sub %% => ... start 1 end \n" " { buf exch 2 index put } for \n" " pop \n" " } { \n" " 127 sub \n" " } ifelse \n" " } ifelse \n" " add %% => index \n" " } loop \n" " pop \n" " buf \n" "} bind def \n" "%%%%EndProlog \n" ; const char PSPAGE [] = /* start of page */ "%%%%Page: %d %d \n" "gsave \n" "%f %f translate \n" "%f %f scale \n" "%d %d %d [ %d %d %d %d %d %d ] { readbuf } image \n" ; const char PSPAGEEND [] = /* end of page */ "\n" "grestore \n" "showpage \n" ; const char PSEND [] = /* end of file */ "%%Trailer \n" "%%%%Pages: %d \n" ; void psinit ( OFILE *f, int newfile, int page, int w, int h, int n ) { float ptw, pth ; if ( ! f ) { msg ( "E2 can't happen (psinit)" ) ; return ; } ptw = w/f->xres * 72.0 ; /* convert to points */ pth = h/f->yres * 72.0 ; if ( newfile ) fprintf ( f->f, PSBEGIN, (int) ptw, (int) pth, /* Bounding Box */ n ) ; /* buffer string length */ fprintf ( f->f, PSPAGE, page, page, /* page number */ 0.0, 0.0, /* shift */ ptw, pth, /* scaling */ w, h, 1, /* image size */ w, 0, 0, -h, 0, h ) ; /* CTM */ f->pslines = 0 ; f->lastpageno = page ; } char nhexout = 0, hexchars [ 16 ] = "0123456789abcdef" ; #define hexputc( f, c ) ( \ putc ( hexchars [ (c) >> 4 ], f ), \ putc ( hexchars [ (c) & 0x0f ], f ), \ ( ( ( nhexout++ & 31 ) == 31 ) ? putc ( '\n', f ) : 0 ) ) void hexputs ( FILE *f, uchar *p, int n ) { uchar c ; if ( n > 0 ) { hexputc ( f, n ) ; while ( n-- ) { c = *p++ ^ 0xff ; hexputc ( f, c ) ; } } } /* Encode into postscript. If not a repeated line, test (using index j) from current position (i) for possible encodings as: copy of > 2 bytes, runs of > 4 or data >=127. Otherwise the byte is skipped. Uncoded bytes are output from the last uncoded byte (l) before output of runs/copies. */ void pswrite ( OFILE *f, unsigned char *buf, int n ) { int i, j, l ; static unsigned char last [ MAXBITS ] ; l=i=0 ; if ( ! f || ! buf || n<0 ) { msg ( "E2 can't happen (pswrite)" ) ; return ; } for ( j=0 ; jpslines ; j++ ) ; if ( j == n ) { /* repeat line */ hexputc ( f->f, 0 ) ; l=i=n ; } while ( ipslines ; j++ ) ; if ( j-i > 2 ) { /* skip */ hexputs ( f->f, buf+l, i-l ) ; hexputc ( f->f, j-i + 127 ) ; l=i=j ; } else { for ( j=i ; j 4 ) { /* run */ hexputs ( f->f, buf+l, i-l ) ; hexputc ( f->f, 255 ) ; hexputc ( f->f, j-i ) ; hexputc ( f->f, buf[i] ^ 0xff ) ; l=i=j ; } else { if ( i-l >= 127 ) { /* maximum data length */ hexputs ( f->f, buf+l, i-l ) ; l=i ; } else { /* data */ i++ ; } } } } hexputs ( f->f, buf+l, i-l ) ; if ( n >= 0 ) memcpy ( last, buf, n ) ; f->pslines++ ; } /* Write 2- and 4-byte integers to an image output file. Return as for fwrite. */ int fwrite2 ( short s, OFILE *f ) { uchar *p = (void*) &s ; return fwrite ( bigendian ? p + sizeof(short) - 2 : p, 2, 1, f->f ) ; } int fwrite4 ( long l, OFILE *f ) { uchar *p = (void*) &l ; return fwrite ( bigendian ? p + sizeof(long ) - 4 : p, 4, 1, f->f ) ; } /* Write a TIFF directory tag. Returns 0 if OK, 1 on errors. */ int wtag ( OFILE *f, int lng, short tag, short type, long count, long offset ) { int err=0 ; err = err || ! fwrite2 ( tag, f ) ; err = err || ! fwrite2 ( type, f ) ; err = err || ! fwrite4 ( count, f ) ; if ( lng ) { err = err || ! fwrite4 ( offset, f ) ; } else { err = err || ! fwrite2 ( offset, f ) ; err = err || ! fwrite2 ( 0, f ) ; } if ( err ) msg ( "ES2 can't write TIFF tag" ) ; return err ; } /* Write TIFF header and directory. File format based on Sam Leffler's tiff.h. Can only be used for single-image TIFFs because always seeks to start of file to re-write the header. */ #define NTAGS 17 /* number of tags in directory */ #define NRATIO 2 /* number of floats (as ratios) */ int tiffinit ( OFILE *f ) { int err=0, compr=1 ; long tdoff, doff ; fseek ( f->f, 0, SEEK_SET ) ; /* 0 ==> (start of TIFF file) */ /* write magic, TIFF version and offset to directory */ fwrite2 ( bigendian ? 0x4d4d : 0x4949, f ) ; fwrite2 ( 42, f ) ; fwrite4 ( 8, f ) ; /* 8 ==> directory */ fwrite2 ( NTAGS, f ) ; /* figure out offsets within file and compression code */ tdoff = 8 + 2 + NTAGS*12 + 4 ; /* offset to directory data */ doff = tdoff + NRATIO*8 ; /* offset to image data */ switch ( f->format ) { case O_TIFF_RAW: compr = 1 ; break ; case O_TIFF_FAX: compr = 3 ; break ; default: err = msg ( "E2can't happen(tiffinit)" ) ; break ; } /* write directory tags, 12 bytes each */ wtag( f, 1, 256, 4, 1, f->w ) ; /* width long */ wtag( f, 1, 257, 4, 1, f->h ) ; /* length long */ wtag( f, 0, 258, 3, 1, 1 ) ; /* bits/sample short */ wtag( f, 0, 259, 3, 1, compr ) ; /* compresssion(g3=3) short */ wtag( f, 0, 262, 3, 1, 0 ) ; /* photometric(0-min=white) short */ wtag( f, 0, 266, 3, 1, 1 ) ; /* fill order(msb2lsb=1) short */ wtag( f, 1, 273, 4, 1, doff ) ; /* strip offsets long */ wtag( f, 0, 274, 3, 1, 1 ) ; /* orientation(1=normal) short */ wtag( f, 0, 277, 3, 1, 1 ) ; /* samples/pixel short */ wtag( f, 1, 278, 4, 1, f->h ) ; /* rows/strip long */ wtag( f, 1, 279, 4, 1, f->bytes ) ; /* strip byte counts long */ wtag( f, 1, 282, 5, 1, tdoff+0 ) ; /* xresolution ratio */ wtag( f, 1, 283, 5, 1, tdoff+8 ) ; /* yresolution ratio */ wtag( f, 0, 284, 3, 1, 1 ) ; /* storage(1=single plane) short */ wtag( f, 1, 292, 4, 1, 0 ) ; /* g3options long */ wtag( f, 0, 296, 3, 1, 2 ) ; /* resolution units(2=in,3=cm) short */ wtag( f, 0, 327, 3, 1, 0 ) ; /* clean fax(0=clean) short */ fwrite4 ( 0, f ) ; /* offset to next dir (no more) */ /* ==> tdoff (tag data offset), write ratios for floats here */ fwrite4 ( f->xres+0.5, f ) ; fwrite4 ( 1, f ) ; fwrite4 ( f->yres+0.5, f ) ; fwrite4 ( 1, f ) ; /* ==> doff (strip data offset), image data goes here */ return err ; } /* Convert array 'runs' of 'nr' run lengths into a bit map 'buf'. Returns the number of bytes filled. */ int runtobit ( short *runs, int nr, uchar *buf ) { static uchar zerofill [ 9 ] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00 } ; static uchar onefill [ 9 ] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff } ; uchar col=0, *buf0 = buf ; register short len, b=8, bytes ; while ( nr-- > 0 ) { len = *runs++ ; if ( col ) *buf |= onefill [ b ] ; /* right bits of cur. byte */ else *buf &= zerofill [ b ] ; if ( b > len ) { /* done fill */ b -= len ; } else { /* continue to next byte */ len -= b ; buf++ ; b = 8 ; if ( ( bytes = len>>3 ) > 0 ) { /* fill >1 byte */ memset ( buf, col, bytes ) ; len -= bytes*8; buf += bytes ; } *buf = col ; /* flood the rest */ b -= len ; } col ^= 0xff ; } return buf - buf0 + ( b < 8 ) ; } /* Write a PCX file header. */ int fputi ( int i, OFILE *f ) { putc ( i & 0xff, f->f ) ; putc ( ( i >> 8 ) & 0xff, f->f ) ; return 0 ; } void pcxinit ( OFILE *f ) { uchar buf [ 60 ] = { 0x0a, 3, 1, 1 } ; /* magic, version, compr, BPP */ fwrite ( buf, 1, 4, f->f ) ; /* 4 */ fputi ( 0, f ) ; /* 8 xmin, ymin, xmax, ymax */ fputi ( 0, f ) ; fputi ( f->w-1, f ) ; fputi ( f->h-1, f ) ; fputi ( f->xres, f ) ; /* 4 x and y dpi */ fputi ( f->yres, f ) ; memset ( buf, 0, 48 ) ; /* 48 palette */ fwrite ( buf, 1, 48, f->f ) ; putc ( 0, f->f ) ; /* 1 reserved */ putc ( 1, f->f ) ; /* 1 planes per pixel */ fputi ( (f->w+15)/16*2, f ) ; /* 2 bytes per line */ memset ( buf, 0, 60 ) ; /* 60 zero */ fwrite ( buf, 1, 60, f->f ) ; } /* Write a PCX-compressed scan line. */ void pcxwrite ( OFILE *of, uchar *p, int nb ) { int c, n, runc ; FILE *f = of->f ; runc = *p++ ; n = 1 ; for ( nb-- ; nb > 0 ; nb-- ) { c = *p++ ; if ( c == runc && n < 63 ) { /* continue run */ n++ ; } else { /* terminate run */ if ( n > 1 || ( ( runc & 0xc0 ) == 0xc0 ) ) /* output as run */ putc ( n | 0xc0, f ) ; putc ( runc, f ) ; runc = c ; /* start new run */ n = 1 ; } } /* last run */ if ( n > 1 || ( ( runc & 0xc0 ) == 0xc0 ) ) /* output as run */ putc ( n | 0xc0, f ) ; putc ( runc, f ) ; } /* Begin/end output pages. If not starting first page (0), terminate previous page. If output filename pattern is defined, [re-]opens that file. If not terminating last page (page==EOF), writes file header. Returns 0 or 2 on errors. */ int nextopage ( OFILE *f, int page ) { int err = 0 ; int i, nb=0 ; uchar *p, codes [ ( RTCEOL * EOLBITS ) / 8 + 3 ] ; if ( f->f ) { /* terminate previous page */ switch ( f->format ) { case O_PBM: break ; case O_PGM: break ; case O_FAX: case O_TIFF_FAX: for ( p = codes, i=0 ; ie, EOLCODE, EOLBITS, p ) ; nb = putcode ( &f->e, 0, 0, p ) - codes ; fwrite ( codes, 1, nb, f->f ) ; f->bytes += nb ; if ( f->format == O_TIFF_FAX ) tiffinit ( f ) ; break ; case O_TIFF_RAW: tiffinit(f) ; /* rewind & update TIFF header */ break ; case O_PCL: fprintf ( f->f, PCLEND ) ; break ; case O_PS: fprintf ( f->f, PSPAGEEND ) ; if ( f->fname || page<0 ) fprintf ( f->f, PSEND, f->lastpageno ) ; break ; case O_PCX: case O_PCX_RAW: fseek ( f->f, 0, SEEK_SET ) ; pcxinit ( f ) ; break ; } if ( ferror ( f->f ) ) { err = msg ("ES2output error:" ) ; } else { msg ( "F+ wrote %s as %dx%d pixel %.fx%.f dpi %s page", f->cfname, f->w, f->h, f->xres, f->yres, oformatname [f->format] ) ; switch ( f->format ) { case O_PS: msg ( "F (%d lines)", f->pslines ) ; break ; case O_TIFF_RAW: case O_TIFF_FAX: msg ( "F (%d bytes)", f->bytes ) ; break ; default: msg ( "F " ) ; break ; } } } if ( ! err && page >= 0 ) { /* open new file */ if ( f->fname ) { sprintf ( f->cfname, f->fname, page+1, page+1, page+1 ) ; if ( ! f->f ) f->f = fopen ( f->cfname, ( f->format == O_PS ) ? "w" : "wb+" ) ; else f->f = freopen ( f->cfname, ( f->format == O_PS ) ? "w" : "wb+", f->f ) ; if ( ! f->f ) { err = msg ("ES2can't open output file %s:", f->cfname ) ; } } else { f->f = stdout ; strcpy ( f->cfname, "standard output" ) ; } } /* start new page */ if ( ! err && page >= 0 ) { switch ( f->format ) { case O_PBM: fprintf ( f->f, "P4 %d %d\n", f->w, f->h ) ; break ; case O_PGM: fprintf ( f->f, "P5 %d %d %d\n", f->w/4, f->h/4, 255 ) ; break ; case O_FAX: case O_TIFF_FAX: if ( f->format == O_TIFF_FAX ) tiffinit ( f ) ; p = putcode ( &f->e, EOLCODE, EOLBITS, codes ) ; nb = p - codes ; fwrite ( codes, 1, nb, f->f ) ; break ; case O_TIFF_RAW: tiffinit ( f ) ; break ; case O_PCL: fprintf ( f->f, PCLBEGIN, (int) f->xres ) ; break ; case O_PS: psinit ( f, ( f->fname || page==0 ), page+1, f->w, f->h, f->w/8 ) ; break ; case O_PCX: case O_PCX_RAW: fseek ( f->f, 0, SEEK_SET ) ; pcxinit ( f ) ; break ; } if ( ferror ( f->f ) ) err = msg ("ES2output error:" ) ; } /* only count lines/bytes for those formats that don't have headers or where we will update the headers on closing */ switch ( f->format ) { case O_FAX: case O_TIFF_FAX: case O_PCX: case O_PCX_RAW: f->h = 0 ; f->bytes = nb ; break ; } return err ; } /* Output scan line of nr runs no times to output file f. */ void writeline ( OFILE *f, short *runs, int nr, int no ) { int nb = 0 ; uchar *p, buf [ MAXCODES ] ; /* if line to be output, convert to right format */ if ( no > 0 ) switch ( f->format ) { case O_PBM: case O_PGM: case O_PCL: case O_PS: case O_TIFF_RAW: case O_PCX: case O_PCX_RAW: nb = runtobit ( runs, nr, buf ) ; break ; case O_FAX: case O_TIFF_FAX: break ; } /* output `no' times. */ while ( no-- > 0 ) { switch ( f->format ) { case O_PCX_RAW: case O_TIFF_RAW: case O_PBM: fwrite ( buf, 1, nb, f->f ) ; break ; case O_PGM: pgmwrite ( f, buf, nb ) ; break ; case O_TIFF_FAX: case O_FAX: p = runtocode ( &f->e, runs, nr, buf ) ; p = putcode ( &f->e, EOLCODE, EOLBITS, p ) ; nb = p - buf ; fwrite ( buf, 1, nb, f->f ) ; break ; case O_PCL: pclwrite ( f, buf, nb ) ; break ; case O_PS: pswrite ( f, buf, nb ) ; break ; case O_PCX: pcxwrite ( f, buf, nb ) ; break ; } /* only count lines/bytes for those formats that don't have headers or where we will update the headers on closing */ switch ( f->format ) { case O_FAX: case O_TIFF_FAX: case O_TIFF_RAW: case O_PCX: case O_PCX_RAW: f->h++ ; f->bytes += nb ; break ; } } } /* Initialize new output file. If fname is NULL, stdout will be used for all images. */ void newOFILE ( OFILE *f, int format, char *fname, float xres, float yres, int w, int h ) { f->f = 0 ; f->format = format ; f->fname = fname ; f->xres = xres ; f->yres = yres ; f->w = w ; f->h = h ; f->bytes = 0 ; newENCODER ( &f->e ) ; } /* Read a bitmap to use as a font and fill in the font data. If the file name is null, empty, or there are errors, the font is initialized to the built-in font. Returns 0 if OK, 2 on errors. */ int readfont ( char *fname, faxfont *font ) { int err=0, i, j, n=0, nr, nb, fontok=0, pels ; char *fnames [2] = { 0, 0 } ; short runs [ MAXRUNS ] ; IFILE f; if ( fname && *fname ) { fnames[0] = fname ; newIFILE ( &f, fnames ) ; if ( nextipage ( &f, 0 ) ) { err = msg ( "E2 can't open font file %s", fnames[0] ) ; } nb = 0 ; while ( ! err && ( nr = readline ( &f, runs, &pels ) ) >= 0 ) { if ( nb+pels/8 < MAXFONTBUF ) { nb += runtobit ( runs, nr, font->buf+nb ) ; } else { err = msg ("E2font file %s too large (max %d bytes)", fnames[0], MAXFONTBUF ) ; } } if ( ! err && nb != f.page->w * f.page->h / 8 ) err = msg ( "E2 read %d bytes of font data for %dx%d bitmap", nb, f.page->w, f.page->h ) ; if ( ! err && ( f.page->w / 256 > MAXFONTW || f.page->h > MAXFONTH ) ) { err = msg ( "E2font size (%dx%d) too large", f.page->w, f.page->h ) ; } if ( err ) { font->w = font->h = 0 ; } else { font->w = f.page->w / 256 ; font->h = f.page->h ; for ( i=0 ; i<256 ; i++ ) font->offset[i] = i*font->w ; msg ("Iread %dx%d font %s (%d bytes)", font->w, font->h, fname, nb ) ; fontok = 1 ; } if ( f.f ) { fclose ( f.f ) ; f.f = 0 ; } } if ( ! fontok ) { /* use built-in font */ font->w = STDFONTW ; font->h = STDFONTH ; for ( i=j=0 ; j 0 ; n-- ) font->buf [ j++ ] = 0 ; else font->buf [ j++ ] = stdfont [ i ] ; if ( i != 1980 ) err = msg ( "E2can't happen(readfont)" ) ; for ( i=0 ; i<256 ; i++ ) font->offset[i] = i*font->w ; } return err ; } /* Initialize bit reversal lookup tables (note that the `normalbits' array is the one actually used for the bit reversal. */ void initbittab ( void ) { int i ; for ( i=0 ; i<256 ; i++ ) normalbits [ reversebits [ i ] = i ] = ( i& 1 ? 128:0 ) | ( i& 2 ? 64:0 ) | ( i& 4 ? 32:0 ) | ( i& 8 ? 16:0 ) | ( i&16 ? 8:0 ) | ( i&32 ? 4:0 ) | ( i&64 ? 2:0 ) | ( i&128 ? 1:0 ) ; } /* T.4 Encoding/Decoding */ /* Table-lookup decoder for variable-bit-length codewords. The table index is the N most recently undecoded bits with the first (oldest) undecoded bit as the MS bit. If the N bits uniquely identify a codeword then the indexed 'code' member identifies the code, otherwise it is zero. The 'bits' member gives the number of bits to be considered decoded (to be removed from the bit stream) and the 'next' element is a pointer to the table to use for decoding the next part of the bit sequence. For T.4 decoding the longest T.4 codeword is 13 bits. The implementation below uses two tables of 512 elements (N=9 bits) for each colour. Codewords longer than 9 bits require a second lookup. Since all codewords longer than than 9 bits have a 4-bit zero prefix it is possible to use only one secondary 9-bit lookup table by dropping only the first 4 bits after the first lookup. The code indentifier is the run length + 1. A separate table is used for decoding the variable-length FILL patterns. For undefined codewords, one bit is skipped and decoding continues at the white code table. */ /* the lookup tables for each colour and the fill lookup table */ dtab tw1 [ 512 ], tw2 [ 512 ], tb1 [ 512 ], tb2 [ 512 ], fill [ 512 ] ; char tabinit=0 ; /* Add code cword shifted left by shift to decoding table tab. */ void addcode ( dtab *tab, int cword, int shift, short code, short bits, dtab *next ) { int i, n = 1 << shift ; for ( i = cword << shift ; n-- > 0 ; i++ ) { tab[i].code = code ; tab[i].bits = bits ; tab[i].next = next ; } } /* Initialize the decoding table for one colour using the codes in the T.4 table p0. t1 and t2 are the two decoding tables and ot is the first table of the other colour. */ void init1dtab ( t4tab *p0, dtab *t1, dtab *t2, dtab *ot ) { t4tab *p ; for ( p = p0 ; p->code ; p++ ) if ( p->bits <= 9 ) { addcode ( t1, p->code, 9 - p->bits, p->rlen + 1, p->bits, ( p - p0 ) > 63 ? t1 : ot ) ; } else { addcode ( t1, p->code >> ( p->bits - 9 ), 0, 0, 4, t2 ) ; addcode ( t2, p->code, 13 - p->bits, p->rlen + 1, p->bits - 4, ( p - p0 ) > 63 ? t1 : ot ) ; } } /* Initialize a T.4 decoder. */ void newDECODER ( DECODER *d ) { int i ; if ( ! tabinit ) { /* undefined codes */ addcode ( tw1, 0, 9, 0, 1, tw1 ) ; addcode ( tw2, 0, 9, 0, 1, tw1 ) ; addcode ( tb1, 0, 9, 0, 1, tw1 ) ; addcode ( tb2, 0, 9, 0, 1, tw1 ) ; addcode ( fill, 0, 9, 0, 1, tw1 ) ; /* fill and EOL */ addcode ( tw1, 0, 0, 0, 4, tw2 ) ; addcode ( tw2, 0, 2, 0, 7, fill ) ; addcode ( tb1, 0, 0, 0, 4, tb2 ) ; addcode ( tb2, 0, 2, 0, 7, fill ) ; addcode ( fill, 0, 0, 0, 9, fill ) ; for ( i=0 ; i<=8 ; i++ ) addcode ( fill, 1, i, -1, 9-i, tw1 ) ; /* white and black runs */ init1dtab ( wtab, tw1, tw2, tb1 ) ; init1dtab ( btab, tb1, tb2, tw1 ) ; tabinit=1 ; } /* initialize decoder to starting state */ d->x = 0 ; d->shift = -9 ; d->tab = tw1 ; d->eolcnt = 0 ; } /* T.4 coding table and default font for efax/efix */ /* T.4 1-D run-length coding tables. codes must be in run length order for runtocode(). */ t4tab wtab [ ( 64 + 27 + 13 ) + 1 ] = { /* runs of white */ /* Terminating White Codes */ {53,8,0}, {7,6,1}, {7,4,2}, {8,4,3}, {11,4,4}, {12,4,5}, {14,4,6}, {15,4,7}, {19,5,8}, {20,5,9}, {7,5,10}, {8,5,11}, {8,6,12}, {3,6,13}, {52,6,14}, {53,6,15}, {42,6,16}, {43,6,17}, {39,7,18}, {12,7,19}, {8,7,20}, {23,7,21}, {3,7,22}, {4,7,23}, {40,7,24}, {43,7,25}, {19,7,26}, {36,7,27}, {24,7,28}, {2,8,29}, {3,8,30}, {26,8,31}, {27,8,32}, {18,8,33}, {19,8,34}, {20,8,35}, {21,8,36}, {22,8,37}, {23,8,38}, {40,8,39}, {41,8,40}, {42,8,41}, {43,8,42}, {44,8,43}, {45,8,44}, {4,8,45}, {5,8,46}, {10,8,47}, {11,8,48}, {82,8,49}, {83,8,50}, {84,8,51}, {85,8,52}, {36,8,53}, {37,8,54}, {88,8,55}, {89,8,56}, {90,8,57}, {91,8,58}, {74,8,59}, {75,8,60}, {50,8,61}, {51,8,62}, {52,8,63}, /* Make Up White Codes */ {27,5,64}, {18,5,128}, {23,6,192}, {55,7,256}, {54,8,320}, {55,8,384}, {100,8,448}, {101,8,512}, {104,8,576}, {103,8,640}, {204,9,704}, {205,9,768}, {210,9,832}, {211,9,896}, {212,9,960}, {213,9,1024},{214,9,1088},{215,9,1152}, {216,9,1216},{217,9,1280},{218,9,1344},{219,9,1408},{152,9,1472},{153,9,1536}, {154,9,1600},{24,6,1664}, {155,9,1728}, /* Extended Make Up Codes (Black and White) */ {8,11,1792}, {12,11,1856},{13,11,1920},{18,12,1984},{19,12,2048},{20,12,2112}, {21,12,2176},{22,12,2240},{23,12,2304},{28,12,2368},{29,12,2432},{30,12,2496}, {31,12,2560}, {0,0,0} } ; t4tab btab [ ( 64 + 27 + 13 ) + 1 ] = { /* runs of black */ /* Terminating Black Codes */ {55,10,0}, {2,3,1}, {3,2,2}, {2,2,3}, {3,3,4}, {3,4,5}, {2,4,6}, {3,5,7}, {5,6,8}, {4,6,9}, {4,7,10}, {5,7,11}, {7,7,12}, {4,8,13}, {7,8,14}, {24,9,15}, {23,10,16}, {24,10,17}, {8,10,18}, {103,11,19}, {104,11,20}, {108,11,21}, {55,11,22}, {40,11,23}, {23,11,24}, {24,11,25}, {202,12,26}, {203,12,27}, {204,12,28}, {205,12,29}, {104,12,30}, {105,12,31}, {106,12,32}, {107,12,33}, {210,12,34}, {211,12,35}, {212,12,36}, {213,12,37}, {214,12,38}, {215,12,39}, {108,12,40}, {109,12,41}, {218,12,42}, {219,12,43}, {84,12,44}, {85,12,45}, {86,12,46}, {87,12,47}, {100,12,48}, {101,12,49}, {82,12,50}, {83,12,51}, {36,12,52}, {55,12,53}, {56,12,54}, {39,12,55}, {40,12,56}, {88,12,57}, {89,12,58}, {43,12,59}, {44,12,60}, {90,12,61}, {102,12,62}, {103,12,63}, /* Make Up Black Codes */ {15,10,64}, {200,12,128},{201,12,192},{91,12,256}, {51,12,320}, {52,12,384}, {53,12,448}, {108,13,512},{109,13,576},{74,13,640}, {75,13,704}, {76,13,768}, {77,13,832}, {114,13,896},{115,13,960},{116,13,1024},{117,13,1088}, {118,13,1152}, {119,13,1216},{82,13,1280},{83,13,1344},{84,13,1408},{85,13,1472},{90,13,1536}, {91,13,1600},{100,13,1664},{101,13,1728}, /* Extended Make Up Codes (Black and White) */ {8,11,1792}, {12,11,1856},{13,11,1920},{18,12,1984},{19,12,2048},{20,12,2112}, {21,12,2176},{22,12,2240},{23,12,2304},{28,12,2368},{29,12,2432},{30,12,2496}, {31,12,2560}, {0,0,0} } ; /* The built-in 8x16 font. Runs of zeroes are coded as 0 followed by the repetition count. */ uchar stdfont [ 1980 ] = { 0,255,0,255,0,194,8,4,12,10,18,0,3,16,4,8,20,8,4,8,20,0,1,10,8,4, 4,10,18,0,2,16,4,8,20,4,0,68,20,0,1,8,0,2,12,6,48,0,5,2,0,43,14,32, 56,0,2,12,0,1,32,0,1,2,0,1,14,0,1,32,8,4,32,56,0,14,6,8,48,0,40,8, 0,1,18,0,6,30,0,4,4,0,11,4,8,18,20,18,12,0,2,8,8,20,20,4,8,20,20, 0,1,20,4,8,10,20,18,0,2,8,8,20,20,8,0,1,24,8,4,8,10,20,12,0,2,8,4, 8,20,16,8,8,20,54,10,8,4,8,10,20,0,2,16,4,8,20,4,0,1,20,0,33,12,20, 18,28,48,12,12,8,8,8,0,4,2,28,8,28,28,4,62,28,62,28,28,0,5,60,28, 12,60,14,56,62,30,14,34,62,62,33,16,33,34,12,60,12,60,30,127,34,33, 65,34,34,62,8,32,8,8,0,1,24,0,1,32,0,1,2,0,1,16,0,1,32,8,4,32,8,0, 7,16,0,6,8,8,8,0,36,4,14,0,1,34,8,12,18,28,24,0,3,28,0,1,24,0,1,28, 28,8,0,1,30,0,2,8,28,0,1,100,100,98,0,6,18,31,14,0,8,56,0,7,13,0, 5,32,36,4,8,20,20,20,18,0,2,4,8,20,20,8,16,20,20,8,20,4,8,20,20,20, 0,2,8,8,20,20,8,32,20,0,33,12,20,18,42,73,18,24,8,8,42,8,0,3,4,34, 24,34,34,12,32,34,2,34,34,0,2,2,0,1,16,2,34,12,34,18,36,32,16,18, 34,8,8,34,16,51,50,18,34,18,34,32,8,34,33,73,34,34,2,8,16,8,8,0,1, 24,0,1,32,0,1,2,0,1,16,0,1,32,0,2,32,8,0,7,16,0,6,8,8,8,0,36,15,16, 65,34,8,18,0,1,34,4,0,3,34,0,1,36,8,2,2,0,2,58,0,2,56,34,0,1,36,36, 18,0,1,12,12,12,12,12,12,24,18,62,62,62,62,62,62,62,62,36,34,12,12, 12,12,12,0,1,18,34,34,34,34,34,32,36,0,5,12,0,10,52,0,6,8,0,6,32, 0,34,12,0,1,63,40,74,18,0,1,16,4,20,8,0,3,4,34,40,2,2,20,32,32,2, 34,34,24,24,4,0,1,8,2,78,18,34,32,34,32,16,32,34,8,8,36,16,51,50, 33,34,33,34,32,8,34,33,73,20,34,4,8,16,8,20,0,2,28,44,14,30,28,62, 30,44,56,60,34,8,82,44,28,44,30,22,30,62,34,34,65,34,34,62,8,8,8, 0,35,12,20,16,62,34,8,16,0,1,77,4,0,3,93,0,1,24,8,2,12,0,1,34,58, 0,2,8,34,0,1,40,40,100,4,12,12,12,12,12,12,40,32,32,32,32,32,8,8, 8,8,34,50,18,18,18,18,18,34,35,34,34,34,34,34,60,40,28,28,28,28,28, 28,54,14,28,28,28,28,56,56,56,56,2,44,28,28,28,28,28,8,29,34,34,34, 34,34,44,34,0,33,12,0,1,18,24,52,12,0,1,16,4,42,8,0,3,8,34,8,2,2, 36,60,32,4,34,34,24,24,8,127,4,2,82,18,34,32,34,32,16,32,34,8,8,40, 16,45,42,33,34,33,34,48,8,34,33,73,20,20,4,8,8,8,20,0,2,34,50,16, 34,34,16,34,50,8,4,36,8,109,50,34,50,34,24,32,16,34,34,73,34,34,2, 4,8,16,57,0,34,12,36,16,34,20,0,1,40,0,1,81,28,18,127,0,1,89,0,2, 127,12,2,0,1,34,58,28,0,1,8,34,36,40,40,24,4,18,18,18,18,18,18,40, 32,32,32,32,32,8,8,8,8,34,50,33,33,33,33,33,20,37,34,34,34,34,20, 34,40,34,34,34,34,34,34,9,16,34,34,34,34,8,8,8,8,30,50,34,34,34,34, 34,0,1,34,34,34,34,34,34,50,34,0,33,12,0,1,18,12,8,25,0,1,16,4,8, 127,0,1,127,0,1,8,34,8,4,12,68,2,60,8,28,30,0,2,16,0,1,2,28,82,18, 60,32,34,60,30,32,62,8,8,56,16,45,42,33,34,33,60,28,8,34,18,85,8, 20,8,8,8,8,34,0,2,2,34,32,34,34,16,34,34,8,4,40,8,73,34,34,34,34, 16,32,16,34,34,73,20,34,4,24,8,12,78,0,35,36,60,34,62,0,1,36,0,1, 81,36,36,1,28,85,0,2,8,16,2,0,1,34,26,28,0,1,8,34,18,18,22,106,0, 1,18,18,18,18,18,18,47,32,60,60,60,60,8,8,8,8,122,42,33,33,33,33, 33,8,45,34,34,34,34,20,34,36,2,2,2,2,2,2,9,32,34,34,34,34,8,8,8,8, 34,34,34,34,34,34,34,127,38,34,34,34,34,34,34,34,0,33,8,0,1,63,10, 22,37,0,1,16,4,0,1,8,0,3,8,34,8,8,2,126,2,34,8,34,2,0,2,8,127,4,16, 86,63,34,32,34,32,16,34,34,8,8,36,16,45,38,33,60,33,36,6,8,34,18, 54,20,8,16,8,8,8,34,0,2,30,34,32,34,62,16,34,34,8,4,56,8,73,34,34, 34,34,16,28,16,34,20,85,8,20,8,4,8,16,0,35,8,36,16,34,8,8,18,0,1, 81,26,72,1,0,1,34,0,2,8,30,28,0,1,34,10,28,0,1,8,28,9,22,17,22,4, 63,63,63,63,63,63,120,32,32,32,32,32,8,8,8,8,34,42,33,33,33,33,33, 20,41,34,34,34,34,8,34,34,30,30,30,30,30,30,63,32,62,62,62,62,8,8, 8,8,34,34,34,34,34,34,34,0,1,42,34,34,34,34,20,34,20,0,35,18,10,41, 34,0,1,16,4,0,1,8,0,3,16,34,8,16,2,4,2,34,16,34,2,0,2,4,0,1,8,0,1, 73,33,34,32,34,32,16,34,34,8,8,34,16,33,38,33,32,33,34,2,8,34,18, 34,20,8,16,8,4,8,0,3,34,34,32,34,32,16,38,34,8,4,36,8,73,34,34,34, 34,16,2,16,34,20,34,20,20,16,8,8,8,0,35,12,20,16,62,62,8,10,0,1,77, 0,1,36,1,0,1,28,0,6,34,10,0,4,18,42,34,42,28,33,33,33,33,33,33,72, 32,32,32,32,32,8,8,8,8,34,38,33,33,33,33,33,34,49,34,34,34,34,8,60, 34,34,34,34,34,34,34,72,32,32,32,32,32,8,8,8,8,34,34,34,34,34,34, 34,8,50,34,34,34,34,20,34,20,0,33,12,0,1,18,42,73,34,0,1,8,8,0,1, 8,12,0,1,24,16,34,8,32,34,4,34,34,16,34,34,24,24,2,0,1,16,16,32,33, 34,16,36,32,16,18,34,8,8,33,16,33,34,18,32,18,34,2,8,34,12,34,34, 8,32,8,4,8,0,3,34,34,16,38,34,16,26,34,8,4,34,8,73,34,34,34,38,16, 2,16,38,8,34,34,8,32,8,8,8,0,35,12,15,16,65,8,8,4,0,1,34,0,1,18,0, 5,127,0,3,54,10,0,4,36,79,68,79,32,33,33,33,33,33,33,72,16,32,32, 32,32,8,8,8,8,36,38,18,18,18,18,18,0,1,18,34,34,34,34,8,32,34,34, 34,34,34,34,34,72,16,34,34,34,34,8,8,8,8,34,34,34,34,34,34,34,8,34, 38,38,38,38,8,34,8,0,33,12,0,1,18,28,6,29,0,1,8,8,0,2,12,0,1,24,32, 28,8,62,28,4,28,28,16,28,28,24,24,0,3,16,28,33,60,14,56,62,16,14, 34,62,112,33,30,33,34,12,32,12,34,60,8,28,12,34,34,8,62,8,2,8,0,3, 29,60,14,26,28,16,2,34,8,4,33,8,73,34,28,60,26,16,60,14,26,8,34,34, 8,62,8,8,8,0,35,12,4,62,0,1,8,8,36,0,1,28,0,11,42,10,0,5,66,71,66, 32,33,33,33,33,33,33,79,14,62,62,62,62,62,62,62,62,56,34,12,12,12, 12,12,0,1,44,28,28,28,28,8,32,36,29,29,29,29,29,29,55,14,28,28,28, 28,8,8,8,8,28,34,28,28,28,28,28,0,1,92,26,26,26,26,8,60,8,0,36,8, 0,3,6,48,0,2,24,0,2,32,0,11,48,0,21,6,0,9,14,2,56,0,1,127,0,7,2,0, 2,4,0,5,32,2,0,7,16,0,1,6,8,48,0,35,12,0,4,8,24,0,13,32,10,0,1,4, 0,6,32,0,7,4,0,31,4,0,21,16,32,16,0,81,3,0,21,28,0,2,56,0,5,32,2, 0,7,48,0,39,12,0,19,32,0,2,24,0,6,30,0,7,24,0,31,24,0,21,48,32,48, 0,255,0,1 } ; efax-gtk-3.2.8/efax/efix.c.orig0000644000175000001440000003105711466007655013150 00000000000000#define Copyright "Copyright 1999 Ed Casas" #define Version "efix v 0.3" /* Copyright (C) 1999 Ed Casas 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 Please contact the author if you wish to use efax or efix in ways not covered by the GNU GPL. You may contact the author by e-mail at: edc@cce.com. */ const char *Usage = "Usage:\n" " %s [ option ]... file... \n" "Options (defaults):\n" " -i f input format (auto):\n" " fax fax (\"Group3\") 1-D coded image\n" " text text\n" " pbm raw PBM (portable bit map)\n" " tiffg3 TIFF, Group 3 fax compression\n" " tiffraw TIFF, no compression\n" " pcx mono PCX\n" " dcx mono DCX\n" " -o f output format (tiffg3):\n" " fax fax (\"Group3\") 1-D coded image\n" " pbm Portable Bit Map\n" " pgm Portable Gray Map (decimated by 4)\n" " pcl HP-PCL (e.g. HP LaserJet)\n" " ps Postscript (e.g. Apple Laserwriter)\n" " tiffg3 TIFF, Group 3 fax compression\n" " tiffraw TIFF, no compression\n" " pcx mono PCX\n" " dcx mono DCX\n" " -n pat printf() pattern for output file name (ofile)\n" " -f fnt use PBM font file fnt for text (built-in)\n" " -l n lines per text page (66)\n" " -v lvl print messages of type in string lvl (ewi)\n" " -s XxY scale input by X and Y (Y optional) (1x1)\n" " -r XxY resolution of output is X by Y (dpi, Y optional) (204x196)\n" " -R XxY resolution of input is X by Y (dpi, Y optional) (204x196)\n" " -p WxH pad/truncate output to width W by height H (215x297mm)\n" " -d R,D displace output right R, down D (opposite if -ve) (0,0)\n" " -O f overlay file f (none)\n" " -M ignore other options and base64 (MIME) encode stdin to stdout\n" "\n" "Add 'in', 'cm', 'mm', or 'pt' to -p and -d arguments (default in[ches]).\n" "Default output size and resolution is same as input (if known).\n" ; #include /* ANSI C */ #include #include #include #include #include #include "efaxlib.h" #include "efaxmsg.h" #ifndef INT_MAX #define INT_MAX 32767 #endif /* Allowed input and output formats. *** MUST match enum *** */ char *iformatstr[] = { " 3text", " 1pbm", " 2fax", " 4tiffg3", " 4tiffraw", " 6pcx", " 6pcxraw", " 8dcx", 0 } ; char *oformatstr[] = { " 1pbm" , " 2fax", " 3pcl", " 4ps", " 5pgm", " 7tiffg3", " 8tiffraw", "11pcx", "12pcxraw", "13dcx", 0 } ; /* Look up a string in a NULL-delimited table where the first character of each string is the digit to return if the rest of the string matches. Returns the value of the digit for the matching string or -1 if no matches. */ int lookup ( char **tab, char *s ) { char **p ; for ( p=tab ; p && *p && strcmp ( *p+2, s ) ; p++ ) ; return p && *p ? atoi ( *p ) : -1 ; } /* Extract pair of values from string. If it's a `dim'ension, two values are required and they are converted to inches, else the y value is optional. Returns 0 or 2 on error. */ int getxy ( char *arg, float *x, float *y, int dim ) { int i, n, nc=0, err=0 ; char c ; static char *unitstr[] = { " 0in", " 1cm", " 2mm", " 3pt", 0 } ; static float unitval[] = { 1.0, 2.54, 25.4, 72.0, 1.0 } ; if ( ! arg ) err = msg ( "E2 missing argument" ) ; if ( !x || !y ) err = msg ( "E2 can't happen (getxy)" ) ; if ( ! err ) { n = sscanf ( arg , "%f%c%f%n", x, &c, y, &nc ) ; switch ( n ) { case 0 : err = msg ( "E2bad X value in (%s)", arg ) ; break ; case 2 : err = msg ( "E2bad Y value in (%s)", arg ) ; break ; } } if ( ! err ) { if ( dim ) { if ( n != 3 ) { err = msg ( "Emissing Y dimension in (%s)", arg ) ; } else { while ( arg [ nc ] && isspace ( arg [ nc ] ) ) nc++ ; if ( arg [ nc ] ) { if ( ( i = lookup ( unitstr, arg+nc ) ) >= 0 ) { *x /= unitval [ i ] ; *y /= unitval [ i ] ; } else { err = msg ( "E2bad units: `%s'", arg+nc ) ; } } } } else { if ( n == 1 ) *y = *x ; } } if ( ! err ) msg ( "Aconverted (%s) into %f x %f", arg, *x, *y ) ; return err ; } /* Copy stdin to stdout while applying base64 (RFC 1521) encoding. This encoding must be applied after the file is complete since some output formats (e.g. TIFF) require seeking backwards within the (binary) file. */ int base64encode ( void ) { int err=0, c ; uchar n=0, m=0, bits=0 ; static uchar chartab[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/" ; while ( ( c = fgetc ( stdin ) ) >= 0 ) { switch ( n ) { case 0: putc ( chartab [ c >> 2 ], stdout ) ; bits = c & 0x3 ; n = 1 ; break ; case 1: putc ( chartab [ (bits << 4) | ( c >> 4 ) ], stdout ) ; bits = c & 0xf ; n = 2 ; break ; case 2: putc ( chartab [ (bits << 2) | ( c >> 6 ) ], stdout ) ; putc ( chartab [ c & 0x3f ], stdout ) ; n = 0 ; if ( ++m >= 18 ) { putc ( '\n', stdout ) ; m = 0 ; } break ; } } switch ( n ) { case 0: break ; case 1: putc ( chartab [ (bits << 4) | ( 0 >> 4 ) ], stdout ) ; putc ( '=', stdout ) ; putc ( '=', stdout ) ; break ; case 2 : putc ( chartab [ (bits << 2) | ( 0 >> 6 ) ], stdout ) ; putc ( '=', stdout ) ; break ; } putc ( '\n', stdout ) ; return err ; } int main( int argc, char **argv) { int err=0, done=0, i, c ; int nr, pels, ovnr, ovpels, no ; /* run/pixel/repeat counts */ int linesout ; int page, ilines, olines ; /* page & line counts */ int xs, ys, w, h, ixsh, iysh ; /* integer scale, size & shift */ short runs [ MAXRUNS ] , ovruns [ MAXRUNS ] ; float /* defaults: */ xsc=1.0, ysc=1.0, /* scale */ xsh=0.0, ysh=0.0, /* shift */ dxres = 204.145, /* o/p res'n: 1728/215mm * 25.4 x */ dyres = 195.58, /* 7.7 * 25.4 */ dxsz = 215 / 25.4, /* o/p size: 8.5" x A4 */ dysz = 297 / 25.4 ; float /* arguments: */ axres = 0, ayres = 0, axsz = 0, aysz = 0, ainxres=0, ainyres=0 ; float /* values used: */ xres = 0, yres = 0, xsz = 0, ysz = 0 ; IFILE ifile, ovfile ; OFILE ofile ; char **ifnames, *ovfnames [ 2 ] = { 0, 0 } ; int iformat=I_AUTO, oformat=O_TIFF_FAX, pglines=0 ; char *ofname=0 ; faxfont font, *pfont=0 ; /* text font */ /* initialize */ argv0 = argv[0] ; setlocale ( LC_ALL, "" ) ; /* process arguments */ while ( !err && (c=nextopt(argc,argv,"n:i:o:O:v:l:f:r:s:p:d:R:M") ) != -1) { switch ( c ) { case 'n': ofname = nxtoptarg ; break ; case 'i': if ( ( iformat = lookup ( iformatstr, nxtoptarg ) ) < 0 ) err = msg ( "E2invalid input type (%s)", nxtoptarg ) ; break ; case 'o': if ( ( oformat = lookup ( oformatstr, nxtoptarg ) ) < 0 ) err = msg ( "E2invalid output type (%s)", nxtoptarg ) ; break ; case 'O': ovfnames[0] = nxtoptarg ; break ; case 'v': verb[0] = nxtoptarg ; msg ( "A " Version ) ; for ( i=0 ; i 0 ) ifile.page->xres = ainxres ; if ( ainyres > 0 ) ifile.page->yres = ainyres ; if ( ifile.page->xres <= 0 ) ifile.page->xres = dxres ; if ( ifile.page->yres <= 0 ) ifile.page->yres = dyres ; xres = axres > 0 ? axres : ifile.page->xres ; yres = ayres > 0 ? ayres : ifile.page->yres ; xsz = axsz > 0 ? axsz : ( ifile.page->w > 0 ? ifile.page->w / ifile.page->xres : dxsz ) ; ysz = aysz > 0 ? aysz : ( ifile.page->h > 0 ? ifile.page->h / ifile.page->yres : dysz ) ; w = xsz * xres + 0.5 ; /* output dimensions in pixels */ h = ysz * yres + 0.5 ; ixsh = xsh * xres ; /* x/y shifts in pixels/lines */ iysh = ysh * yres ; if ( ( w & 7 ) != 0 ) /* just about everything requires... */ msg ("Iimage width rounded to %d pixels", w = ( w + 7 ) & ~7 ) ; if ( ofile.format == O_PGM && h & 3 ) /* PGM x4 decimation requires... */ msg ("I PGM image height rounded up to %d lines", h = ( h + 3 ) & ~3 ) ; if ( w <= 0 || h <= 0 || xres < 0 || yres < 0 ) err = msg ( "E2negative/zero scaling/size/resolution" ) ; if ( ofile.format == O_PCL && /* check for strange PCL resolutions */ ( xres != yres || ( xres != 300 && xres != 150 && xres != 75 ) ) ) msg ( "Wstrange PCL resolution (%.0fx%.0f)", xres, yres ) ; if ( w > MAXBITS*8 ) /* make sure output will fit... */ err = msg( "E2requested output width too large (%d pixels)", w ) ; ofile.w = w ; ofile.h = h ; ofile.xres = xres ; ofile.yres = yres ; /* scale according to input file resolution */ xs = 256 * xsc * xres / ifile.page->xres + 0.5 ; ys = 256 * ysc * yres / ifile.page->yres + 0.5 ; if ( xs <= 0 || ys <= 0 ) err = msg ( "E2negative/zero scaling" ) ; if ( *ovfnames ) /* [re-]open overlay file */ if ( nextipage ( &ovfile , 0 ) ) { err=2 ; continue ; } if ( nextopage ( &ofile, page ) ) { err=2 ; continue ; } linesout=0 ; /* y-shift */ if ( iysh > 0 ) { writeline ( &ofile, ( ( *runs = w ), runs ), 1, iysh ) ; linesout += iysh ; } else { for ( i=0 ; i < -iysh ; i++ ) readline ( &ifile, runs, 0 ) ; } /* copy input to output */ olines = ilines = 0 ; while ( linesout < h ) { if ( ! ifile.lines || ( nr = readline ( &ifile, runs, &pels ) ) < 0 ) { break ; } else { ilines++ ; } if ( *ovfnames ) { if ( ( ovnr = readline ( &ovfile, ovruns, &ovpels ) ) >= 0 ) nr = runor ( runs, nr, ovruns, ovnr, 0, &pels ) ; } /* x-scale, x-shift & x-pad input line */ pels = ( xs == 256 ) ? pels : xscale ( runs, nr, xs ) ; pels += ( ixsh == 0 ) ? 0 : xshift ( runs, nr, ixsh ) ; nr = ( pels == w ) ? nr : xpad ( runs, nr, w - pels ) ; /* y-scale by deleting/duplicating lines. */ no = ( ( ilines * ys ) >> 8 ) - olines ; if ( linesout + no > h ) no = h - linesout ; olines += no ; writeline ( &ofile, runs, nr, no ) ; linesout += no ; } /* y-pad */ if ( linesout < h ) writeline ( &ofile, ( ( *runs = w ), runs ), 1, h - linesout ) ; if ( ferror ( ifile.f ) ) err = msg ( "ES2input error:" ) ; } nextopage ( &ofile, EOF ) ; return err ; } efax-gtk-3.2.8/efax/efix.10000644000175000001440000001373711466007655012134 00000000000000.TH EFIX 1 "February 1999" "" "" .UC 1 .SH NAME efix \- convert between fax, text, bit-map and gray-scale formats .SH SYNOPSIS .B efix [ .I options ] .I file... .SH OPTIONS Where \fIoptions\fP are: .TP 9 .B -i \fIf\fP the input image is in format \fIf\fP. Default is to automatically determine the input type from its contents. .TP 9 .B fax fax ("Group3") 1-D coded image .TP 9 .B text text. Line feeds separate lines, form feeds cause page breaks and tabs are expanded assuming tabs every 8 columns. .TP 9 .B pbm raw PBM (portable bit map) .TP 9 .B tiffg3 TIFF format with Group 3 (fax) compression. .TP 9 .B tiffraw TIFF format with no compression. .TP 9 .B -o \fIf\fP write the output in format \fIf\fP. Default is tiffg3. .TP 9 .B fax fax ("Group3") 1-D coded image .TP 9 .B pbm raw PBM .TP 9 .B pgm raw PGM (Portable Gray Map). Gray-scale values are produced by summing pixels in 4x4 pixel blocks. The output file is 1/4 of the size given by \-p. The resulting image has 17 discrete values between 0 and 255. .TP 9 .B pcl HP-PCL (e.g. HP LaserJet). .TP 9 .B ps encapsulated Postscript (e.g. Apple Laserwriter). The file is compressed using differential coding vertically and run-length coding horizontally. There is no provision for positioning the image within the page and so the image will appear at the lower left corner of the page when printed. .TP 9 .B tiffg3 TIFF format with Group 3 (fax) compression. .TP 9 .B tiffraw TIFF format with no compression. .TP 9 .B -n \fIpat\fP use the printf(3) pattern \fIpath\fP to generate the output file name. Up to three %d escapes will be replaced by the page number starting with 1 (e.g. \-n order.%03d will create file names order.001, order.002, etc.) .TP 9 .B -v \fIlvl\fP print messages of type in string \fIlvl\fP. Each \fIlower-case\fP letter in \fIlvl\fP enables one type of message: .RS 12 .B e - errors .br .B w - warnings .br .B i - information messages .br .B a - program arguments .br .B f - file format details .RE .RS 9 The default is "ewi". .RE .TP 9 .B -f \fIfnt\fP use font file \fIfnt\fP for text. The font file for an WxH font should be a bit map of an image of H rows and 256*W columns. Each successive WxH cell contains the bit map for characters with codes from 0 to 255. The default is to use a built-in 8x16 font. .TP 9 .B -s \fIX\fP\fRx\fP\fIY\fP scale the input by a factor of X horizontally and Y vertically. Scaling does not change the size of the output (use \-p). If Y is not specified it is assumed to be the same as X. Any floating point value may be used for X and Y. The default is 1,1. .TP 9 .B -d \fIR\fP\fR,\fP\fID\fP displace the output right by R and down by D (opposite if negative). See below for units. Default is 0,0. .TP 9 .B -p \fIW\fP\fRx\fP\fIH\fP truncate or pad the output to generate an image of width W and height H. This does not scale the input. See below for units. The default is the size of the input image if it can be determined or A4 (215x297mm) if it can't. .TP 9 .B -r \fIX\fP\fRx\fP\fIY\fP assume an output device resolution of X by Y dots per inch. If Y is not specified it is assumed to be the same as X. The default is the input resolution if it can be determined or the fax resolution of 204.1x195.6 dpi if it can't. .TP 9 .B -R \fIX\fP\fRx\fP\fIY\fP assume an input device resolution of X by Y dots per inch. If Y is not specified it is assumed to be the same as X. The default is the input resolution if it can be determined or the fax resolution of 204.1x195.6 dpi if it can't. .TP 9 .B -l \fIn\fP place n lines per page during text input. Default is 66. .TP 9 .B -O \fIf\fP overlay (logical OR) the image from file f into the output. Use "\-" for standard input (\-O\-). Default is no overlay file. .TP 9 .B -M ignore all other options and copy the standard input to the standard output while applying base64 (MIME) encoding as specified by RFC 1521. .SH FILES If no \-n options are given, output is written to the standard output. .SH UNITS The units of the W, H, R, and D values above are in inches by default. Any floating point value may be used. Units of inches, centimetres, millimetres or points (72 per inch) can be used instead by appending one of the strings `in', `cm', `mm', or `pt' to the argument (e.g. \-d2,4cm). .SH CUT AND PASTE The \-d and \-p options allow efix to cut out images from received faxes for use in other faxes or documents. The \-d option specifies the top left portion of the desired image and the \-p option gives the size of the cut image. For example, the command .RS .nf .ft CW efix \-d-5,\-8 \-p2,1 sample.001 >sig.001 .ft P .fi .RE would cut out part of the input with its top left corner 5 inches from the left edge and 8 inches from top of the input image. The output image would be 2 inches wide and 1 inch high. The \-O option allows efix to superimpose two or more images. The overlay image must be in fax format and cannot be scaled, truncated or shifted. However, multiple efix commands may be used to transform images before combining them. For example, the commands .RS .nf .ft CW efix \-d4,8 signature >sig.fax efix \-O sig.fax letterhead >letterhead.fax efix \-O letterhead.fax letter.002 >letter.002.new .ft P .fi .RE will shift the image in the file signature down 8 inches and right 4 inches and combine (overlay) it with the images in the files letterhead and letter.002. .SH REFERENCES Gunter Born, "The File Formats Handbook", International Thompson Computer Press, 1995. .SH COPYRIGHT efix is copyright 1994 -- 1999 by Ed Casas. It may be used, copied and modified under the terms of the GNU Public License. .SH DISCLAIMER Although \fBefix\fP has been tested it may have errors that will prevent it from working correctly on your system. Some of these errors may cause serious problems including loss of data. .SH SEE ALSO .BR efax(1), .BR ghostscript(1), .BR pbm(5), .BR pgm(5). .SH BUGS Only reads two types of TIFF compression formats. Does not write multi-page TIFF files (a feature). efax-gtk-3.2.8/efax/efax.10000644000175000001440000012072711466007655012122 00000000000000.TH EFAX 1 "August 2007" "" "" .UC 1 .SH NAME efax \- send/receive faxes with Class 1, 2 or 2.0 fax modem .ce 1 (Please read the \fBfax\fP man page first.) .SH SYNOPSIS .B efax [ \fIoptions\fP ] [ \fB-t\fP \fInum\fP [ \fIfile\fP... ] ] .SH OPTIONS Where \fIoptions\fP are: .TP 9 .B -a \fIcmd\fP use the command \fBATcmd\fP when answering the phone. The default is "A". .TP 9 .B -c \fIcaps\fP set the local modem capabilities. See the section on capabilities below for the format and meaning of \fIcaps\fP. For Class 1 the default is 1,n,0,2,0,0,0,0 where n is the highest speed supported by the modem. For Class 2 the default is determined by the modem. .TP 9 .B -d \fIdev\fP use the fax modem connected to device \fIdev\fP. The default is \fB/dev/modem\fP. .TP 9 .B -e \fIcmd\fP if a \fBCONNECT\fP response indicates a voice call, the shell \fB/bin/sh\fP is exec(2)'ed with \fIcmd\fP as its command. .TP 9 .B -f \fIfnt\fP use font file \fIfnt\fP for generating the header. The default is a built-in 8x16 font. See the efix(1) \-f option for the font file format. .TP 9 .B -g \fIcmd\fP if a \fBCONNECT\fP (or \fBDATA\fP) response indicates a data call, the shell \fB/bin/sh\fP is exec(2)'ed with \fIcmd\fP as its command. \fIcmd\fP is a printf(3) format that may contain up to 6 %d escapes which are replaced by the baud rate following the most recent \fBCONNECT\fP message. \fIcmd\fP typically exec's getty(8). .TP 9 .B -h \fIhdr\fP put string `hdr' at the top of each page. The first %d in `hdr' is replaced by the page number and the second, if any, is replaced by the number of pages being sent. .TP 9 .B -i \fIstr\fP .TP 9 .B -j \fIstr\fP .TP 9 .B -k \fIstr\fP send the command \fBAT\fP\fIstr\fP to the modem to initialize it. \-i commands are sent before the modem is put into fax mode, \-j commands after the modem is in fax mode, and \-k commands just before efax exits. The only default is a hang-up (ATH) command that is sent before exiting only if no other \-k options are given. Multiple options may be used. .TP 9 .B -l \fIid\fP set the local identification string to \fIid\fP. \fIid\fP should be the local telephone number in international format (for example "+1 800 555 1212"). This is passed to the remote fax machine. Some fax machines may not accept characters other than numbers, space, and '+'. .TP 9 .B -n force line buffering of stdout instead of block buffering. This might be necessary if outputting UTF-8 to a terminal with translated text via NLS, since otherwise the terminal may be confronted (when the buffer is flushed when full) with only a partially formed UTF-8 character. Don't use this option unless you have to. .TP 9 .B -o \fIopt\fP use option \fIopt\fP to accommodate a non-standard fax modem protocol. See the MODEM REQUIREMENTS section below for more details. The \fIopt\fPions are: .TP 9 .B 0 Force use of Class 2.0 fax modem commands. The modem must support Class 2.0. .TP 9 .B 2 Force use of Class 2 fax modem commands. The modem must support Class 2. .TP 9 .B 1 Force use of Class 1 fax modem commands. The modem must support Class 1. By default efax queries the modem and uses the first of the three above classes which is supported by the modem. .TP 9 .B a use software adaptive answer method. If the first attempt to answer the call does not result in a data connection within 8 seconds the phone is hung up temporarily and answered again in fax mode (see "Accepting both fax and data calls" below). .TP 9 .B e ignore errors in modem initialization commands. .TP 9 .B f use "virtual flow control". efax tries to estimate the number of bytes in the modem's transmit buffer and pauses as necessary to avoid filling it. The modem's buffer is assumed to hold at least 96 bytes. This feature does not work properly with Class 2 modems that add redundant padding to scan lines. Use this option only if you have problems configuring flow control. .TP 9 .B h use hardware (RTS/CTS) in addition to software (XON/XOFF) flow control. Many modems will stop responding if this option is used. See the section `Resolving Problems' before using this option. .TP 9 .B l halve the time between testing lock files when waiting for other programs to complete. By default this is 8 seconds. For example -olll sets the interval to 1 second. .TP 9 .B n ignore requests for pages to be retransmitted. Use this option if you don't care about the quality of the received fax or if the receiving machine is too fussy. Otherwise each page may be retransmitted up to 3 times. .TP 9 .B r do not reverse bit order during data reception for Class 2 modems. Only Multitech modems require this option. Not normally required since efax detects these modems. .TP 9 .B x send XON (DC1) instead of DC2 to start data reception. Applies to a very few Class 2 modems only. .TP 9 .B z delay an additional 100 milliseconds before each modem initialization or reset command. The initial delay is 100 ms. For example, \-ozzz produces a 400 ms delay. Use with modems that get confused when commands arrive too quickly. .TP 9 .B -q \fIn\fP ask for retransmission of pages received with more than \fIn\fP errors. Default is 10. .TP 9 .B -r \fIpat\fP each received fax page is stored in a separate file. The file name is created using \fIpat\fP as a strftime(3) format string. A page number of the form .001, .002, ... is appended to the file name. If \fIpat\fP is blank ("") or no \-r option is given a default string of "%m%d%H%M%S" is used. .\" If a file already exists, efax terminates with an error. .TP 9 .B -s remove lock file(s) after initializing the modem. This allows outgoing calls to proceed when efax is waiting for an incoming call. If efax detects modem activity it will attempt to re-lock the device. If the modem has been locked by the other program efax will exit and return 1 (``busy''). Normally a new efax process is then started by init(8). The new efax process will then check periodically until the lock file disappears and then re-initialize the modem. .TP 9 .B -t \fInum [file\fP...] dial telephone number \fInum\fP and send the fax image files \fIfile\fP.... If used, this must be the last argument on the command line. The telephone number \fInum\fP is a string that may contain any dial modifiers that the modem supports such as a T prefix for tone dialing or commas for delays. If no file names are given the remote fax machine will be polled. If no \-t argument is given efax will answer the phone and attempt to receive a fax. .TP 9 .B -u use UTF-8 and not locale codeset (if different) for messages to stderr and stdout (see also the \-n option) \- this is useful if efax is used with a front-end which expects UTF-8 encoding of internationalized strings. .TP 9 .B -v \fIstrng\fP select types of messages to be printed. Each \fIlower-case\fP letter in \fIstrng\fP enables one type of message: .RS 12 .B e - errors .br .B w - warnings .br .B i - session progress information .br .B n - capability negotiation information .br .B c - modem (AT) commands and responses .br .B h - HDLC frame data (Class 1 only) .br .B m - modem output .br .B a - program arguments .br .B r - reception error details .br .B t - transmission details .br .B f - image file details .br .B x - lock file processing .RE .RS 9 Up to two \-v options may be used. The first is for messages printed to the standard error and the second is for messages to the standard output. The default is "ewin" to the standard error only. .RE .TP 9 .B -w wait for an OK or CONNECT prompt instead of issuing an answer (\fBATA\fP) command to receive a fax. Use this option when the modem is set to auto-answer (using S0=\fIn\fP) or if another program has already answered the call. .TP 9 .B -x \fIlkf\fP use a UUCP-style lock file \fIlkf\fP to lock the modem device before opening it. If the device is locked, efax checks every 15 seconds until it is free. Up to 16 \-x options may be used if there are several names for the same device. A `#' prefix on the file name creates an binary rather than text (HDB-style) lock file. This is the reverse of what was used by previous efax versions. .SH FAX FILE FORMATS efax can read the same types of files as \fBefix(1)\fP including text, T.4 (Group 3), PBM, single- and multi-page TIFF (G3 and uncompressed). efax automatically determines the type of file from its contents. TIFF files are recommended as they contain information about the image size and resolution. Each page to be sent should be converted to a separate TIFF format file with Group 3 (G3) compression. Received files are also stored in this format. The EXAMPLES section below shows how efix and other programs can be used to create, view and print these files. .SH OPERATING SYSTEM REQUIREMENTS The operating system must provide short response times to avoid protocol timeouts. For Class 2 and 2.0 modems the delay should not exceed 1 or 2 seconds. When using Class 1 modems the program must respond to certain events within 55 milliseconds. Longer delays may cause the fax protocol to fail in certain places (between DCS and TCF or between RTC and MPS). Class 1 modems should therefore not be used on systems that cannot guarantee that the program will respond to incoming data in less than 55 milliseconds. In particular, some intelligent serial cards and terminal servers may introduce enough delay to cause problems with Class 1 operation. The operating system must also provide sufficient low-level buffering to allow uninterrupted transfer of data between the modem and a disk file at the selected baud rate, typically 9600 bps. Since the fax protocol does not provide end-to-end flow control the effectiveness of flow control while receiving is limited by the size of the modem's buffer. This can be less than 100 bytes. Efax does not use flow control during reception. .SH MODEM REQUIREMENTS The "Group" is the protocol used to send faxes between fax machines. Efax supports the Group 3 protocol used over the public telephone network. The "Class" is the protocol used by computers to control fax modems. Efax supports Class 1, 2 and 2.0 fax modems. Most fax modems use XON/XOFF flow control when in fax mode. This type of flow control adds very little overhead for fax use. Many modems have unreliable hardware (RTS/CTS) flow control in fax mode. By default efax enables only XON/XOFF flow control and the -oh option must be used to add hardware flow control. While some modems have serial buffers of about 1k bytes, many inexpensive modems have buffers of about one hundred bytes and are thus more likely to suffer overruns when sending faxes. A few older modems may need a delay between commands of more than the default value used by efax (100 milliseconds). If the delay is too short, commands may not echo properly, may time out, or may give inconsistent responses. Use one or more \fB-oz\fP options to increase the delay between modem initialization commands and use the E0 modem initialization command to disable echoing of modem commands. By default efax sends DC2 to start the data flow from the modem when receiving faxes from Class 2 modems. A few older modems require XON instead. Use of DC2 would cause the modem to give an error message and/or the program to time out. The \fB-ox\fP option should be used in this case. A few older Class 2 modems (e.g. some Intel models) don't send DC2 or XON to start the data flow to the modem when sending faxes. After waiting 2 seconds efax will print a warning and start sending anyways. A very few Class 2 modems do not reverse the bit order (MSB to LSB) by default on receive. This might cause errors when trying to display or print the received files. The \fB-or\fP option can be used in this case. Some inexpensive "9600 bps" fax modems only \fItransmit\fP at 9600 bps and reception is limited to 4800 bps. The following Class 1 modems have been reported to work with efax: AT&T DataPort, .\" Andrea Gozzi , v0.6, SCO 3.2.0, (Class 1) Cardinal Digital Fax Modem (14400), .\" awk0%navajo@gte.com, v0.6, linux 1.0, downloading fax144c.car Digicom Scout+, .\" umlin000@CC.UManitoba.CA, v 0.6, Linux 1.1.12 Motorola Lifestyle 28.8, .\" mortbay@ozemail.com.au Motorola Power 28.8, .\" danz@wv.mentorg.com, Linux 1.2.10 QuickComm Spirit II, .\" umlin000@CC.UManitoba.CA, v 0.6, Linux 1.1.12 .\" gsmith@softsmiths.oz.au, v 0.7a, add "*F1" for Xon/Xoff Smartlink 9614AV-Modem, .\" gt@sky.gun.de, v0.6, Linux 1.1.15 Supra Faxmodem 144LC, .\" john@johncon.johncon.com, v0.6, Consensys (ie., Unixware) 4.2 USR Courier V.32bis Terbo, .\" meyer@geomatic.no, v0.6, SunOS 4.1.3 USR Sportster (V.32 and V.34), .\" satyr!kayvan@apple.com (Kayvan Sylvan), v0.6, Linux (?) Zoom AFC 2.400, .\" hausutzu@pse.panic.bln.sub.org (Utz-Uwe Haus), v0.6, Linux Zoom VFX14.4V. .\" edc@ee.ubc.ca (me!), v0.6, Linux The following Class 2 modems have been reported to work with efax: 14k4 Amigo Communion fax/modem, .\" bekker@tn.utwente.nl, efax0.5 Adtech Micro Systems 14.4 Fax/modem, .\" gmaughan@grape.fcit.monash.edu.au, Linux 1.2.10, efax 07a askey modem type 1414VQE, .\" thowi@chiba.escape.de, efax06?, Linux? AT&T DataPort, .\" ingber@alumni.caltech.edu (Class 2) ATT/Paradyne, .\" john@johncon.johncon.com AT&T Paradyne PCMCIA, .\" jh@datanet.tele.fi (Juha Heinanen) Boca modem, .\" ? BOCA M1440E, .\" v0.6a, SunOS 4.1.1, Linux 1.0.9 .\" hsw1@papa.attmail.com Crosslink 9614FH faxmodem, .\" ? FuryCard DNE 5005, .\" a PCMCIA Class 3 faxmodem .\" ron@draconia.hacktic.nl GVC 14.4k internal, .\" jchen@ee.mcgill.ca, 0.6a w/ stty fax patch, Linux kernel 1.1.59 Intel 14.4 fax modem, .\" (matloff@cs.ucdavis.edu) Megahertz 14.4, ,\" norman@bellcore.com Microcom DeskPorte FAST ES 28.8, .\" Skip Montanaro (skip@automatrix.com), 0.6a, Linux Motorola UDS FasTalk II, .\" Raj Mathur (root@darbari.ncst.ernet.in), 0.6a, Linux 1.1.48 MultiTech 1432MU, .\"reb@pdsf.ssc.gov Practical Peripherals PM14400FXMT, .\" (DEC Alpha AXP 3000/500 running OSF/1 V1.3) Supra V32bis, .\" john@johncon.johncon.com, v0.5b, SysV R4.2 .\" tbucks!timothy@csn.org .\" (ROCKWELL) .\" Alec.Muffett@UK.Sun.COM (Alec Muffett), Linux 1.1.51, .\" Supra FAXModem v.32bis Telebit Worldblazer, .\" blurfl!jhood@Dartmouth.EDU .\" Telebit Worldblazer with ROM version LA7.02. (requires -or) .\" (my configuration required hardware flow control) .\" Dario_Ballabio@milano.europe.dg.com, v 0.6, Version LA7.05C. TKR DM-24VF+, .\" rainer.dorsch@student.uni-ulm.de Twincom 144/DFi, .\" (ROCKWELL, V.32AC, V1.270 TR14-Jxxx-001) ViVa 14.4/Fax modem, .\" Robert.Sprockeels@csc.be, v0.6a, Linux Vobis Fax-Modem (BZT-approved), .\" klein@pc-klein.zxa.basf-ag.de (Peter Klein), Linux, kernel 0.99.14 .\" beck@irs.inf.tu-dresden.de (Andre Beck), v 0.6, Ultrix 4.3, gcc V2.5.8: .\" gcc -ansi -D_XOPEN_SOURCE -O2 efax.c -o efax -lcP Zoom VFX14.4V, .\" edc@ee.ubc.ca (me!), v0.6, Linux ZyXEL U-1496E[+], .\" plph@umcc.umich.edu, v0.3 & faxmodem ROM version 5.05M) .\" requires -or .\" Marc@Synergytics.Com, v0.5a & ZyXEL 1496E Plus, ROM Version 6.11a) .\" -or -i '+FCLASS=2;+FCR=1' -c '+FDCC=1,5,2,2,0,0,0,0' ZyXEL Elite 2864I. .\" schlatt@dial.eunet.ch, v0.7a, using -Xn (n<4) .SH MODEM INITIALIZATION OPTIONS The required modem initialization commands are generated by efax. Additional commands may be supplied as command-line arguments. The modem must be set up to issue verbose(text) result codes. The following command does this and is sent by efax before trying to initialize the modem. .TP 9 .BR Q0V1 respond to commands with verbose result codes .PP The following commands may be useful for special purposes: .TP 9 .BR X3 don't wait for dial tone before dialing. This may be used to send a fax when the call has already been dialed manually. In this case use an empty string ("") as the first argument to the \fB-t\fP command. Use \fBX4\fP (usual default) to enable all result codes. .TP 9 .BR M2 leave the monitor speaker turned on for the duration of the call (use \fBM0\fP to leave it off). .TP 9 .BR L0 turn monitor speaker volume to minimum (use \fBL3\fP for maximum). .TP 9 .BR E0 disable echoing of modem commands. See the Resolving Problems section below. .TP 9 .BR &D2 returns the modem to command mode when DTR is dropped. The program drops DTR at the start and end of the call if it can't get a response to a modem command. You can use \fB&D3\fP to reset the modem when DTR is dropped. .TP 9 .BR S7=120 wait up to two minutes (120 seconds) for carrier. This may be useful if the answering fax machine takes a long time to start the handshaking operation (e.g. a combined fax/answering machine with a long announcement). .SH CAPABILITIES The capabilities of the local hardware and software can be set using a string of 8 digits separated by commas: .BR \fIvr\fP,\fIbr\fP,\fIwd\fP,\fIln\fP,\fIdf\fP,\fIec\fP,\fIbf\fP,\fIst\fP where: .TP 9 .I vr \fP (vertical resolution) = 0 for 98 lines per inch .br 1 for 196 lpi .TP 9 .I br \fP (bit rate) = 0 for 2400 bps .br 1 for 4800 .br 2 for 7200 .br 3 for 9600 .br 4 for 12000 (V.17) .br 5 for 14400 (V.17) .TP 9 .I wd \fP (width) = 0 for 8.5" (21.5 cm) page width .br 1 for 10" (25.5 cm) .br 2 for 12" (30.3 cm) .TP 9 .I ln \fP (length) = 0 for 11" (A4: 29.7 cm) page length .br 1 for 14" (B4: 36.4 cm) .br 2 for unlimited page length .TP 9 .I df \fP (data format) = 0 for 1-D coding .br 1 for 2-D coding (not supported) .TP 9 .I ec \fP (error correction) = 0 for no error correction .\" .br .\" 1 for EC mode with 64 byte frames (not supported) .\" .br .\" 2 for EC mode with 256 byte frames (not supported) .TP 9 .I bf \fP (binary file) = 0 for no binary file transfer .TP 9 .I st \fP (minimum scan time) = 0 for zero delay per line .br 1 for 5 ms per line .br 3 for 10 ms per line .br 5 for 20 ms per line .br 7 for 40 ms per line .PP When \fIreceiving\fP a fax the \fIvr\fP, \fIwd\fP, and \fIln\fP fields of the capability string should be set to the maximum values that your display software supports. The default is 196 lpi, standard (8.5"/21.5cm) width and unlimited length. When \fIsending\fP a fax efax will determine \fIvr\fP and \fIln\fP from the image file and set \fIwd\fP to the default. If the receiving fax machine does not support high resolution (\fIvr\fP=1) mode, efax will reduce the resolution by combining pairs of scan lines. If the receiving fax machine does not support the image's width then efax will truncate or pad as required. Most fax machines can receive \fIln\fP up to 2. Few machines support values of \fIwd\fP other than 0. .SH HEADERS efax adds blank scan lines at the top of each image when it is sent. This allows room for the page header but increases the length of the image (by default about 0.1" or 2.5mm of blank space is added). The header placed in this area typically includes the date and time, identifies the, and shows the page number and total pages. Headers cannot be disabled but the header string can be set to a blank line. The default font for generating the headers is the built-in 8x16 pixel font scaled to 12x24 pixels (about 9 point size). Note that both efax and efix have \-f options to specify the font. efIx uses the font to generate text when doing text-to-fax conversions (during "fax make") while efAx uses the font to generate the header (during "fax send"). .SH SESSION LOG A session log is written to the standard error stream. This log gives status and error messages from the program as selected by the \fB-v\fP option. A time stamp showing the full time or just minutes and seconds is printed before each message. Times printed along with modem responses also show milliseconds. .SH RETURN VALUES The program returns an error code as follows: .TP 9 0 The fax was successfully sent or received. .TP 9 1 The dialed number was busy or the modem device was in use. Try again later. .TP 9 2 Something failed (e.g. file not found or disk full). Don't retry. Check the session log for more details. .TP 9 3 Modem protocol error. The program did not receive the expected response from the modem. The modem may not have been properly initialized, the correct \fB-o\fP options were not used, or a bug report may be in order. Check the session log for more details. .TP 9 4 The modem is not responding. Operator attention is required. Check that the modem is turned on and connected to the correct port. .TP 9 5 The program was terminated by a signal. .SH EXAMPLES .B Creating fax (G3) files The efix program can be used to convert text files to TIFF-G3 format. For example, the following command will convert the text file \fBletter\fP to the files \fBletter.001\fP, \fBletter.002\fP, etc,: .IP .nf .ft CW efix \-nletter.%03d letter .ft P .fi .LP Ghostscript's \fBtiffg3\fP driver can generate fax files in TIFF-G3 format from postscript files. For example, the command: .IP .nf \f(CW gs \-q \-sDEVICE=tiffg3 \-dNOPAUSE \\ -sOutputFile=letter.%03d letter.ps &1 >> fax.log .ft P .fi .LP .B Sharing the modem with outgoing calls The modem device can be shared by programs that use the UUCP device locking protocol. This includes pppd, chat, minicom, kermit, uucico, efax, cu, and many others others. However, locking will only work if all programs use the same lock file. efax will lock the modem device before opening it if one or more UUCP lock file names are given with \fB-x\fP options. Most programs place their lock files in the \fR/usr/spool/uucp\fP or \fR/var/lock\fP directories and use the name \fRLCK..\fP\fIdev\fP where \fIdev\fP is the name of the device file in the /dev directory that is to be locked. If the \fB-s\fP (share) option is used, the lock file is removed while waiting for incoming calls so other programs can use the same device. If efax detects another program using the modem while it is waiting to receive a fax, efax exits with a termination code of 1. A subsequent efax process using this device will wait until the other program is finished before re-initializing the modem and starting to wait for incoming calls again. Programs that try to lock the modem device by using device locking facilities other than UUCP lock files not be able to use this arbitration mechanism because the device will still be open to the efax process. In this case you will need to kill the efax process (e.g. "fax stop") before starting the other program. When efax is waiting for a fax it leaves the modem ready to receive in fax mode but removes the lock file. When a slip or PPP program takes over the modem port by setting up its own lock file efax cannot send any more commands to the modem -- not even to reset it. Therefore the other program has to set the modem back to data mode when it starts up. To do this add a modem reset command (send ATZ expect OK) to the beginning of your slip or PPP chat script. .B Accepting both fax and data calls Many modems have an adaptive data/fax answer mode that can be enabled using the \fB-j+FAE=1\fP (for Class 1) or \fB-jFAA=1\fP (for Class 2[.0]) initialization string. The type of call (data or fax) can then be deduced from the modem's responses. Some modems have limited adaptive answer features (e.g. only working properly at certain baud rates or only in Class 2) or none at all. In this case use the initialization string \fB-i+FCLASS=0\fP to answer in data mode first and the \fB-oa\fP option to then hang up and try again in fax mode if the first answer attempt was not successful. This method only works if your telephone system waits a few seconds after you hang up before disconnecting incoming calls. If the \fB-g\fP option is used then the option's argument will be run as a shell command when an incoming data call is detected. Typically this command will exec \fBgetty\fP(8). This program should expect to find the modem already off-hook and a lock file present so it should not try to hang up the line or create a lock file. Note that the modem should be set up to report the DCE-DTE (modem-computer, e.g. CONNECT 38400) speed, not the DCE-DCE (modem-modem, e.g. CONNECT 14400) speed. For many modems the initialization option \-iW0 will set this. The following command will make efax answer incoming calls on \fB/dev/cua1\fP on the second ring. This device will be locked using two different lock files but these lock files will be removed while waiting for incoming calls (\fB-s\fP). If a data call is detected, the \fBgetty\fP program will be run to initialize the terminal driver and start a \fBlogin\fP(1) process. Received fax files will be stored using names like \fBDec02-12.32.33.001\fP, in the \fB/usr/spool/fax/incoming\fP directory and the log file will be appended to \fB/usr/spool/fax/faxlog.cua1\fP. .IP .nf .ft CW efax \-d /dev/cua1 \-j '+FAA=1' \\ \-x /usr/spool/uucp/LCK..cua1 \\ \-x /usr/spool/uucp/LCK..ttyS1 \\ \-g "exec /sbin/getty \-h /dev/cua1 %d" \\ \-iS0=2 \-w \-s \\ \-r "/usr/spool/fax/incoming/%b%d-%H.%I.%S" \\ >> /usr/spool/fax/faxlog.cua1 2>&1 .ft P .fi .LP Note that adaptive answer of either type will not work for all callers. For some data calls the duration of the initial data-mode answer may be too short for data handshaking to complete. In other cases this duration may be so long that incoming fax calls will time out before efax switches to fax mode. In addition, some calling fax modems mistake data-mode answering tones for fax signaling tones and initiate fax negotiation too soon. If you use software adaptive answer you can reduce the value of the initial data-mode answer (set by TO_DATAF in efax.c) to get more reliable fax handshaking or increase it for more reliable data handshaking. However, if you need to provide reliable fax and data service to all callers you should use separate phone numbers for the two types of calls. When a call is answered the modem goes on-line with the computer-to-modem baud rate fixed at the speed used for the most recent AT command. When efax is waiting for a fax or data call it sets the interface speed to 19200 bps since this is the speed required for fax operation. This prevents full use of 28.8kbps modem capabilities. .SH USING INIT TO RUN EFAX efax can answer all incoming calls if you place an entry for efax in \fB/etc/inittab\fP (for SysV-like systems) or \fB/etc/ttytab\fP (for BSD-like systems). The \fBinit\fP(8) process will run a new copy of efax when the system boots up and whenever the previous efax process terminates. The inittab or ttytab entry should invoke efax by running the \fBfax\fP script with an \fBanswer\fP argument. For example, placing the following line in \fB/etc/inittab\fP (and running "kill \-1 1") will make init run the \fBfax\fP script with the argument \fBanswer\fP every time previous process terminates and \fBinit\fP is in runlevel 4 or 5. .IP .nf .ft CW s1:45:respawn:/bin/sh /usr/bin/fax answer .ft P .fi .LP For BSD-like systems (e.g. SunOS), a line such as the following in \fB/etc/ttytab\fP will have the same effect: .IP .nf .ft CW ttya "/usr/local/bin/fax answer" unknown on .ft P .fi .LP You should protect the fax script and configuration files against tampering since init will execute them as a privileged (root) process. If you will be allowing data calls via getty and login you should ensure that your system is reasonably secure (e.g. that all user id's have secure passwords). If efax exec()'s getty properly but you get a garbled login prompt then there is probably a baud rate mismatch between the modem and the computer. First, check the efax log file to make sure the modem's CONNECT response reported the serial port speed (e.g. 19200), \fBnot\fP the modem-modem speed (e.g. 14400). Next, check the getty options and/or configuration files (e.g. /etc/gettydefs) for that particular baud rate. Then run getty manually with the same arguments and verify the port settings using ``stty $LOCKF $BIN $* rm $LOCKF fi .ft P .fi .LP .SH DELIVERING RECEIVED FAXES BY E-MAIL The "fax answer" script described above can be configured to e-mail the fax files received by the previous fax answer process to a "fax manager" who can then forward the fax to the correct recipient. The received fax files are send as MIME attachments, one file per page, using the ``base64'' text encoding and the ``image/tiff'' file format. To view the fax images directly from your e-mail reader you will have to configure it with an application that can display files of type image/tiff. Typically this is specified in a ``mailcap'' file. For example, placing the following line in /etc/mailcap will cause the fax file attachments to be displayed using the ``fax view'' command. .ft CW image/tiff; fax view %s .ft P .SH SENDING FAXES USING THE PRINT SPOOLER You can configure a "fax" printer into the lpr print spooler that will fax a document out using efax instead of printing it. This allows a network server running efax to send faxes on behalf of other machines, including non-Unix clients. In the following steps use the directories specified in the fax script if they are different than /usr/bin and /var/spool/fax (FAXDIR). To set up a fax printer do the following as root: (1) Create a link to the fax script called ``faxlpr'' so the fax script can determine when it is being invoked from the print spooler: .ft CW ln \-s /usr/bin/fax /usr/bin/faxlpr .ft P (2) Edit /etc/printcap and add an entry such as: .IP .nf .ft CW fax:lp=/dev/null:sd=/var/spool/fax:if=/usr/bin/faxlpr: .ft P .fi .LP to define a printer called "fax". Print files will be spooled to the /var/spool/fax (sd=) directory and then piped to the /usr/bin/faxlpr filter (if=). Error messages will appear on /dev/console. (3) Create and/or set the permissions to allow anyone to read and write in the fax spool directory. For example: .IP .nf .ft CW mkdir /var/spool/fax chmod 777 /var/spool/fax .ft P .fi .LP (4) Create a printer daemon lock file that is readable by anyone: .IP .nf .ft CW touch /var/spool/fax/lock chmod 644 /var/spool/fax/lock .ft P .fi .LP You should now be able to send a fax using the lpr interface by using a command such as: .IP .nf .ft CW lpr \-P fax \-J "555 1212" file.ps .ft P .fi .LP where the \-J option is used to specify the phone number or alias to be dialed. Note that if more than one file is given on the command line they will be concatenated before being passed to "fax send". TIFF-G3, Postscript or PBM files must therefore be sent one file at a time although TIFF and Postscript files may contain multiple pages. Only multiple \fItext\fP files can be sent in one command. Page breaks in text files can be marked with form-feed characters. Files will be converted and sent at the default (high) resolution. You can use lpq(1) to check the fax queue, lprm(1) to remove fax jobs and lpc(8) to control the spooler. In each case use the -Pfax option to specify the fax ``printer.'' A log file will be mailed to the user when the fax is sent. You should also be able to send a fax from any networked computer that has lpr-compatible remote printing software and that allows you to set the job name (\-J option) to an arbitrary string. Such software is available for most computers. See the lpd(8) and printcap(5) man pages for information on the print spooler and for restricting access by host name (/etc/host.lpd) or by user group (the `rg' printcap entry). .SH RESOLVING PROBLEMS Double check the configuration setup in the first part of the fax script, particularly the modem device name and the lock file names. If efax hangs when trying to open the modem device (typically /dev/ttyX), the device is either already in use by another process (e.g. pppd) or it requires the carrier detect line to be true before it can be opened. Many systems define an alternate device name for the same physical device (typically cuaX) that can be opened even if carrier is not present or other programs are already using it. If responses to modem initialization commands are being lost or generated at random, another processes (e.g. getty or an efax auto-answer process) may be trying to use the modem at the same time. Try running efax while this other program is running. If efax does not report "/dev/ttyX locked or busy. waiting." then the lock files names are not specified correctly. Attempt to send a fax. Check that the modem starts making the calling signal (CNG, a 0.5 second beep every 3 seconds) as soon as it's finished dialing. This shows the modem is in fax mode. You may need to set the SPKR variable to \-iM2L3 to monitor the phone line to do this. Listen for the answering fax machine and check that it sends the answer signal (CED, a 3 second beep) followed by "warbling" sounds (DIS frames) every 3 seconds. If you hear a continuous sound (tones or noise) instead, then you've connected to a data modem instead. Your modem should send back its own warble (DCS frame) in response to DIS immediately followed by 1.5 seconds of noise (a channel check). If everything is OK, the receiving end will send another warble (CFR frame) and your modem will start to send data. If you have an external modem, check its LEDs. If flow control is working properly the modem's send data (SD) LED will turn off periodically while the fax data is sent. Check the message showing the line count and the average bit rate when the page transmission is done. Low line counts (under 1000 for a letter size image) or the warning "fax output buffer overflow" while sending indicate that the image data format is incorrect. Check the file being sent using the "fax view" command. If you get the error message ``flow control did not work'' then flow control was not active. This usually results in a garbled transmission and the receiving machine may reject the page, abort the call, print a distorted or blank image and/or hang up. The warning "characters received while sending" or an character appearing after the transmission means that the operating system ignored the modem's XOFF flow control character. Ensure that you are not running other programs such as getty or pppd at the same time as efax since they will turn off xon/xoff flow control. If you cannot get flow control to work properly then enable ``virtual flow control'' with the \fB-of\fP option or hardware flow control with the \fB-oh\fP option. Check that the remote machine confirms reception with a +FPTS:1 response (Class 2) or an MCF frame (Class 1). For Class 2 modems, the error message "abnormal call termination (code \fInn\fP)" indicates that the modem detected an error and hung up. Many companies advertise services that will fax back information on their products. These can be useful for testing fax reception. The message "run length buffer overflow" when receiving indicates an error with the image data format. You may need to use the \fB-or\fP option with certain Class 2 modems. If efax displays the message "can't happen (
)" please send a bug report to the author. Finally, don't play "option bingo," if you can't resolve the problem send a verbose log of the failed session (the output from \fBfax \-v ...\fP) to the address below. .SH WEB PAGE A Web Page with pointers to the latest version, known bugs and patches is available at: .IP .ft CW http://casas.ee.ubc.ca/efax/ .ft P .LP .SH RELATED SOFTWARE For Linux Systems Independent packages provide more user-friendly interfaces to efax (xfax, tefax) and provide an e-mail-to-fax (Qfax) gateway using efax. All are available by anonymous FTP from metalab.unc.edu in /pub/Linux/apps/serialcomm/fax/. For Amiga Systems A port of an early version of efax for the Amiga is available as a component of a shareware voice mail package, AVM, distributed by Al Villarica (rvillari@cat.syr.edu). Other Ports efax is relatively easy to port. All system-dependent code is in \fBefaxos.c\fP. An early version of efax was ported to VMS. Version 0.8a was ported to Win32 by Luigi Capriotti. Contact the author if you would like to integrate the Win32 code into the current version. .SH AUTHOR Efax was written by Ed Casas. Please send comments or bug reports to edc@cce.com. .SH BUG REPORTS Bug reports should include the operating system, the type of the modem and a copy of a verbose session log that demonstrates the problem. It's usually impossible to help without a verbose log. Please do \fBnot\fP send fax image files. .SH COPYRIGHT efax is copyright 1993 -- 1999 Ed Casas. It may be used, copied and modified under the terms of the GNU Public License. .SH DISCLAIMER Although \fBefax\fP has been tested it may have errors that will prevent it from working correctly on your system. Some of these errors may cause serious problems including loss of data and interruptions to telephone service. .SH REFERENCES CCITT Recommendation T.30, "Procedures for Document Facsimile Transmission in the General Switched Telephone Network". 1988 CCITT Recommendation T.4, "Standardization of Group 3 Facsimile Apparatus for Document Transmission". 1988. For documentation on Class 1 and Class 2 fax commands as implemented by Connexant (formerly Rockwell) modems see http://www.conexant.com/techinfo. For the TIFF specification see http://partners.adobe.com/supportservice/devrelations/PDFS/TN/TIFF6.pdf or RFC 2301 (ftp://ftp.isi.edu/in-notes/rfc2301.txt). For information on Ghostscript see http://www.cs.wisc.edu/~ghost/. The pbm utilities can be obtained by ftp from wuarchive.wustl.edu in /graphics/graphics/packages/NetPBM/netpbm-1mar1994.tar.gz. PCX and many other file formats are described in: Gunter Born, The File Formats Handbook, International Thomson Computer Press, 1995. The "Fax Modem Source Book" by Andrew Margolis, published by John Wiley & Sons in 1994 (ISBN 0471950726), is a book on writing fax applications which includes source code. Dennis Bodson et. al., "FAX: Digital Facsimile Technology and Applications", Second Edition. Artech House, Boston. 1992. .SH SEE ALSO .BR fax(1), .BR efix(1), .BR gs(1), .BR init(8), .BR inittab(5), .BR ttytab(5), .BR printcap(5), .BR lpd(8), .BR printf(3), .BR strftime(3). .SH BUGS Can't read TIFF files with more than 1 strip Class 1 operation may fail if the program can't respond to certain data received from the modem within 55 milliseconds. May fail if multitasking delays cause the received data to overflow the computer's serial device buffer or if an under-run of transmit data exceeds 5 seconds. Polling does not work. Does not support 2-D coding, ECM, or BFT. efax-gtk-3.2.8/efax/efaxos.c.orig0000644000175000001440000002761211466007655013504 00000000000000/* efaxos.c - O/S-dependent routines Copyright 1995, Ed Casas */ #include #include #include #include #include #include #include #include #include #include #ifndef FD_SET #include /* for AIX */ #endif #include "efaxlib.h" #include "efaxmsg.h" #include "efaxos.h" #ifdef USE_TERMIO #include #include #define termios termio #define tcgetattr(fd, pt) ioctl(fd, TCGETA, pt) #define tcsetattr(fd, x, pt) ioctl(fd, TCSETAW, pt) #define cfsetospeed(pt, b) ((pt)->c_cflag = ((pt)->c_cflag & ~CBAUD) | b) #define cfsetispeed(pt, b) #define tcdrain(fd) #else #include #endif #ifdef TIOCSSOFTCAR #include #endif #ifndef CRTSCTS #define CRTSCTS 0 #endif /* The milliseconds portion of the current time. If your system does not provide gettimeofday(3) you can safely substitute a dummy function that returns 0. This will cause the milliseconds portion of time stamps to be printed as 0. */ int time_ms ( void ) { struct timeval tv ; gettimeofday ( &tv, NULL ) ; return (int) ( tv.tv_usec / 1000 ) ; } /* Process elapsed time in milliseconds. This is used for ``virtual flow control'' only. */ long proc_ms ( void ) { struct timeval t ; static int init=0 ; static struct timeval s ; if ( ! init ) { gettimeofday ( &s, 0 ) ; init = 1 ; } gettimeofday ( &t, 0 ) ; return ( t.tv_sec - s.tv_sec ) * 1000 + ( t.tv_usec - s.tv_usec ) / 1000 ; } /* Wait for t millisecond (for systems without usleep). */ void msleep ( int t ) { struct timeval timeout ; timeout.tv_sec = t / 1000 ; timeout.tv_usec = ( t % 1000 ) * 1000 ; if ( select ( 1 , 0 , 0 , 0 , &timeout ) < 0 ) msg ("ES2select failed in msleep:") ; } /* Return number of characters ready to read or < 0 on error. t is tenths of a second of idle time before timing out. If t is negative, waits forever. */ int tdata ( TFILE *f, int t ) { int n, err=0 ; fd_set fds ; struct timeval timeout ; if ( f->fd < 0 ) msg ( "Ecan't happen (faxdata)" ) ; timeout.tv_sec = t / 10 ; timeout.tv_usec = ( t % 10 ) * 100000 ; FD_ZERO ( &fds ) ; FD_SET ( f->fd, &fds ) ; do { n = select ( f->fd + 1, &fds, 0, 0, t<0 ? 0 : &timeout ) ; if ( n < 0 ) { if ( errno == EINTR ) { msg ( "W0 select() interrupted in tdata()" ) ; } else { err = msg ( "ES2 select() failed in tdata():" ) ; } } } while ( n < 0 && ! err ) ; return n ; } /* tundrflw is called only by the tgetc() macro when the buffer is empty. t is maximum idle time before giving up. Returns number of characters read or EOF on timeout or errors. */ int tundrflw ( TFILE *f, int t ) { int n ; n = tdata ( f, t ) ; if ( n > 0 ) if ( ( n = read( f->fd, f->ibuf, IBUFSIZE ) ) < 0 ) msg ( "ES2fax device read:" ) ; f->iq = ( f->ip = f->ibuf ) + ( n > 0 ? n : 0 ) ; return n > 0 ? n : EOF ; } /* tgetd returns the next data character after removing DLE escapes, DLE-ETX terminators and fixing bit order. Evaluates to the next character, EOF on error/timeout, or -2 on DLE-ETX. */ int tgetd ( TFILE *f, int t ) { int c ; if ( ( c = tgetc(f,t) ) < 0 ) c = EOF ; else if ( c != DLE ) c = f->ibitorder[c] ; else { /* escape sequence */ c = tgetc(f,t) ; if ( c == ETX ) c = -2 ; else if ( c == DLE || c == SUB ) c = f->ibitorder [ DLE ] ; else c = msg ( "W0invalid escape sequence (DLE-%s) in data", cname(c) ) ; } return c ; } /* Write buffer to modem. Returns 0 or EOF on error. */ int tput ( TFILE *f, uchar *p, int n ) { int m=0 ; while ( n > 0 && ( m = write( f->fd, p, n ) ) > 0 ) { if ( m != n ) msg ( "Wonly wrote %d of %d bytes", m, n ) ; n -= m ; p += m ; } if ( m < 0 ) msg ( "ES2fax device write:" ) ; return m ; } /* Compare current termios state with termios struct t. Returns 0 if equal, 1 otherwise. */ int ckfld ( char *field, int set, int get ) { return set == get ? 0 : msg ( "W1 termios.%s is 0%08o, not 0%08o", field, get, set ) ; } int checktermio ( struct termios *t, TFILE *f ) { struct termios s ; int err=0 ; s.c_iflag=s.c_oflag=s.c_lflag=s.c_cflag=s.c_cc[VMIN]=s.c_cc[VTIME]=0 ; if ( tcgetattr ( f->fd , &s ) ) err = msg ("ES2tcgetattr failed:") ; if ( ! err ) return ckfld ( "iflag" , t->c_iflag, s.c_iflag ) || ckfld ( "oflag" , t->c_oflag , s.c_oflag ) || ckfld ( "lflag" , t->c_lflag , s.c_lflag ) || ckfld ( "cflag" , t->c_cflag , s.c_cflag ) || ckfld ( "START" , t->c_cc[VSTART] , s.c_cc[VSTART] ) || ckfld ( "STOP" , t->c_cc[VSTOP] , s.c_cc[VSTOP] ) || ckfld ( "MIN" , t->c_cc[VMIN] , s.c_cc[VMIN] ) || ckfld ( "TIME" , t->c_cc[VTIME] , s.c_cc[VTIME] ) ; return err ; } /* Set serial port mode. Sets raw, 8-bit, 19.2 kbps mode with no flow control or as required. Break and parity errors are ignored. CLOCAL means DCD is ignored since some modems apparently drop it during the fax session. Flow control is only used when sending. Returns 0 or 2 on error. */ int ttymode ( TFILE *f, enum ttymodes mode ) { int err=0, i ; static struct termios t, oldt, *pt ; static int saved=0 ; if ( ! saved ) { if ( tcgetattr ( f->fd, &oldt ) ) err = msg ( "ES2tcgetattr on fd=%d failed:", f->fd ) ; else saved=1 ; } t.c_iflag = IGNBRK | IGNPAR ; t.c_oflag = 0 ; t.c_cflag = CS8 | CREAD | CLOCAL ; t.c_lflag = 0 ; for ( i=0 ; ihwfc ? CRTSCTS : 0 ; case VOICECOMMAND : cfsetospeed ( pt, B38400 ) ; cfsetispeed ( pt, B38400 ) ; break ; case SEND : t.c_iflag |= IXON ; t.c_cflag |= f->hwfc ? CRTSCTS : 0 ; case COMMAND : cfsetospeed ( pt, B19200 ) ; cfsetispeed ( pt, B19200 ) ; break ; case DROPDTR : cfsetospeed ( pt, B0 ) ; break ; case ORIGINAL : if ( saved ) pt = &oldt ; break ; default : err = msg ("E2can't happen(ttymode)") ; break ; } if ( ! err && tcsetattr ( f->fd, TCSADRAIN, pt ) ) err = msg ( "ES2tcsetattr on fd=%d failed:", f->fd ) ; if ( ! err && checktermio ( pt, f ) ) msg ( "Wterminal mode not set properly" ) ; tcflow ( f->fd, TCOON ) ; /* in case XON got lost */ return err ; } /* Initialize TFILE data structure. Bit ordering: serial devices transmit LS bit first. T.4/T.30 says MS bit is sent first. `Normal' order therefore reverses bit order. */ void tinit ( TFILE *f, int fd, int reverse, int hwfc ) { f->ip = f->iq = f->ibuf ; f->obitorder = normalbits ; f->ibitorder = reverse ? reversebits : normalbits ; f->fd = fd ; f->hwfc = hwfc ; if ( ! normalbits[1] ) initbittab () ; } /* Open a serial fax device as a TFILE. Returns 0 if OK, 1 if busy, 2 on error. */ int ttyopen ( TFILE *f, char *fname, int reverse, int hwfc ) { int flags, err=0 ; tinit ( f, open ( fname, O_RDWR | O_NDELAY | O_NOCTTY ), reverse, hwfc ) ; if ( f->fd < 0 ) { if ( errno == EBUSY ) { err = 1 ; } else { err = msg ( "ES2can't open serial port %s:", fname ) ; } } if ( ! err ) { if ( ( flags = fcntl( f->fd, F_GETFL, 0 ) ) < 0 || fcntl( f->fd, F_SETFL, ( flags & ~O_NDELAY ) ) < 0 ) err = msg ( "ES2fax device fcntl failed %s:", fname ) ; } #ifdef TIOCSSOFTCAR { int arg = 1 ; if ( ! err ) if ( ioctl ( f->fd, TIOCSSOFTCAR, &arg ) ) msg ("WS unable to set software carrier:" ) ; } #endif return err ; } /* UUCP-style device locking using lock files */ /* Test for UUCP lock file & remove stale locks. Returns 0 on null file name or if no longer locked, 1 if locked by another pid, 2 on error, 3 if locked by us. */ int ttlocked ( char *fname, int log ) { int err=0, ipid ; FILE *f ; pid_t pid = 0 ; char buf [ EFAX_PATH_MAX ] = "" ; if ( fname && *fname == BINLKFLAG ) fname++ ; if ( fname && ( f = fopen ( fname , "r" ) ) ) { if ( fread ( buf, sizeof(char), EFAX_PATH_MAX-1, f ) == sizeof(pid_t) || sscanf ( buf, "%d" , &ipid ) != 1 ) { pid = * (pid_t *) buf ; if ( log ) msg ("X+ read binary pid %d from %s", (int) pid, fname ) ; } else { char *p ; pid = (pid_t) ipid ; if ( log ) { msg ( "X+ read HDB pid %d [", (int) pid ) ; for ( p=buf ; *p ; p++ ) msg ( "X+ %s", cname ( *p ) ) ; msg ( "X+ ] from %s", fname ) ; } } if ( kill ( pid, 0 ) && errno == ESRCH ) { if ( log ) msg ("X - stale" ) ; if ( remove ( fname ) ) err = msg ( "ES2can't remove stale lock %s from pid %d:", fname, pid ) ; else err = msg ( "I0removed stale lock %s from pid %d", fname, pid ) ; } else { if ( pid != getpid() ) { err = 1 ; if ( log ) msg ( "X1 (not our pid)" ) ; } else { err = 3 ; if ( log ) msg ( "X3 (our pid)" ) ; } } fclose ( f ) ; } return err ; } /* Create UUCP (text or binary) lock file. Returns 0 on null file name or if created, 1 if locked by another pid, 2 on error, 3 if locked by us. */ int ttlock ( char *fname, int log ) { int err=0, dirlen, bin=0 ; FILE *f=0 ; pid_t pid = getpid ( ) ; char *p , buf [ EFAX_PATH_MAX ] = "" ; if ( fname && *fname == BINLKFLAG ) { fname++ ; bin = 1 ; } err = ttlocked ( fname, log ) ; if ( ! err ) { dirlen = ( p = strrchr( fname , '/' ) ) ? p-fname+1 : strlen ( fname ) ; sprintf ( buf , "%.*sTMP..%05d" , dirlen , fname , (int) pid ) ; if ( ! ( f = fopen( buf, "w" ) ) ) err = msg ( "ES2can't open pre-lock file %s:", buf ) ; } if ( ! err && f ) { if ( bin ) { if ( fwrite ( &pid, sizeof(pid_t), 1, f ) < 1 ) err = msg ( "ES2can't write pre-lock file %s:", buf ) ; } else { if ( fprintf ( f, "%10d\n", (int) pid ) < 0 ) err = msg ( "ES2can't write pre-lock file %s:", buf ) ; } } if ( ! err && f ) { if ( rename ( buf , fname ) == 0 ) { chmod ( fname , 0444 ) ; msg ( "Xcreated %s lock file %s", bin ? "binary" : "text", fname ) ; } else { err = ttlocked ( fname, log ) ; if ( ! err ) err = msg ( "ES2can't rename lock file %s to %s:", buf, fname ) ; } } if ( f ) { fclose ( f ) ; if ( err ) remove ( buf ) ; } return err ; } /* Remove lock file. Returns 0 on null file name, doesn't exist, or was removed, 1 if the lock is to another pid, 2 on errors. */ int ttunlock ( char *fname ) { int err = 0 ; if ( fname && *fname == BINLKFLAG ) fname++ ; switch ( ttlocked ( fname, 1 ) ) { case 0: break ; case 1: err = msg ( "E1won't remove lock %s (not ours)" , fname ) ; break ; case 2: err = 2 ; break ; case 3: if ( remove ( fname ) ) { err = msg ( "ES2can't remove lock %s:", fname ) ; } else { err = msg ( "X0removed lock file %s", fname ) ; } break ; default: err = msg ( "E2can't happen (ttunlock)" ) ; break ; } return err ; } /* Lock all lock files and possibly log attempt if log=1. Returns 0 if all locks [already] applied, 1 if any are locked to other pids, 2 on any errors. */ int lockall ( char **lkfiles, int log ) { int err = 0 ; char **p = lkfiles ; while ( *p && ! err ) if ( ( err = ttlock ( *p++, log ) ) == 3 ) err = 0 ; return err ; } /* Remove all lock files. Returns 0 if all locks removed, 2 on errors. */ int unlockall ( char **lkfiles ) { int err = 0, i ; char **p = lkfiles ; while ( *p ) if ( ( i = ttunlock ( *p++ ) ) != 0 ) err = i ; return err ; } /* Return basename of the argument or the whole thing if can't find it. */ char *efaxbasename ( char *p ) { return strrchr ( p , '/' ) ? strrchr ( p , '/' ) + 1 : p ; } efax-gtk-3.2.8/efax/efaxio.h0000644000175000001440000000345611466007655012540 00000000000000#ifndef _EFAXIO_H #define _EFAXIO_H #include "efaxos.h" /* TFILE definition */ #ifndef uchar #define uchar unsigned char #endif #define CMDBUFSIZE 256 /* longest possible command or response */ #define DLE_ETX "\020\003" /* DLE-ETX (end of data) string */ #define CAN_STR "\030" /* CAN (cancel reception) string */ #define TO_RESET 50 /* t/o for modem reset commands (>>2.6s) */ #define T_CMD 1 /* pause before each modem command */ #define MAXDCEBUF 32 /* max bytes allowed in buffer when write */ #define MINWRITE 64 /* minimum bytes to write() to modem */ enum promptcodes { /* codes for modem prompts */ BUSY = 'B', CONNECT = 'C', DATA='D', ERROR = 'E', MODULATION='M', NO = 'N', OK = 'O', RING = 'R', VCONNECT = 'V' } ; /* Modem features */ extern int c1, c20 ; /* use class 1/class 2.0 */ extern int c2 ; /* force class 2 */ extern int cmdpause ; /* delay before each init command */ extern int vfc ; /* virtual flow control */ extern uchar startchar ; /* character to start reception */ extern int lockpolldelay ; /* milliseconds between checks of lock files */ /* response detector lookup tables */ extern uchar rd_allowed[], rd_nexts[] ; #define RD_BEGIN 0x01 #define RD_END 0x20 /* Modem interface routines */ int cmd ( TFILE *f, char *s , int t ) ; int ckcmd ( TFILE *f, int *err, char *s, int t, int r ) ; int modemsync ( TFILE *f ) ; char *sresponse ( char *s, int *ip ) ; char *strinresp ( char *s ) ; int getresp ( char *s, char *buf, int len ) ; int setup ( TFILE *f, char **cmds, int ignerr ) ; int sendbuf ( TFILE *f, uchar *p, int n, int dcecps ) ; int begin_session ( TFILE *f, char *fname, int reverse, int hwfc, char **lkfile, ttymodes mode, void (*onsig) (int) ) ; int end_session ( TFILE *f, char **zcmd, char **lkfile, int sync ) ; #endif efax-gtk-3.2.8/efax/efax.c0000644000175000001440000023524111466007655012202 00000000000000#define Copyright "Copyright 1999 Ed Casas" #define Version "efax v 0.9a-001114" /* Copyright (C) 1999 Ed Casas 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 Please contact the author if you wish to use efax or efix in ways not covered by the GNU GPL. You may contact the author by e-mail at: edc@cce.com. */ /* Internationalisation support added by Chris Vine September 2005, including addition of the -n and -u options. The following patches from http://shino.pos.to/linux/efax/ also applied: efax-0.9-nullptr.patch efax-0.9a-frlen.patch The patch efax-0.9-misc.patch from Fedora 2 has been applied. */ const char *Usage = "Usage:\n" " %s [ option ]... [ -t num [ file... ] ]\n" "Options:\n" " -a str use command ATstr to answer\n" " -c cap set modem and receive capabilites to cap\n" " -d dev use modem on device dev\n" " -e cmd exec \"/bin/sh -c cmd\" for voice calls\n" " -f fnt use (PBM) font file fnt for headers\n" " -g cmd exec \"/bin/sh -c cmd\" for data calls\n" " -h hdr use page header hdr (use %%d's for current page/total pages)\n" " -i str send modem command ATstr at start\n" " -j str send modem command ATstr after set fax mode\n" " -k str send modem command ATstr when done\n" " -l id set local identification to id\n" " -n force line buffering of stdout instead of block buffering (necessary\n" " if outputting UTF-8 to a terminal with translated text via NLS)\n" " -o opt use protocol option opt:\n" " 0 use class 2.0 instead of class 2 modem commands\n" " 1 use class 1 modem commands\n" " 2 use class 2 modem commands\n" " a if first [data mode] answer attempt fails retry as fax\n" " e ignore errors in modem initialization commands\n" " f use virtual flow control\n" " h use hardware flow control\n" " l halve lock file polling interval\n" " n ignore page retransmission requests\n" " r do not reverse received bit order for Class 2 modems\n" " x use XON instead of DC2 to trigger reception\n" " z add 100 ms to pause before each modem comand (cumulative)\n" " -q ne ask for retransmission if more than ne errors per page\n" " -r pat save received pages into files pat.001, pat.002, ... \n" " -s share (unlock) modem device while waiting for call\n" " -u use UTF-8 and not locale codeset (if different) for messages to\n" " stderr and stdout (see also -n option)\n" " -v lvl print messages of type in string lvl (ewinchamr)\n" " -w don't answer phone, wait for OK or CONNECT instead\n" " -x fil use uucp-style lock file fil\n" "Commands:\n" " -t dial num and send fax image files file... \n" ; #include /* ANSI C */ #include #include #include #include #include /* For NLS */ #ifdef ENABLE_NLS #include #include #include #endif #include "efaxio.h" /* EFAX */ #include "efaxlib.h" #include "efaxmsg.h" #include "efaxos.h" /* constants... */ /* delays and timeouts (t/o), in deciseconds */ #define T1 350 /* T.30 T1 - waiting for DIS/DCS before Phase B */ #define T2 60 /* T.30 T2 - waiting for frame in Phase B */ #define T3S 30 /* T.30 response timeout (not T3) */ #define T4 30 /* T.30 T4 - between [re]transmissions of DIS */ #define TCFSECS 1.5 /* TCF duration (seconds, nominally 1.5) */ #define TMOD 55 /* T.30 pause between v.21&v.29, 75-20 ms */ #define MODDLY "5" /* same as above, a string */ #define TO_A 1200 /* dial/answer (Phase A) - modem may t/o first */ #define TO_ABRT 20 /* max delay after sending abort sequence */ #define TO_CHAR 51 /* per data character (max FILL length) */ #define TO_DATAF 80 /* software adaptive answer data connect t/o */ #define TO_DRAIN_H 136 /* minimum HDLC buffer drain time (4k/300cps) */ #define TO_DRAIN_D 300 /* minimum data buffer drain time */ #define TO_FT 31 /* max delay after +F[TR][MH] command */ #define TO_RTCMD 20 /* return to command mode after DLE-ETX (rx) */ #define TO_C2B 450 /* Class 2 DIS to CONNECT:(DCS+TCF+CFR)xretries */ #define TO_C2X 20 /* Class 2 wait for XON: 2/5 of 5s timeout */ #define TO_C2PP 200 /* Class 2 wait for ppr: (ppm+ppr)x3retries + 2 */ #define TO_C2R 600 /* Class 2 receive: (TCF+FTT)x11 retrains + 5 */ #define TO_C2EOR 160 /* Class 2 end of data rx (4 retrans x 4 s) */ #define ANSCMD "A" /* default modem command to answer calls */ #define DCSLEN 3 /* length of FIF for DCS commands sent */ #define DEFDISLEN 3 /* length of DIS initially transmitted */ #define DEFCAP 1,3,0,2,0,0,0,0 /* default local capabilities */ #define DEFID " " /* default local ID */ #define DEFPAT "%m%d%H%M%S" /* default received file name pattern */ #define HDRSHFT 54 /* shift header right 6.7mm into image area */ #define HDRSPCE 20 /* number of scan lines inserted before image */ #define HDRSTRT 4 /* scan line where header is placed on image */ #define HDRCHRH 24 /* header character height (pels, at 196lpi) */ #define HDRCHRW 12 /* header character width (pels) */ #define IDLEN 20 /* length of T.30 ID strings, must be 20 */ #define MAXDIS 8 /* maximum DIS frames sent without response (T1) */ #define MAXERRPRT 32 /* maximum number of reception errors to report */ #define MAXFIFLEN 125 /* max FIF len = MAXFRLEN - (adx+ctl+FCF) - FCS */ #define MAXFRLEN 130 /* max frame length = 3.45s x 300 bps / 8 */ #define MAXGETTY 512 /* maximum length of exec'ed (-g, -e) commands */ #define MAXICMD 100 /* maximum # of modem setup/reset commands */ #define MAXLKFILE 16 /* maximum number of lock files */ #define MAXNULLS 2 /* maximum consecutive received nulls saved */ #define MAXPGERR 10 /* maximum received errors allowed per page */ #define MAXTRAIN 2 /* maximum training retries at lowest speed */ #define MAXRETRY 3 /* maximum retries of unacknowledged commands */ #define NCAP 8 /* number of fields in a capability string */ #define NTXRETRY 3 /* maximum re-sends per page */ typedef int cap [ NCAP ] ; /* remote/local capabilities */ /* capability fields... */ enum captype { VR, BR, WD, LN, DF, EC, BF, ST } ; int capmax [ NCAP ] = { 1, 7, 2, 2, 3, 2, 1, 7 } ; /* & maximum values */ /* vertical resolution, dpi */ int vresolution [ 2 ] = { 98, 196 } ; /* characters per second for br */ int cps [ 8 ] = { 300, 600, 900, 1200, 1500, 1800, 900, 1200 } ; /* next br = fallback [ br ] */ /* 0, 1, 2, 3, 4, 5, 6, 7 */ int fallback [ 8 ] = {-1, 0, 1, 2, 7, 4, 3, 6 } ; /* negotiation speed index */ /* 0, 1, 2, 3, 4, 5, 6, 7 */ int brindex [ 8 ] = { 0, 1, 2, 3, 4, 7, 5, 6 } ; /* minimum scan time in ms */ int mst [ 8 ] = { 0 , 5, 10, 10, 20, 20, 40, 40 } ; /* page width in pixels */ int pagewidth [ 5 ] = { 1728, 2048, 2432, 1216, 864 } ; /* Table to convert between T.30 DIS/DCS/DTC FIF and Class 2-like capability codes. Uses br=6, 7 for V.17 at 7200, 9600. */ typedef struct t30tabstruct { char *name ; uchar byte, shift, mask ; uchar safeval ; uchar captodis[8], distocap[16], captodcs[8], dcstocap[16] ; } t30tabst ; #define X 0xff /* invalid values */ t30tabst t30tab [ NCAP ] = { { "vr", 1, 1, 0x01, 0, { 0, 1 } , { 0, 1 } , { 0, 1 } , { 0, 1 } }, { "br", 1, 2, 0x0f, 0, { 0, 4, 12, 12, 13, 13 } , { 0, X, X, X, 1, X, X, X, 3, X, X, X, 3, 5, 3, X } , { 0, 4, 12, 8, 5, 1 } , { 0, 5, 5, X, 1, 4, 4, X, 3, 7, X, X, 2, 6, X, X } } , { "wd", 2, 6, 0x03, 0, { 0, 2, 1 } , { 0, 2, 1, 2 } , { 0, 2, 1 } , { 0, 2, 1, 2 } }, { "ln", 2, 4, 0x03, 0, { 0, 2, 1 } , { 0, 2, 1, X } , { 0, 2, 1 } , { 0, 2, 1, X } }, { "df", 1, 0, 0x01, 0, { 0, 1 } , { 0, 1 } , { 0, 1 } , { 0, 1 } }, { "ec", 3, 4, 0x03, 0, { 0, 2, 2 } , { 0, X, 2, X } , { 0, 3, 2 } , { 0, 0, 2, 1 } }, { "bf", 5, 5, 0x01, 0, { 0, 1 } , { 0, 1 } , { 0, 1 } , { 0, 1 } }, { "st", 2, 1, 0x07, 7, { 7, 4, 3, 2, 6, 0, 5, 1 } , { 5, 7, 3, 2, 1, 6, 4, 0 } , { 7, 4, X, 2, X, 0, X, 1 } , { 5, 7, 3, 1, X, X, X, 0 } } } ; /* values of capability fields */ char *capvaluestr [ NCAP ] [8] = { { " 98lpi", "196lpi" } , { " 2400bps", " 4800bps", " 7200bps", " 9600bps", " 12kbps", "14.4kbps", "7200V.17", "9600V.17" } , { "8.5\"/215mm", " 10\"/255mm", " 12\"/303mm", " 6\"/151mm", "4.2\"/107mm" } , { "11\"/A4", "14\"/B4", " any " } , { "1D" , "2D" }, { " - ", "ECM-256", "ECM-64 " }, { " - ", "BFT" }, { "0ms", "5ms", "10/5ms", "10ms", "20/10ms", "20ms", "40/20ms", "40ms" } } ; /* T.30 control frames */ enum frametype { DIS=0x01, CSI, NSF=0x04, CFR=0x21, FTT, MCF=0x31, RTN, RTP, PIN, PIP, DCS=0x41, TSI, NSS=0x44, CRP=0x58, DCN=0x5f, EOM=0x71, MPS, EOP=0x74, PRI_EOM=0x79, PRI_MPS, PRI_EOP=0x7c, DTC=0x81, CIG, NSC=0x84 } ; enum commanddtype { RCV=0, SND=1, DTA=0, TRN=1 } ; /* Class 1 commands to [receive=0/transmit=1] [data=0/training=1] for [baud rate=BR]. */ char *c1cmd [ 2 ] [ 2 ] [ 8 ] = { { { "+FRM=24", "+FRM=48", "+FRM=72", "+FRM=96", "+FRM=122", "+FRM=146" , "+FRM=74", "+FRM=98" } , { "+FRM=24", "+FRM=48", "+FRM=72", "+FRM=96", "+FRM=121", "+FRM=145" , "+FRM=73", "+FRM=97" } } , { { "+FTM=24", "+FTM=48", "+FTM=72", "+FTM=96", "+FTM=122", "+FTM=146" , "+FTM=74", "+FTM=98", } , { "+FTM=24", "+FTM=48", "+FTM=72", "+FTM=96", "+FTM=121", "+FTM=145" , "+FTM=73", "+FTM=97" } } } ; struct c2msgstruct { int min, max ; char *msg ; } c2msg [] = { { 0, 9, "Call Placement and Termination:" }, { 0, 0, " Normal and proper end of connection" }, { 1, 1, " Ring Detect without successful handshake" }, { 2, 2, " Call aborted, from +FK[S] or CAN" }, { 3, 3, " No Loop Current" }, { 4, 4, " Ringback Detected, no answer" }, { 5, 5, " Ringback Detected, answer without CED" }, { 10, 19, "Transmit Phase A & Miscellaneous Errors:" }, { 10, 10, " Unspecified Phase A error" }, { 11, 11, " No Answer (T.30 T1 timeout)" }, { 20, 39, "Transmit Phase B Hangup Codes:" }, { 20, 20, " Unspecified Transmit Phase B error" }, { 21, 21, " Remote cannot receive or send" }, { 22, 22, " COMREC error in transmit Phase B" }, { 23, 23, " COMREC invalid command received" }, { 24, 24, " RSPREC error" }, { 25, 25, " DCS sent three times without response" }, { 26, 26, " DIS/DTC received 3 times; DCS not recognized" }, { 27, 27, " Failure to train at 2400 bps or +FMINSP value" }, { 28, 28, " RSPREC invalid response received" }, { 40, 49, "Transmit Phase C Hangup Codes:" }, { 40, 40, " Unspecified Transmit Phase C error" }, { 41, 41, " Unspecified image format error" }, { 42, 42, " Image conversion error" }, { 43, 43, " DTE to DCE data underflow" }, { 44, 44, " Unrecognized transparent data command" }, { 45, 45, " Image error, line length wrong" }, { 46, 46, " Image error, page length wrong" }, { 47, 47, " Image error, wrong compression code" }, { 50, 69, "Transmit Phase D Hangup Codes:" }, { 50, 50, " Unspecified Transmit Phase D error" }, { 51, 51, " RSPREC error" }, { 52, 52, " No response to MPS repeated 3 times" }, { 53, 53, " Invalid response to MPS" }, { 54, 54, " No response to EOP repeated 3 times" }, { 55, 55, " Invalid response to EOP" }, { 56, 56, " No response to EOM repeated 3 times" }, { 57, 57, " Invalid response to EOM" }, { 58, 58, " Unable to continue after PIN or PIP" }, { 70, 89, "Receive Phase B Hangup Codes:" }, { 70, 70, " Unspecified Receive Phase B error" }, { 71, 71, " RSPREC error" }, { 72, 72, " COMREC error" }, { 73, 73, " T.30 T2 timeout, expected page not received" }, { 74, 74, " T.30 T1 timeout, after EOM received" }, { 90, 99, "Receive Phase C Hangup Codes:" }, { 90, 90, " Unspecified Receive Phase C error" }, { 91, 91, " Missing EOL after 5 seconds" }, { 92, 92, " Unused code" }, { 93, 93, " DCE to DTE buffer overflow" }, { 94, 94, " Bad CRC or frame (ECM or BFT modes)" }, { 100, 119, "Receive Phase D Hangup Codes:" }, { 100, 100, " Unspecified Receive Phase D errors" }, { 101, 101, " RSPREC invalid response received" }, { 102, 102, " COMREC invalid response received" }, { 103, 103, " Unable to continue after PIN or PIP" }, { 120, 255, "Reserved Codes" }, { -1, -1, "" } } ; /* array for efax return codes */ char *errormsg [7] ; /* array for frame names */ static struct framenamestruct { int code ; char *name ; } framenames [] = { {NSC,0}, /* these 3 frames must be first */ {CIG,0}, {DTC,0}, {NSF,0}, {CSI,0}, {DIS,0}, {NSS,0}, {TSI,0}, {DCS,0}, {CFR,0}, {FTT,0}, {MPS,0}, {EOM,0}, {EOP,0}, {PRI_MPS,0}, {PRI_EOM,0}, {PRI_EOP,0}, {MCF,0}, {RTP,0}, {PIP,0}, {RTN,0}, {PIN,0}, {CRP,0}, {DCN,0}, {0,0} } ; /* Functions... */ /* Provide dummy gettext() function if there is no internationalisation support */ #ifndef ENABLE_NLS static const char *gettext ( const char *text ) { return text; } #endif /* Initialize errormsg array - meaning of efax return codes */ void init_errormsg ( void ) { errormsg[0] = strdup ( gettext ( "success" ) ); errormsg[1] = strdup ( gettext ( "number busy or modem in use" ) ); errormsg[2] = strdup ( gettext ( "unrecoverable error" ) ); errormsg[3] = strdup ( gettext ( "invalid modem response" ) ); errormsg[4] = strdup ( gettext ( "no response from modem" ) ); errormsg[5] = strdup ( gettext ( "terminated by signal" ) ); errormsg[6] = strdup ( gettext ( "internal error" ) ); } /* Initialize the framenames array */ void init_framenames ( void ) { /* Translator: this reports frame progress during reception/transmission - leave "NSC" untranslated, but translate the remainder */ framenames[0].name = strdup ( gettext ( "NSC - poller features" ) ); /* Translator: this reports frame progress during reception/transmission - leave "CIG" untranslated, but translate the remainder */ framenames[1].name = strdup ( gettext ( "CIG - poller ID" ) ); /* Translator: this reports frame progress during reception/transmission - leave "DTC" untranslated, but translate the remainder */ framenames[2].name = strdup ( gettext ( "DTC - poller capabilities" ) ); /* Translator: this reports frame progress during reception/transmission - leave "NSF" untranslated, but translate the remainder */ framenames[3].name = strdup ( gettext ( "NSF - answering features" ) ); /* Translator: this reports frame progress during reception/transmission - leave "CSI" untranslated, but translate the remainder */ framenames[4].name = strdup ( gettext ( "CSI - answering ID" ) ); /* Translator: this reports frame progress during reception/transmission - leave "DIS" untranslated, but translate the remainder */ framenames[5].name = strdup ( gettext ( "DIS - answering capabilities" ) ); /* Translator: this reports frame progress during reception/transmission - leave "NSS" untranslated, but translate the remainder */ framenames[6].name = strdup ( gettext ( "NSS - caller features" ) ); /* Translator: this reports frame progress during reception/transmission - leave "TSI" untranslated, but translate the remainder */ framenames[7].name = strdup ( gettext ( "TSI - caller ID" ) ); /* Translator: this reports frame progress during reception/transmission - leave "DCS" untranslated, but translate the remainder */ framenames[8].name = strdup ( gettext ( "DCS - session format" ) ); /* Translator: this reports frame progress during reception/transmission - leave "CFR" untranslated, but translate the remainder */ framenames[9].name = strdup ( gettext ( "CFR - channel OK" ) ); /* Translator: this reports frame progress during reception/transmission - leave "FTT" untranslated, but translate the remainder */ framenames[10].name = strdup ( gettext ( "FTT - channel not OK" ) ); /* Translator: this reports frame progress during reception/transmission - leave "MPS" untranslated, but translate the remainder */ framenames[11].name = strdup ( gettext ( "MPS - not done" ) ); /* Translator: this reports frame progress during reception/transmission - leave "EOM" untranslated, but translate the remainder */ framenames[12].name = strdup ( gettext ( "EOM - not done, new format" ) ); /* Translator: this reports frame progress during reception/transmission - leave "EOP" untranslated, but translate the remainder */ framenames[13].name = strdup ( gettext ( "EOP - done" ) ); /* Translator: this reports frame progress during reception/transmission - leave "PRI-MPS" untranslated, but translate the remainder */ framenames[14].name = strdup ( gettext ( "PRI-MPS - not done, call operator" ) ); /* Translator: this reports frame progress during reception/transmission - leave "PRI-EOM" untranslated, but translate the remainder */ framenames[15].name = strdup ( gettext ( "PRI-EOM - not done, new format, call operator" ) ); /* Translator: this reports frame progress during reception/transmission - leave "PRI-EOP" untranslated, but translate the remainder */ framenames[16].name = strdup ( gettext ( "PRI-EOP - done, call operator" ) ); /* Translator: this reports frame progress during reception/transmission - leave "MCF" untranslated, but translate the remainder */ framenames[17].name = strdup ( gettext ( "MCF - page OK" ) ); /* Translator: this reports frame progress during reception/transmission - leave "RTP" untranslated, but translate the remainder */ framenames[18].name = strdup ( gettext ( "RTP - page OK, check channel" ) ); /* Translator: this reports frame progress during reception/transmission - leave "PIP" untranslated, but translate the remainder */ framenames[19].name = strdup ( gettext ( "PIP - page OK, call operator" ) ); /* Translator: this reports frame progress during reception/transmission - leave "RTN" untranslated, but translate the remainder */ framenames[20].name = strdup ( gettext ( "RTN - page not OK, check channel" ) ); /* Translator: this reports frame progress during reception/transmission - leave "PIN" untranslated, but translate the remainder */ framenames[21].name = strdup ( gettext ( "PIN - page not OK, call operator" ) ); /* Translator: this reports frame progress during reception/transmission - leave "CRP" untranslated, but translate the remainder */ framenames[22].name = strdup ( gettext ( "CRP - repeat command" ) ); /* Translator: this reports frame progress during reception/transmission - leave "DCN" untranslated, but translate the remainder */ framenames[23].name = strdup ( gettext ( "DCN - disconnect" ) ); /* Translator: this reports an unknown frame type during reception/transmission */ framenames[24].name = strdup ( gettext ( "UNKNOWN" ) ); } /* Return name of frame of type 'fr'. */ char *frname ( int fr ) { struct framenamestruct *p ; static int is_framenames_init = 0 ; if ( !is_framenames_init ) { is_framenames_init = 1; init_framenames(); } for ( p=framenames ; p->code ; p++ ) /* framenames[24].code == 0 */ if ( fr == p->code || ( fr & 0x7f ) == p->code) break ; return p->name ; } /* Range-check capability. */ int checkcap ( cap c ) { int err=0, i ; for ( i=0 ; i capmax[i] || c[i] < 0 ) { err = msg ( "E3%s = %d out of range, set to 0", t30tab[i].name, c[i] ) ; c[i]=0 ; } return err ; } /* Print cap[ability] c using text values and prefix s. */ void printcap ( char *s , cap c ) { int i ; msg ( "N-+ %s" , s ) ; checkcap ( c ) ; for ( i=0 ; i DCSLEN ? DCSLEN : len ; fif[0] = 0 ; fif[1] = ( isdis && t4tx ? 0x80 : 0 ) | 0x40 ; for ( i=2 ; icaptodis : p->captodcs ) [ c [ i ] ] ) == X ) msg ( "E3mkdis: can't happen (invalid %s)", p->name ), k=0 ; if ( p->byte < len ) fif [ p->byte ] |= k << p->shift ; } } /* Return length of DIS/DTC FIF (counts extension bits). */ int dislen ( uchar *fif ) { int n ; for ( n=3 ; fif [ n-1 ] & 0x01 && n < MAXFIFLEN ; n++ ) ; return n ; } /* Convert received DIS/DCS/DTC FIF to cap. Returns 0 or 3 if bad DIS/DCS field. */ int mkcap ( uchar *fif, cap c, int dis ) { int err=0, i, j, k, len ; t30tabst *p ; len = dislen ( fif ) ; for ( i=0 ; ibyte >= len ) { c [ i ] = 0 ; } else { j = ( fif [ p->byte ] >> p->shift ) & p->mask ; k = ( dis ? p->distocap : p->dcstocap ) [ j ] ; if ( k == X ) { c [ i ] = p->safeval ; err = msg("E3mkcap: bad %s field (%d) set to %d", p->name, j, c [ i ] ) ; } else { c [ i ] = k ; } } } return err ; } /* Compute compatible local/remote capabilities. Used by the sending station only and only for Class 1. Returns 0 if OK or 3 if no compatible settings possible. */ int mincap ( cap local, cap remote, cap session ) { int err=0, i ; int msttab[2][8] = { { 0,1,3,3,5,5,7,7 } , { 0,1,1,3,3,5,5,7 } } ; printcap ( "local ", local ) ; printcap ( "remote ", remote ) ; for ( i=0 ; i session[LN] || local[DF] != session[DF] ) err = msg ("W3 %s", gettext ( "incompatible local and remote capabilities" ) ); return err ; } /* Skip to start of first/next page (or to start of previous page if dp is 0). If ppm in not null, it is then set to EOP if there are no pages following this one, MPS if the next page has the same format as `local' (assumed to be the format of the previous page), EOM if the page has a different format. If local is non-NULL its format fields are set according to the format of the new page. Currently only considers the file's y-resolution. This function is called before send_data() and obtains the ppm for that page. It can be called again with dp=0 if a PIN or RTN is received to restart the page. Returns 0 or 2 on errors. */ int rdpage ( IFILE *f, int dp, int *ppm, cap local, int *changed ) { int err=0, m=EOP, yres, fVR, nVR ; if ( nextipage ( f, dp ) ) err = msg ( "E2 can't happen (rdpage: can't go to %s page)", dp ? "next" : "same" ) ; if ( ! err ) { yres = f->page->yres ; fVR = ( yres > (196+98)/2 ) ? 1 : 0 ; if ( local && yres ) { if ( local [ VR ] != fVR ) { local [ VR ] = fVR ; if ( changed ) *changed = 1 ; } else { if ( changed ) *changed = 0 ; } } if ( lastpage ( f ) ) { m = EOP ; } else { PAGE *p = f->page + 1 ; nVR = ( p->yres > (196+98)/2 ) ? 1 : 0 ; m = ( nVR != fVR ) ? EOM : MPS ; } } if ( ppm ) { *ppm = err ? EOP : m ; } return err ; } /* Terminate previous page if page number is non-zero and start next output page if page number is non-negative. If page is -1 removes the most recently opened file. Returns 0 if OK, 2 on errors. */ int wrpage ( OFILE *f, int page ) { int err=0 ; char *message = NULL ; #ifdef ENABLE_NLS gsize written = 0 ; char *conv_cfname ; #endif err = nextopage ( f, page ) ; #ifdef ENABLE_NLS if ( ! err && page == -1 ) { if ( use_utf8 && !g_utf8_validate ( f->cfname, -1, NULL ) ) { conv_cfname = g_filename_to_utf8 ( f->cfname, -1, NULL, &written, NULL ) ; if ( remove ( f->cfname ) ) { message = strdup2 ( "ES2 ", gettext ( "can't delete file %s:" ) ) ; if ( message && conv_cfname ) err = msg ( message, conv_cfname ) ; } else { message = strdup2 ( "F ", gettext ( "removed file: %s" ) ) ; if ( message && conv_cfname ) msg ( message, conv_cfname ) ; } g_free ( conv_cfname ) ; } else { if ( remove ( f->cfname ) ) { message = strdup2 ( "ES2 ", gettext ( "can't delete file %s:" ) ) ; if ( message ) err = msg ( message, f->cfname ) ; } else { message = strdup2 ( "F ", gettext ( "removed file: %s" ) ) ; if ( message ) msg ( message, f->cfname ) ; } } free ( message ) ; } #else if ( ! err && page == -1 ) { if ( remove ( f->cfname ) ) { message = strdup2 ( "ES2 ", gettext ( "can't delete file %s:" ) ) ; if ( message ) err = msg ( message, f->cfname ) ; } else { message = strdup2 ( "F ", gettext ( "removed file: %s" ) ) ; if ( message ) msg ( message, f->cfname ) ; } free ( message ) ; } #endif return err ; } /* Send data for one page. Figures out required padding and 196->98 lpi decimation based on local and session capabilitites, substitutes page numbers in header string and enables serial port flow control. Inserts the page header before the input file data. Converts each scan line to T.4 codes and adds padding (FILL) and EOL codes before writing out. Sends RTC when done. Sends DLE-ETX and returns serial port to command mode when done. Returns 0 if OK, non-0 on errors. */ int send_data ( TFILE *mf, IFILE *f, int page, int pages, cap local, cap session, char *header, faxfont *font ) { int done=0, err=0, noise=0, nr=0, lastnr=0, line, pixels ; int i, decimate, pwidth, minlen, dcecps, inheader, skip=0 ; uchar buf [ MAXCODES + 2*EOLBITS/8 + 1 ], *p ; short runs [ MAXRUNS ], lastruns [ MAXRUNS ] ; char headerbuf [ MAXLINELEN ] ; ENCODER e ; newENCODER ( &e ) ; dcecps = cps[session[BR]] ; minlen = ( (long)dcecps * mst[session[ST]] - 1500 + 500 ) / 1000 ; pwidth = pagewidth [ session [ WD ] ] ; decimate = local[VR] > session[VR] ; msg ( "T padding to %d bytes/scan line.%s", minlen+1, decimate ? " reducing 196->98 lpi." : "" ) ; if ( vfc ) msg ( "T limiting output to %d bps for %d byte modem buffer", dcecps*8, MAXDCEBUF + MINWRITE ) ; if ( ckfmt ( header, 6 ) ) msg ( "W too many %%d escapes in header format string \"%s\"", header ) ; else sprintf ( headerbuf, header, page, pages, page, pages, page, pages ) ; /* Translator: "header" is a reference to the fax top header line */ msg ("I %s[%s]", gettext ( "header:" ), headerbuf ) ; done = err = ttymode ( mf, SEND ) ; mf->start = time(0) ; mf->mstart = proc_ms() ; mf->bytes = mf->pad = mf->lines = 0 ; /* start T.4 data with some FILL and an EOL */ p = buf ; for ( i=0 ; i<32 ; i++ ) { p = putcode ( &e, 0, 8, p ) ; } p = putcode ( &e, EOLCODE, EOLBITS, p ) ; if ( ! f || ! f->f ) err = msg ( "E2can't happen(send_data)" ) ; mf->lines=0 ; for ( line=0 ; ! done && ! err ; line++ ) { if ( line < HDRSPCE ) { /* insert blank lines at the top */ runs[0] = pwidth ; pixels = pwidth ; nr = 1 ; } else { if ( ( nr = readline ( f, runs, &pixels ) ) < 0 ) { done = 1 ; continue ; } } /* generate and OR in header pixels */ if ( line >= HDRSTRT && line < HDRSTRT + HDRCHRH ) { int hnr ; short hruns [ MAXRUNS ] ; hnr = texttorun ( (uchar*) headerbuf, font, line-HDRSTRT, HDRCHRW, HDRCHRH, HDRSHFT, hruns, 0 ) ; nr = runor ( runs, nr, hruns, hnr, 0, &pixels ) ; } inheader = line < HDRSTRT + HDRCHRH ; if ( decimate || ( inheader && local[VR] == 0 ) ) { if ( ++skip & 1 ) { /* save the first of every 2 lines */ memcpy ( lastruns, runs, nr * sizeof(short) ) ; lastnr = nr ; continue ; /* get next line */ } else { /* OR previous line into current line */ nr = runor ( runs, nr, lastruns, lastnr, 0, &pixels ) ; } } if ( nr > 0 ) { if ( pixels ) { /* make line the right width */ if ( pixels != pwidth ) nr = xpad ( runs, nr, pwidth - pixels ) ; /* convert to MH coding */ p = runtocode ( &e, runs, nr, p ) ; /* zero pad to minimum scan time */ while ( p - buf < minlen ) { p = putcode ( &e, 0, 8, p ) ; mf->pad ++ ; } /* add EOL */ p = putcode ( &e, EOLCODE, EOLBITS, p ) ; sendbuf ( mf, buf, p - buf, dcecps ) ; mf->bytes += p - buf ; mf->lines++ ; } else { /* probably read an EOL as part of RTC */ } if ( tdata ( mf, 0 ) ) noise = 1 ; p = buf ; } } for ( i=0 ; i < RTCEOL ; i++ ) p = putcode ( &e, EOLCODE, EOLBITS, p ) ; p = putcode ( &e, 0, 0, p ) ; sendbuf ( mf, buf, p - buf, dcecps ) ; mf->bytes += p - buf ; if ( noise ) msg ("W- %s", gettext ( "characters received while sending" ) ) ; return err ; } int end_data ( TFILE *mf, cap session, int ppm, int *good ) { int err=0, c ; uchar *p ; long dt, draintime ; char *message; if ( ! ppm ) p = (uchar*) DLE_ETX ; else if ( ppm == MPS ) p = (uchar*) "\020," ; else if ( ppm == EOM ) p = (uchar*) "\020;" ; else if ( ppm == EOP ) p = (uchar*) "\020." ; else { p = (uchar*) "" ; err = msg ( "E2 can't happen (end_data)" ) ; } tput ( mf, p, 2 ) ; dt = time(0) - mf->start ; /* time to drain buffers + 100% + 4s */ draintime = ( 2 * ( mf->bytes / cps[ session[BR] ] + 1 - dt ) + 4 ) * 10 ; draintime = draintime < TO_DRAIN_D ? TO_DRAIN_D : draintime ; c = ckcmd ( mf, 0, 0, (int) draintime, OK ) ; if ( good ) *good = ( c == OK ) ? 1 : 0 ; dt = time(0) - mf->start ; /* Translator: this is reporting the outcome of fax transmission. It gives the number of lines sent, the number of bytes sent, the seconds taken and the bit rate (bps) - the translated text must contain 6 "%d" formatting items */ message = strdup2 ( "I ", gettext ( "sent %d+%d lines and %d+%d bytes, in %d secs at %d bps" ) ); if ( message ) { msg ( message , HDRSPCE, mf->lines-HDRSPCE, mf->bytes-mf->pad, mf->pad, (int) dt, (mf->bytes*8)/dt ) ; free ( message ) ; } if ( mf->bytes / (dt+1) > cps[session[BR]] ) msg ( "E %s", gettext ( "flow control did not work" ) ); if ( ! err ) err = ttymode ( mf, COMMAND ) ; return err ; } /* Read one scan line from fax device. If pointer pels is not null it is used to save pixel count. Returns number of runs stored, EOF on RTC, or -2 on EOF, DLE-ETX or other error. */ int readfaxruns ( TFILE *f, DECODER *d, short *runs, int *pels ) { int err=0, c=EOF, x, n ; dtab *tab, *t ; short shift ; short *p, *maxp, *q, len=0 ; uchar rd_state ; maxp = ( p = runs ) + MAXRUNS ; x = d->x ; shift = d->shift ; tab = d->tab ; /* restore decoder state */ rd_state = f->rd_state ; do { do { while ( shift < 0 ) { c = tgetd ( f, TO_CHAR ) ; rd_state = ( rd_state & rd_allowed[c] ) ? ( ( rd_state & rd_nexts[c] ) ? rd_state << 1 : rd_state ) : RD_BEGIN ; if ( rd_state == RD_END ) { /* Translator: I am not sure what this means - I think that the modem has given an unexpected response while receiving date */ msg ( "W+ %s", gettext ( "modem response in data" ) ) ; } if ( c < 0 ) { x = ( x << 15 ) | 1 ; shift += 15 ; /* EOL pad at EOF */ } else { x = ( x << 8 ) | c ; shift += 8 ; } } t = tab + ( ( x >> shift ) & 0x1ff ) ; tab = t->next ; shift -= t->bits ; } while ( ! t->code ) ; if ( p < maxp ) *p++ = t->code ; } while ( t->code != -1 ) ; d->x = x ; d->shift = shift ; d->tab = tab ; /* save state */ f->rd_state = rd_state ; if ( p >= maxp ) msg ( "W %s", gettext ( "run length buffer overflow" ) ) ; /* combine make-up and terminating codes and remove +1 offset in run lengths */ n = p - runs - 1 ; for ( p = q = runs ; n-- > 0 ; ) if ( *p > 64 && n-- > 0 ) { len += *q++ = p[0] + p[1] - 2 ; p+=2 ; } else { len += *q++ = *p++ - 1 ; } n = q - runs ; /* check for RTC and errors */ if ( len ) d->eolcnt = 0 ; else if ( ++(d->eolcnt) >= RTCEOL ) err = EOF ; if ( c < 0 ) err = - 2 ; if ( pels ) *pels = len ; return err ? err : n ; } /* Receive data. Reads scan lines from modem and writes to output file. Checks for errors by comparing received line width and session line width. Check that the output file is still OK and if not, send one CANcel character and wait for protocol to complete. Returns 0 if OK, 1 on DLE-ETX without RTC, or 2 if there was a file write error. */ int receive_data ( TFILE *mf, OFILE *f, cap session, int *nerr ) { int err=0, line, lines, nr, len ; int pwidth = pagewidth [ session [ WD ] ] ; short runs [ MAXRUNS ] ; DECODER d ; char *message ; if ( ! f || ! f->f ) { msg ( "E2 can't happen (writeline)" ) ; } newDECODER ( &d ) ; lines=0 ; for ( line=0 ; ( nr = readfaxruns ( mf, &d, runs, &len ) ) >= 0 ; line++ ) { if ( nr > 0 && len > 0 && line ) { /* skip first line+EOL and RTC */ if ( len != pwidth ) { (*nerr)++ ; if ( *nerr <= MAXERRPRT ) msg ("R-+ (%d:%d)", line, len ) ; nr = xpad ( runs, nr, pwidth - len ) ; } writeline ( f, runs, nr, 1 ) ; lines++ ; } if ( ferror ( f->f ) ) { err = msg ( "ES2 %s", gettext ( "file write:" ) ) ; tput ( mf, (uchar*) CAN_STR, 1 ) ; msg ("W %s", gettext ( "CAN: data reception cancelled" ) ) ; } } if ( *nerr ) { if ( *nerr > MAXERRPRT ) msg ("R-+ ....." ) ; msg ("R- : %s", gettext ( "reception errors" ) ) ; msg ("W- %d %s", *nerr , gettext ( "reception errors" ) ) ; } if ( nr == EOF ) { while ( tgetd ( mf, TO_CHAR ) >= 0 ) ; /* got RTC, wait for DLE-ETX */ } else { err = 1 ; /* DLE-ETX without RTC - should try again */ } /* Translator: this must have two "%d" formatting items in the translated string */ message = strdup2 ( "I- ", gettext ( "received %d lines with %d errors" ) ) ; if ( message ) { msg ( message, lines, *nerr ) ; free ( message ) ; } return err ; } /* Send training check sequence of n zeroes. Returns 0 or 2 on error. */ int puttrain ( TFILE *f, char *s, int n ) { int i, m, err=0 ; uchar buf [ MINWRITE ] = { 0 } ; char *message ; #ifdef ADDTCFRTC ENCODER e ; uchar *p ; #endif ckcmd ( f, &err, s, TO_FT, CONNECT ) ; if ( ! err ) { ttymode ( f, SEND ) ; /* send n bytes of zeros */ for ( i=0 ; i < n ; i += m ) { m = n-i < MINWRITE ? n-i : MINWRITE ; sendbuf ( f, buf, m, 0 ) ; } #ifdef ADDTCFRTC /* append RTC in case modem is looking for it */ newENCODER ( &e ) ; p = buf ; for ( i=0 ; i < RTCEOL ; i++ ) p = putcode ( &e, EOLCODE, EOLBITS, p ) ; p = putcode ( &e, 0, 0, p ) ; sendbuf ( f, buf, p - buf, 0 ) ; #endif tput ( f, (uchar*) DLE_ETX, 2 ) ; ckcmd ( f, &err, 0, TO_DRAIN_D, OK ) ; message = strdup2 ( "I- ", gettext ( "sent TCF - channel check of %d bytes" ) ) ; if ( message ) { msg ( message, n ) ; free ( message ) ; } ttymode ( f, COMMAND ) ; } return err ; } /* Checks for an error-free run of at least n bytes in the received training check sequence. Sets good if it's not null, the run was long enough and there were no errors. Returns 0 or 3 on other errors. */ int gettrain ( TFILE *f, char *s, int n, int *good ) { int err=0, c, i=0, maxrunl=0, runl=0 ; char * message ; ckcmd ( f, &err, s, T2, CONNECT ) ; if ( ! err ) { for ( i=0 ; ( c = tgetd ( f, T3S ) ) >= 0 ; i++ ) if ( c ) { if ( runl > maxrunl ) maxrunl = runl ; runl = 0 ; } else { runl ++ ; } if ( c == EOF ) err = msg ( "E3 %s", gettext ( "timed out during training check data" ) ) ; else ckcmd ( f, &err, 0, TO_RTCMD, NO ) ; } if ( runl > maxrunl ) maxrunl = runl ; if ( good ) *good = !err && maxrunl > n ; if ( !err ) { if ( maxrunl > n ) { message = strdup2 ( "I- ", gettext ( "received TCF - channel check (OK: run of %d in %d)" ) ) ; } else { message = strdup2 ( "I- ", gettext ( "received TCF - channel check (not OK: run of %d in %d)" ) ) ; } if ( message ) { msg ( message, maxrunl, i ) ; free ( message ) ; } } return err ; } /* Log a sent/received HDLC frame. Display of these messages is delayed to avoid possible timing problems. */ void logfr ( char *s , char *nm , uchar *p , int n ) { int i=0 ; msg ( n > 10 ? "H- %s %d bytes:" : "H-+ %s %d bytes:" , s, n ) ; for ( i=0 ; i= 1 ; i-- ) buf[i]=buf[i-1] ; buf[i] = 0xff ; msg ("W %s", gettext ( "HDLC frame missing initial 0xff" ) ) ; n++ ; } if ( buf[1] == 0x03 || buf[1] == 0x13 ) { for ( i=0 ; i < n ; i++ ) buf[i]=normalbits[buf[i]] ; msg ("W %s", gettext ( "bit-reversed HDLC frame, reversing bit order" ) ) ; f->ibitorder = f->ibitorder == normalbits ? reversebits : normalbits ; } return n ; } /* Read HDLC frame data. Returns 0 if OK, 1 on frame error, 3 on timeout, invalid response or too-long frame. */ int receive_frame_data ( TFILE *f, uchar *buf, int n, int *len ) { int err=0, c, i ; char *message; for ( i=0 ; ( c = tgetd ( f, T3S ) ) >= 0 ; i++ ) if ( i < n ) buf[ i ] = c ; if ( c == EOF ) { err = msg ( "E3 %s", gettext ( "timed out reading frame data" ) ) ; } else { switch ( cmd ( f, 0, TO_RTCMD ) ) { case OK: case CONNECT: break ; case ERROR: case NO: err = msg ( "W1 %s", gettext ( "frame error" ) ) ; break ; case EOF: err = msg ( "E3 %s", gettext ( "no response after frame data" ) ) ; break ; default: err = msg ( "E3 %s", gettext ( "wrong response after frame data" ) ); break ; } } if ( i >= n ) { message = strdup2 ( "E3 ", gettext ( "frame too long (%d, > %d max bytes)" ) ) ; if ( message ) { err = msg ( message, i, n ) ; free ( message ) ; } } if ( len ) *len = i ; return err ; } /* Get a Class 1 command or response frame. An attempt to match and combine T.30 "Response Received?" and "Command Received?" protocol flowcharts. When receiving commands returns after first correct non-optional frame or after the time given by getcmd has elapsed. This is instead of looping through main flowchart. When receiving responses returns on the first detected non-optional frame, after timeout T4, or on errors. Returns immediately if gets a +FCERROR response so can retry as data carrier. Returns DCN as a valid frame instead of hanging up. Returns the command/response received, or EOF on timeout or error. */ int getfr ( TFILE *mf, uchar *buf, int getcmd ) { /* frlen should be initialized to be zero */ /* informed from Steven Doerfler */ int err=0, frame=0, frlen=0, c, t ; char remoteid [ IDLEN + 1 ] ; time_t start ; uchar *fif=buf+3 ; char *message ; start = 10*time(0) ; t = getcmd ? ( getcmd > 1 ? getcmd : T2 ) : T4 ; Enter: err = 0 ; if ( nframes++ ) { c = cmd ( mf, "+FRH=3", t ) ; } else { c = CONNECT ; /* implied by ATA or ATD */ } switch ( c ) { case EOF: /* time out */ tput ( mf, (uchar*) CAN_STR, 1 ) ; ckcmd ( mf, 0, 0, TO_ABRT, OK ) ; err = 1 ; break ; case NO: /* S7 time out */ err = 1 ; break ; case MODULATION: /* data carrier (or DHS) */ return -msg ( "W-2 %s", gettext ( "wrong carrier" ) ) ; break ; case CONNECT: /* frame */ break ; default: /* shouldn't happen */ err = msg ( "E3 %s", gettext ( "wrong response to command to receive a frame" ) ) ; break ; } if ( ! err ) err = receive_frame_data ( mf, buf, MAXFRLEN, &frlen ) ; if ( ! err && frlen < 3 ) { message = strdup2 ( "E3 ", gettext ( "received short frame (%d bytes)" ) ) ; if ( message ) { err = msg ( message, frlen ) ; free ( message ) ; } } logfr ( gettext ( "received" ), frname ( buf [ 2 ] ), buf, frlen ) ; if ( ! err ) { frlen = fixframe ( buf, frlen, mf ) ; frame = buf [ 2 ] & 0x7f ; switch ( frame ) { case CRP: err = 1 ; case NSF: case NSC: case NSS: goto Enter ; case CIG: case CSI: case TSI: revcpy ( fif , (uchar*) remoteid ) ; msg ( "I- %s %*.*s", gettext ( "The remote ID is" ), IDLEN, IDLEN, remoteid ) ; goto Enter ; } } if ( err && getcmd && ( t -= 10*time(0) - start ) > 0 ) goto Enter ; return err ? EOF : frame ; } /* Class 1 send/receive. The logic in this function is a mess because it's meant to mirror the flowchart in ITU-T recommendation T.30 which is the protocol specification. */ int c1sndrcv ( TFILE *mf, cap local, char *localid, OFILE *outf, IFILE *inf, int pages, char *header, faxfont *font, int maxpgerr, int noretry, int calling ) { int err=0, rxpage=0, page=1, t, disbit, good, frame, last, nerr ; int rxdislen, ppm, try=0, pagetry=0, retry=0, remtx=0, remrx=0 ; int writepending=0, dp=0 ; cap remote = { DEFCAP }, session = { DEFCAP } ; char *fname=0, *message ; uchar buf [ MAXFRLEN ], *fif=buf+3 ; #ifdef ENABLE_NLS gsize written = 0 ; char *conv_fname ; #endif if ( ! calling ) goto RX ; /* Class 1 Transmitter: */ T: /* Transmitter Phase B - wait for DIS or DTC */ pagetry = 0 ; frame = getfr ( mf, buf, T1 ) ; if ( frame <= 0 ) { err = msg ( "E3 %s", gettext ( "no answer from remote fax" ) ) ; goto B ; } if ( frame != DIS && frame != DTC ) { msg ( "W2 %s", gettext ( "can't open page" ) ) ; goto C ; } disbit = ( frame == DIS ) ? 0x80 : 0x00 ; try = 0 ; A: /* decide to send or receive after DIS/DTC */ if ( frame == DIS || frame == DTC ) { rxdislen = dislen ( fif ) ; mkcap ( fif, remote, 1 ) ; remtx = fif[1] & 0x80 ; remrx = fif[1] & 0x40 ; } if ( remtx ) { if (remrx ) { msg ( "N %s", gettext ( "remote has one or more documents to send and can receive" ) ) ; } else { msg ( "N %s", gettext ( "remote has one or more documents to send and cannot receive" ) ) ; } } else { if (remrx ) { msg ( "N %s", gettext ( "remote has no documents to send and can receive" ) ) ; } else { msg ( "N %s", gettext ( "remote has no documents to send and cannot receive" ) ) ; } } if ( pages > 0 ) { if ( ! remrx ) msg ( "W %s", gettext ( "remote cannot receive, trying anyways" ) ) ; goto D ; } else { if ( ! remtx ) msg ( "W %s", gettext ( "remote has nothing to send, trying anyways" ) ) ; goto R ; } D: /* send DCS */ if ( rdpage ( inf, dp, &ppm, local, 0 ) ) { err = msg ( "E2 %s", gettext ( "can't open page" ) ) ; goto B ; } D_2: mincap ( local, remote, session ) ; revcpy ( (uchar*) localid, fif ) ; if ( ! err ) err = putframe ( TSI | MORE_FR | disbit, buf, IDLEN, mf, -1 ) ; mkdis ( session, fif, DCSLEN, 0, pages ) ; if ( ! err ) err = putframe ( DCS | SUB_FR | disbit, buf, DCSLEN, mf, -1 ) ; #ifdef USEFTS if ( cmd ( mf, "+FTS=" MODDLY, T3S ) != OK ) #endif msleep ( TMOD ) ; /* if +FTS not supported */ if ( ! err ) err = puttrain ( mf, c1cmd[SND][TRN][session[BR]], TCFSECS*cps [ session[BR] ] ) ; try++ ; if ( ! err ) { cmd ( mf, "+FRS=1", T3S ) ; /* wait for TCF carrier to drop */ frame = getfr ( mf, buf, 0 ) ; } if ( err || frame < 0 ) { if ( try >= 3 ) { goto C_timeout ; } else { goto D_2 ; } } switch ( frame ) { case DIS: case DTC: if ( try >= 3 ) goto C_timeout ; else goto A ; case FTT: message = strdup2 ( "I ", gettext ( "channel not usable at %d bps" ) ) ; if ( message ) { msg ( message, 8*cps[session[BR]] ) ; free ( message ) ; } remote[BR] = fallback[session[BR]] ; if ( remote[BR] >= 0 ) goto D_2 ; else { err = msg ( "E2 %s", gettext ( "channel not usable at lowest speed" ) ) ; goto C ; } case CFR: goto I_2 ; default: err = msg ( "E3 %s", gettext ( "invalid response to DCS" ) ) ; goto C ; } I: /* send a page */ if ( rdpage ( inf, dp, &ppm, local, 0 ) ) { err = msg ( "E2 %s", gettext ( "can't open page" ) ) ; goto B ; } I_2: ckcmd ( mf, &err, c1cmd [SND][DTA][session[BR]], TO_FT, CONNECT ) ; if ( !err ) { msleep ( 1000 ) ; err = send_data ( mf, inf, page, pages, local, session, header, font ) ; } pagetry++ ; if ( !err ) err = end_data ( mf, session, 0, 0 ) ; #ifdef USEFTS if ( cmd ( mf, "+FTS=" MODDLY, T3S ) != OK ) #endif msleep ( TMOD ) ; /* if +FTS not supported */ /* fix ppm if on last page of stdin */ if ( lastpage ( inf ) ) ppm = EOP ; try = 0 ; sendppm: if ( !err ) err = putframe ( ppm | disbit, buf, 0, mf, -1 ) ; try++ ; frame = getfr ( mf, buf, 0 ) ; if ( frame < 0 ) { if ( try >= 3 ) { goto C_timeout ; } else { goto sendppm ; } } fname = inf->page->fname ; switch ( noretry ? MCF : frame ) { /* common retry logic */ case MCF: case RTP: case PIP: fname = inf->page->fname ; if ( fname ) { message = strdup2 ( "I ", gettext ( "sent page %s" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( fname, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( fname, -1, NULL, &written, NULL ) ; if ( conv_fname ) { msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { msg ( message, fname ) ; } #else msg ( message, fname ) ; #endif free ( message ) ; } } pagetry=0 ; page++ ; dp = 1 ; break ; case PIN: case RTN: dp = 0 ; retry = pagetry < NTXRETRY ; break ; default: err = msg ( "E3 %s", gettext ( "invalid post-page response" ) ); goto C ; } switch ( ppm ) { case MPS: switch ( frame ) { case PIN: goto E ; case PIP: goto E ; case MCF: goto I ; case RTP: goto D ; case RTN: goto D ; } case EOP: switch ( frame ) { case PIN: goto E ; case PIP: goto E ; case MCF: case RTP: nextipage ( inf, 1 ) ; /* skip ahead to mark all files done */ if ( remtx ) goto R ; /* poll after sending */ else goto C ; case RTN: if ( retry ) goto D ; else goto C ; } case EOM: switch ( frame ) { case PIN: goto E ; case PIP: goto E ; case MCF: case RTP: case RTN: cmd ( mf, "+FRS=20", T3S ) ; /* wait for ppr carrier to drop */ if ( retry ) goto T ; else goto T ; } } E: /* ignore PIN and PIP */ msg ( "W %s", gettext ( "interrupt request ignored" ) ) ; try=0 ; goto A ; /* Class 1 Receiver */ RX: R: /* Receiver Phase B */ if ( ! err ) err = wrpage ( outf, rxpage ) ; disbit=0x00 ; for ( t=0 ; !err && t 0 ) { disbit = ( frame == DIS ) ? 0x80 : 0x00 ; goto F_2 ; } } if ( err ) goto C ; else goto C_timeout ; F: /* get a command */ last = frame ; frame = getfr ( mf, buf, 1 ) ; if ( writepending ) { /* do postponed file close/open */ writepending=0 ; err = wrpage ( outf, rxpage ) ; if ( err ) goto C ; } if ( frame < 0 ) { if ( frame == -2 ) goto getdata ; /* data carrier detected */ if ( last == EOM ) goto R ; else { err = msg ("E3 %s", gettext ( "timed out waiting for command" ) ) ; goto B ; } } F_2: switch ( frame ) { case DTC: goto D ; case DIS: try=0 ; goto A ; case DCS: mkcap ( fif, session, 0 ) ; printcap ( "session", session ) ; cmd ( mf, "+FTS=1", T3S ) ; /* make sure DCS is over */ gettrain ( mf, c1cmd [RCV][TRN][session[BR]], cps[session[BR]], &good ) ; if ( putframe ( ( good ? CFR : FTT ) | disbit, buf, 0, mf, -1 ) || ! good ) goto F ; getdata: outf->w=pagewidth[session[WD]]; outf->h=0; outf->xres=204.0; outf->yres=vresolution[session[VR]]; nerr = 0 ; re_getdata: if ( cmd ( mf, c1cmd [RCV][DTA][session[BR]], TO_FT ) != CONNECT ) goto F ; /* +FCERROR -> DCS resent */ switch ( receive_data ( mf, outf, session, &nerr ) ) { case 0: good = nerr < maxpgerr ; /* Translator: the %s formatting item refers to the file name to which a received fax page has been saved */ message = strdup2 ("I- ", gettext ( "page saved to %s" ) ) ; if (message) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( outf->cfname, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( outf->cfname, -1, NULL, &written, NULL ) ; if ( conv_fname ) { msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { msg ( message, outf->cfname ) ; } #else msg ( message, outf->cfname ) ; #endif free ( message ) ; } writepending=1 ; /* ppm follows immediately, don't write yet */ rxpage++ ; break ; case 1: /* no RTC, re-issue +FRM command */ goto re_getdata ; default: good = 0 ; break ; } ckcmd ( mf, 0, 0, TO_RTCMD, NO ) ; goto F ; /* III: */ case PRI_EOM: case PRI_MPS: case PRI_EOP: frame &=0xf7 ; /* ignore PRocedure Interrupt bit */ case MPS: case EOP: case EOM: putframe ( ( good ? MCF : RTN ) | disbit, buf, 0, mf, -1 ) ; if ( good && frame == MPS ) goto getdata ; else goto F ; case DCN: goto B ; default: err = msg ( "E3 %s", gettext ( "unrecognized command" ) ) ; goto B ; } C_timeout: err = msg ( "E3 %s", gettext ( "no command or response from remote" ) ) ; C: putframe ( DCN, buf, 0, mf, -1 ) ; B: ckcmd ( mf, 0, "H", TO_RESET, OK ) ; /* hang up */ if ( rxpage > 0 ) wrpage ( outf, -1 ) ; /* remove last file */ return err ; } /* Check for hangup message. Assumes hsc is initialized to a negative value. Returns 0 if no hangup message, 1 if there was one. If perr is not null, sets it to 2 if the hsc was non-zero (error). */ int gethsc ( int *hsc, int *perr ) { int err=0, i ; char *message ; if ( sresponse ( "+FHNG:", hsc ) || sresponse ( "+FHS:", hsc ) ) { if ( hsc && *hsc > 0 ) { message = strdup2 ("E2 ", gettext ( "abnormal termination (code %d)" ) ) ; if ( message ) { err = msg ( message, *hsc ) ; free ( message ) ; } for ( i=0 ; c2msg[i].min >= 0 ; i++ ) { if ( *hsc >= c2msg[i].min && *hsc <= c2msg[i].max ) { msg ( "E %s", c2msg[i].msg ) ; } } if ( perr && ! *perr ) { *perr = 2 ; } } else { err = 1 ; } } return err ; } /* Print remote ID and store DCS values in session as per responses since last command. */ void getc2dcs ( cap session ) { char *p ; if ( ( p = sresponse ( "+FTI:", 0 ) ) != 0 || ( p = sresponse ( "+FTSI:", 0 ) ) != 0 ) { msg ( "I- remote ID -> %s", p ) ; } if ( ( p = sresponse ( "+FCS:", 0 ) ) != 0 || ( p = sresponse ( "+FDCS:", 0 ) ) != 0 ) { str2cap ( p, session ) ; printcap ( "session", session ) ; } } /* Wait for a starting character XON or DC2. Display & ignore any other characters received. */ void getstartc ( TFILE *mf ) { int c, noise ; char *message ; for ( noise=0 ; ( c = tgetc ( mf, TO_C2X ) ) != XON && c != DC2 ; noise++ ) { if ( c == EOF ) { msg ( "W %s", gettext ( "no XON/DC2 received after CONNECT" ) ) ; break ; } else { msg ( "W-+ %s", cname ( c ) ) ; noise++ ; } } if ( noise ) { message = strdup2 ( "W : ", gettext ( "%d characters received while waiting to send" ) ) ; if ( message ) { msg ( message, noise ) ; free ( message ) ; } } } /* Class 2 send and receive. If calling, polls if no files to send, otherwise sends. If not calling sends documents if files to send, else receives. When sending, issues +FDIS to change session parameters if file format changes, then sends +FDT followed by data and a post-page message determined by format of next page, if any. Retransmits each page up to NTXRETRY times. When receiving extracts file format from responses to +FDR or ATA and saves them in the file. Receives data to a file and sets page transfer status if too many errors. Returns 0 if OK or 2 on errors. */ int c2sndrcv ( TFILE *mf, cap local, char *localid, OFILE *outf, IFILE *inf, int pages, char *header, faxfont *font, int maxpgerr, int noretry, int calling ) { int err=0, done=0, page, pagetry, nerr, c, dp=0 ; int ppm=0, good, hsc, changed ; int remtx=0 ; char *fname=0, *message ; cap session = { 0,0,0,0, 0,0,0,0 } ; char buf [ CMDBUFSIZE ] ; #ifdef ENABLE_NLS gsize written = 0 ; char *conv_fname ; #endif hsc=-1 ; /* will be set >= 0 on hangup */ if ( sresponse ( "+FPO", 0 ) ) { remtx = 1 ; msg ( "N %s", gettext ( "remote has one or more documents to send." ) ) ; } if ( calling ) { if ( pages ) goto send ; else goto poll ; } else { if ( pages ) goto pollserver ; else goto receive ; } /* Class 2 Send */ pollserver: /* with +FLP[L]=1 the modem should accept +FDT. */ send: page=1 ; pagetry=0 ; while ( ! err && ! done ) { err = rdpage ( inf, dp, &ppm, local, &changed ) ; if ( ! err && changed ) { sprintf ( buf, c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d", local[0], local[1], local[2], local[3] ) ; ckcmd ( mf, 0, buf, TO_FT, OK ) ; if ( gethsc ( &hsc, &err ) ) { continue ; } } ckcmd ( mf, &err, "+FDT", -TO_C2B, CONNECT ) ; if ( err || gethsc ( &hsc, &err ) ) { done=1 ; continue ; } getc2dcs ( session ) ; if ( ! c20 ) getstartc ( mf ) ; send_data ( mf, inf, page, pages, local, session, header, font ) ; pagetry++ ; if ( c20 ) { end_data ( mf, session, ppm, &good ) ; } else { end_data ( mf, session, 0, 0 ) ; gethsc ( &hsc, &err ) ; if ( ! err && hsc < 0 ) { ckcmd ( mf, &err, ppm == EOP ? "+FET=2" : ppm == EOM ? "+FET=1" : "+FET=0" , TO_C2PP, OK ) ; } gethsc ( &hsc, &err ) ; if ( ! err && hsc < 0 ) { if ( sresponse ( "+FPTS:", &good ) ) { good &= 1 ; /* odd values mean received OK */ } else { /* no +FPTS and +FHNG probably NG */ good = gethsc ( 0, 0 ) ? 0 : msg ( "W1 %s", gettext ("no +FPTS response obtained, it is assumed that fax was received" ) ) ; } } } if ( noretry ) good = 1; if ( good ) { fname = inf->page->fname ; if ( fname ) { message = strdup2 ( "I ", gettext ( "sent page %s" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( fname, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( fname, -1, NULL, &written, NULL ) ; if ( conv_fname ) { msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { msg ( message, fname ) ; } #else msg ( message, fname ) ; #endif free ( message ) ; } } pagetry=0 ; page++ ; dp = 1 ; if ( ppm == EOP ) { nextipage ( inf, 1 ) ; /* skip ahead to mark all files done */ done = 1 ; } } else { dp = 0 ; if ( pagetry >= NTXRETRY ) err = msg ( "E2 %s", gettext ( "too many page send retries" ) ) ; } if ( gethsc ( &hsc, &err ) ) done=1 ; if ( good && lastpage ( inf ) ) { done = 1 ; } } goto done ; /* Class 2 Receive */ poll: /* with +FSP[L]=1 and +FPO[LL]: the modem should now accept +FDR. */ receive: getc2dcs ( session ) ; /* get ATA responses */ done=0 ; for ( page=0 ; ! err && ! done ; page++ ) { if ( ! ( err = wrpage ( outf, page ) ) ) { c = cmd ( mf, "+FDR", -TO_C2R ) ; switch ( c ) { case CONNECT: getc2dcs ( session ) ; outf->w=pagewidth[session[WD]]; outf->h=0; outf->xres=204.0; outf->yres=vresolution[session[VR]]; nerr = 0 ; tput ( mf, &startchar, 1 ) ; if ( receive_data ( mf, outf, session, &nerr ) == 0 ) { good = nerr < maxpgerr ; /* Translator: the %s formatting item refers to the file name to which a received fax page has been saved */ message = strdup2 ( "I- ", gettext ( "page saved to %s" ) ) ; if ( message ) { #ifdef ENABLE_NLS if ( use_utf8 && !g_utf8_validate ( outf->cfname, -1, NULL ) ) { conv_fname = g_filename_to_utf8 ( outf->cfname, -1, NULL, &written, NULL ) ; if ( conv_fname ) { msg ( message, conv_fname ) ; g_free ( conv_fname ) ; } } else { msg ( message, outf->cfname ) ; } #else msg ( message, outf->cfname ) ; #endif free ( message ) ; } } else { good = 0 ; } ckcmd ( mf, &err, 0, TO_C2EOR, OK ) ; if ( err || gethsc ( &hsc, &err ) ) { wrpage ( outf, page+1 ) ; wrpage ( outf, -1 ) ; done=1 ; continue ; } if ( ! good ) { msg ( "W %s", gettext ( "reception errors" ) ) ; ckcmd ( mf, 0, c20 ? "+FPS=2" : "+FPTS=2", T3S, OK ) ; if ( gethsc ( &hsc, &err ) ) continue ; } break ; case OK: wrpage ( outf, -1 ) ; /* no more pages */ done=1 ; if ( gethsc ( &hsc, &err ) ) continue ; break ; default: wrpage ( outf, -1 ) ; /* oops */ err = msg ( "E3 %s", gettext ( "receive (+FDR) command failed" ) ) ; break ; } } } done: if ( hsc < 0 ) ckcmd ( mf, 0, c20 ? "+FKS" : "+FK", TO_RESET, OK ) ; return err ; } /* Dial the phone number given by string s. If nowait is true adds a ';' to the dial string to avoid waiting for a CONNECTion (might allow ersatz polling). Also resets the global "nframes" if appropriate so getfr() and putframe() know not to issue +FRH/+FTH. Returns 0 if dialed OK, 1 if busy, 2 on errors. */ int dial ( TFILE *f, char *s, int nowait ) { int err=0, hsc=-1 ; char c, dsbuf [ 128 ], *p, *message ; sprintf ( dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ; message = strdup2 ( "I ", gettext ( "dialing %s" ) ) ; if ( message ) { msg ( message, dsbuf+1 ) ; free ( message ) ; } c = cmd ( f, dsbuf, TO_A ) ; if ( ( p = sresponse ( "+FCSI:", 0 ) ) != 0 || ( p = sresponse ( "+FCI:", 0 ) ) != 0 ) { message = strdup2 ( "I- ", gettext ( "The remote ID is %s" ) ) ; if ( message ) { msg ( message, p ) ; free ( message ) ; } } if ( nowait && c == OK ) { msg ( "I %s", gettext ( "called" ) ) ; nframes = 1 ; } else if ( c1 && c == CONNECT ) { msg ( "I %s", gettext ( "connected" ) ) ; nframes = 0 ; } else if ( !c1 && c == OK ) { msg ( "I %s", gettext ( "connected" ) ); } else if ( c == BUSY ) { err = msg ( "W1 %s", gettext ( "number is busy" ) ) ; } else { err = msg ( "E2 %s", gettext ( "dial command failed" ) ) ; } gethsc ( &hsc, err ? 0 : &err ) ; return err ; } /* Figure out which mode the modem answered in (fax, data, voice or none) based on modem class and responses to the previous command. Sets crate (connect rate) for DATAMODE and hsc (hangup status code) if detects a class 2 hangup message. */ enum connectmode { NONE, DATAMODE, FAXMODE, VOICEMODE } ; enum connectmode ansmode ( int *crate, int *hsc ) { enum connectmode mode = NONE ; int x=0 ; if ( c1 && sresponse ( "CONNECT", &x ) ) { mode = x ? DATAMODE : FAXMODE ; } if ( !c1 && sresponse ( "OK", 0 ) ) { mode = FAXMODE ; } if ( !c1 && ( sresponse ( "CONNECT", &x ) || sresponse ( "+FDM", 0 ) ) ) { mode = DATAMODE ; } if ( sresponse ( "DATA", 0 ) || sresponse ( "CONNECT DATA", 0 ) ) { mode = DATAMODE ; sresponse ( "CONNECT", &x ) ; } if ( sresponse ( "FAX", 0 ) || sresponse ( "+FCO", 0 ) ) { mode = FAXMODE ; } if ( sresponse ( "VCON", 0 ) ) { mode = VOICEMODE ; } if ( gethsc ( hsc, 0 ) ) { mode = NONE ; } if ( DATAMODE && x ) *crate = x ; return mode ; } /* Answer the phone. Remove our lock if sharing device with outgoing calls. If waiting for call, wait for modem activity, else answer phone. Figure out what mode we answered in and handle call appropriately. Re-lock if necessary. Exec *getty or *vcmd for data or voice calls. */ int answer ( TFILE *f, char **lkfile, int wait, int share, int softaa, char *getty, char *vcmd, char *acmd ) { int err=0, c ; int crate=19200, hsc=-1, i ; enum connectmode mode=NONE ; char *message; if ( ! err && share ) { err = ttymode ( f, COMMAND ) ; if ( ! err ) err = unlockall ( lkfile ) ; } if ( ! err && wait ) { msg ( "I %s", gettext ( "waiting for activity") ) ; tdata ( f, -1 ) ; msg ( "I %s", gettext ( "activity detected") ) ; } if ( ! err && share ) { msleep ( 500 ) ; /* let other programs lock port */ err = lockall ( lkfile, 1 ) ; if ( err ) err = msg ( "W1 %s", gettext ( "can't answer: can't lock device" ) ); else err = ttymode ( f, COMMAND ) ; /* in case it was changed silently */ } for ( i=0 ; ! err && mode == NONE && ( i==0 || ( i==1 && softaa ) ) ; i++ ) { c = cmd ( f, wait ? 0 : acmd, ( i==0 && softaa ) ? TO_DATAF : TO_A ) ; if ( c == DATA ) cmd ( f, c1 ? "O" : 0, TO_A ) ; /* +FAE=1 weirdness */ mode = ansmode ( &crate, &hsc ) ; switch ( mode ) { case DATAMODE : msg ( "Idata call answered") ; if ( getty && *getty ) { char buf [ MAXGETTY ] ; if ( ckfmt ( getty, 6 ) ) { message = strdup2 ( "E3 ", gettext ( "too many %%d escapes in command (%s)" ) ) ; if ( message ) { err = msg ( message, getty ) ; free ( message ) ; } } else { sprintf ( buf, getty, crate, crate, crate, crate, crate, crate ) ; message = strdup2 ( "I ", gettext ( "executing command /bin/sh -c %s" ) ) ; if ( message ) { msg ( message, buf ) ; free ( message ) ; } execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; err = msg ( "ES2 %s", gettext ( "exec() call failed:" ) ) ; } } else { err = msg ( "E2 %s", gettext ( "no getty command defined for data call" ) ) ; } break ; case FAXMODE : nframes = 0 ; msg ( "I %s", gettext ( "fax call answered") ) ; break ; case VOICEMODE : msg ( "I %s", gettext ( "voice call answered") ); if ( vcmd && *vcmd ) { char buf [ MAXGETTY ] ; if ( ckfmt ( vcmd, 6 ) ) { } else { sprintf ( buf, vcmd, f->fd, f->fd, f->fd, f->fd, f->fd, f->fd ) ; message = strdup2 ( "I ", gettext ( "executing command /bin/sh -c %s" ) ) ; if ( message ) { msg ( message, buf ) ; free ( message ) ; } execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; err = msg ( "ES2 %s", gettext ( "exec() call failed:" ) ) ; } } else { err = msg ( "E2 %s", gettext ( "no voice command defined for voice call" ) ) ; } break ; case NONE: if ( i==0 && softaa && hsc < 0 && getty && *getty ) { int j ; /* switch to fax for 2nd try */ for ( j=0 ; j<3 ; j++ ) if ( cmd ( f, c1 ? "+FCLASS=1" : ( c20 ? "+FCLASS=2.0" : "+FCLASS=2" ), -TO_RESET ) == OK ) break ; wait = 0 ; acmd = ANSCMD ; } else { err = msg ( "E3 %s", gettext ( "unable to answer call") ) ; } break ; default: err = msg ( "E3can't happen(answer)" ) ; break ; } } return err ; } /* Initialize modem. Determine class to use and issue class-specific fax initialization commands. If poll is true, issues commands to enable polling also. Returns 0 or 3 if a mandatory setup command fails. */ int modem_init ( TFILE *mf, cap c, char *id, int calling, int poll, int capsset, int *preverse ) { int err=0, t=-TO_RESET ; char buf [ CMDBUFSIZE ], model [ CMDBUFSIZE ] = "" ; char **p, *q, *modelq [2][4] = { { "+FMFR?", "+FMDL?", 0 }, { "+FMI?", "+FMM?", "+FMR?", 0 } } ; char *message; /* diasable command echo and get firmware revision */ cmd ( mf, "E0", t ) ; if ( cmd ( mf, "I3", t ) == OK ) { getresp ( "", model, CMDBUFSIZE ) ; } /* if not already chosen, pick safest class; set it */ if ( ! err && ! c1 && !c2 && ! c20 ) { if ( cmd ( mf, "+FCLASS=?", t ) != OK ) { err = msg ("E3 %s", gettext ( "modem does not support fax" ) ) ; } else { if ( strinresp ( "2.0" ) ) c20 = 1 ; else if ( strinresp ( "2" ) ) ; else if ( strinresp ( "1" ) ) c1 = 1 ; else err = msg ("E3 %s", gettext ( "can't determine fax modem class support" ) ) ; if ( strstr ( model, "Sportster" ) ) { /* USR Sporsters are buggy */ c1 = 1 ; c2 = c20 = 0 ; } } } ckcmd ( mf, &err, c1 ? "+FCLASS=1" : ( c20 ? "+FCLASS=2.0" : "+FCLASS=2" ), t, OK ) ; /* get make & model if using Class 2 or 2.0 */ if ( ! c1 ) { for ( p = modelq [ c20 ] ; ! err && *p ; p++ ) { if ( cmd ( mf, *p, t ) == OK ) { getresp ( "", model, CMDBUFSIZE ) ; } } if ( ! c1 && strstr ( model, "Multi-Tech" ) ) { *preverse = 0 ; /* Translator: "Multi-Tech" is a make of modem */ msg ("I %s", gettext ( "Multi-Tech bit order set" ) ) ; } } if ( ! err ) { /* Translator: the first string is the model of modem and the second is the fax modem class in which it operates */ message = strdup2 ( "I ", gettext ( "using %s in class %s" ) ) ; if ( message ) { msg ( message, model, c1 ? "1" : c20 ? "2.0" : "2" ) ; free ( message ) ; } } /* get maximum modem speed if not already set (Class 1 only) */ if ( ! err && c1 && ! capsset ) { int i ; char *c1spstr [6] = { "24", "48", "72", "96", "121", "145" } ; ckcmd ( mf, &err, calling ? "+FTM=?" : "+FRM=?", t, OK ) ; for ( i=0 ; i < 6 && strinresp ( c1spstr[i] ) ; i++ ) ; c[1]=i?i-1:0; } /* issue essential commands and set/get modem capabilities (Class 2 only) */ if ( ! err && ! c1 ) { if ( c20 ) { ckcmd ( mf, 0, "+FIP", t, OK ) ; ckcmd ( mf, 0, "+FNR=1,1,1,0", t, OK ) ; ckcmd ( mf, 0, "+FLO=1", t, OK ) ; ckcmd ( mf, 0, "+FBO=0", t, OK ) ; } ckcmd ( mf, &err, "+FCR=1", t, OK ) ; if ( ! capsset ) { if ( cmd ( mf, c20 ? "+FIS?" : "+FDIS?", -t ) == OK && ( q = strinresp ( "," ) ) ) { str2cap ( q-1, c ) ; } else { msg ( "W can't get modem capabilities, set to default" ) ; capsset = 1 ; } } if ( capsset ) { sprintf ( buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" : "+FDCC=%d,%d,%d,%d,%d,%d,%d,%d", c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ; ckcmd ( mf, 0, buf, -t, OK ) ; } sprintf ( buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" , CMDBUFSIZE-9, id ) ; ckcmd ( mf, 0, buf, -t, OK ) ; if ( ! err && poll ) { ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ; sprintf ( buf, c20 ? "+FPI=\"%.*s\"" : "+FCIG=\"%.*s\"" , CMDBUFSIZE-9, id ) ; ckcmd ( mf, 0, buf, -t, OK ) ; } } return err ; } /* the following are global so can terminate properly on signal */ char *icmd[3][ MAXICMD+1 ] = {{0},{0},{0}} ; /* initialization commands */ TFILE faxdev = { -1, 0,0, {0}, 0, 0 } ; /* modem */ char *lkfile [ MAXLKFILE+1 ] = {0} ; /* lock file names */ IFILE ifile = { 0 } ; /* files being sent */ int locked = 0 ; /* modem locked */ /* print names of files not sent and reset modem before exiting. */ int cleanup ( int err ) { char *message; /* log names of files not sent */ /* Translator: this specifies a file (a fax page) the sending of which has failed (%s represents the file name of the page) */ message = strdup2 ( "I ", gettext ( "failed page %s") ) ; if ( message ) { logifnames ( &ifile, message ) ; free ( message ) ; } if ( ! locked && faxdev.fd >= 0 ) end_session ( &faxdev, icmd[2], lkfile, err != 4 ) ; /* Translator: %s represents a string reporting whether the fax operation failed or succeeded */ message = strdup2 ( "I ", gettext ( "finished - %s" ) ) ; if ( message ) { msg ( message, errormsg [ err >= 0 && err <= 5 ? err : 6 ] ) ; free ( message ) ; } return err ; } /* signal handler */ void onsig ( int sig ) { msg ( "E terminating on signal %d", sig ) ; exit ( cleanup ( 5 ) ) ; } /* Fax send/receive program for Class 1, 2 and 2.0 fax modems. Returns 0 on success, 1 if number busy or device locked, 2 for errors, 3 for protocol errors, 4 if no modem response, 5 on signal. */ int main( int argc, char **argv) { int err=0, doneargs=0, c=0, i ; int testing=0, calling=0 ; int nicmd[3]={0,0,0}, nlkfile=0, nverb=0 ; char *faxfile = FAXFILE ; int softaa=0, share=0, wait=0, reverse=1, ignerr=0, noretry=0, hwfc=0 ; int capsset=0 ; char *getty = "", *vcmd = "", *acmd=ANSCMD ; cap local = { DEFCAP } ; char localid [ IDLEN + 1 ] = DEFID ; int maxpgerr = MAXPGERR ; time_t now ; char *header = 0, headerbuf [ MAXLINELEN ] ; char *fontname = 0 ; faxfont font ; OFILE ofile ; int pages = 0 ; char *phnum="", *ansfname = DEFPAT ; char fnamepat [ EFAX_PATH_MAX ] ; int index ; char *result, *message; /* As efax only accepts one option per argument, it is easy to test for '-u' and -n */ for ( index = 0 ; index < argc ; index++ ) { if ( *( argv [ index ] ) == '-' ) { if ( *( argv [ index ] + 1 ) == 'u' ) use_utf8 = 1 ; else if ( *( argv [ index ] + 1 ) == 'n' ) line_buffered = 1 ; } if ( use_utf8 && line_buffered ) break ; } /* set up internationalization */ #ifdef ENABLE_NLS /* use the efax-gtk translation files */ bindtextdomain( "efax-gtk", DATADIR "/locale" ) ; if ( use_utf8 ) { result = bind_textdomain_codeset ( "efax-gtk", "UTF-8" ) ; if ( ! result ) use_utf8 = 0 ; } textdomain ( "efax-gtk" ) ; setlocale ( LC_ALL, "" ) ; /* efax uses formatted text functions for floating point numbers, so restore the C locale for that */ setlocale ( LC_NUMERIC, "C" ) ; #endif /* Initialize global/static variables */ init_errormsg(); /* print initial message to both stderr & stdout */ argv0 = argv[0] ; memset((void *)lkfile, 0, sizeof(lkfile)); /* random effects on sparc linux */ verb[1] = "ewia" ; msg ( "I " Version " " Copyright ) ; argv0 = efaxbasename ( argv0 ) ; msg ( "A compiled "__DATE__ " " __TIME__ ) ; verb[1] = "" ; while ( ! err && ! doneargs && ( c = nextopt ( argc,argv, "a:c:d:e:f:g:h:i:j:k:l:no:p:q:r:st:uv:wx:T" ) ) != -1 ) { switch (c) { case 'a': acmd = nxtoptarg ; break ; case 'c': err = str2cap ( nxtoptarg, local ) ; capsset = 1 ; break ; case 'l': if ( strlen ( nxtoptarg ) > IDLEN ) { message = strdup2 ( "W ", gettext ( "local ID (%s) truncated to %d characters" ) ) ; if ( message ) { msg ( message, nxtoptarg, IDLEN ) ; free ( message ) ; } } if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) ) { message = strdup2 ( "W ", gettext ( "local ID (%s) has non-standard characters" ) ) ; if ( message ) { msg ( message, nxtoptarg ) ; free ( message ) ; } } sprintf ( localid, "%*.*s", IDLEN, IDLEN, nxtoptarg ) ; break ; case 'i': if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ; else err = msg ( "E2too many '-i' options"); break ; case 'j': if ( nicmd[1] < MAXICMD ) icmd[1][ nicmd[1]++ ] = nxtoptarg ; else err = msg ( "E2too many '-j' options"); break ; case 'k': if ( nicmd[2] < MAXICMD ) icmd[2][ nicmd[2]++ ] = nxtoptarg ; else err = msg ( "E2too many '-k' options"); break ; case 'h': header = nxtoptarg ; break ; case 'f': fontname = nxtoptarg ; break ; case 'd': faxfile = nxtoptarg ; break ; case 'e': vcmd = nxtoptarg ; break ; case 'g': getty = nxtoptarg ; break ; case 'n': msg ( "I %s", gettext ( "using line buffering of stdout" ) ) ; break ; case 'o': /* most protocol options are globals */ for ( ; *nxtoptarg ; nxtoptarg++ ) switch ( *nxtoptarg ) { case '0' : c20 = 1 ; break ; case '1' : c1 = 1 ; break ; case '2' : c2 = 1 ; break ; case 'a' : softaa = 1 ; break ; case 'e' : ignerr = 1 ; break ; case 'f' : vfc = 1 ; break ; case 'h' : hwfc = 1 ; break ; case 'l' : lockpolldelay /= 2 ; break ; case 'n' : noretry = 1 ; break ; case 'r' : reverse = 0 ; break ; case 'x' : startchar = XON ; break ; case 'z' : cmdpause += T_CMD ; break ; default : msg ( "Wunrecognized protocol option (%c)", *nxtoptarg ) ; } break ; case 'q': if ( sscanf ( nxtoptarg , "%d", &maxpgerr ) != 1 || maxpgerr < 0 ) { message = strdup2 ( "E2 ", gettext ( "incorrect quality (-q) argument (%s)" ) ) ; if ( message ) { err=msg ( message, nxtoptarg ) ; free ( message ) ; } } break; case 'r': ansfname = nxtoptarg ; break; case 's': share = 1 ; break; case 't': calling=1; /* fall through */ case 'p': if ( argv [ argc ] ) err = msg ("E2can't happen(unterminated argv)") ; if ( ! err ) err = newIFILE ( &ifile, argv + nxtoptind ) ; pages = argc - nxtoptind - ( c == 'p' ? 1 : 0 ) ; pages = pages < 0 ? 0 : pages ; phnum = nxtoptarg ; doneargs=1 ; break; case 'u': if ( ! use_utf8 ) msg ( "E error in binding textdomain to UTF-8 codeset" ) ; /* else msg ( "I using UTF-8 codeset" ) ; */ break ; case 'v': verb[nverb] = nxtoptarg ; nverb=1; break ; case 'w': wait = 1 ; break ; case 'x': if ( nlkfile < MAXLKFILE ) lkfile[ nlkfile++ ] = nxtoptarg ; else err = msg ( "E2too many lock files" ) ; break ; case 'T': /* test: begin+end session */ testing=1; doneargs=1 ; break ; default : fprintf ( stderr, Usage, argv0 ) ; err = 2 ; break ; } } for ( i=0 ; i/dev/null ; case $? in 0) ;; *) NICE="" ;; esac # -------- resolve dependencies on command-line arguments eval LOCK=\"$LOCK\" # depends on DEV # make device name w/o directories case $DEV in */*) DEVN=`echo $DEV|sed -e s./._.g` ;; *) DEVN=$DEV ;; esac case $PAGE in letter) PAGEDIM="$PAGE_letter" ;; legal) PAGEDIM="$PAGE_legal" ;; a4) PAGEDIM="$PAGE_a4" ;; *) echo "Error: PAGE=\"${PAGE}\" not valid." ; exit 2 ;; esac # --- check for a command or alias and optional flags cmd="" case $0 in */faxlpr|faxlpr) cmd=faxlpr ;; *) while : ; do case $# in 0) case $cmd in '') cmd=receive ;; esac ; break ;; esac case $1 in -l) OPT="$OPT -l" ; RES=204x98 ; shift ;; -h) OPT="$OPT -h" ; RES=204x196 ; shift ;; -v) OPT="$OPT -v" ; VERB=$VERBLOG ; shift ;; *) case $cmd in '') cmd=$1 ; shift ;; *) break ;; esac ;; esac done ;; esac # -------- functions faxmail () { echo "Subject: fax/message from $REMID : $FILES" echo "Mime-Version: 1.0" echo "Content-Type: multipart/mixed; boundary=EFAX_MAIL" echo "" echo "--EFAX_MAIL" echo "Content-Type: text/plain; charset=\"us-ascii\"" echo "Content-Transfer-Encoding: 7bit" echo "" cat $f for f in $FILES do echo "--EFAX_MAIL" echo "Content-Type: image/tiff; name=\"$f.tiff\"" echo "Content-Transfer-Encoding: base64" echo "Content-Disposition: attachment; filename=\"$f.tiff\"" echo "" $EFIX -M <$f echo "--EFAX_MAIL--" done echo "--EFAX_MAIL--" } # -------- export variables for fone script export DEV TSTAMP # -------- do the appropriate command while : ; do # so we can use `break' to get to the end of the script case $cmd in # fax answer : clean up logs and exec efax. normally run by init(8). answer) if cd $FAXDIR ; then : else echo "Error: $FAX cannot cd to $FAXDIR" >>$CONSOLE sleep 30 break fi umask $UMASK case $OWNER in '') ;; *) chown $OWNER /dev/$DEV ;; esac case $MODE in '') ;; *) chmod $MODE /dev/$DEV ;; esac for f in ${DEVN}.[0-9]* # clean up old log files do egrep "done, returning $NOLOG|exec'ing" $f >/dev/null 2>/dev/null case $? in 0) $RM $f ;; 1) FILES=`sed -n -e '/received ->/s/^.*-> \(.*\)$/\1/p' $f` FILES=`echo $FILES` REMID=`sed -n -e '/remote ID ->/s/^.*-> \(.*\)$/\1/p' \ -e tok -e b -e ':ok' -e q $f` case $REMID in '') REMID='?' ;; esac eval $NOTIFY echo >>${LOGDIR}/${DEVN}.log && \ cat $f >>${LOGDIR}/${DEVN}.log && \ $RM $f || \ echo "Error: $FAX cannot save log files" >>$CONSOLE ;; esac done while [ -f ${DEVN}.stop ] ; do sleep 15 ; done exec $NICE $EFAX -v "" -v "$VERBLOG" -d/dev/$DEV $INIT $SPKR \ $CLASSINIT $FCINIT $RXINIT $LOCK \ $RXCAP -l "$FROM" $RESET \ $DATAINIT -g "$DCMD" $VOICEINIT -e "$VCMD" \ -jS0=$ANSRINGS -w -s -r "$ANSFNAME" 2>$CONSOLE >${DEVN}.$$ echo ERROR: $FAX answer exec failed >>$CONSOLE ; sleep 30 break ;; # fax reanswer : switch from voice mode to fax[/data] mode reanswer) # we should already be in the fax spool directory, the # device locked, the modem answered and initialized in # voice mode and stdout/stderr redirected appropriately umask $UMASK exec $NICE $EFAX -v "" -v "$VERBLOG" -d/dev/$DEV '-i#CLS=0' \ $CLASSINIT $FCINIT $RXINIT \ $RXCAP -l "$FROM" $RESET \ $DATAINIT -g "$DCMD" \ -r "$ANSFNAME" echo ERROR: $FAX reanswer exec failed >>$CONSOLE ; sleep 30 break ;; # fax queue : list received fax files q*) cd $FAXDIR case $? in 0) ;; *) echo "cannot cd to $FAXDIR" ; break ;; esac for f in [0-9]*.[0-9][0-9][0-9] [0-9]*.v do if [ -r $f ] then echo echo Fax files in `pwd` : echo ${LS} -l [0-9]*.[0-9][0-9][0-9] [0-9]*.v 2>/dev/null echo break fi done break ;; # faxlpr : get phone number and user from current cf* file and run fax send faxlpr) # display permissions for debugging echo "$0: running as:" >&2 ; id -a >&2 ${LS} -ld $FAXDIR >&2 # the lpr spool directory for printer 'fax' if ! cd $FAXDIR then echo "$0: cannot cd to $FAXDIR" >&2 ; break fi if ! test -r lock then echo "$0: can't read lock file" >&2 ; break fi cfile=`tail -1 lock` if ! test -r $cfile then echo "$0: can't read control file" >&2 ; break fi cfile=`cat $cfile` num=` echo "$cfile" | sed -e /^[^J]/d -e s/.//` host=`echo "$cfile" | sed -e /^[^H]/d -e s/.//` user=`echo "$cfile" | sed -e /^[^P]/d -e s/.//` if ! test "$num" then echo "$0: can't read phone number" >&2 ; break fi # save stdin in a file if ! cat - >> fax$$ then echo "$0: can't write `pwd`/fax$$" >&2 ; break fi l=`$FAX send "$num" fax$$` case $? in 0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;; *) echo "$l" | mail -s "fax to $num failed " $user@$host ;; esac $RM fax$$ fax$$.??? break ;; # fax start/stop/status : manage fax receive daemon start|stop|st*) # common section cd $FAXDIR ; case $? in 0) ;; *) echo "cannot cd to $FAXDIR" ; break ;; esac n= ; for f in ${DEVN}.[0-9]* ; do logfile="$f" ; n=x$n ; done case $n in xx*) echo Warning: multiple logs for $DEV : ; ${LS} ${DEVN}.[0-9]* ;; esac case $logfile in *\*) echo no fax answer process for device $DEV ; break ;; esac efaxpid=`echo $logfile | sed -e "s/${DEVN}\.//g"` case $cmd in # fax start - remove stop file so fax answer will continue start) if [ ! -w . ] ; then echo "can't write `pwd`" ; break ; fi $RM ${DEVN}.stop break ;; # fax stop - make a stop file and kill current fax answer daemon stop) if [ ! -w . ] ; then echo "can't write `pwd`" ; break ; fi touch ${DEVN}.stop echo stopping fax daemon for ${DEV}, pid=$efaxpid kill -HUP $efaxpid break ;; # fax status - display pid and log file for current daemon st*) if [ -f ${DEVN}.stop ] ; then stat="(set to stop)" ; fi if ps -u $efaxpid 2>/dev/null ; then : else echo "NOT ACTIVE (last daemon was $efaxpid)" fi echo echo from: $FAXDIR/$logfile echo egrep "Warning|Error|starts|activity|opened|received -|done" $logfile case $# in 0) ;; *) echo "---------------" ; sleep $1 ; exec $FAX status $1 ;; esac break ;; esac # common section ;; # fax makefont : rasterize a PS font into a 256-character-wide bitmap makefont) if [ $# -lt 5 ] then echo Usage: fax makefont fontname fontsize \ cellwidth cellheight filename echo "(cellwidth and cellheight in pixels, fontsize in points)" echo "Example: fax makefont Courier-Bold 8 16 24 efaxfont" echo "will make an 8pt font (there are about 3 pixels per pt)" exit 1 fi FNTFMT=pbmraw # format for font files # FNTFMT=tiffg3 # smaller, available with Ghostscript 3.x or later pelwidth=`expr 256 \* $3` gs -q -sDEVICE=$FNTFMT -r204x196 -g${pelwidth}x$4 \ -sOutputFile=$5 - </dev/null ) ;; II*|MM*|P4*) echo "$1 is an image file..." $EFIX -ve -otiffg3 -p$PAGEDIM -r$RES -n $1.%03d $1 ;; *) echo "$1 is text..." $EFIX -ve -otiffg3 -p$PAGEDIM -r$RES -n $1.%03d $TEXTFONT $1 ;; esac break ;; # fax send : fax files to given number, converting first if necessary s*) case $# in 0) echo "missing phone number to call" ; ERR=2 ; break ;; esac # look up names case $1 in [A-Za-z]*) for f in $DIRFILES ; do if [ -r $f ] ; then TELNO=`$LOOKUP` ; fi case "$TELNO" in '') continue ;; *) break ;; esac done case "$TELNO" in '') echo "Name lookup for $1 failed" ; ERR=2 ; break ;; *) echo "Lookup: $1 = $TELNO" ;; esac ;; *) TELNO="$1" ;; esac shift case "$TO" in '') TO="$TELNO" ;; *) ;; esac TELNO=`echo $TELNO|sed "s/[ ()][ ()]*//g"` # handle manual dialing and number->dial string conversions case "$TELNO" in -m*) MANINIT="-jX3" ; TELNO="" ;; +*) TELNO=`echo $TELNO | $TELCVT` ;; esac case $TELNO in '') ;; *) TELNO="${DIALPREFIX}${TELNO}${DIALSUFFIX}" ;; esac # use `fax make' to convert files if they need to be updated FILES="" for f in $* ; do case $f in -) FILES="$FILES -" ; continue ;; esac if [ ! -r $f ] ; then echo "can't read file $f" ; ERR=2 ; break 2 fi case $f in *.[0-9][0-9][0-9]) FILES="$FILES $f" ;; # skip image files *) if echo ${f}.001: $f \; x | make -r -q -f - ; then echo ${f}.nnn is up-to-date else $RM ${f}.[0-9][0-9][0-9] $FAX make $OPT $f fi if [ -r $f.001 ] ; then FILES="$FILES $f.[0-9][0-9][0-9]" else # something's wrong, catch it later FILES="$FILES $f.001" fi ;; esac done # check that all files are OK for f in $FILES ; do case $f in -) continue ;; esac if [ ! -r $f ] ; then echo "can't read file $f" ; ERR=2 ; break 2 fi done # send it for s in 0 $FAILRETRIES ; do case $s in 0) ;; *) echo "Will try again in $s seconds" ; sleep $s ;; esac # logfile=`$TSTAMP`.log logfile="$TELNO".log for t in 0 $BUSYRETRIES ; do case $t in 0) ;; *) echo "Will try again in $t seconds" ; sleep $t ;; esac DATE=`eval "$DATECMD"` eval HDR=\"$HDR\" $NICE $EFAX -v "$VERB" -v "$VERBLOG" \ -d/dev/$DEV $LOCK $INIT $SPKR \ $CLASSINIT $FCINIT $TXINIT \ $TXCAP -l "$FROM" $RESET $HDRFONT -h "$HDR" \ $MANINIT -t "$TELNO" $FILES >$logfile ERR=$? case $ERR in 0) $RM $logfile ; break 2 ;; 1) echo Busy... ;; *) echo "There were errors (see ${logfile})." ; break ;; esac done SENT=` sed -n -e '/sent ->/s/^.*-> \([^ ]*\).*/\1/p' $logfile` FILES=`sed -n -e '/failed ->/s/^.*-> \([^ ]*\).*/\1/p' $logfile` case $SENT in '') break ;; esac case $FILES in '') break ;; esac echo Failed... done break ;; # fax hangup : hang up the phone hangup*) $NICE exec $EFAX -v $VERB -d/dev/$DEV $LOCK -iZ -T break ;; # fax fone : open modem device and exec fone script fone) cd $FAXDIR case $? in 0) ;; *) echo "cannot cd to $FAXDIR" ; break ;; esac $NICE exec $EFAX -v $VERB -d/dev/$DEV $LOCK $INIT \ -j#CLS=8 -a#VLS=1 -e "$VCMD $*" break ;; # fax (rm|print|view) commands possibly on files in spool directory rm|p*|v*) # common code # switch to spool directory if first file is found there for f in $FAXDIR/$1 ; do if test -r $f ; then cd $FAXDIR ; break ; fi done for f in $* ; do case $cmd in rm) # fax rm : delete files if $RM $f ; then echo deleted $f ; fi ;; p*) # fax print : print files echo "$f ... " eval "$PRINT | $PRCMD" ;; v*) # fax view : display images echo "$f ... " eval "$VIEW | $VIEWCMD" ;; esac done break ;; # fax [receive] : answer phone now and receive fax files r*) case $1 in '') file=`$TSTAMP` ;; *) file=$1 ;; esac logfile=${file}.log $NICE $EFAX -v "$VERB" -v "$VERBLOG" -d/dev/$DEV $LOCK $INIT $SPKR \ $CLASSINIT $FCINIT $RXINIT \ $RXCAP -l "$FROM" $RESET \ -r $file >$logfile ERR=$? case $ERR in 0) $RM $logfile ; break ;; 1) echo Busy... ;; *) echo "There were errors (see ${logfile})." ; break ;; esac break ;; # fax new : create a cover page for a fax (needs work) new) fname=${1-new.fax} DATE=`date "+%B %d %Y"` cat >$fname 2>/dev/null << EOF ________________________________________________ FAX COVER PAGE ________________________________________________ To: x fax: ________________________________________________ From: $NAME fax: $FROM Date: $DATE Pages: 1 (including this page) ________________________________________________ EOF ${VISUAL-${EDITOR-vi}} $fname break ;; # fax help : show command arguments -\?|\?|-h*|h*) cat 1>&2 < /* ANSI C */ #include #include #include #include #include #include "efaxmsg.h" #define MAXTSTAMP 80 /* maximum length of a time stamp */ #define MAXMSGBUF 4096 /* maximum status/error message bytes held */ #define NLOG 2 char *verb[NLOG] = { "ewin", "" } ; char *argv0 = "" ; int nxtoptind = 1 ; /* for communication with nextopt() */ char *nxtoptarg ; /* For systems without strerror(3) */ #ifdef NO_STRERROR extern int sys_nerr; extern char *sys_errlist[]; extern char *strerror( int i ) { return ( i >= 0 && i < sys_nerr ) ? sys_errlist[i] : "Unknown Error" ; } #endif /* Print time stamp. */ time_t tstamp ( time_t last, FILE *f ) { time_t now ; char tbuf [ MAXTSTAMP ] ; now = time ( 0 ) ; strftime ( tbuf, MAXTSTAMP, ( now - last > 600 ) ? "%c" : "%M:%S", localtime( &now ) ) ; fputs ( tbuf, f ) ; return now ; } /* Return string corresponding to character c. */ char *cname ( uchar c ) { #define CNAMEFMT "<0x%02x>" #define CNAMELEN 6+1 static char *cnametab [ 256 ] = { /* character names */ "","","","", "","","","", "", "", "", "", "", "", "", "", "","","","","","","","", "","", "","", "", "", "", "" } ; static char names[ (127-32)*2 + 129*(CNAMELEN) ] ; char *p=names ; static int i=0 ; if ( ! i ) { for ( i=32 ; i<256 ; i++ ) { cnametab [ i ] = p ; sprintf ( p, i<127 ? "%c" : CNAMEFMT, i ) ; p += strlen ( p ) + 1 ; } } return cnametab [ c ] ; } /* Print a message with a variable number of printf()-type arguments if the first character appears in the global verb[ose] string. Other leading characters and digits do additional actions: + allows the message to be continued on the same line, '-' buffers the message instead of printing it, E, and W expand into strings, S prints the error message for the most recent system error, a digit sets the return value, a space ends prefix but isn't printed. Returns 0 if no prefix digit. */ enum msgflags { E=0x01, W=0x02, S=0x04, NOFLSH=0x08, NOLF=0x10 } ; int msg ( char *fmt, ... ) { static int init=0 ; static FILE *logfile [ NLOG ] ; static char msgbuf [ NLOG ] [ MAXMSGBUF ] ; static time_t logtime [ NLOG ] = { 0, 0 } ; static int atcol1 [ NLOG ] = { 1, 1 } ; int err=0, i, flags=0 ; char *p ; va_list ap ; va_start ( ap, fmt ) ; if ( ! init ) { logfile[0] = stderr ; logfile[1] = stdout ; for ( i=0 ; i= argc || *(a = argv[nxtoptind]) != '-' ) return -1 ; nxtoptind++ ; if ( ! *(a+1) || ( ( p = strchr ( args, *(a+1) ) ) == 0 ) ) return msg ( "Eunknown option (%s)", a ), '?' ; if ( *(p+1) != ':' ) nxtoptarg = 0 ; else if ( *(a+2) ) nxtoptarg = a+2 ; else if ( nxtoptind >= argc ) return msg ( "Eno argument for (%s)", a ), '?' ; else nxtoptarg = argv [ nxtoptind++ ] ; return *(a+1) ; } efax-gtk-3.2.8/efax/README0000644000175000001440000000560611466007655011773 00000000000000 Introduction This is the README file for version 0.9 of efax, a small ANSI C/POSIX program that sends and receives faxes using any fax modem (Class 1, 2 or 2.0). efax is smaller and easier to install than HylaFAX or mgetty+sendfax. As one user put it ``EFAX is a nice simple program for single user systems.'' The ``fax'' command, a shell script, lets you send, receive, view and print faxes. In larger systems, faxes can be sent by printing to a ``fax'' printer and received faxes can be e-mailed as MIME attachments to an administrator for distribution. efax can also pass incoming data calls to a getty program. The efax package includes ``efix,'' a program to convert between various image file formats. To fax Postscript files you will need Ghostscript. To view faxes you can use any program that displays PGM files (e.g. xloadimage or xv). efix can convert received files to Postscript or HP Laserjet formats for printing. This version of the program was written & tested under Linux 2.0. Previous versions have been compiled and used under most versions of Unix and should work with minor changes on any Unix with an ANSI C compiler and libraries that include select(2) and termios(4). efax is distributed as a gzip'ed tar file, efax-0.9.tar.gz. It may be obtained by anonymous FTP from metalab.unc.edu in /pub/Linux/apps/serialcomm/fax. Changes from version 0.8a to version 0.9 - fixed bad (0x0 pixel) file output on new glibc systems - fixed bad file output on 64-bit systems - automatic selection of baud rate and class - hardware flow control made optional - modernized directory and file names - many bugs removed, others added Manifest The efax distribution should contain the following files: README - this file COPYING - the GNU General Public License Makefile - makefile to make all/install/clean efax.c - program to send and receive faxes efix.c - program to convert between file formats efaxmsg.{h,c} - functions to print errors, warnings, etc efaxlib.{h,c} - functions common to efax and efix efaxio.{h,c} - low-level modem i/o functions efaxos.{h,c} - OS-dependent functions fax.1 - man page for fax(1) efax.1 - man page for efax(1) efix.1 - man page for efix(1) fax - a (Bourne) shell script to create, send, receive, view and print faxes. Installation Edit the makefile and change the compile command and destination directories if required. Type "make" to compile the efax and efix binaries. Edit the configuration information at the beginning of the ``fax'' script according to the comments. Type "make install" to install the fax script, the binaries and the man pages. Read the fax(1) man page first for information on using efax. The efax(1) man page has details on resolving problems, setting up a network fax server and using efax to handle both fax and data calls. efax-gtk-3.2.8/efax/Makefile.orig0000644000175000001440000000240311466007655013502 00000000000000# Makefile for efax # Change the following to the name of your ANSI C compiler # (normally gcc). CC=gcc # Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror # is undefined CFLAGS= LDFLAGS= # Change the following to the destination directories for # binaries and man pages. Probably /usr/bin and /usr/man on # Linux, /usr/local/{bin,man} on other systems. BINDIR=/usr/bin MANDIR=/usr/man .c.o: $(CC) $(CFLAGS) -c $< all: efax efix efax: efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o $(CC) -o efax $(LDFLAGS) efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o strip efax efix: efix.o efaxlib.o efaxmsg.o $(CC) -o efix $(LDFLAGS) efix.o efaxlib.o efaxmsg.o strip efix install: cp fax efax efix $(BINDIR) chmod 755 $(BINDIR)/fax $(BINDIR)/efax $(BINDIR)/efix cp fax.1 efax.1 efix.1 $(MANDIR)/man1 chmod 644 $(MANDIR)/man1/fax.1 $(MANDIR)/man1/efax.1 \ $(MANDIR)/man1/efix.1 clean: rm -f efax efix efax.o efix.o efaxlib.o efaxio.o efaxos.o efaxmsg.o efax.o: efax.c efaxmsg.h efaxlib.h efaxio.h efaxos.h efaxio.o: efaxio.c efaxmsg.h efaxio.h efaxos.h efaxos.o: efaxos.c efaxmsg.h efaxlib.h efaxos.h efix.o: efix.c efaxmsg.h efaxlib.h efaxlib.o: efaxlib.c efaxmsg.h efaxlib.h efaxmsg.o: efaxmsg.c efaxmsg.h efax-gtk-3.2.8/efax/Makefile.am0000644000175000001440000000107311466007655013141 00000000000000## Process this file with automake to produce Makefile.in bin_PROGRAMS = efax-0.9a efix-0.9a efax_0_9a_SOURCES = efax.c efaxlib.c efaxio.c efaxos.c efaxmsg.c efix_0_9a_SOURCES = efix.c efaxlib.c efaxmsg.c noinst_HEADERS = efaxlib.h efaxio.h efaxos.h efaxmsg.h dist_man_MANS = efax.1 efix.1 INCLUDES = -DDATADIR=\"$(datadir)\" AM_CFLAGS = @GLIB_CFLAGS@ efax_0_9a_LDADD = @GLIB_LIBS@ efix_0_9a_LDADD = @GLIB_LIBS@ EXTRA_DIST = PATCHES Makefile.orig efax.c.orig efix.c.orig efaxlib.c.orig efaxmsg.c.orig efaxio.c.orig efaxos.c.orig fax efax.1.orig efax-gtk-3.2.8/efax/efaxmsg.h0000644000175000001440000000132311466007655012706 00000000000000#ifndef _EFAXMSG_H #define _EFAXMSG_H #include #ifndef uchar #define uchar unsigned char #endif /* Messages & Program Arguments */ enum cchar { /* control characters */ NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, LF, VT, FF, CR, SO, SI, DLE, XON, DC2, XOFF,DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US } ; extern char *verb[] ; /* types of messages to print */ extern char *argv0 ; /* program name */ char *cname ( unsigned char c ) ; time_t tstamp ( time_t last, FILE *f ) ; int msg ( char *fmt, ... ) ; extern int nxtoptind ; extern char *nxtoptarg ; extern int use_utf8 ; extern int line_buffered ; int nextopt( int argc, char **argv, char *args ) ; #endif efax-gtk-3.2.8/efax/COPYING0000644000175000001440000004312711466007655012146 00000000000000 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. efax-gtk-3.2.8/efax/efaxlib.h0000644000175000001440000001516611466007655012700 00000000000000#ifndef _EFAXLIB_H #define _EFAXLIB_H #include #define EFAX_PATH_MAX 1024 /* T.4 fax encoding/decoding */ #ifndef uchar #define uchar unsigned char #endif #define DEFPGLINES 66 /* default lines per page */ /* Buffer sizes. */ /* The maximum scan line width, MAXRUNS, is conservatively set at 8k pels. This is enough for the longest standard T.4 coding line width (2432 pels), the longest encodeable run (2623 pels) and with 32-pel-wide characters allows up to 256 characters per line. Converted to T.4 codes, each pair of runs takes up to 25 bits to code. MAXCODES must also be at least the maximum minimum line length (1200 cps*40 ms ~= 48 bytes). */ #define MAXRUNS 8192 #define MAXBITS (MAXRUNS/8+1) #define MAXCODES (MAXRUNS*25/8/2+1) /* Line/font size limits */ #define MAXLINELEN 256 /* maximum length of string */ #define MAXFONTW 32 /* maximum char width */ #define MAXFONTH 48 /* maximum char height */ #define MAXFONTBUF (MAXFONTW*MAXFONTH/8*256) /* PBM font buffer size */ /* Longest run encodeable by the T.4 encoding tables used. */ #define MAXRUNLEN (2560+63) /* Codes for EOL and number of EOLs required for RTC */ #define EOLCODE 1 #define EOLBITS 12 #define RTCEOL 5 /* Fonts */ #define STDFONTW 8 /* the built-in font width, height & size */ #define STDFONTH 16 #define STDFONTBUF 4096 typedef struct fontstruct { int h, w ; uchar buf [ MAXFONTBUF ] ; short offset [ 256 ] ; } faxfont ; extern uchar stdfont [ ] ; /* compressed bit map for built-in font */ int readfont ( char *fname, faxfont *font ) ; /* T.4 Encoding/Decoding */ typedef struct t4tabstruct { short code, bits, rlen ; /* code, bits, run length */ } t4tab ; extern t4tab wtab [ ( 64 + 27 + 13 ) + 1 ] ; /* white runs */ extern t4tab btab [ ( 64 + 27 + 13 ) + 1 ] ; /* black runs */ typedef struct dtabstruct { /* decoder table entry */ struct dtabstruct *next ; short bits, code ; } dtab ; /* Image Input */ #define bigendian ( * (uchar*) &short256 ) extern short short256 ; /* input, output and page file formats */ #define NIFORMATS 9 #define NOFORMATS 14 #define NPFORMATS 5 enum iformats { I_AUTO=0, I_PBM=1, I_FAX=2, I_TEXT=3, I_TIFF=4, I_DFAX=5, I_PCX=6, I_RAW=7, I_DCX=8 } ; #define IFORMATS { "AUTO", "PBM", "FAX", "TEXT", "TIFF", \ "DFAX", "PCX", "RAW", "DCX" } ; enum oformats { O_AUTO=0, O_PBM=1, O_FAX=2, O_PCL=3, O_PS=4, O_PGM=5, O_TEXT=6, O_TIFF_FAX=7, O_TIFF_RAW=8, O_DFAX=9, O_TIFF=10, O_PCX=11, O_PCX_RAW=12, O_DCX=13 } ; #define OFORMATS { "AUTO", "PBM", "FAX", "PCL", "PS", \ "PGM", "TEXT", "TIFF", "TIFF", "DFAX", \ "TIFF", "PCX", "PCX", "DCX" } enum pformats { P_RAW=0, P_FAX=1, P_PBM=2, P_TEXT=3, P_PCX=4 } ; #define PFORMATS { "RAW", "FAX", "PBM", "TEXT", "PCX" } extern char *iformatname [ NIFORMATS ] ; extern char *oformatname [ NOFORMATS ] ; extern char *pformatname [ NPFORMATS ] ; typedef struct decoderstruct { long x ; /* undecoded bits */ short shift ; /* number of unused bits - 9 */ dtab *tab ; /* current decoding table */ int eolcnt ; /* EOL count for detecting RTC */ } DECODER ; void newDECODER ( DECODER *d ) ; #define IFILEBUFSIZE 512 #define MAXPAGE 360 /* number of A4 pages in a 100m roll */ typedef struct PAGEstruct { /* page data */ char *fname ; /* file name */ long offset ; /* location of data within file */ int w, h ; /* pel and line counts */ float xres, yres ; /* x and y resolution, dpi */ uchar format ; /* image coding */ uchar revbits ; /* fill order is LS to MS bit */ uchar black_is_zero ; /* black is encoded as zero */ } PAGE ; typedef struct ifilestruct { /* input image file */ /* data for each pages */ PAGE *page, *lastpage ; /* pointers to current and last page */ PAGE pages [ MAXPAGE ] ; /* page data */ long next ; /* offset to next page (while scanning only) */ /* data for current input page */ FILE *f ; /* current file pointer */ int lines ; /* scan lines remaining in page */ uchar bigend ; /* TIFF: big-endian byte order */ DECODER d ; /* FAX: T.4 decoder state */ faxfont *font ; /* TEXT: font to use */ int pglines ; /* TEXT: text lines per page */ char text [ MAXLINELEN ] ; /* TEXT: current string */ int txtlines ; /* TEXT: scan lines left in text l. */ int charw, charh, lmargin ; /* TEXT: desired char w, h & margin */ } IFILE ; int newIFILE ( IFILE *f, char **fname ) ; void logifnames ( IFILE *f, char *s ) ; int nextipage ( IFILE *f, int dp ) ; int lastpage ( IFILE *f ) ; int readline ( IFILE *f, short *runs, int *pels ) ; /* Image Output */ typedef struct encoderstruct { long x ; /* unused bits */ short shift ; /* number of unused bits - 8 */ } ENCODER ; void newENCODER ( ENCODER *e ) ; typedef struct ofilestruct { /* input image file state */ FILE *f ; /* file pointer */ int format ; /* file format */ char *fname ; /* file name pattern */ float xres, yres ; /* x and y resolution, dpi */ int w, h ; /* width & height, pixels */ int lastpageno ; /* PS: last page number this file */ int pslines ; /* PS: scan lines written to file */ int bytes ; /* TIFF: data bytes written */ ENCODER e ; /* T.4 encoder state */ char cfname [ EFAX_PATH_MAX + 1 ] ; /* current file name */ } OFILE ; void newOFILE ( OFILE *f, int format, char *fname, float xres, float yres, int w, int h ) ; int nextopage ( OFILE *f, int page ) ; void writeline ( OFILE *f, short *runs, int nr, int no ) ; /* Scan Line Processing */ uchar *putcode ( ENCODER *e, short code , short bits , uchar *buf ) ; uchar *runtocode ( ENCODER *e, short *runs, int nr, uchar *buf ) ; /* int bittorun ( uchar *buf, int n, short *runs ) ; */ int texttorun ( uchar *txt, faxfont *font, short line, int w, int h, int lmargin, short *runs, int *pels ) ; int xpad ( short *runs, int nr, int pad ) ; int xscale ( short *runs, int nr, int xs ) ; int xshift ( short *runs, int nr, int s ) ; int runor ( short *a, int na, short *b, int nb, short *c, int *pels ) ; /* Bit reversal lookup tables (note that the `normalbits' array is the one actually used for the bit reversal. */ uchar reversebits [ 256 ], normalbits [ 256 ] ; void initbittab(void) ; /* Other Stuff */ int ckfmt ( char *p, int n ) ; /* utility function for combining two strings: the output is a null terminated string constructed on the heap comprising first str1 and then str2 (free with free()) - added by Chris Vine September 2005 as part of the internationalization of efax */ char *strdup2 ( const char *str1, const char *str2 ) ; #endif efax-gtk-3.2.8/configure.ac0000644000175000001440000000337311544566704012457 00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT([efax-gtk], [3.2.8]) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION) AM_CONFIG_HEADER(config.h) dnl check for working c and c++ compilers AC_CHECK_COMPILERS dnl Checks for programs. AC_PROG_INSTALL dnl Checks for libraries AC_CHECK_GTK_VERSION PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.10.0) PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.0.0) PKG_CHECK_GIO AC_CHECK_HEADERS([pthread.h],[],[AC_MSG_ERROR([pthread.h not found], 1)]) AC_CHECK_X11_XLIB_H AC_CHECK_CXX_GTK_UTILS AC_CHECK_HEADERS([tiffio.h],[],[AC_MSG_ERROR([tiffio.h in libtiff not found], 1)]) dnl this is probably best not checked for dnl AC_CHECK_GTHREAD_HAS_PTHREADS dnl Checks for typedefs, structures, and compiler characteristics. AC_LANG_CPLUSPLUS dnl switch to C++ AC_TYPE_SIZE_T AC_CHECK_TYPE([ssize_t], [:], AC_MSG_ERROR([POSIX ssize_t not available])) AC_CHECK_SOCKLEN_T AC_CHECK_IN_ADDR_T dnl wchar_t is used in internal version of c++-gtk-utils AC_CHECK_SIZEOF([wchar_t]) dnl set up gettext AM_GNU_GETTEXT([external]) dnl Checks for library functions. AC_CHECK_MKSTEMP AC_CHECK_HAVE_IOS_NOCREATE AC_CHECK_HAVE_STREAM_IMBUE AC_CHECK_HEADERS([ostream istream sstream],[],[AC_MSG_ERROR([ostream, istream or sstream header not found], 1)]) dnl now check out the install directory AC_INSTALL_DIRS dnl enable source in subdirectories to be compiled AC_PROG_RANLIB dnl define MAKE for subdirectories AC_PROG_MAKE_SET AC_CONFIG_FILES([ Makefile src/Makefile efax/Makefile po/Makefile.in \ efax-gtk-faxfilter/Makefile src/utils/Makefile \ efax-gtk.spec src/internal/Makefile \ src/internal/c++-gtk-utils/Makefile \ src/internal/c++-gtk-utils/cgu_config.h ]) AC_OUTPUT AC_CLOSING_MESSAGE efax-gtk-3.2.8/install-sh0000755000175000001440000003246411466007655012176 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # 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-end: "$" # End: efax-gtk-3.2.8/depcomp0000755000175000001440000004271311466007655011545 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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, 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 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 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 $1 != '--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 $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac 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. -*|$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 $1 != '--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, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; 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-end: "$" # End: efax-gtk-3.2.8/README0000644000175000001440000010727411531004737011043 00000000000000Copyright (C) 2001 to 2010 Chris Vine 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. A copy of the GNU General Public License version 2 is set out in the file COPYING accompanying this distribution. You can also obtain a written copy from the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Note that the copyright of the efax program, to which this is a front end, belongs to Ed Casas. OVERVIEW This program is a GTK+ front end for the efax program. It can be used to send and receive faxes with a fax modem, and to view, print and manage faxes received. It also has a socket interface to provide a "virtual printer" for sending faxes from word processors and similar programs, and can automatically e-mail a received fax to a designated user, and automatically print a received fax. Any files to be faxed should be in postscript format, which is the generic printer format for Unix/Linux systems. The program will use ghostscript to convert these into the Group 3 fax format which the fax modem will understand. Recent versions of ghostscript (which is used to carry out the conversion) will also accept files in PDF format. EFAX The efax-gtk distribution compiles and installs a patched version of efax-0.9a-001114, so you do not need to separately build and install efax. In particular, the version of efax supplied with efax-gtk provides internationalization support, and resolves certain difficulties with locales in the standard distribution. If you get reports of UTF-8 conversion errors from efax-gtk or efax when referring to file names then you may not have set the G_FILENAME_ENCODING or G_BROKEN_FILENAMES environmental variable correctly - see the "INTERNATIONALISATION" section below for further details. To avoid name conflicts the patched versions of efax and efix are installed as efax-0.9a and efix-0.9a. INSTALLATION: FROM SOURCE FILES Compiling from source --------------------- To compile from source, place the distribution file in a local source directory (eg ~/src). Untarring/unzipping it will create a sub-directory 'efax-gtk' where the source code can be found. You can now edit the file efax-gtkrc (which by default will be placed by "make install" in /usr/local/etc) to provide global settings which match your serial port, name, telephone number and other particulars. efax-gtkrc specifies run-time not compile-time options, but you can edit it now so that the version installed by "make install" is correct. Alternatively, you can start up the program and enter any settings by bringing up the `Settings' dialog from the `File/Settings' pull-down menu once the program has started. (See below). Then enter the command `./configure'. This will set up the Makefile so that it matches your system. This can be done as user (you do not need to be root). Then type "make", and then "make install". "make install" must be run as root, but "make" can be run as user. The program will by default be installed in /usr/local/bin. The name of the executable is "efax-gtk". You can change the install directory by running `./configure' with the --prefix=[dir] option. Thus - ./configure --prefix=/usr will install the executables in /usr/bin, as will - ./configure --bindir=/usr/bin. The configuration file efax-gtkrc (see above) is installed in $RCDIR, which by default is /usr/local/etc. If the --prefix=[dir] option is used, $RCDIR will be taken from that. So - ./configure --prefix=/usr will install efax-gtkrc in the /usr/etc directory. Its install directory RCDIR can also be changed by running ./configure with the --sysconfdir=[dir] option. Thus - ./configure --sysconfdir=/etc will install efax-gtkrc in /etc. The man file will by default be installed in $prefix/man. If the --prefix=[dir] option is used, the base directory will be taken from that. So - ./configure --prefix=/usr will install the man file in the /usr/man/man1 directory, as will - ./configure --mandir=/usr/man In addition, a fax filter file `efax-gtk-faxfilter' is by default installed in /var/spool/fax, but a different directory can be chosen by running `./configure' with the --with-spooldir=[dir] option. See below for an explanation of what this does. To compile and use the program, glib >=2.10.0, gtk+2 >= 2.12.0 or gtk+3 >= 2.99.0, dbus-glib >= 0.70 and libtiff must be installed, except that dbus-glib is not required if glib >= 2.26.0. The c++-gtk-utils library, version 1.2.7 or greater, is used, but if that is not installed then an internal version in the tarball will be compiled in. If the --with-cgu-version-2 configuration option is chosen, before searching for c++-gtk-utils >= 1.2.7, a search will also be made for c++-gtk-utils >= 2.0.0-rc1 and if it is found the program will be compiled using that library under C++0x. See under "GTK VERSIONS" below for further particulars about choosing between gtk+2 and gtk+3. The program is written as a single instance program: if the user tries to start another instance when one is already running, the one already running will be brought up. Making RPM binaries ------------------- A RPM spec file is included in the distribution. If rpm is installed, entering `rpmbuild -tb efax-gtk-[version].src.tgz' as root will create a standard RPM binary file efax-gtk-[version]-1.[i386].rpm. This will be found in the RPM binary directory that your RPM-build configuration specifies (normally /usr/src/redhat/RPMS/i386 for Redhat i86 systems, and /usr/src/packages/RPMS/i386 for SuSE i86 systems). To install the rpm binary once made, use the normal command `rpm -i [rpm filename]'. To make the binary RPM file you must have the packages referred to in "Compiling from source" above. Once the rpm file is made, to install it you must also have the ghostscript package installed. As the efax-gtk.spec file causes rpm to check for dependencies both when efax-gtk is being compiled and when being installed, this can give rise to problems of portability, because different distributions package things under different names. If the rpm binary won't compile or install on your system because of these dependencies, but you are sure that you have gtk+, libsigc++ and ghostscript installed, there are two choices -- to compile the package using `rpmbuild -tb --nodeps efax-gtk-[version].src.tgz' and install the binary file using `rpm -i --nodeps [rpm filename]', or to: - unzip efax-gtk-[version].src.tgz, - amend the `BuildRequires:' and/or `Requires:' lines in the efax-gtk.spec file to provide the correct dependency package names for your distribution - copy efax-gtk-[version].src.tgz to /usr/src/[packages]/SOURCES - enter `rpmbuild -bb efax-gtk.spec'. If you install via binary RPMs, then you will either have to use the File/Settings dialog to configure the program when you first use it, or before using it have to amend the $prefix/etc/efax-gtkrc by hand after installation (see further below). USE The first time you use the program, you will be asked if you accept the terms of the General Public Licence, version 2. Files to be sent should be saved as postscript files. Recent versions of ghostscript (which is used to convert the postscript file to tiffg3 fax format) will also accept PDF files. If the program is started with a filename as the last argument, then it will begin with that file already inserted in the program's "file to be sent" box. Otherwise once the program has started you can use the standard file open dialog, or enter it directly into the box via the keyboard. Ordinary ascii text files can be converted into postscript if required using a number of programs, of which probably the easiest to use are nenscript or GNU enscript (`man enscript'). For further suggestions about sending faxes from a wordprocessor using CUPS, see "Using with a word processor" below. For efax to operate correctly, the user must have write permission to the /var/lock directory, and to the serial port to which the fax modem is connected. In most distributions, the uucp group has write permission for these: if this applies to your distribution, the easiest approach is to make users members of the uucp group. The program may be started with a -r option and a -s option: efax-gtk -r This will start the program in receive standby mode efax-gtk -s This will start the program hidden in the system tray Sending faxes ------------- Before sending a fax, it must be specified in the "Fax to send" box. It must be in postscript format (a format produced by all Unix/Linux word and document processors), and will be converted by the program into the correct tiffg3 fax format. Recent versions of ghostscript (which is used to convert the postscript file to tiffg3 fax images) will also accept files in PDF format. There are two fax entry methods. First, the fax to be sent can be a file saved on the filesystem. It can be entered manually in the "Fax to send" box, or entered by means of the file selection dialog. If the file comprises a single postscript or PDF file, then you can find it by pressing the "Single File" button. It can be more easily found with this dialog if it is placed in the $HOME/faxout directory. Where more than one file is specified in the "Fax to send" box, they will be sent as a single fax appended in the order in which they are entered in the box. Such multiple files can be more easily selected using the file list brought up by pressing the "Multiple Files" button. Pressing the "Multiple Files" button enables files to be found and added to the file list, and they can be reordered by using the Up or Down arrow buttons, or by dragging and dropping with the mouse. (If entering multiple files manually rather than by means of the "Multiple Files" dialog, use a ',' or a ';' as the file name separator.) As an alternative, faxes can be received directly from the print system by means of a socket server provided by the program. Efax-gtk maintains a list of queued faxes received from the socket which can be accessed by choosing "Socket" as the fax entry method, and then bringing up the queued faxes list by pressing the "Socket list" button. This is a more convenient way of sending faxes from a word processor, and enables a fax to be sent for faxing to efax-gtk by printing from the word processor program. Where a fax is queued for sending in the socket list, a small red circle will appear in the main program window on the right hand side of the "Fax to send" box. More particulars are given under "Using with a word processor" below. The telephone number to which the fax is to be sent is entered into the "Tel number" box. This can be entered directly into the box, or by using the built-in addressbook. The addressbook can be invoked by pressing the "Tel number" button, or from the `File/Address book' pull-down menu item. See "Using the address book" further below. However, if a telephone connection has already been established with the remote fax receiver, then the fax can be sent without dialing by leaving the "Tel number" box blank (a dialog will come up asking if you would like to send the fax without dialing - this does the same thing as 'fax send -m ...' using the efax 'fax' script from the command line). When a fax is received from the print system via the socket server, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes, the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. Successfully sent faxes are copied to a directory in the $HOME/faxsent directory, which has a name derived from the year, month, day, hour and seconds when the sending of the fax was completed, and will appear in the faxes sent list. They are only included in that list if they have been sent without error. The efax message display box will report on the progress of a fax being sent. The fax list can be brought up from the `File/List sent faxes' pull down menu item. See 'Using the fax lists" further below. The program can send a fax when it is in receive standby mode. If sending a fax from receive standby mode, when the fax has been sent (or there is an error in sending the fax), the program will return to receive standby mode. Automatic redialing ------------------- The program settings have an option for automatic redialing of a fax to be sent if the modem was in use or the receiving station was busy when the first attempt to send it was made. A list of the faxes queued for redialing can be brought up from the 'File' pull-down menu or from the icon in the system tray. If the program settings have been set to provide for automatic redialing, the program will keep trying to send the fax at the intervals chosen in the settings until either (a) the sending of the fax is successful, (b) there has been a failure arising from something other than the modem being in use or the recipient station being busy (such as a modem error, or the remote number ringing out without answering), (c) the fax is removed by the user from the list of faxes queued for redialing, (d) if the fax to be sent is a print job received from the print system, the print job is removed by the user from the dialog showing the list of queued faxes from the print socket, (e) if the fax to be sent comprises file(s) on the file system, the file(s) are deleted or moved (or their permissions changed to make them unreadable), or (f) the 'Stop' button is pressed while an attempt is being made to send the fax concerned which is queued for redialing. A fax queued for redialing will not be sent while the Settings dialog is open. Instead, if the interval for resending such a fax has passed, a further sending attempt will take place once the Settings dialog has been closed. The list of queued faxes for redialing is not preserved when the program is terminated. However, if any unsent faxes are print jobs received from the print system, they can still be found in the dialog showing the list of queued faxes from the print socket (assuming they have not been explicitly removed from that list by the user). Receiving faxes --------------- Three ways of receiving faxes are provided for. First, the program can be set to answer a fax call which is ringing but has not been answered, by pressing the "Answer call" button. Secondly, the program can take over a call which has already been answered (say, by a telephone hand set) by pressing the "Take over call" button. Thirdly, the program can be placed in standby mode by pressing the "Standby" button. This will automatically answer any call after the number of rings specified in the efax-gtkrc file, and receive the fax. The program will keep on receiving faxes until the "Stop" button is pressed. A fax can also be sent when the program is in receive standby mode. Received faxes in tiffg3 format (one file for each page) are placed in a directory in the $HOME/faxin directory, which has a name derived from the year, month, day, hour and seconds when reception of the fax was completed (for version 3.0.4 onwards), and is the fax ID number. Received faxes can be printed, viewed, described and managed using the built in fax list facility. This can be brought up from the `File/List received faxes' pull down menu item. See "Using the fax lists" further below. When a fax is received, a pop-up dialog can also be set to appear (go to the Settings dialog to do this). In the settings dialog you can also specify a program to be executed whenever a fax is received. The fax ID number is passed as the first (and only) argument to the program, which enables the program to find the fax in $HOME/faxin. The distribution contains two executable scripts, mail_fax and print_fax, which can be used to e-mail a fax to a user or print a fax automatically when it is received. (These scripts are not installed by 'make install' - if you want to use them, make them executable with 'chmod +x' and copy them to a directory which is in the system path, such as /usr/local/bin, and then specify the script name in the settings dialog). Using the address book ---------------------- To pick a telephone number from the address book, highlight the relevant address by pressing the left mouse button over it, and then press the "OK" button. Addresses can be added to the address book by pressing the add button, and then completing the relevant dialog which will appear. To delete an address from the address book, highlight the relevant address and press the delete (trashcan) button. The addressbook can be sorted by using the up and down arrow buttons on a highlighted address, or by dragging and dropping using the mouse. Addresses are stored in file `$HOME/.efax-gtk_addressbook'. Using the fax lists ------------------- To bring up the fax lists, go to the the `File' menu and pick the `List received faxes' or `List sent faxes' menu item. Highlight the fax to printed or viewed by pressing the left mouse button. The programs to be used to print and view the fax are specifed in the efax-gtkrc configuration file, or if none are specified, the program will print using lpr (which will work for most Unix systems) and view with gv. To print faxes, a PRINT_SHRINK parameter can be specifed in efax-gtkrc to enable the fax page to fit within the printer margins. A parameter of 98 will work with most printers. This can be changed while the program is running by bringing up the `Settings' dialog and entering it into the `Print/Print Shrink' box. A fax can be deleted from a fax list by pressing the delete (trashcan) button. This will place the deleted fax in the `Trash' folder. If the delete (trashcan) button is pressed in relation to a fax in the `Trash' folder, it will be deleted from the file system. A description can be added to a received fax when appearing in a fax list (or subsequently amended) by pressing the relevant button -- this will enable faxes to be more easily identified. The received faxes list will show, at the far right of the tool bar, the number of faxes received since the program was last started. If efax-gtk is in receive standby mode, the "tooltips" for the program's icon in the system tray will also indicate this number. The count can be reset to 0 without restarting the program by pressing the reset button in the received faxes list. From version 3.0.4 onwards, the fax lists have a column displaying the time at which faxes are received or sent. However, in the case of faxes received with versions earlier than version 3.0.4 but displayed with version 3.0.4 or later, the displayed received fax time will be the time efax-gtk was put into receive mode (which could be a considerably earlier than the time a fax was actually received if efax-gtk was in receive-standby mode), rather than the time the fax was actually received. With faxes received with version 3.0.4 onwards, the displayed received fax time will be correctly shown as the time that efax-gtk completed reception of the fax. (You can tell whether a received fax was received with version 3.0.4 or later, or an earlier one, by going to the faxin sub-directory and examining the fax ID giving the directory name within which individual faxes are stored. If the fax ID number is a 12 digit number, the fax was received with a version earlier than 3.0.4. If the fax ID number is a 14 digit number beginning with 2, then the fax was received with version 3.0.4 or later. This is because the fax ID is given as a number comprising year-month-day-hour-minutes-seconds, and with versions earlier than 3.0.4 the year is given by a two digit number (eg 05), and with version 3.0.4 or later it is given by its full four digit number (eg 2005). The displayed sent fax time is correct for faxes sent with all versions of efax-gtk, including versions earlier than version 3.0.4. The time displayed will be the time that the sending of the fax was completed. From version 3.0.7 of efax-gtk, fax descriptions in the fax lists are stored in the UTF-8 codeset rather than the locale codeset. This means that any fax descriptions previously stored in a codeset other than ASCII or UTF-8 by efax-gtk will not be shown in version 3.0.7. Sorry about that, but the former method of storing them in the locale codeset was bound to lead to trouble, because in due course Unix-like systems will adopt UTF-8 as their standard codeset and on changing codesets, previously entered file description were bound to be broken anyway. This gets it over with. To show these fax descriptions again, the contents of all the files with the name Description in the $HOME/[WORK_SUBDIR]/faxin/[faxnumber] and $HOME/[WORK_SUBDIR]/faxsent/[faxnumber] directories will need to be changed from the locale codeset to UTF-8. gedit can do this manually, although it will be a bit tedious. Settings -------- The program settings can be changed by manually editing the efax-gtk configuration file comprising $HOME/.efax-gtkrc, $sysconfdir/efax-gtkrc or /etc/efax-gtkrc. The file is searched for in that order, so $HOME/.efax-gtkrc takes precedence over the other two. The configuration file can also be set by using the Settings dialog launched from the `File/Settings' pull down menu item. The settings entered using this dialog are always stored as $HOME/.efax-gtkrc. Accordingly, if the Settings dialog has been used, and you want to revert to the global settings, this can be done either by deleting the $HOME/.efax-gtkrc file, or by pressing the `Reset' button in the Settings dialog, which will reload the Settings dialog from the global configuration file ($sysconfdir/efax-gtkrc or /etc/efax-gtkrc). Help can be obtained when filling out the Settings dialog by holding the mouse over the relevant help (?) button, which will bring up a "Tips" display, or by pressing the button, which will bring up an information display. USING WITH A WORD PROCESSOR Printing to file from the program itself ---------------------------------------- Probably the simplest way of using the program with a word processor is to print to file from the print dialog of the word processor program concerned, and choosing a file name in the $HOME/faxout directory which can then be selected with the file selector dialog in efax-gtk. The file to be printed should be in postscript format or PDF format (recent versions of ghostscript will accept PDF files as well as postscript files). Faxing via CUPS --------------- Versions 2.2.* and 3.* provide a socket server, which CUPS can connect to. When the socket server is running, fax files received from CUPS will automatically be displayed in a "Queued faxes from socket" list maintained by efax-gtk. From this list, a fax can be selected for sending by efax-gtk, so there is no need to print to file from the word processor and then select the file with the file selection dialog in efax-gtk. When a fax is received in this way from the print system via the socket, the program settings can also be configured to bring up a dialog automatically. If the program is inactive or is standing-by to receive faxes, the fax can be sent directly from this dialog without the need to invoke the list of queued faxes received from the socket. If you are using CUPS and you want to connect it directly to efax-gtk as mentioned above, you can do so by bringing up the fax administration page for CUPS in a web browser, installing a new printer with a name of "fax" (or whatever other name you want), choose the IPP protocol, pick a URI of "socket://[hostname]:[port]", and choose the "Raw" CUPS printer driver. The port number can be any port number less than 65536 and more than 1023 which is not used by any other service on your machine/network (this can be checked out by using nmap, but it is best to avoid any listed in /etc/services). For example, as you will usually be printing from a local computer, if you choose a port number of 9900 (which would be quite reasonable) the URI would be: socket://localhost:9900 As an alternative, rather easier than the web interface is adding a new CUPS virtual printer for efax-gtk by using lpadmin. To do this, log in as whatever user has appropriate permissions (usually root) and do it from the command line with: /usr/sbin/lpadmin -p FaxPrinter -E -v socket://localhost:9900 That will create a printer name for efax-gtk called FaxPrinter for a case where efax-gtk is listening on port 9900. You should then start efax-gtk, go to the Socket tab in the settings dialog, check the "Run socket server" box, and enter 9900 in the "Port to which faxes to be sent" box. To send a fax from the "Queued faxes from socket" dialog, highlight the one to be sent, press the "Enter selected fax to send" button in the dialog (the one with an icon representing a fax machine) which will enter the fax in the "File to fax" box in efax-gtk, and then choose a telephone number to send it to and press the "Send fax" button in the ordinary way. If efax-gtk isn't running when you attempt to send a file via CUPS to efax-gtk don't worry. CUPS will queue the fax until it detects that the efax-gtk socket server is running, and then send it to efax-gtk. Faxing via lpd/lprng -------------------- The socket server can also be used in the same way with lpd/lprng. The files efax-gtk-faxfilter and efax-gtk-socket-client are installed in /var/spool/fax, when you run 'make install' (the installation directory can be changed at the ./configure stage using the ./configure --spooldir=[dir] parameter). You should add at the end of /etc/printcap the following - fax:\ :sd=/var/spool/fax:\ :mx#0:\ :sh:\ :lp=/dev/null:\ :if=/var/spool/fax/efax-gtk-faxfilter: This will cause a printer by the name of "fax" to be available, which (if printed to) will send the file to the efax-gtk socket server. If you set efax-gtk to listen on a port other than port 9900, you will need to amend the file /var/spool/fax/efax-gtk-faxfilter by hand to specify the correct port number on which efax-gtk is listening. Don't forget to restart the lpd printer daemon after amending /etc/printcap. (An equivalent addition to /etc/printcap can also be made by using the printer configuration tool with your distribution, choosing a printer name of "fax" (or whatever other name you want), choosing a printer device of "/dev/null", a spool directory of "/var/spool/fax" and an input filter of "/var/spool/fax/efax-gtk-faxfilter".) SYSTEM TRAY Efax-gtk has been written so that it will sit in the system tray in GNOME and KDE when the program is running. From the system tray, the program can be hidden and raised again by left-clicking with the mouse on the icon, and right-clicking on it will bring up a menu from which certain program operations can be performed. A 'tips' display will also indicate the program state if the mouse is left hovering over the efax-gtk icon. Clicking on the top right (delete) button of the window frame will not cause the program to terminate if the program is embedded in the system tray. Instead it will hide it in the tray. If you want to close the program when it is embedded in the tray, either select the "Quit" menu item in the system tray efax-gtk menu, or select the "Quit" menu item in the "File" pull-down menu in the program toolbar. Recent versions of GNOME call the system tray a "Notification Area". If your desktop panel does not have a Notification Area installed, it can be placed on the panel by right clicking on the panel, and going to Add to Panel -> Utility -> Notification Area. LOGGING Errors and warnings from efax are displayed in red in the application text window, and information messages and reports on the progress of negotiations and on fax status are displayed in black in the window. In addition, these messages are sent to stderr and stdout respectively. Accordingly, fax status can be logged by redirecting stderr and stdout to a log file. As an alternative, a log file can also be maintained by setting the LOG_FILE parameter in the efax-gtkrc configuration file, or by entering a log file name via the Settings dialog. If no log file is specified, no log file will be maintained. If a log file is specified, then it can be viewed and printed from the "Log" pull-down menu. If a log file is specified, it can be specified with or without an absolute path name. If it is specified without an absolute path name, then it will be maintained either in the $HOME directory or if a working sub-directory is specified with the WORK_SUBDIR parameter (see below), in the working sub-directory. SCANNERS If you have a scanner and want to fax it's output, you may find that it produces a separate postscript file for each page. The easiest way of dealing with this is to concatenate the postscript page files produced by the scanner to a single fax file such as /tmp/faxfile.ps, using 'cat' and appropriate command line wildcards. You may want to automate this with a script. Alternatively, as mentioned above, more than one file can be specified in the "File to fax" box when the program is running. INTERNATIONALISATION Version 2.0 and above of the program has been written to accommodate i18n support. If anyone wants to provide me with a *.po file with translations into their language/locale, I will include it in the distribution. An efax-gtk.pot file and other relevant build tools are included in the po directory in the source directory for the purpose. Users with a file system using other than the ASCII or UTF-8 codesets will need to set either the G_FILENAME_ENCODING or G_BROKEN_FILENAMES environmental variable in order for glib to carry out the correct conversions of file names. (If you receive frequent error messages stating that there was a "UTF-8 conversion error in FileReadSelectDialog::set_result()" or some other function, then you probably haven't set either environmental variable but need to do so.) The environmental variables are best set in /etc/profile or ~/.profile or in a file included in /etc/profile.d (depending on the distribution). The G_FILENAME_ENCODING environmental variable is supported in recent versions of glib-2.0, and if used should be set to the codeset used by the file system for filenames. For example, with a bash shell, if the file system uses the ISO-8859-15 codeset for filenames, a line in the relevant file as follows will do the trick: export G_FILENAME_ENCODING=ISO-8859-15 Earlier versions of glib-2.0 only support the G_BROKEN_FILENAMES environmental variable (this is also usable by current versions). If this environmental variable is set, glib will assume filenames use the same codeset as the current locale. G_FILENAME_ENCODING takes precedence over G_BROKEN_FILENAMES, but you only need to set one of them. To get glib to use your locale codeset for filenames (and they are almost always the same), the following will do the trick in the bash shell: export G_BROKEN_FILENAMES=1 The name of this environmental variable is a little misleading. The authors of glib chose to regard any filename codeset other than UTF-8 as "broken". In due course UTF-8 will probably become universal on Unix-like systems. At present, it is not. WORKING DIRECTORY A working sub-directory for the storage of .efax-gtk_addressbook, .efax-gtk_mainwin_save and .efax-gtk_queued_server_files and the faxin, faxout, faxsent and efax-gtk-server directories can be specified in the efax-gtkrc configuration file with the WORK_SUBDIR: parameter. This working subdirectory will appear as a subdirectory of $HOME (so if WORK_SUBDIR: is specified as efax-gtk, $HOME/efax-gtk will be the working directory). If none is specified, which is the default, then these files/directories will be stored directly in $HOME (which was what happened before the option was available, so past efax-gtk installations will not be broken if this option is left unset). The WORK_SUBDIR: parameter enables these files and folders to be kept together in a separate directory if wanted. If a WORK_SUBDIR: parameter is specified, only .efax-gtkrc will appear directly in $HOME. Note that if you specify a value for WORK_SUBDIR: in the efax-gtkrc configuration file, you will need to shift old versions of the files and directories mentioned above into the new working directory or efax-gtk will not be able to find them, so use this option with caution. In addition, if you wish to use the 'print_fax' or 'mail_fax' scripts, you will need to set the WORK_SUBDIR option in the relevant script. MODEM CLASS MODES Efax-gtk provides Group 3 fax support using either Class 1, Class 2 or Class 2.0 modem protocols. When operating in Class 2 and 2.0 modes, it is the modem which does most of the work. In Class 1 mode, the computer (running efax) does more of the fax processing. Many fax modem firmware implementations for Class 2 are buggy, particularly when receiving faxes. If you select the "Auto" modem class option in the efax-gtk program settings, Classes 2 and 2.0 modes will be selected in preference to Class 1 if the program detects that the modem supports them. If you find you get fax reception errors in an auto-detected class 2 or 2.0 mode, but your modem also supports the Class 1 protocol, try explicitly selecting the "Class 1" modem class option in the program settings. Because most of the fax processing in Class 1 mode is done by efax (which is known to do it correctly), there is much less chance of running into buggy firmware problems. DBUS The program operates as a single-instance program, and in order to do so a dbus session message bus must be running. Most recent distributions using GNOME, KDE or Xfce do this anyway, but if your X environment does not start a session bus, you may need to start one yourself in the script which starts your X session. To do this you can put the following in the script (this will often be a xinitrc file in /etc/X11/xinit, but might be ~/.xsession or ~/.Xclients): if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then eval `dbus-launch --sh-syntax --exit-with-session` echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" fi However, before amending your scripts, test whether this is necessary, by trying to launch the program, or by bringing up a terminal (such as xterm, gnome-terminal or konsole) and seeing if 'echo $DBUS_SESSION_BUS_ADDRESS' reports anything. (Usually it won't be necessary to amend your scripts.) If an attempt to start the program is made without the session message bus running then an error dialog will be shown and the program will then terminate. GTK VERSIONS As of version 3.2.3, the program can compile against GTK+3 as well as GTK+2. Whichever one of those is installed will be picked automatically by the configure script. If both GTK+2 and GTK+3 are installed, from version 3.2.7 GTK+3 will be preferred, but if './configure' is passed the '--with-gtk-version=gtk2' option, then the program will be configured and compiled against GTK+2 instead. To compile against GTK+3, GTK+ >= 2.99.0 is required. The configuration option '--with-gtk-version' can also be given the values 'gtk3' and 'auto'. If 'gtk3' is given, then GTK+3 must be installed if configuration is to succeed; if 'auto' is given, then the effect is the same as if the '--with-gtk-version' option had not been used. CONTACTING THE AUTHOR I can be contacted at: cvine -at- users -dot- sourceforge -dot- net. Updates can be obtained from http://efax-gtk.sourceforge.net/ Chris Vine. efax-gtk-3.2.8/config.sub0000644000175000001440000010115311466007655012142 00000000000000#! /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 # Free Software Foundation, Inc. timestamp='2008-01-16' # 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 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. # 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 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-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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) os= basic_machine=$1 ;; -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 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | 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 | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # 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 ;; # 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-* | c54x-* | c55x-* | c6x-* \ | 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-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | 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-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | 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-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # 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 ;; 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 ;; c90) basic_machine=c90-cray os=-unicos ;; 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) 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 ;; 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 ;; 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 ;; 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) basic_machine=powerpc-unknown ;; ppc-*) 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 ;; 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 ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; 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 ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-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[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. -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* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -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* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -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*) # 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 ;; -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 ;; # 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 ;; -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: efax-gtk-3.2.8/Makefile.am0000644000175000001440000000103711466007655012216 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = src efax po efax-gtk-faxfilter desktopdir = $(datadir)/applications desktop_DATA = efax-gtk.desktop icondir = $(datadir)/pixmaps icon_DATA = efax-gtk.png sysconf_DATA = efax-gtkrc dist_man_MANS = efax-gtk.1 release: dist mv @PACKAGE@-@VERSION@.tar.gz @PACKAGE@-@VERSION@.src.tgz snapshot: dist mv @PACKAGE@-@VERSION@.tar.gz @PACKAGE@3-`date +%y%m%d`.src.tgz EXTRA_DIST = efax-gtkrc efax-gtk.spec config.rpath BUGS efax-gtk.desktop efax-gtk.png mail_fax print_fax efax-gtk-3.2.8/mail_fax0000755000175000001440000000600111466007655011664 00000000000000#!/bin/sh # This script is for use with efax-gtk. It can be used automatically # to e-mail a fax to a user when a fax is received. To use it you # must have the Heirloom mailx (previously called 'nail') enhanced # mail program installed. If Heirloom mailx does not come with your # distribution, you can get it from # http://heirloom.sourceforge.net/mailx.html . If the PDF output # format is chosen then this also uses the ps2pdf script which comes # with Ghostscript, which should be within the user's path. # Edit the user options below as necessary. ########### start of user options ########### # The fax can be e-mailed as a PDF (Portable Document Format) or PS # (PostScript) file. Choose the format here. FORMAT=pdf #FORMAT=ps # Specify the page size to be used here. PAGE=a4 # ISO A4 #PAGE=letter # US letter #PAGE=legal # US legal # This is the address to which the fax is to be sent. If none is # specified, it will be send to $USER@localhost #MAIL_ADDR= # SHRINK reduces the size of the fax image which is e-mailed to enable # the recipient to print it out with an allowance for printer margins. # It is a percentage, so if you comment it out, or specify 100, then # the image will be sent full size. It cannot be set to a size larger # than 100, or less than 50. SHRINK=98 # if you have specified a sub-directory WORK_SUBDIR: in the efax-gtkrc # configuration file then you will need to amend the following line # accordingly WORK_SUBDIR="" ############ end of user options ############ if [ -z "$SHRINK" ] ; then SHRINK=100 fi if [ -z "$MAIL_ADDR" ] ; then MAIL_ADDR="$USER@localhost" fi PAGE_a4="210x297mm" PAGE_letter="216x279mm" PAGE_legal="216x356mm" case $PAGE in a4) PAGE_DIM="$PAGE_a4" H_OFFSET=$((210*(100-$SHRINK)/200)) V_OFFSET=$((297*(100-$SHRINK)/200)) ;; letter) PAGE_DIM="$PAGE_letter" H_OFFSET=$((216*(100-$SHRINK)/200)) V_OFFSET=$((279*(100-$SHRINK)/200)) ;; legal) PAGE_DIM="$PAGE_legal" H_OFFSET=$((216*(100-$SHRINK)/200)) V_OFFSET=$((356*(100-$SHRINK)/200)) ;; *) echo "Incorrect page size specified" exit 2 ;; esac if [ $SHRINK -gt 100 ]; then echo "SHRINK is too large" exit 1 elif [ $SHRINK -lt 50 ]; then echo "SHRINK is too small" exit 1 elif [ $SHRINK -eq 100 ]; then SIZE="1" else SIZE="0."$SHRINK fi DISPLACE=$H_OFFSET","$V_OFFSET"mm" FILES=$HOME/$WORK_SUBDIR/faxin/$1/$1.* # generate the file to e-mail in the chosen format case $FORMAT in pdf) TEMP_FILE=$HOME/efax-gtk-$1.pdf efix-0.9a -ve -r300 -ops -p$PAGE_DIM -s$SIZE -d$DISPLACE $FILES | ps2pdf -sPAPERSIZE=$PAGE - $TEMP_FILE ;; ps) TEMP_FILE=$HOME/efax-gtk-$1.ps efix-0.9a -ve -r300 -ops -p$PAGE_DIM -s$SIZE -d$DISPLACE $FILES > $TEMP_FILE ;; *) echo "Incorrect output format specified" exit 3 ;; esac # now e-mail it MAIL_CMD="mailx -s efax-gtk -a$TEMP_FILE $MAIL_ADDR" echo "Fax $1 received by efax-gtk attached" | $MAIL_CMD sleep 1 rm $TEMP_FILE efax-gtk-3.2.8/COPYING0000644000175000001440000004535011466007655011223 00000000000000Copyright (C) 2001 to 2005 Chris Vine 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. A copy of the GNU General Public License version 2 is set out below. You can also obtain a written copy from the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also note that the copyright to the licence below is held by the Free Software Foundation, but the copyright to the instance of code that it refers to (this program) is held by me. The copyright to the efax program, to which this is a front end, is held by Ed Casas. Chris Vine cvine@users.sourceforge.net --------------------------------------------------------------------- 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) 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) year 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.