mirror of
https://git.familie-radermacher.ch/linux/ptouch-print.git
synced 2026-05-04 21:56:17 +00:00
Compare commits
67 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5cf946bf43 | |||
| 57084a30e6 | |||
| 9cd8a5bc22 | |||
| 25e7a8c876 | |||
| cb76f2ae75 | |||
| 245aa4aad0 | |||
| 0db6ba4477 | |||
| 5e5e833bcd | |||
| c08a456bfd | |||
| 2d4ffd6112 | |||
| 118afc7694 | |||
| 76c419f952 | |||
| bdd724fef5 | |||
| 3e026ef26b | |||
| 5cbc680f63 | |||
| 7ef61111bc | |||
| fd526f9dbe | |||
| d2a3bac46e | |||
| c2b607be7c | |||
| 7509ef765c | |||
| b3ab878bfb | |||
| a27a320672 | |||
| d8a4ed71e2 | |||
| e730c3b480 | |||
| d293e9427d | |||
| 92c1e43f0c | |||
| 3bcde60eea | |||
| f1c34dd0d4 | |||
| f59e19349b | |||
| ab80c721f6 | |||
| d7d97eede8 | |||
| d1eeacbdd8 | |||
| efa48162a8 | |||
| 1f450d9124 | |||
| 1a39fe1284 | |||
| 2c9828af87 | |||
| 2f18522602 | |||
| 140bf0a6cc | |||
| a6c67df2c9 | |||
| ec923ed579 | |||
| aa5392bc13 | |||
| 740b20e150 | |||
| bc7d32a6e6 | |||
| 9cae7f465b | |||
| 9a0ef8c7d6 | |||
| b904e22cf1 | |||
| da9ed2600a | |||
| a51fcf98f8 | |||
| 8aaeecd84b | |||
| ad4e1541de | |||
| dc5b974e74 | |||
| 312adc3209 | |||
| 935dd9a31b | |||
| 06a8001bf4 | |||
| 5fbd590f01 | |||
| f22e844eed | |||
| 8b631a7996 | |||
| 01d661493f | |||
| 6b82cd6166 | |||
| 53987c4150 | |||
| f56d7ea740 | |||
| 71396e8ff1 | |||
| ffc1b1f7b1 | |||
| 674e0da5fb | |||
| e968176637 | |||
| f74d068776 | |||
| a2d2548867 |
+48
-33
@@ -1,31 +1,60 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
|
||||||
project(ptouch-print C)
|
project(ptouch-print C)
|
||||||
|
|
||||||
# Configure CMake
|
|
||||||
set(CMAKE_C_STANDARD 11)
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
set(CMAKE_INSTALL_PREFIX /usr)
|
||||||
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
|
||||||
# Configure required dependencies
|
# Configure required dependencies
|
||||||
find_package(Gettext REQUIRED)
|
find_package(Gettext REQUIRED)
|
||||||
find_package(GD REQUIRED)
|
find_package(GD REQUIRED)
|
||||||
|
find_package(Git REQUIRED)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
find_package(Intl REQUIRED)
|
find_package(Intl REQUIRED)
|
||||||
|
find_package(argp REQUIRED)
|
||||||
|
|
||||||
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
||||||
|
|
||||||
# Configure project executable
|
# Configure project executable
|
||||||
add_executable(ptouch-print)
|
add_executable(${PROJECT_NAME})
|
||||||
|
|
||||||
target_sources(ptouch-print PUBLIC
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||||
version.h
|
${CMAKE_BINARY_DIR} # HB9HEI - location of generated version.h
|
||||||
|
${CMAKE_SOURCE_DIR}/include
|
||||||
|
${GD_INCLUDE_DIR}
|
||||||
|
${LIBUSB_INCLUDE_DIRS}
|
||||||
|
${Intl_INCLUDE_DIRS}
|
||||||
|
${ARGP_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
|
${GD_LIBRARIES}
|
||||||
|
${LIBUSB_LIBRARIES}
|
||||||
|
${LIBUSB_LINK_LIBRARIES}
|
||||||
|
${Intl_LIBRARIES}
|
||||||
|
${ARGP_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_sources(${PROJECT_NAME} PRIVATE
|
||||||
include/ptouch.h
|
include/ptouch.h
|
||||||
include/gettext.h
|
|
||||||
src/libptouch.c
|
src/libptouch.c
|
||||||
src/ptouch-print.c
|
src/ptouch-print.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# Configure compiler
|
add_dependencies(${PROJECT_NAME}
|
||||||
target_compile_options(ptouch-print PUBLIC
|
git-version
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PUBLIC
|
||||||
|
LOCALEDIR="${CMAKE_INSTALL_LOCALEDIR}"
|
||||||
|
USING_CMAKE=1
|
||||||
|
PACKAGE="ptouch-print"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_options(${PROJECT_NAME} PUBLIC
|
||||||
-g
|
-g
|
||||||
-Wall
|
-Wall
|
||||||
-Wextra
|
-Wextra
|
||||||
@@ -34,32 +63,18 @@ target_compile_options(ptouch-print PUBLIC
|
|||||||
-fPIC
|
-fPIC
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(ptouch-print PUBLIC
|
# HB9HEI - custom target that produces version.h (req. cmake 3.0)
|
||||||
LOCALEDIR="${CMAKE_INSTALL_LOCALEDIR}"
|
add_custom_target(git-version ALL
|
||||||
USING_CMAKE=1
|
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/gitversion.cmake
|
||||||
PACKAGE="ptouch-print"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(ptouch-print PUBLIC
|
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/gettext.cmake)
|
||||||
include
|
|
||||||
${GD_INCLUDE_DIR}
|
|
||||||
${LIBUSB_INCLUDE_DIRS}
|
|
||||||
${CMAKE_BINARY_DIR}
|
|
||||||
${Libintl_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Configure linker
|
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
target_link_libraries(ptouch-print
|
|
||||||
${GD_LIBRARIES}
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${Libintl_LIBRARY}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add a custom command that produces version.h, plus a dummy output that's
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ptouch-print.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||||
# not produced, in order to force gitversion.cmake to always be re-run
|
|
||||||
# before the build
|
if(EXISTS /etc/udev/rules.d)
|
||||||
ADD_CUSTOM_COMMAND(
|
install(FILES udev/20-usb-ptouch-permissions.rules DESTINATION /etc/udev/rules.d)
|
||||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/version.h
|
install(CODE "execute_process(COMMAND udevadm control --reload-rules)")
|
||||||
${CMAKE_BINARY_DIR}/_version.h
|
endif()
|
||||||
COMMAND ${CMAKE_COMMAND} -P
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/gitversion.cmake)
|
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ Maybe others work too (please report USB VID and PID so I can include support
|
|||||||
for further models, too).
|
for further models, too).
|
||||||
|
|
||||||
Further info can be found at:
|
Further info can be found at:
|
||||||
https://familie-radermacher.ch/dominic/projekte/ptouch-print/
|
https://dominic.familie-radermacher.ch/projekte/ptouch-print/
|
||||||
|
|
||||||
Compile instructions:
|
Compile instructions:
|
||||||
|
|
||||||
./build.sh
|
./compile.sh
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
# This file is part of CMake-argp.
|
||||||
|
#
|
||||||
|
# CMake-argp 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 3 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 Lesser General Public License along
|
||||||
|
# with this program. If not, see
|
||||||
|
#
|
||||||
|
# http://www.gnu.org/licenses/
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Copyright (c)
|
||||||
|
# 2016-2017 Alexander Haase <ahaase@alexhaase.de>
|
||||||
|
#
|
||||||
|
|
||||||
|
include(CheckFunctionExists)
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
include(FindPackageMessage)
|
||||||
|
|
||||||
|
|
||||||
|
# Do the following checks for header, library and argp functions quietly. Only
|
||||||
|
# print the result at the end of this file.
|
||||||
|
set(CMAKE_REQUIRED_QUIET TRUE)
|
||||||
|
|
||||||
|
|
||||||
|
# First check if argp is shipped together with libc without linking to any other
|
||||||
|
# library or including any paths. In that case, no files for argp need to be
|
||||||
|
# searched and argp may be used out-of-the-box.
|
||||||
|
check_function_exists("argp_parse" ARGP_IN_LIBC)
|
||||||
|
if (ARGP_IN_LIBC)
|
||||||
|
# Set the argp library- and include-paths to empty values, otherwise CMake
|
||||||
|
# might print warnings about unknown variables and fills them with
|
||||||
|
# 'xy-NOTFOUND'.
|
||||||
|
set(ARGP_FOUND TRUE)
|
||||||
|
set(ARGP_LIBRARIES "")
|
||||||
|
set(ARGP_INCLUDE_PATH "")
|
||||||
|
|
||||||
|
# Print a message, that argp has been successfully found and return from
|
||||||
|
# this module, as argp doesn't need to be searched as a separate library.
|
||||||
|
find_package_message(argp "Found argp: built-in" "built-in")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# Argp is not part of the libc, so it needs to be searched as a separate library
|
||||||
|
# with its own include directory.
|
||||||
|
#
|
||||||
|
# First search the argp header file. If it is not found, any further steps will
|
||||||
|
# fail.
|
||||||
|
find_path(ARGP_INCLUDE_PATH "argp.h")
|
||||||
|
if (ARGP_INCLUDE_PATH)
|
||||||
|
# Try to find the argp library and check if it has the required argp_parse
|
||||||
|
# function.
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES "${ARGP_INCLUDE_PATH}")
|
||||||
|
find_library(ARGP_LIBRARIES "argp")
|
||||||
|
|
||||||
|
# Check if argp_parse is available. Some implementations don't have this
|
||||||
|
# symbol defined, thus they're not compatible.
|
||||||
|
if (ARGP_LIBRARIES)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES "${ARGP_LIBRARIES}")
|
||||||
|
check_function_exists("argp_parse" ARGP_EXTERNAL)
|
||||||
|
if (NOT ARGP_EXTERNAL)
|
||||||
|
message(FATAL_ERROR "Your system ships an argp library in "
|
||||||
|
"${ARGP_LIBRARIES}, but it does not have a symbol "
|
||||||
|
"named argp_parse.")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
# Restore the quiet settings. By default the last check should be printed if not
|
||||||
|
# disabled in the find_package call.
|
||||||
|
set(CMAKE_REQUIRED_QUIET ${argp_FIND_QUIETLY})
|
||||||
|
|
||||||
|
|
||||||
|
# Check for all required variables.
|
||||||
|
find_package_handle_standard_args(argp
|
||||||
|
DEFAULT_MSG
|
||||||
|
ARGP_LIBRARIES ARGP_INCLUDE_PATH)
|
||||||
|
mark_as_advanced(ARGP_LIBRARIES ARGP_INCLUDE_PATH)
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
# Utilize gettext multilingual internationalization services
|
||||||
|
if(Gettext_FOUND)
|
||||||
|
# generate pot files using xgettext
|
||||||
|
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
|
||||||
|
if(GETTEXT_XGETTEXT_EXECUTABLE)
|
||||||
|
add_custom_target(
|
||||||
|
pot-update
|
||||||
|
ALL
|
||||||
|
DEPENDS ${CMAKE_SOURCE_DIR}/po/ptouch.pot
|
||||||
|
)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE C_FILES RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/*.c)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET pot-update
|
||||||
|
PRE_BUILD
|
||||||
|
COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE}
|
||||||
|
--keyword=_
|
||||||
|
--keyword=N_
|
||||||
|
--force-po
|
||||||
|
--package-name=${PROJECT_NAME}
|
||||||
|
--copyright-holder="Dominic Radermacher <dominic@familie-radermacher.ch>"
|
||||||
|
--msgid-bugs-address="dominic@familie-radermacher.ch"
|
||||||
|
--output ${CMAKE_SOURCE_DIR}/po/ptouch.pot
|
||||||
|
${C_FILES}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
# read available languages from LINGUAS file while ignoring comments
|
||||||
|
file(STRINGS po/LINGUAS LINGUAS REGEX "^[^#]")
|
||||||
|
|
||||||
|
# merge po files
|
||||||
|
find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
|
||||||
|
if(GETTEXT_MSGMERGE_EXECUTABLE)
|
||||||
|
add_custom_target(
|
||||||
|
po-merge
|
||||||
|
ALL
|
||||||
|
DEPENDS ${CMAKE_SOURCE_DIR}/po/ptouch.pot
|
||||||
|
)
|
||||||
|
add_dependencies(po-merge pot-update)
|
||||||
|
|
||||||
|
foreach(LINGUA IN LISTS LINGUAS)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET po-merge
|
||||||
|
PRE_BUILD
|
||||||
|
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE}
|
||||||
|
--update
|
||||||
|
--quiet
|
||||||
|
${CMAKE_SOURCE_DIR}/po/${LINGUA}.po
|
||||||
|
${CMAKE_SOURCE_DIR}/po/ptouch.pot
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# compile po files
|
||||||
|
foreach(LINGUA IN LISTS LINGUAS)
|
||||||
|
gettext_process_po_files(
|
||||||
|
${LINGUA}
|
||||||
|
ALL
|
||||||
|
PO_FILES ${CMAKE_SOURCE_DIR}/po/${LINGUA}.po
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# install mo files
|
||||||
|
foreach(LINGUA IN LISTS LINGUAS)
|
||||||
|
install(
|
||||||
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/${LINGUA}.gmo"
|
||||||
|
DESTINATION "${CMAKE_INSTALL_LOCALEDIR}/${LINGUA}/LC_MESSAGES"
|
||||||
|
RENAME "${PROJECT_NAME}.mo"
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
+11
-5
@@ -1,3 +1,6 @@
|
|||||||
|
# HB9HEI - required for autogen version.h
|
||||||
|
find_package(Git REQUIRED)
|
||||||
|
|
||||||
# Get commit hash
|
# Get commit hash
|
||||||
execute_process(COMMAND git log --format='%H' -n 1
|
execute_process(COMMAND git log --format='%H' -n 1
|
||||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||||
@@ -30,13 +33,16 @@ else()
|
|||||||
string(STRIP "${GIT_COMMITS}" GIT_COMMITS)
|
string(STRIP "${GIT_COMMITS}" GIT_COMMITS)
|
||||||
string(STRIP "${GIT_DIFF}" GIT_DIFF)
|
string(STRIP "${GIT_DIFF}" GIT_DIFF)
|
||||||
string(STRIP "${GIT_TAG}" GIT_TAG)
|
string(STRIP "${GIT_TAG}" GIT_TAG)
|
||||||
|
if (${GIT_COMMITS} STREQUAL ${GIT_TAG})
|
||||||
|
set(GIT_COMMITS "0")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(VERSION "const char* GIT_BRANCH=\"${GIT_BRANCH}\";
|
set(VERSION "#define GIT_BRANCH \"${GIT_BRANCH}\"
|
||||||
const char* GIT_COMMIT=\"${GIT_COMMIT_SHORT}\";
|
#define GIT_COMMIT \"${GIT_COMMIT_SHORT}\"
|
||||||
const char* GIT_COMMITS=\"${GIT_COMMITS}\";
|
#define GIT_COMMITS \"${GIT_COMMITS}\"
|
||||||
const char* GIT_TAG=\"${GIT_TAG}\";
|
#define GIT_TAG \"${GIT_TAG}\"
|
||||||
const char* VERSION=\"${GIT_TAG}-r${GIT_COMMITS}-g${GIT_COMMIT_SHORT}${GIT_DIFF}\";
|
#define VERSION \"${GIT_TAG}.r${GIT_COMMITS}.g${GIT_COMMIT_SHORT}${GIT_DIFF}\"
|
||||||
")
|
")
|
||||||
|
|
||||||
message(DEBUG "Generated Version: \"${VERSION}\"")
|
message(DEBUG "Generated Version: \"${VERSION}\"")
|
||||||
|
|||||||
@@ -1,288 +0,0 @@
|
|||||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
|
||||||
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011, 2015 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 3 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, see <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#ifndef _LIBGETTEXT_H
|
|
||||||
#define _LIBGETTEXT_H 1
|
|
||||||
|
|
||||||
/* NLS can be disabled through the configure --disable-nls option. */
|
|
||||||
#if ENABLE_NLS
|
|
||||||
|
|
||||||
/* Get declarations of GNU message catalog functions. */
|
|
||||||
# include <libintl.h>
|
|
||||||
|
|
||||||
/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
|
|
||||||
the gettext() and ngettext() macros. This is an alternative to calling
|
|
||||||
textdomain(), and is useful for libraries. */
|
|
||||||
# ifdef DEFAULT_TEXT_DOMAIN
|
|
||||||
# undef gettext
|
|
||||||
# define gettext(Msgid) \
|
|
||||||
dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
|
|
||||||
# undef ngettext
|
|
||||||
# define ngettext(Msgid1, Msgid2, N) \
|
|
||||||
dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
|
|
||||||
chokes if dcgettext is defined as a macro. So include it now, to make
|
|
||||||
later inclusions of <locale.h> a NOP. We don't include <libintl.h>
|
|
||||||
as well because people using "gettext.h" will not include <libintl.h>,
|
|
||||||
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
|
|
||||||
is OK. */
|
|
||||||
#if defined(__sun)
|
|
||||||
# include <locale.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
|
|
||||||
<libintl.h>, which chokes if dcgettext is defined as a macro. So include
|
|
||||||
it now, to make later inclusions of <libintl.h> a NOP. */
|
|
||||||
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
|
|
||||||
# include <cstdlib>
|
|
||||||
# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
|
|
||||||
# include <libintl.h>
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Disabled NLS.
|
|
||||||
The casts to 'const char *' serve the purpose of producing warnings
|
|
||||||
for invalid uses of the value returned from these functions.
|
|
||||||
On pre-ANSI systems without 'const', the config.h file is supposed to
|
|
||||||
contain "#define const". */
|
|
||||||
# undef gettext
|
|
||||||
# define gettext(Msgid) ((const char *) (Msgid))
|
|
||||||
# undef dgettext
|
|
||||||
# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
|
|
||||||
# undef dcgettext
|
|
||||||
# define dcgettext(Domainname, Msgid, Category) \
|
|
||||||
((void) (Category), dgettext (Domainname, Msgid))
|
|
||||||
# undef ngettext
|
|
||||||
# define ngettext(Msgid1, Msgid2, N) \
|
|
||||||
((N) == 1 \
|
|
||||||
? ((void) (Msgid2), (const char *) (Msgid1)) \
|
|
||||||
: ((void) (Msgid1), (const char *) (Msgid2)))
|
|
||||||
# undef dngettext
|
|
||||||
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
|
||||||
((void) (Domainname), ngettext (Msgid1, Msgid2, N))
|
|
||||||
# undef dcngettext
|
|
||||||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
|
||||||
((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
|
|
||||||
# undef textdomain
|
|
||||||
# define textdomain(Domainname) ((const char *) (Domainname))
|
|
||||||
# undef bindtextdomain
|
|
||||||
# define bindtextdomain(Domainname, Dirname) \
|
|
||||||
((void) (Domainname), (const char *) (Dirname))
|
|
||||||
# undef bind_textdomain_codeset
|
|
||||||
# define bind_textdomain_codeset(Domainname, Codeset) \
|
|
||||||
((void) (Domainname), (const char *) (Codeset))
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Prefer gnulib's setlocale override over libintl's setlocale override. */
|
|
||||||
#ifdef GNULIB_defined_setlocale
|
|
||||||
# undef setlocale
|
|
||||||
# define setlocale rpl_setlocale
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* A pseudo function call that serves as a marker for the automated
|
|
||||||
extraction of messages, but does not call gettext(). The run-time
|
|
||||||
translation is done at a different place in the code.
|
|
||||||
The argument, String, should be a literal string. Concatenated strings
|
|
||||||
and other string expressions won't work.
|
|
||||||
The macro's expansion is not parenthesized, so that it is suitable as
|
|
||||||
initializer for static 'char[]' or 'const char[]' variables. */
|
|
||||||
#define gettext_noop(String) String
|
|
||||||
|
|
||||||
/* The separator between msgctxt and msgid in a .mo file. */
|
|
||||||
#define GETTEXT_CONTEXT_GLUE "\004"
|
|
||||||
|
|
||||||
/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
|
|
||||||
MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
|
|
||||||
short and rarely need to change.
|
|
||||||
The letter 'p' stands for 'particular' or 'special'. */
|
|
||||||
#ifdef DEFAULT_TEXT_DOMAIN
|
|
||||||
# define pgettext(Msgctxt, Msgid) \
|
|
||||||
pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
|
|
||||||
#else
|
|
||||||
# define pgettext(Msgctxt, Msgid) \
|
|
||||||
pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
|
|
||||||
#endif
|
|
||||||
#define dpgettext(Domainname, Msgctxt, Msgid) \
|
|
||||||
pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
|
|
||||||
#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
|
|
||||||
pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
|
|
||||||
#ifdef DEFAULT_TEXT_DOMAIN
|
|
||||||
# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
|
|
||||||
npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
|
|
||||||
#else
|
|
||||||
# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
|
|
||||||
npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
|
|
||||||
#endif
|
|
||||||
#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
|
|
||||||
npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
|
|
||||||
#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
|
|
||||||
npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__inline
|
|
||||||
#else
|
|
||||||
#ifdef __cplusplus
|
|
||||||
inline
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
static const char *
|
|
||||||
pgettext_aux (const char *domain,
|
|
||||||
const char *msg_ctxt_id, const char *msgid,
|
|
||||||
int category)
|
|
||||||
{
|
|
||||||
const char *translation = dcgettext (domain, msg_ctxt_id, category);
|
|
||||||
if (translation == msg_ctxt_id)
|
|
||||||
return msgid;
|
|
||||||
else
|
|
||||||
return translation;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__inline
|
|
||||||
#else
|
|
||||||
#ifdef __cplusplus
|
|
||||||
inline
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
static const char *
|
|
||||||
npgettext_aux (const char *domain,
|
|
||||||
const char *msg_ctxt_id, const char *msgid,
|
|
||||||
const char *msgid_plural, unsigned long int n,
|
|
||||||
int category)
|
|
||||||
{
|
|
||||||
const char *translation =
|
|
||||||
dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
|
|
||||||
if (translation == msg_ctxt_id || translation == msgid_plural)
|
|
||||||
return (n == 1 ? msgid : msgid_plural);
|
|
||||||
else
|
|
||||||
return translation;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
|
|
||||||
can be arbitrary expressions. But for string literals these macros are
|
|
||||||
less efficient than those above. */
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
|
|
||||||
/* || __STDC_VERSION__ >= 199901L */ )
|
|
||||||
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
|
|
||||||
#else
|
|
||||||
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
|
||||||
#include <stdlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define pgettext_expr(Msgctxt, Msgid) \
|
|
||||||
dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
|
|
||||||
#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
|
|
||||||
dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__inline
|
|
||||||
#else
|
|
||||||
#ifdef __cplusplus
|
|
||||||
inline
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
static const char *
|
|
||||||
dcpgettext_expr (const char *domain,
|
|
||||||
const char *msgctxt, const char *msgid,
|
|
||||||
int category)
|
|
||||||
{
|
|
||||||
size_t msgctxt_len = strlen (msgctxt) + 1;
|
|
||||||
size_t msgid_len = strlen (msgid) + 1;
|
|
||||||
const char *translation;
|
|
||||||
#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
|
||||||
char msg_ctxt_id[msgctxt_len + msgid_len];
|
|
||||||
#else
|
|
||||||
char buf[1024];
|
|
||||||
char *msg_ctxt_id =
|
|
||||||
(msgctxt_len + msgid_len <= sizeof (buf)
|
|
||||||
? buf
|
|
||||||
: (char *) malloc (msgctxt_len + msgid_len));
|
|
||||||
if (msg_ctxt_id != NULL)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
|
|
||||||
msg_ctxt_id[msgctxt_len - 1] = '\004';
|
|
||||||
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
|
|
||||||
translation = dcgettext (domain, msg_ctxt_id, category);
|
|
||||||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
|
||||||
if (msg_ctxt_id != buf)
|
|
||||||
free (msg_ctxt_id);
|
|
||||||
#endif
|
|
||||||
if (translation != msg_ctxt_id)
|
|
||||||
return translation;
|
|
||||||
}
|
|
||||||
return msgid;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
|
|
||||||
dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
|
|
||||||
#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
|
|
||||||
dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__inline
|
|
||||||
#else
|
|
||||||
#ifdef __cplusplus
|
|
||||||
inline
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
static const char *
|
|
||||||
dcnpgettext_expr (const char *domain,
|
|
||||||
const char *msgctxt, const char *msgid,
|
|
||||||
const char *msgid_plural, unsigned long int n,
|
|
||||||
int category)
|
|
||||||
{
|
|
||||||
size_t msgctxt_len = strlen (msgctxt) + 1;
|
|
||||||
size_t msgid_len = strlen (msgid) + 1;
|
|
||||||
const char *translation;
|
|
||||||
#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
|
||||||
char msg_ctxt_id[msgctxt_len + msgid_len];
|
|
||||||
#else
|
|
||||||
char buf[1024];
|
|
||||||
char *msg_ctxt_id =
|
|
||||||
(msgctxt_len + msgid_len <= sizeof (buf)
|
|
||||||
? buf
|
|
||||||
: (char *) malloc (msgctxt_len + msgid_len));
|
|
||||||
if (msg_ctxt_id != NULL)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
|
|
||||||
msg_ctxt_id[msgctxt_len - 1] = '\004';
|
|
||||||
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
|
|
||||||
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
|
|
||||||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
|
||||||
if (msg_ctxt_id != buf)
|
|
||||||
free (msg_ctxt_id);
|
|
||||||
#endif
|
|
||||||
if (!(translation == msg_ctxt_id || translation == msgid_plural))
|
|
||||||
return translation;
|
|
||||||
}
|
|
||||||
return (n == 1 ? msgid : msgid_plural);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _LIBGETTEXT_H */
|
|
||||||
+21
-4
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
ptouch-print - Print labels with images or text on a Brother P-Touch
|
ptouch-print - Print labels with images or text on a Brother P-Touch
|
||||||
|
|
||||||
Copyright (C) 2015-2021 Dominic Radermacher <dominic@familie-radermacher.ch>
|
Copyright (C) 2015-2026 Dominic Radermacher <dominic@familie-radermacher.ch>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License version 3 as
|
under the terms of the GNU General Public License version 3 as
|
||||||
@@ -18,7 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <libusb.h>
|
||||||
|
#else
|
||||||
#include <libusb-1.0/libusb.h>
|
#include <libusb-1.0/libusb.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
struct _pt_tape_info {
|
struct _pt_tape_info {
|
||||||
uint8_t mm; /* Tape width in mm */
|
uint8_t mm; /* Tape width in mm */
|
||||||
@@ -32,6 +36,8 @@ struct _pt_tape_info {
|
|||||||
#define FLAG_PLITE (1 << 2)
|
#define FLAG_PLITE (1 << 2)
|
||||||
#define FLAG_P700_INIT (1 << 3)
|
#define FLAG_P700_INIT (1 << 3)
|
||||||
#define FLAG_USE_INFO_CMD (1 << 4)
|
#define FLAG_USE_INFO_CMD (1 << 4)
|
||||||
|
#define FLAG_HAS_PRECUT (1 << 5)
|
||||||
|
#define FLAG_D460BT_MAGIC (1 << 6)
|
||||||
|
|
||||||
typedef enum _pt_page_flags {
|
typedef enum _pt_page_flags {
|
||||||
FEED_NONE = 0x0,
|
FEED_NONE = 0x0,
|
||||||
@@ -96,14 +102,25 @@ int ptouch_send(ptouch_dev ptdev, uint8_t *data, size_t len);
|
|||||||
int ptouch_init(ptouch_dev ptdev);
|
int ptouch_init(ptouch_dev ptdev);
|
||||||
int ptouch_lf(ptouch_dev ptdev);
|
int ptouch_lf(ptouch_dev ptdev);
|
||||||
int ptouch_ff(ptouch_dev ptdev);
|
int ptouch_ff(ptouch_dev ptdev);
|
||||||
size_t ptouch_get_max_pixel_width(ptouch_dev ptdev);
|
int ptouch_get_dpi(ptouch_dev ptdev);
|
||||||
|
int ptouch_calc_tape_px(ptouch_dev ptdev, const uint8_t tape_with_mm);
|
||||||
|
size_t ptouch_get_max_width(ptouch_dev ptdev);
|
||||||
size_t ptouch_get_tape_width(ptouch_dev ptdev);
|
size_t ptouch_get_tape_width(ptouch_dev ptdev);
|
||||||
|
int ptouch_get_max_lines(ptouch_dev ptdev, int fontsize_px);
|
||||||
int ptouch_page_flags(ptouch_dev ptdev, uint8_t page_flags);
|
int ptouch_page_flags(ptouch_dev ptdev, uint8_t page_flags);
|
||||||
int ptouch_eject(ptouch_dev ptdev);
|
int ptouch_finalize(ptouch_dev ptdev, int chain);
|
||||||
int ptouch_getstatus(ptouch_dev ptdev);
|
int ptouch_getstatus(ptouch_dev ptdev, int timeout);
|
||||||
int ptouch_getmaxwidth(ptouch_dev ptdev);
|
int ptouch_getmaxwidth(ptouch_dev ptdev);
|
||||||
|
int ptouch_send_d460bt_magic(ptouch_dev ptdev);
|
||||||
|
int ptouch_send_d460bt_chain(ptouch_dev ptdev);
|
||||||
int ptouch_enable_packbits(ptouch_dev ptdev);
|
int ptouch_enable_packbits(ptouch_dev ptdev);
|
||||||
int ptouch_info_cmd(ptouch_dev ptdev, int size_x);
|
int ptouch_info_cmd(ptouch_dev ptdev, int size_x);
|
||||||
|
int ptouch_send_precut_cmd(ptouch_dev ptdev, int precut);
|
||||||
int ptouch_rasterstart(ptouch_dev ptdev);
|
int ptouch_rasterstart(ptouch_dev ptdev);
|
||||||
int ptouch_sendraster(ptouch_dev ptdev, uint8_t *data, size_t len);
|
int ptouch_sendraster(ptouch_dev ptdev, uint8_t *data, size_t len);
|
||||||
|
void ptouch_rawstatus(uint8_t raw[32]);
|
||||||
void ptouch_list_supported();
|
void ptouch_list_supported();
|
||||||
|
|
||||||
|
const char* pt_mediatype(unsigned char media_type);
|
||||||
|
const char* pt_tapecolor(unsigned char tape_color);
|
||||||
|
const char* pt_textcolor(unsigned char text_color);
|
||||||
|
|||||||
@@ -6,195 +6,354 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: ptouch-print 1.3.1\n"
|
"Project-Id-Version: ptouch-print 1.7\n"
|
||||||
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
|
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
|
||||||
"POT-Creation-Date: 2015-12-29 14:22+0100\n"
|
"POT-Creation-Date: 2026-03-08 13:10+0100\n"
|
||||||
"PO-Revision-Date: 2015-11-11 09:35+0100\n"
|
"PO-Revision-Date: 2024-05-23 22:27-0400\n"
|
||||||
"Last-Translator: <dominic@familie-radermacher.ch>\n"
|
"Last-Translator: dominic@familie-radermacher.ch\n"
|
||||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"X-Generator: Poedit 2.4.2\n"
|
||||||
|
|
||||||
#: src/libptouch.c:59
|
#: src/libptouch.c:108 src/libptouch.c:112 src/libptouch.c:116
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "out of memory\n"
|
msgid "out of memory\n"
|
||||||
msgstr "Nicht genug Speicher\n"
|
msgstr "Nicht genug Speicher\n"
|
||||||
|
|
||||||
#: src/libptouch.c:63
|
#: src/libptouch.c:120
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "libusb_init() failed\n"
|
msgid "libusb_init() failed\n"
|
||||||
msgstr "ptouch_init() fehlgeschlagen\n"
|
msgstr "ptouch_init() fehlgeschlagen\n"
|
||||||
|
|
||||||
#: src/libptouch.c:72
|
#: src/libptouch.c:129
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "failed to get device descriptor"
|
msgid "failed to get device descriptor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:78
|
#: src/libptouch.c:135
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s found on USB bus %d, device %d\n"
|
msgid "%s found on USB bus %d, device %d\n"
|
||||||
msgstr "Drucker %s am USB Bus %d, Gerät %d gefunden\n"
|
msgstr "Drucker %s am USB Bus %d, Gerät %d gefunden\n"
|
||||||
|
|
||||||
#: src/libptouch.c:83
|
#: src/libptouch.c:150
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "libusb_open error :%s\n"
|
msgid "libusb_open error :%s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:89
|
#: src/libptouch.c:156
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "error while detaching kernel driver: %s\n"
|
msgid "error while detaching kernel driver: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:93
|
#: src/libptouch.c:160
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "interface claim error: %s\n"
|
msgid "interface claim error: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:101
|
#: src/libptouch.c:171
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"No P-Touch printer found on USB (remember to put switch to position E)\n"
|
"No P-Touch printer found on USB (remember to put switch to position E)\n"
|
||||||
msgstr "Kein P-Ptouch Drucker am USB gefunden (Schalter muss auf E stehen)\n"
|
msgstr "Kein P-Ptouch Drucker am USB gefunden (Schalter muss auf E stehen)\n"
|
||||||
|
|
||||||
#: src/libptouch.c:121
|
#: src/libptouch.c:191
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_send() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:198
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "write error: %s\n"
|
msgid "write error: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:125
|
#: src/libptouch.c:202
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "write error: could send only %i of %ld bytes\n"
|
||||||
|
msgstr "Lesefehler: %i anstatt 32 bytes empfangen\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:252
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "write error: could send only %i of %i bytes\n"
|
msgid "debug: called ptouch_info_cmd() with NULL ptdev\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:194
|
#: src/libptouch.c:294
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_rasterstart() with NULL ptdev\n"
|
||||||
|
msgstr "ptouch_rasterstart() fehlgeschlagen\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:325
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_finalize() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:340
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "debug: dumping raw status bytes\n"
|
msgid "debug: dumping raw status bytes\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:218 src/libptouch.c:263
|
#: src/libptouch.c:359
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_getstatus() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:369 src/libptouch.c:400
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "read error: %s\n"
|
msgid "read error: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:223
|
#: src/libptouch.c:374
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "timeout while waiting for status response\n"
|
msgid "timeout (%i sec) while waiting for status response\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:231
|
#: src/libptouch.c:383
|
||||||
#, c-format
|
|
||||||
msgid "Error 1 = %02x\n"
|
|
||||||
msgstr "Fehlerbyte1 = %02x\n"
|
|
||||||
|
|
||||||
#: src/libptouch.c:234
|
|
||||||
#, c-format
|
|
||||||
msgid "Error 2 = %02x\n"
|
|
||||||
msgstr "Fehlerbyte2 = %02x\n"
|
|
||||||
|
|
||||||
#: src/libptouch.c:244
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unknown tape width of %imm, please report this.\n"
|
msgid "unknown tape width of %imm, please report this.\n"
|
||||||
msgstr "Unbekannte Schriftband breite (%i mm), bitte melden\n"
|
msgstr "Unbekannte Schriftband breite (%i mm), bitte melden\n"
|
||||||
|
|
||||||
#: src/libptouch.c:252
|
#: src/libptouch.c:389
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "got only 16 bytes... wondering what they are:\n"
|
msgid "got only 16 bytes... wondering what they are:\n"
|
||||||
msgstr "nur 16 bytes empfangen... mal gucken was die sind:\n"
|
msgstr "nur 16 bytes empfangen... mal gucken was die sind:\n"
|
||||||
|
|
||||||
#: src/libptouch.c:256
|
#: src/libptouch.c:393
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "read error: got %i instead of 32 bytes\n"
|
msgid "read error: got %i instead of 32 bytes\n"
|
||||||
msgstr "Lesefehler: %i anstatt 32 bytes empfangen\n"
|
msgstr "Lesefehler: %i anstatt 32 bytes empfangen\n"
|
||||||
|
|
||||||
#: src/libptouch.c:259
|
#: src/libptouch.c:396
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "strange status:\n"
|
msgid "strange status:\n"
|
||||||
msgstr "Seltsamer Status:\n"
|
msgstr "Seltsamer Status:\n"
|
||||||
|
|
||||||
#: src/libptouch.c:261
|
#: src/libptouch.c:398
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "trying to flush junk\n"
|
msgid "trying to flush junk\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:266
|
#: src/libptouch.c:403
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "got another %i bytes. now try again\n"
|
msgid "got another %i bytes. now try again\n"
|
||||||
msgstr "weitere %i bytes empfangen. probiere es nochmal.\n"
|
msgstr "weitere %i bytes empfangen. probiere es nochmal.\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:71
|
#: src/libptouch.c:410
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_get_dpi() with NULL ptdev\n"
|
||||||
|
msgstr "ptouch_rasterstart() fehlgeschlagen\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:419
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_cal_tape_width() with NULL ptdev\n"
|
||||||
|
msgstr "ptouch_rasterstart() fehlgeschlagen\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:430
|
||||||
|
#, c-format
|
||||||
|
msgid "printer with %d dpi not supported\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:444
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_lines() with NULL ptdev\n"
|
||||||
|
msgstr "ptouch_rasterstart() fehlgeschlagen\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:448
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_lines() with invalid fontsize_px\n"
|
||||||
|
msgstr "ptouch_rasterstart() fehlgeschlagen\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:451
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: calculated max lines %d \n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:458
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_tape_width() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:467
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_width() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:479
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_sendraster() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:176
|
||||||
|
#, c-format
|
||||||
|
msgid "nothing to print\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:184
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "image is too large (%ipx x %ipx)\n"
|
msgid "image is too large (%ipx x %ipx)\n"
|
||||||
msgstr "Bild ist zu gross (%ipx x %ipx)\n"
|
msgstr "Bild ist zu gross (%ipx x %ipx)\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:72 src/ptouch-print.c:356
|
#: src/ptouch-print.c:185
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "maximum printing width for this tape is %ipx\n"
|
msgid "maximum printing width for this tape is %ipx\n"
|
||||||
msgstr "Maximal druckbare Breite für dieses Schriftband sind %ipx\n"
|
msgstr "Maximal druckbare Breite für dieses Schriftband sind %ipx\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:77
|
#: src/ptouch-print.c:188
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "image size (%ipx x %ipx)\n"
|
||||||
|
msgstr "Bild ist zu gross (%ipx x %ipx)\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:198
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_rasterstart() failed\n"
|
msgid "ptouch_rasterstart() failed\n"
|
||||||
msgstr "ptouch_rasterstart() fehlgeschlagen\n"
|
msgstr "ptouch_rasterstart() fehlgeschlagen\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:88
|
#: src/ptouch-print.c:204
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_send() failed\n"
|
msgid "send print information command\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:210
|
||||||
|
#, c-format
|
||||||
|
msgid "send PT-D460BT magic commands\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:217
|
||||||
|
#, c-format
|
||||||
|
msgid "send precut command\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:226
|
||||||
|
#, c-format
|
||||||
|
msgid "send PT-D460BT chain commands\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:238
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "ptouch_sendraster() failed\n"
|
||||||
msgstr "ptouch_send() fehlgeschlagen\n"
|
msgstr "ptouch_send() fehlgeschlagen\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:128
|
#: src/ptouch-print.c:287
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "writing image '%s' failed\n"
|
msgid "writing image '%s' failed\n"
|
||||||
msgstr "Schreiben der Bilddatei '%s' fehlgeschlagen\n"
|
msgstr "Schreiben der Bilddatei '%s' fehlgeschlagen\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:197
|
#: src/ptouch-print.c:292
|
||||||
|
#, c-format
|
||||||
|
msgid "printing '%s' requires %.1f mm of tape\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:314
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: z baseline offset - %d\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:315
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: text baseline offset - %d\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:388
|
||||||
|
#, c-format
|
||||||
|
msgid "render_text(): %i lines, font = '%s', align = '%c'\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:391
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "warning: font config not available\n"
|
msgid "warning: font config not available\n"
|
||||||
msgstr "Warnung: fontconfig ist nicht verfügbar\n"
|
msgstr "Warnung: fontconfig ist nicht verfügbar\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:201
|
#: src/ptouch-print.c:395
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "setting font size=%i\n"
|
msgid "setting font size=%i\n"
|
||||||
msgstr "setze Zeichensatzgrösse=%i\n"
|
msgstr "setze Zeichensatzgrösse=%i\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:205
|
#: src/ptouch-print.c:397
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "ignoring setting font margin=%i\n"
|
||||||
|
msgstr "setze Zeichensatzgrösse=%i\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:402
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not estimate needed font size\n"
|
msgid "could not estimate needed font size\n"
|
||||||
msgstr "Konnte die notwendige Zeichensatzgrösse nicht bestimmen\n"
|
msgstr "Konnte die notwendige Zeichensatzgrösse nicht bestimmen\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:212
|
#: src/ptouch-print.c:409
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "choosing font size=%i\n"
|
msgid "choosing font size=%i\n"
|
||||||
msgstr "Wähle Zeichensatzgrösse %i\n"
|
msgstr "Wähle Zeichensatzgrösse %i\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:226 src/ptouch-print.c:232
|
#: src/ptouch-print.c:425 src/ptouch-print.c:459
|
||||||
#, c-format
|
#, fuzzy, c-format
|
||||||
msgid "error in gdImageStringFT: %s\n"
|
msgid "error in gdImageStringFT_180dpi: %s\n"
|
||||||
msgstr "Fehler in Funktion gdImageStringFT(): %s\n"
|
msgstr "Fehler in Funktion gdImageStringFT(): %s\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:299
|
#: src/ptouch-print.c:616
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch-print version %s by Dominic Radermacher\n"
|
msgid "Only up to %d lines are supported"
|
||||||
msgstr "ptouch-print Version %s von Dominic Radermacher\n"
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:326
|
#: src/ptouch-print.c:697
|
||||||
|
msgid "No arguments supported"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:702
|
||||||
|
msgid "Option --writepng missing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:705
|
||||||
|
msgid "Options --force_tape_width and --info can't be used together"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:736
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_init() failed\n"
|
msgid "ptouch_init() failed\n"
|
||||||
msgstr "ptouch_init() fehlgeschlagen\n"
|
msgstr "ptouch_init() fehlgeschlagen\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:329
|
#: src/ptouch-print.c:739
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_getstatus() failed\n"
|
msgid "ptouch_getstatus() failed\n"
|
||||||
msgstr "ptouch_getstatus() fehlgeschlagen\n"
|
msgstr "ptouch_getstatus() fehlgeschlagen\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:373
|
#: src/ptouch-print.c:753
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "printer has %d dpi, maximum printing width is %ld px\n"
|
||||||
|
msgstr "Maximal druckbare Breite für dieses Schriftband sind %ipx\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:754
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "maximum printing width for this tape is %ldpx\n"
|
||||||
|
msgstr "Maximal druckbare Breite für dieses Schriftband sind %ipx\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:779
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to load image file\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:788
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not render text\n"
|
msgid "could not render text\n"
|
||||||
msgstr "Konnte Text nicht rendern\n"
|
msgstr "Konnte Text nicht rendern\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:389
|
#: src/ptouch-print.c:829
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_eject() failed\n"
|
msgid "ptouch_finalize(%d) failed\n"
|
||||||
msgstr "ptouch_eject() fehlgeschlagen\n"
|
msgstr "ptouch_finalize(%d) fehlgeschlagen\n"
|
||||||
|
|
||||||
|
#, fuzzy, c-format
|
||||||
|
#~ msgid "maximum printing width for this printer is %ldpx\n"
|
||||||
|
#~ msgstr "Maximal druckbare Breite für dieses Schriftband sind %ipx\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
#~ msgid "ptouch-print version %s by Dominic Radermacher\n"
|
||||||
|
#~ msgstr "ptouch-print Version %s von Dominic Radermacher\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
#~ msgid "Error 1 = %02x\n"
|
||||||
|
#~ msgstr "Fehlerbyte1 = %02x\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
#~ msgid "Error 2 = %02x\n"
|
||||||
|
#~ msgstr "Fehlerbyte2 = %02x\n"
|
||||||
|
|||||||
@@ -5,196 +5,355 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: ptouch-print 1.3.1\n"
|
"Project-Id-Version: ptouch-print 1.7\n"
|
||||||
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
|
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
|
||||||
"POT-Creation-Date: 2015-12-29 14:22+0100\n"
|
"POT-Creation-Date: 2026-03-08 13:10+0100\n"
|
||||||
"PO-Revision-Date: 2015-11-11 09:47+0100\n"
|
"PO-Revision-Date: 2024-05-23 22:26-0400\n"
|
||||||
"Last-Translator: <dominic@familie-radermacher.ch>\n"
|
"Last-Translator: dominic@familie-radermacher.ch\n"
|
||||||
"Language-Team: English <en@translate.freefriends.org>\n"
|
"Language-Team: English <en@translate.freefriends.org>\n"
|
||||||
"Language: en\n"
|
"Language: en\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"X-Generator: Poedit 2.4.2\n"
|
||||||
|
|
||||||
#: src/libptouch.c:59
|
#: src/libptouch.c:108 src/libptouch.c:112 src/libptouch.c:116
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "out of memory\n"
|
msgid "out of memory\n"
|
||||||
msgstr "out of memory\n"
|
msgstr "out of memory\n"
|
||||||
|
|
||||||
#: src/libptouch.c:63
|
#: src/libptouch.c:120
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "libusb_init() failed\n"
|
msgid "libusb_init() failed\n"
|
||||||
msgstr "libusb_init() failed\n"
|
msgstr "libusb_init() failed\n"
|
||||||
|
|
||||||
#: src/libptouch.c:72
|
#: src/libptouch.c:129
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "failed to get device descriptor"
|
msgid "failed to get device descriptor"
|
||||||
msgstr "failed to get device descriptor"
|
msgstr "failed to get device descriptor"
|
||||||
|
|
||||||
#: src/libptouch.c:78
|
#: src/libptouch.c:135
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s found on USB bus %d, device %d\n"
|
msgid "%s found on USB bus %d, device %d\n"
|
||||||
msgstr "%s found on USB bus %d, device %d\n"
|
msgstr "%s found on USB bus %d, device %d\n"
|
||||||
|
|
||||||
#: src/libptouch.c:83
|
#: src/libptouch.c:150
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "libusb_open error :%s\n"
|
msgid "libusb_open error :%s\n"
|
||||||
msgstr "libusb_open error :%s\n"
|
msgstr "libusb_open error :%s\n"
|
||||||
|
|
||||||
#: src/libptouch.c:89
|
#: src/libptouch.c:156
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "error while detaching kernel driver: %s\n"
|
msgid "error while detaching kernel driver: %s\n"
|
||||||
msgstr "error while detaching kernel driver: %s\n"
|
msgstr "error while detaching kernel driver: %s\n"
|
||||||
|
|
||||||
#: src/libptouch.c:93
|
#: src/libptouch.c:160
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "interface claim error: %s\n"
|
msgid "interface claim error: %s\n"
|
||||||
msgstr "interface claim error: %s\n"
|
msgstr "interface claim error: %s\n"
|
||||||
|
|
||||||
#: src/libptouch.c:101
|
#: src/libptouch.c:171
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"No P-Touch printer found on USB (remember to put switch to position E)\n"
|
"No P-Touch printer found on USB (remember to put switch to position E)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"No P-Touch printer found on USB (remember to put switch to position E)\n"
|
"No P-Touch printer found on USB (remember to put switch to position E)\n"
|
||||||
|
|
||||||
#: src/libptouch.c:121
|
#: src/libptouch.c:191
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_send() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:198
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "write error: %s\n"
|
msgid "write error: %s\n"
|
||||||
msgstr "write error: %s\n"
|
msgstr "write error: %s\n"
|
||||||
|
|
||||||
#: src/libptouch.c:125
|
#: src/libptouch.c:202
|
||||||
#, c-format
|
#, fuzzy, c-format
|
||||||
msgid "write error: could send only %i of %i bytes\n"
|
msgid "write error: could send only %i of %ld bytes\n"
|
||||||
msgstr "write error: could send only %i of %i bytes\n"
|
msgstr "write error: could send only %i of %i bytes\n"
|
||||||
|
|
||||||
#: src/libptouch.c:194
|
#: src/libptouch.c:252
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_info_cmd() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:294
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_rasterstart() with NULL ptdev\n"
|
||||||
|
msgstr "ptouch_rasterstart() failed\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:325
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_finalize() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:340
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "debug: dumping raw status bytes\n"
|
msgid "debug: dumping raw status bytes\n"
|
||||||
msgstr "debug: dumping raw status bytes\n"
|
msgstr "debug: dumping raw status bytes\n"
|
||||||
|
|
||||||
#: src/libptouch.c:218 src/libptouch.c:263
|
#: src/libptouch.c:359
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_getstatus() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:369 src/libptouch.c:400
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "read error: %s\n"
|
msgid "read error: %s\n"
|
||||||
msgstr "read error: %s\n"
|
msgstr "read error: %s\n"
|
||||||
|
|
||||||
#: src/libptouch.c:223
|
#: src/libptouch.c:374
|
||||||
#, c-format
|
#, fuzzy, c-format
|
||||||
msgid "timeout while waiting for status response\n"
|
msgid "timeout (%i sec) while waiting for status response\n"
|
||||||
msgstr "timeout while waiting for status response\n"
|
msgstr "timeout while waiting for status response\n"
|
||||||
|
|
||||||
#: src/libptouch.c:231
|
#: src/libptouch.c:383
|
||||||
#, c-format
|
|
||||||
msgid "Error 1 = %02x\n"
|
|
||||||
msgstr "Error 1 = %02x\n"
|
|
||||||
|
|
||||||
#: src/libptouch.c:234
|
|
||||||
#, c-format
|
|
||||||
msgid "Error 2 = %02x\n"
|
|
||||||
msgstr "Error 2 = %02x\n"
|
|
||||||
|
|
||||||
#: src/libptouch.c:244
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unknown tape width of %imm, please report this.\n"
|
msgid "unknown tape width of %imm, please report this.\n"
|
||||||
msgstr "unknown tape width of %imm, please report this.\n"
|
msgstr "unknown tape width of %imm, please report this.\n"
|
||||||
|
|
||||||
#: src/libptouch.c:252
|
#: src/libptouch.c:389
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "got only 16 bytes... wondering what they are:\n"
|
msgid "got only 16 bytes... wondering what they are:\n"
|
||||||
msgstr "got only 16 bytes... wondering what they are:\n"
|
msgstr "got only 16 bytes... wondering what they are:\n"
|
||||||
|
|
||||||
#: src/libptouch.c:256
|
#: src/libptouch.c:393
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "read error: got %i instead of 32 bytes\n"
|
msgid "read error: got %i instead of 32 bytes\n"
|
||||||
msgstr "read error: got %i instead of 32 bytes\n"
|
msgstr "read error: got %i instead of 32 bytes\n"
|
||||||
|
|
||||||
#: src/libptouch.c:259
|
#: src/libptouch.c:396
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "strange status:\n"
|
msgid "strange status:\n"
|
||||||
msgstr "strange status:\n"
|
msgstr "strange status:\n"
|
||||||
|
|
||||||
#: src/libptouch.c:261
|
#: src/libptouch.c:398
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "trying to flush junk\n"
|
msgid "trying to flush junk\n"
|
||||||
msgstr "trying to flush junk\n"
|
msgstr "trying to flush junk\n"
|
||||||
|
|
||||||
#: src/libptouch.c:266
|
#: src/libptouch.c:403
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "got another %i bytes. now try again\n"
|
msgid "got another %i bytes. now try again\n"
|
||||||
msgstr "got another %i bytes. now try again\n"
|
msgstr "got another %i bytes. now try again\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:71
|
#: src/libptouch.c:410
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_get_dpi() with NULL ptdev\n"
|
||||||
|
msgstr "ptouch_rasterstart() failed\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:419
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_cal_tape_width() with NULL ptdev\n"
|
||||||
|
msgstr "ptouch_rasterstart() failed\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:430
|
||||||
|
#, c-format
|
||||||
|
msgid "printer with %d dpi not supported\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:444
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_lines() with NULL ptdev\n"
|
||||||
|
msgstr "ptouch_rasterstart() failed\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:448
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_lines() with invalid fontsize_px\n"
|
||||||
|
msgstr "ptouch_rasterstart() failed\n"
|
||||||
|
|
||||||
|
#: src/libptouch.c:451
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: calculated max lines %d \n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:458
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_tape_width() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:467
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_width() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:479
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_sendraster() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:176
|
||||||
|
#, c-format
|
||||||
|
msgid "nothing to print\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:184
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "image is too large (%ipx x %ipx)\n"
|
msgid "image is too large (%ipx x %ipx)\n"
|
||||||
msgstr "image is too large (%ipx x %ipx)\n"
|
msgstr "image is too large (%ipx x %ipx)\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:72 src/ptouch-print.c:356
|
#: src/ptouch-print.c:185
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "maximum printing width for this tape is %ipx\n"
|
msgid "maximum printing width for this tape is %ipx\n"
|
||||||
msgstr "maximum printing width for this tape is %ipx\n"
|
msgstr "maximum printing width for this tape is %ipx\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:77
|
#: src/ptouch-print.c:188
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "image size (%ipx x %ipx)\n"
|
||||||
|
msgstr "image is too large (%ipx x %ipx)\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:198
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_rasterstart() failed\n"
|
msgid "ptouch_rasterstart() failed\n"
|
||||||
msgstr "ptouch_rasterstart() failed\n"
|
msgstr "ptouch_rasterstart() failed\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:88
|
#: src/ptouch-print.c:204
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_send() failed\n"
|
msgid "send print information command\n"
|
||||||
msgstr "ptouch_send() failed\n"
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:128
|
#: src/ptouch-print.c:210
|
||||||
|
#, c-format
|
||||||
|
msgid "send PT-D460BT magic commands\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:217
|
||||||
|
#, c-format
|
||||||
|
msgid "send precut command\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:226
|
||||||
|
#, c-format
|
||||||
|
msgid "send PT-D460BT chain commands\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:238
|
||||||
|
#, c-format
|
||||||
|
msgid "ptouch_sendraster() failed\n"
|
||||||
|
msgstr "ptouch_sendraster() failed\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:287
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "writing image '%s' failed\n"
|
msgid "writing image '%s' failed\n"
|
||||||
msgstr "writing image '%s' failed\n"
|
msgstr "writing image '%s' failed\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:197
|
#: src/ptouch-print.c:292
|
||||||
|
#, c-format
|
||||||
|
msgid "printing '%s' requires %.1f mm of tape\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:314
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: z baseline offset - %d\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:315
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: text baseline offset - %d\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:388
|
||||||
|
#, c-format
|
||||||
|
msgid "render_text(): %i lines, font = '%s', align = '%c'\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:391
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "warning: font config not available\n"
|
msgid "warning: font config not available\n"
|
||||||
msgstr "warning: font config not available\n"
|
msgstr "warning: font config not available\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:201
|
#: src/ptouch-print.c:395
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "setting font size=%i\n"
|
msgid "setting font size=%i\n"
|
||||||
msgstr "setting font size=%i\n"
|
msgstr "setting font size=%i\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:205
|
#: src/ptouch-print.c:397
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "ignoring setting font margin=%i\n"
|
||||||
|
msgstr "setting font size=%i\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:402
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not estimate needed font size\n"
|
msgid "could not estimate needed font size\n"
|
||||||
msgstr "could not estimate needed font size\n"
|
msgstr "could not estimate needed font size\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:212
|
#: src/ptouch-print.c:409
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "choosing font size=%i\n"
|
msgid "choosing font size=%i\n"
|
||||||
msgstr "choosing font size=%i\n"
|
msgstr "choosing font size=%i\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:226 src/ptouch-print.c:232
|
#: src/ptouch-print.c:425 src/ptouch-print.c:459
|
||||||
#, c-format
|
#, fuzzy, c-format
|
||||||
msgid "error in gdImageStringFT: %s\n"
|
msgid "error in gdImageStringFT_180dpi: %s\n"
|
||||||
msgstr "error in gdImageStringFT: %s\n"
|
msgstr "error in gdImageStringFT: %s\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:299
|
#: src/ptouch-print.c:616
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch-print version %s by Dominic Radermacher\n"
|
msgid "Only up to %d lines are supported"
|
||||||
msgstr "ptouch-print version %s by Dominic Radermacher\n"
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:326
|
#: src/ptouch-print.c:697
|
||||||
|
msgid "No arguments supported"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:702
|
||||||
|
msgid "Option --writepng missing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:705
|
||||||
|
msgid "Options --force_tape_width and --info can't be used together"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:736
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_init() failed\n"
|
msgid "ptouch_init() failed\n"
|
||||||
msgstr "ptouch_init() failed\n"
|
msgstr "ptouch_init() failed\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:329
|
#: src/ptouch-print.c:739
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_getstatus() failed\n"
|
msgid "ptouch_getstatus() failed\n"
|
||||||
msgstr "ptouch_getstatus() failed\n"
|
msgstr "ptouch_getstatus() failed\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:373
|
#: src/ptouch-print.c:753
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "printer has %d dpi, maximum printing width is %ld px\n"
|
||||||
|
msgstr "maximum printing width for this tape is %ipx\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:754
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "maximum printing width for this tape is %ldpx\n"
|
||||||
|
msgstr "maximum printing width for this tape is %ipx\n"
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:779
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to load image file\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:788
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not render text\n"
|
msgid "could not render text\n"
|
||||||
msgstr "could not render text\n"
|
msgstr "could not render text\n"
|
||||||
|
|
||||||
#: src/ptouch-print.c:389
|
#: src/ptouch-print.c:829
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_eject() failed\n"
|
msgid "ptouch_finalize(%d) failed\n"
|
||||||
msgstr "ptouch_eject() failed\n"
|
msgstr "ptouch_finalize(%d) failed\n"
|
||||||
|
|
||||||
|
#, fuzzy, c-format
|
||||||
|
#~ msgid "maximum printing width for this printer is %ldpx\n"
|
||||||
|
#~ msgstr "maximum printing width for this tape is %ipx\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
#~ msgid "ptouch-print version %s by Dominic Radermacher\n"
|
||||||
|
#~ msgstr "ptouch-print version %s by Dominic Radermacher\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
#~ msgid "Error 1 = %02x\n"
|
||||||
|
#~ msgstr "Error 1 = %02x\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
#~ msgid "Error 2 = %02x\n"
|
||||||
|
#~ msgstr "Error 2 = %02x\n"
|
||||||
|
|||||||
+210
-68
@@ -1,14 +1,14 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR Free Software Foundation, Inc.
|
# Copyright (C) YEAR Dominic\ Radermacher\ <dominic@familie-radermacher.ch>
|
||||||
# This file is distributed under the same license as the ptouch package.
|
# This file is distributed under the same license as the ptouch-print package.
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: ptouch 1.3.3\n"
|
"Project-Id-Version: ptouch-print\n"
|
||||||
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
|
"Report-Msgid-Bugs-To: dominic@familie-radermacher.ch\n"
|
||||||
"POT-Creation-Date: 2015-12-29 14:22+0100\n"
|
"POT-Creation-Date: 2026-03-08 13:11+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -17,183 +17,325 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=CHARSET\n"
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: src/libptouch.c:59
|
#: src/libptouch.c:108 src/libptouch.c:112 src/libptouch.c:116
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "out of memory\n"
|
msgid "out of memory\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:63
|
#: src/libptouch.c:120
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "libusb_init() failed\n"
|
msgid "libusb_init() failed\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:72
|
#: src/libptouch.c:129
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "failed to get device descriptor"
|
msgid "failed to get device descriptor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:78
|
#: src/libptouch.c:135
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s found on USB bus %d, device %d\n"
|
msgid "%s found on USB bus %d, device %d\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:83
|
#: src/libptouch.c:150
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "libusb_open error :%s\n"
|
msgid "libusb_open error :%s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:89
|
#: src/libptouch.c:156
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "error while detaching kernel driver: %s\n"
|
msgid "error while detaching kernel driver: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:93
|
#: src/libptouch.c:160
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "interface claim error: %s\n"
|
msgid "interface claim error: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:101
|
#: src/libptouch.c:171
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"No P-Touch printer found on USB (remember to put switch to position E)\n"
|
"No P-Touch printer found on USB (remember to put switch to position E)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:121
|
#: src/libptouch.c:191
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_send() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:198
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "write error: %s\n"
|
msgid "write error: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:125
|
#: src/libptouch.c:202
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "write error: could send only %i of %i bytes\n"
|
msgid "write error: could send only %i of %ld bytes\n"
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/libptouch.c:194
|
|
||||||
#, c-format
|
|
||||||
msgid "debug: dumping raw status bytes\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/libptouch.c:218 src/libptouch.c:263
|
|
||||||
#, c-format
|
|
||||||
msgid "read error: %s\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/libptouch.c:223
|
|
||||||
#, c-format
|
|
||||||
msgid "timeout while waiting for status response\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/libptouch.c:231
|
|
||||||
#, c-format
|
|
||||||
msgid "Error 1 = %02x\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/libptouch.c:234
|
|
||||||
#, c-format
|
|
||||||
msgid "Error 2 = %02x\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/libptouch.c:244
|
|
||||||
#, c-format
|
|
||||||
msgid "unknown tape width of %imm, please report this.\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:252
|
#: src/libptouch.c:252
|
||||||
#, c-format
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_info_cmd() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:294
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_rasterstart() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:325
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_finalize() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:340
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: dumping raw status bytes\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:359
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_getstatus() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:369 src/libptouch.c:400
|
||||||
|
#, c-format
|
||||||
|
msgid "read error: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:374
|
||||||
|
#, c-format
|
||||||
|
msgid "timeout (%i sec) while waiting for status response\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:383
|
||||||
|
#, c-format
|
||||||
|
msgid "unknown tape width of %imm, please report this.\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:389
|
||||||
|
#, c-format
|
||||||
msgid "got only 16 bytes... wondering what they are:\n"
|
msgid "got only 16 bytes... wondering what they are:\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:256
|
#: src/libptouch.c:393
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "read error: got %i instead of 32 bytes\n"
|
msgid "read error: got %i instead of 32 bytes\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:259
|
#: src/libptouch.c:396
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "strange status:\n"
|
msgid "strange status:\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:261
|
#: src/libptouch.c:398
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "trying to flush junk\n"
|
msgid "trying to flush junk\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libptouch.c:266
|
#: src/libptouch.c:403
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "got another %i bytes. now try again\n"
|
msgid "got another %i bytes. now try again\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:71
|
#: src/libptouch.c:410
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_dpi() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:419
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_cal_tape_width() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:430
|
||||||
|
#, c-format
|
||||||
|
msgid "printer with %d dpi not supported\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:444
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_lines() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:448
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_lines() with invalid fontsize_px\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:451
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: calculated max lines %d \n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:458
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_tape_width() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:467
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_get_max_width() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libptouch.c:479
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: called ptouch_sendraster() with NULL ptdev\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:176
|
||||||
|
#, c-format
|
||||||
|
msgid "nothing to print\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:184
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "image is too large (%ipx x %ipx)\n"
|
msgid "image is too large (%ipx x %ipx)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:72 src/ptouch-print.c:356
|
#: src/ptouch-print.c:185
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "maximum printing width for this tape is %ipx\n"
|
msgid "maximum printing width for this tape is %ipx\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:77
|
#: src/ptouch-print.c:188
|
||||||
|
#, c-format
|
||||||
|
msgid "image size (%ipx x %ipx)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:198
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_rasterstart() failed\n"
|
msgid "ptouch_rasterstart() failed\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:88
|
#: src/ptouch-print.c:204
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_send() failed\n"
|
msgid "send print information command\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:128
|
#: src/ptouch-print.c:210
|
||||||
|
#, c-format
|
||||||
|
msgid "send PT-D460BT magic commands\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:217
|
||||||
|
#, c-format
|
||||||
|
msgid "send precut command\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:226
|
||||||
|
#, c-format
|
||||||
|
msgid "send PT-D460BT chain commands\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:238
|
||||||
|
#, c-format
|
||||||
|
msgid "ptouch_sendraster() failed\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:287
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "writing image '%s' failed\n"
|
msgid "writing image '%s' failed\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:197
|
#: src/ptouch-print.c:292
|
||||||
|
#, c-format
|
||||||
|
msgid "printing '%s' requires %.1f mm of tape\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:314
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: z baseline offset - %d\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:315
|
||||||
|
#, c-format
|
||||||
|
msgid "debug: text baseline offset - %d\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:388
|
||||||
|
#, c-format
|
||||||
|
msgid "render_text(): %i lines, font = '%s', align = '%c'\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:391
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "warning: font config not available\n"
|
msgid "warning: font config not available\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:201
|
#: src/ptouch-print.c:395
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "setting font size=%i\n"
|
msgid "setting font size=%i\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:205
|
#: src/ptouch-print.c:397
|
||||||
|
#, c-format
|
||||||
|
msgid "ignoring setting font margin=%i\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:402
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not estimate needed font size\n"
|
msgid "could not estimate needed font size\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:212
|
#: src/ptouch-print.c:409
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "choosing font size=%i\n"
|
msgid "choosing font size=%i\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:226 src/ptouch-print.c:232
|
#: src/ptouch-print.c:425 src/ptouch-print.c:459
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "error in gdImageStringFT: %s\n"
|
msgid "error in gdImageStringFT_180dpi: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:299
|
#: src/ptouch-print.c:616
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch-print version %s by Dominic Radermacher\n"
|
msgid "Only up to %d lines are supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:326
|
#: src/ptouch-print.c:697
|
||||||
|
msgid "No arguments supported"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:702
|
||||||
|
msgid "Option --writepng missing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:705
|
||||||
|
msgid "Options --force_tape_width and --info can't be used together"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:736
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_init() failed\n"
|
msgid "ptouch_init() failed\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:329
|
#: src/ptouch-print.c:739
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_getstatus() failed\n"
|
msgid "ptouch_getstatus() failed\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:373
|
#: src/ptouch-print.c:753
|
||||||
|
#, c-format
|
||||||
|
msgid "printer has %d dpi, maximum printing width is %ld px\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:754
|
||||||
|
#, c-format
|
||||||
|
msgid "maximum printing width for this tape is %ldpx\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:779
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to load image file\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ptouch-print.c:788
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not render text\n"
|
msgid "could not render text\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/ptouch-print.c:389
|
#: src/ptouch-print.c:829
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ptouch_eject() failed\n"
|
msgid "ptouch_finalize(%d) failed\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
+19
-5
@@ -1,10 +1,10 @@
|
|||||||
.\" Man page for ptouch-print
|
.\" Man page for ptouch-print
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (C) 2015-2021 Dominic Radermacher
|
.\" Copyright (C) 2015-2023 Dominic Radermacher
|
||||||
.\"
|
.\"
|
||||||
.\" You may distribute under the terms of the GNU General Public License.
|
.\" You may distribute under the terms of the GNU General Public License.
|
||||||
.\"
|
.\"
|
||||||
.TH PTOUCH-PRINT 1 "2021-08-30" "1.4.3" "ptouch printer util"
|
.TH PTOUCH-PRINT 1 "2023-03-13" "1.5" "ptouch printer util"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ptouch-print \- a command line tool to use Brother Ptouch label printers
|
ptouch-print \- a command line tool to use Brother Ptouch label printers
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -28,9 +28,18 @@ once in any order, and will be executed in the given order.
|
|||||||
.TP
|
.TP
|
||||||
.BR \-\-debug
|
.BR \-\-debug
|
||||||
Enables printing of debugging information.
|
Enables printing of debugging information.
|
||||||
|
.TP
|
||||||
|
.BR \-\-timeout\ \fI<time>
|
||||||
|
Set the seconds ptouch-print is waiting for finishing a previous ptouch-print command.
|
||||||
|
Default is 1 second. 0 (zero) means wait forever.
|
||||||
|
Useful if ptouch-print is used in a script multiple times, and the device is waiting for the user
|
||||||
|
to use the mechanical cutter.
|
||||||
|
|
||||||
.SS "Font selection options"
|
.SS "Font selection options"
|
||||||
.TP
|
.TP
|
||||||
|
.BR \-\-fontmargin\ \fI<size>
|
||||||
|
When auto-detecting font size account for a margin above and below the text.
|
||||||
|
.TP
|
||||||
.BR \-\-fontsize\ \fI<size>
|
.BR \-\-fontsize\ \fI<size>
|
||||||
Disable auto-detection of the font size and force the font size to the size
|
Disable auto-detection of the font size and force the font size to the size
|
||||||
given as argument. Please note that text will be cut off if you specify a
|
given as argument. Please note that text will be cut off if you specify a
|
||||||
@@ -50,7 +59,9 @@ file (which can be printed later using the --image printing command option).
|
|||||||
.BR \-\-text\ \fItext
|
.BR \-\-text\ \fItext
|
||||||
Print the given text at the current position. Text including spaces must be
|
Print the given text at the current position. Text including spaces must be
|
||||||
enclosed in question marks.
|
enclosed in question marks.
|
||||||
To print a text in multiple lines, give multiple text arguments.
|
Literal '\\n' or actual newline characters in the text will be treated as
|
||||||
|
line breaks.
|
||||||
|
To print a text in multiple lines, either use '\\n' or use the -n argument.
|
||||||
Also see the
|
Also see the
|
||||||
.BR EXAMPLES
|
.BR EXAMPLES
|
||||||
section.
|
section.
|
||||||
@@ -76,6 +87,9 @@ Display version information and exit.
|
|||||||
.TP
|
.TP
|
||||||
.BR \-\-info
|
.BR \-\-info
|
||||||
Show info about the tape detected (like printing width etc.) and exit.
|
Show info about the tape detected (like printing width etc.) and exit.
|
||||||
|
.TP
|
||||||
|
.BR \-\-list-supported
|
||||||
|
List all supported printers
|
||||||
|
|
||||||
.SH DEFAULTS
|
.SH DEFAULTS
|
||||||
The default font used is 'DejaVuSans'.
|
The default font used is 'DejaVuSans'.
|
||||||
@@ -98,7 +112,7 @@ Printer device could not been opened.
|
|||||||
\fBptouch-print\fR \fI--text\fR 'Hello World'
|
\fBptouch-print\fR \fI--text\fR 'Hello World'
|
||||||
Print the text 'Hello World' in one line
|
Print the text 'Hello World' in one line
|
||||||
.TP
|
.TP
|
||||||
\fBptouch-print\fR \fI--text\fR 'Hello' 'World'
|
\fBptouch-print\fR \fI--text\fR 'Hello' -n 'World'
|
||||||
Print the text 'Hello World' in two lines ('Hello' in the first line
|
Print the text 'Hello World' in two lines ('Hello' in the first line
|
||||||
and 'World' in the second line).
|
and 'World' in the second line).
|
||||||
.TP
|
.TP
|
||||||
@@ -109,4 +123,4 @@ The image file must be palette based PNG format with two colors.
|
|||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Written by Dominic Radermacher (dominic@familie-radermacher.ch).
|
Written by Dominic Radermacher (dominic@familie-radermacher.ch).
|
||||||
|
|
||||||
Also see https://familie-radermacher.ch/dominic/projekte/ptouch-print/
|
Also see https://dominic.familie-radermacher.ch/projekte/ptouch-print/
|
||||||
|
|||||||
+266
-40
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
libptouch - functions to help accessing a brother ptouch
|
libptouch - functions to help accessing a brother ptouch
|
||||||
|
|
||||||
Copyright (C) 2013-2021 Dominic Radermacher <dominic@familie-radermacher.ch>
|
Copyright (C) 2013-2026 Dominic Radermacher <dominic@familie-radermacher.ch>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License version 3 as
|
under the terms of the GNU General Public License version 3 as
|
||||||
@@ -21,34 +21,39 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h> /* malloc() */
|
#include <stdlib.h> /* malloc() */
|
||||||
#include <string.h> /* memcmp() */
|
#include <string.h> /* memcmp() */
|
||||||
#include <sys/types.h> /* open() */
|
#include <sys/types.h> /* open() */
|
||||||
#include <sys/stat.h> /* open() */
|
#include <sys/stat.h> /* open() */
|
||||||
#include <fcntl.h> /* open() */
|
#include <fcntl.h> /* open() */
|
||||||
#include <time.h> /* nanosleep(), struct timespec */
|
#include <time.h> /* nanosleep(), struct timespec */
|
||||||
|
#include <libintl.h> /* gettext() */
|
||||||
|
|
||||||
#include "gettext.h" /* gettext(), ngettext() */
|
|
||||||
#include "ptouch.h"
|
#include "ptouch.h"
|
||||||
|
|
||||||
#define _(s) gettext(s)
|
#define _(s) gettext(s)
|
||||||
|
|
||||||
/* Print area width in 180 DPI pixels */
|
/* Print area width in 180 DPI pixels */
|
||||||
struct _pt_tape_info tape_info[]= {
|
struct _pt_tape_info tape_info[]= {
|
||||||
{ 4, 24, 0.5}, /* 3.5 mm tape */
|
{ 4, 24, 0.5}, /* 3.5 mm tape */
|
||||||
{ 6, 32, 1.0}, /* 6 mm tape */
|
{ 6, 32, 1.0}, /* 6 mm tape */
|
||||||
{ 9, 52, 1.0}, /* 9 mm tape */
|
{ 9, 52, 1.0}, /* 9 mm tape */
|
||||||
{12, 76, 2.0}, /* 12 mm tape */
|
{12, 76, 2.0}, /* 12 mm tape */
|
||||||
{18, 120, 3.0}, /* 18 mm tape */
|
{18, 120, 3.0}, /* 18 mm tape */
|
||||||
|
{21, 124, 3.0}, /* 21 mm tape */
|
||||||
{24, 128, 3.0}, /* 24 mm tape */
|
{24, 128, 3.0}, /* 24 mm tape */
|
||||||
{36, 192, 4.5}, /* 36 mm tape */
|
{36, 192, 4.5}, /* 36 mm tape */
|
||||||
{ 0, 0, 0.0} /* terminating entry */
|
{ 0, 0, 0.0} /* terminating entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _pt_dev_info ptdevs[] = {
|
struct _pt_dev_info ptdevs[] = {
|
||||||
|
{0x04f9, 0x2001, "PT-9200DX", 384, 360, FLAG_RASTER_PACKBITS|FLAG_HAS_PRECUT}, /* 360dpi, maximum 128px, max tape width 36mm */
|
||||||
|
{0x04f9, 0x2002, "PT-9200DX", 384, 360, FLAG_RASTER_PACKBITS|FLAG_HAS_PRECUT}, /* reported by Christian Pauls - either 0x2001 is wrong, or this printer exists with two different IDs */
|
||||||
|
{0x04f9, 0x2004, "PT-2300", 112, 180, FLAG_RASTER_PACKBITS|FLAG_HAS_PRECUT}, /* 180dpi, 112px printhead */
|
||||||
{0x04f9, 0x2007, "PT-2420PC", 128, 180, FLAG_RASTER_PACKBITS}, /* 180dpi, 128px, maximum tape width 24mm, must send TIFF compressed pixel data */
|
{0x04f9, 0x2007, "PT-2420PC", 128, 180, FLAG_RASTER_PACKBITS}, /* 180dpi, 128px, maximum tape width 24mm, must send TIFF compressed pixel data */
|
||||||
|
//{0x04f9, 0x200d, "PT-3600", 384, 360, FLAG_RASTER_PACKBITS},
|
||||||
{0x04f9, 0x2011, "PT-2450PC", 128, 180, FLAG_RASTER_PACKBITS},
|
{0x04f9, 0x2011, "PT-2450PC", 128, 180, FLAG_RASTER_PACKBITS},
|
||||||
{0x04f9, 0x2019, "PT-1950", 128, 180, FLAG_RASTER_PACKBITS}, /* 180dpi, apparently 112px printhead ?, maximum tape width 18mm - unconfirmed if it works */
|
{0x04f9, 0x2019, "PT-1950", 112, 180, FLAG_RASTER_PACKBITS}, /* 180dpi, apparently 112px printhead ?, maximum tape width 18mm - unconfirmed if it works */
|
||||||
{0x04f9, 0x201f, "PT-2700", 128, 180, FLAG_NONE},
|
{0x04f9, 0x201f, "PT-2700", 128, 180, FLAG_HAS_PRECUT},
|
||||||
{0x04f9, 0x202c, "PT-1230PC", 128, 180, FLAG_NONE}, /* 180dpi, supports tapes up to 12mm - I don't know how much pixels it can print! */
|
{0x04f9, 0x202c, "PT-1230PC", 128, 180, FLAG_NONE}, /* 180dpi, supports tapes up to 12mm - I don't know how much pixels it can print! */
|
||||||
/* Notes about the PT-1230PC: While it is true that this printer supports
|
/* Notes about the PT-1230PC: While it is true that this printer supports
|
||||||
max 12mm tapes, it apparently expects > 76px data - the first 32px
|
max 12mm tapes, it apparently expects > 76px data - the first 32px
|
||||||
@@ -59,13 +64,16 @@ struct _pt_dev_info ptdevs[] = {
|
|||||||
{0x04f9, 0x2041, "PT-2730", 128, 180, FLAG_NONE}, /* 180dpi, maximum 128px, max tape width 24mm - reported to work with some quirks */
|
{0x04f9, 0x2041, "PT-2730", 128, 180, FLAG_NONE}, /* 180dpi, maximum 128px, max tape width 24mm - reported to work with some quirks */
|
||||||
/* Notes about the PT-2730: was reported to need 48px whitespace
|
/* Notes about the PT-2730: was reported to need 48px whitespace
|
||||||
within png-images before content is actually printed - can not check this */
|
within png-images before content is actually printed - can not check this */
|
||||||
{0x04f9, 0x205e, "PT-H500", 128, 180, FLAG_RASTER_PACKBITS},
|
{0x04f9, 0x205e, "PT-H500", 128, 180, FLAG_RASTER_PACKBITS|FLAG_HAS_PRECUT},
|
||||||
/* Note about the PT-H500: was reported by Eike with the remark that
|
/* Note about the PT-H500: was reported by Eike with the remark that
|
||||||
it might need some trailing padding */
|
it might need some trailing padding */
|
||||||
{0x04f9, 0x205f, "PT-E500", 128, 180, FLAG_RASTER_PACKBITS},
|
{0x04f9, 0x205f, "PT-E500", 128, 180, FLAG_RASTER_PACKBITS},
|
||||||
/* Note about the PT-E500: was reported by Jesse Becker with the
|
/* Note about the PT-E500: was reported by Jesse Becker with the
|
||||||
remark that it also needs some padding (white pixels) */
|
remark that it also needs some padding (white pixels) */
|
||||||
{0x04f9, 0x2061, "PT-P700", 128, 180, FLAG_RASTER_PACKBITS|FLAG_P700_INIT},
|
{0x04f9, 0x2060, "PT-E550W", 128, 180, FLAG_UNSUP_RASTER},
|
||||||
|
/* Note about the PT-E550W: was reported by Tim Biermann but does not
|
||||||
|
work yet (only prints empty tape with FLAG_RASTER_PACKBITS|FLAG_HAS_PRECUT) */
|
||||||
|
{0x04f9, 0x2061, "PT-P700", 128, 180, FLAG_RASTER_PACKBITS|FLAG_P700_INIT|FLAG_HAS_PRECUT},
|
||||||
{0x04f9, 0x2062, "PT-P750W", 128, 180, FLAG_RASTER_PACKBITS|FLAG_P700_INIT},
|
{0x04f9, 0x2062, "PT-P750W", 128, 180, FLAG_RASTER_PACKBITS|FLAG_P700_INIT},
|
||||||
{0x04f9, 0x2064, "PT-P700 (PLite Mode)", 128, 180, FLAG_PLITE},
|
{0x04f9, 0x2064, "PT-P700 (PLite Mode)", 128, 180, FLAG_PLITE},
|
||||||
{0x04f9, 0x2065, "PT-P750W (PLite Mode)", 128, 180, FLAG_PLITE},
|
{0x04f9, 0x2065, "PT-P750W (PLite Mode)", 128, 180, FLAG_PLITE},
|
||||||
@@ -74,13 +82,19 @@ struct _pt_dev_info ptdevs[] = {
|
|||||||
{0x04f9, 0x2074, "PT-D600", 128, 180, FLAG_RASTER_PACKBITS},
|
{0x04f9, 0x2074, "PT-D600", 128, 180, FLAG_RASTER_PACKBITS},
|
||||||
/* PT-D600 was reported to work, but with some quirks (premature
|
/* PT-D600 was reported to work, but with some quirks (premature
|
||||||
cutting of tape, printing maximum of 73mm length) */
|
cutting of tape, printing maximum of 73mm length) */
|
||||||
//{0x04f9, 0x200d, "PT-3600", 384, 360, FLAG_RASTER_PACKBITS},
|
{0x04f9, 0x20af, "PT-P710BT", 128, 180, FLAG_RASTER_PACKBITS|FLAG_HAS_PRECUT},
|
||||||
{0x04f9, 0x20af, "PT-P710BT", 128, 180, FLAG_RASTER_PACKBITS},
|
{0x04f9, 0x20df, "PT-D410", 128, 180, FLAG_USE_INFO_CMD|FLAG_HAS_PRECUT|FLAG_D460BT_MAGIC},
|
||||||
|
{0x04f9, 0x20e0, "PT-D460BT", 128, 180, FLAG_P700_INIT|FLAG_USE_INFO_CMD|FLAG_HAS_PRECUT|FLAG_D460BT_MAGIC},
|
||||||
|
{0x04f9, 0x20e1, "PT-D610BT", 128, 180, FLAG_P700_INIT|FLAG_USE_INFO_CMD|FLAG_HAS_PRECUT|FLAG_D460BT_MAGIC},
|
||||||
|
/* added by Christian, PT-E310BT (aka PT-E310BTVP) requires these flags, otherwise not returning from libusb_bulk_transfer-call */
|
||||||
|
/* printhead 128px, 180 dpi resolution */
|
||||||
|
/* 3,5/6/9/12/18 mm TZe Tapes, 12mm and 18mm tested */
|
||||||
|
/* 5,2/9/11,2 mm HSe heat shrink tubes not tested, probably requiring extension of struct _pt_tape_info */
|
||||||
|
{0x04f9, 0x2201, "PT-E310BT", 128, 180, FLAG_P700_INIT|FLAG_USE_INFO_CMD|FLAG_D460BT_MAGIC},
|
||||||
|
{0x04f9, 0x2203, "PT-E560BT", 128, 180, FLAG_P700_INIT|FLAG_USE_INFO_CMD|FLAG_D460BT_MAGIC},
|
||||||
{0,0,"",0,0,0}
|
{0,0,"",0,0,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
void ptouch_rawstatus(uint8_t raw[32]);
|
|
||||||
|
|
||||||
int ptouch_open(ptouch_dev *ptdev)
|
int ptouch_open(ptouch_dev *ptdev)
|
||||||
{
|
{
|
||||||
libusb_device **devs;
|
libusb_device **devs;
|
||||||
@@ -116,7 +130,7 @@ int ptouch_open(ptouch_dev *ptdev)
|
|||||||
libusb_free_device_list(devs, 1);
|
libusb_free_device_list(devs, 1);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (int k=0; ptdevs[k].vid > 0; k++) {
|
for (int k=0; ptdevs[k].vid > 0; ++k) {
|
||||||
if ((desc.idVendor == ptdevs[k].vid) && (desc.idProduct == ptdevs[k].pid) && (ptdevs[k].flags >= 0)) {
|
if ((desc.idVendor == ptdevs[k].vid) && (desc.idProduct == ptdevs[k].pid) && (ptdevs[k].flags >= 0)) {
|
||||||
fprintf(stderr, _("%s found on USB bus %d, device %d\n"),
|
fprintf(stderr, _("%s found on USB bus %d, device %d\n"),
|
||||||
ptdevs[k].name,
|
ptdevs[k].name,
|
||||||
@@ -161,6 +175,9 @@ int ptouch_open(ptouch_dev *ptdev)
|
|||||||
|
|
||||||
int ptouch_close(ptouch_dev ptdev)
|
int ptouch_close(ptouch_dev ptdev)
|
||||||
{
|
{
|
||||||
|
if (!ptdev) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
libusb_release_interface(ptdev->h, 0);
|
libusb_release_interface(ptdev->h, 0);
|
||||||
libusb_close(ptdev->h);
|
libusb_close(ptdev->h);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -170,7 +187,11 @@ int ptouch_send(ptouch_dev ptdev, uint8_t *data, size_t len)
|
|||||||
{
|
{
|
||||||
int r, tx;
|
int r, tx;
|
||||||
|
|
||||||
if ((ptdev == NULL) || (len > 128)) {
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_send() with NULL ptdev\n"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (len > 128) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if ((r=libusb_bulk_transfer(ptdev->h, 0x02, data, (int)len, &tx, 0)) != 0) {
|
if ((r=libusb_bulk_transfer(ptdev->h, 0x02, data, (int)len, &tx, 0)) != 0) {
|
||||||
@@ -186,8 +207,36 @@ int ptouch_send(ptouch_dev ptdev, uint8_t *data, size_t len)
|
|||||||
|
|
||||||
int ptouch_init(ptouch_dev ptdev)
|
int ptouch_init(ptouch_dev ptdev)
|
||||||
{
|
{
|
||||||
char cmd[]="\x1b\x40"; /* 1B 40 = ESC @ = INIT */
|
/* first invalidate, then send init command */
|
||||||
return ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
|
uint8_t cmd[102];
|
||||||
|
memset(cmd, 0, 100);
|
||||||
|
cmd[100] = 0x1b; /* ESC */
|
||||||
|
cmd[101] = 0x40; /* @ */
|
||||||
|
return ptouch_send(ptdev, (uint8_t *)cmd, sizeof(cmd));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sends some magic commands to enable chaining on the PT-D460BT.
|
||||||
|
These should go out right before magic commands. */
|
||||||
|
int ptouch_send_d460bt_chain(ptouch_dev ptdev)
|
||||||
|
{
|
||||||
|
uint8_t cmd[] = "\x1b\x69\x4b\x00";
|
||||||
|
return ptouch_send(ptdev, (uint8_t *)cmd, sizeof(cmd));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sends some magic commands to make prints work on the PT-D460BT.
|
||||||
|
These should go out after info_cmd and right before the raster data. */
|
||||||
|
int ptouch_send_d460bt_magic(ptouch_dev ptdev)
|
||||||
|
{
|
||||||
|
/* 1B 69 64 {n1} {n2} {n3} {n4} */
|
||||||
|
uint8_t cmd[7];
|
||||||
|
/* n1 and n2 are the length margin/spacing, in px? (uint16_t value, little endian) */
|
||||||
|
/* A value of 0x06 is equivalent to the width margin on 6mm tape */
|
||||||
|
/* A value of 0x01 adds barely any margin, suitable for image printing */
|
||||||
|
/* The default for P-Touch software is 0x0e */
|
||||||
|
/* n3 must be 0x4D or the print gets corrupted! */
|
||||||
|
/* n4 seems to be ignored or reserved. */
|
||||||
|
memcpy(cmd, "\x1b\x69\x64\x01\x00\x4d\x00", 7);
|
||||||
|
return ptouch_send(ptdev, (uint8_t *)cmd, sizeof(cmd));
|
||||||
}
|
}
|
||||||
|
|
||||||
int ptouch_enable_packbits(ptouch_dev ptdev)
|
int ptouch_enable_packbits(ptouch_dev ptdev)
|
||||||
@@ -199,6 +248,11 @@ int ptouch_enable_packbits(ptouch_dev ptdev)
|
|||||||
/* print information command */
|
/* print information command */
|
||||||
int ptouch_info_cmd(ptouch_dev ptdev, int size_x)
|
int ptouch_info_cmd(ptouch_dev ptdev, int size_x)
|
||||||
{
|
{
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_info_cmd() with NULL ptdev\n"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* 1B 69 7A {n1} {n2} {n3} {n4} {n5} {n6} {n7} {n8} {n9} {n10} */
|
/* 1B 69 7A {n1} {n2} {n3} {n4} {n5} {n6} {n7} {n8} {n9} {n10} */
|
||||||
uint8_t cmd[] = "\x1b\x69\x7a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
|
uint8_t cmd[] = "\x1b\x69\x7a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
|
||||||
|
|
||||||
@@ -214,11 +268,32 @@ int ptouch_info_cmd(ptouch_dev ptdev, int size_x)
|
|||||||
cmd[8] = (uint8_t) (size_x >> 8) & 0xff;
|
cmd[8] = (uint8_t) (size_x >> 8) & 0xff;
|
||||||
cmd[9] = (uint8_t) (size_x >> 16) & 0xff;
|
cmd[9] = (uint8_t) (size_x >> 16) & 0xff;
|
||||||
cmd[10] = (uint8_t) (size_x >> 24) & 0xff;
|
cmd[10] = (uint8_t) (size_x >> 24) & 0xff;
|
||||||
|
if ((ptdev->devinfo->flags & FLAG_D460BT_MAGIC) == FLAG_D460BT_MAGIC) {
|
||||||
|
/* n9 is set to 2 in order to feed the last of the label and properly stop printing. */
|
||||||
|
cmd[11] = (uint8_t) 0x02;
|
||||||
|
}
|
||||||
return ptouch_send(ptdev, cmd, sizeof(cmd)-1);
|
return ptouch_send(ptdev, cmd, sizeof(cmd)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If set, printer will prompt to cut blank tape before finishing the print.
|
||||||
|
If not set, printer will print normally with a big blank space on the label.
|
||||||
|
The printer ignores this value if the print is very short. */
|
||||||
|
/* 0x80 horizontally mirrors the print */
|
||||||
|
int ptouch_send_precut_cmd(ptouch_dev ptdev, int precut)
|
||||||
|
{
|
||||||
|
char cmd[] = "\x1b\x69\x4d\x00";
|
||||||
|
if (precut) {
|
||||||
|
cmd[3] = 0x40;
|
||||||
|
}
|
||||||
|
return ptouch_send(ptdev, (uint8_t *)cmd, sizeof(cmd)-1);
|
||||||
|
}
|
||||||
|
|
||||||
int ptouch_rasterstart(ptouch_dev ptdev)
|
int ptouch_rasterstart(ptouch_dev ptdev)
|
||||||
{
|
{
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_rasterstart() with NULL ptdev\n"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
/* 1B 69 52 01 = Select graphics transfer mode = Raster */
|
/* 1B 69 52 01 = Select graphics transfer mode = Raster */
|
||||||
char cmd[] = "\x1b\x69\x52\x01";
|
char cmd[] = "\x1b\x69\x52\x01";
|
||||||
/* 1B 69 61 01 = switch mode (0=esc/p, 1=raster mode) */
|
/* 1B 69 61 01 = switch mode (0=esc/p, 1=raster mode) */
|
||||||
@@ -243,18 +318,28 @@ int ptouch_ff(ptouch_dev ptdev)
|
|||||||
return ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
|
return ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* print and cut tape */
|
/* finish print and either cut or leave tape in machine */
|
||||||
int ptouch_eject(ptouch_dev ptdev)
|
int ptouch_finalize(ptouch_dev ptdev, int chain)
|
||||||
{
|
{
|
||||||
char cmd[]="\x1a";
|
if (!ptdev) {
|
||||||
return ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
|
fprintf(stderr, _("debug: called ptouch_finalize() with NULL ptdev\n"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
char cmd_eject[]="\x1a"; /* Print command with feeding */
|
||||||
|
char cmd_chain[]="\x0c"; /* Print command (no cut) */
|
||||||
|
|
||||||
|
// The D460BT devices use a leading packet to indicate chaining instead.
|
||||||
|
char *cmd = (chain && (!(ptdev->devinfo->flags & FLAG_D460BT_MAGIC))) ? cmd_chain : cmd_eject;
|
||||||
|
return ptouch_send(ptdev, (uint8_t *)cmd, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ptouch_rawstatus(uint8_t raw[32])
|
void ptouch_rawstatus(uint8_t raw[32])
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("debug: dumping raw status bytes\n"));
|
fprintf(stderr, _("debug: dumping raw status bytes\n"));
|
||||||
for (int i=0; i<32; i++) {
|
for (int i=0; i<32; ++i) {
|
||||||
fprintf(stderr, "%02x ", raw[i]);
|
fprintf(stderr, "0x%02x ", raw[i]);
|
||||||
if (((i+1) % 16) == 0) {
|
if (((i+1) % 16) == 0) {
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
@@ -263,13 +348,18 @@ void ptouch_rawstatus(uint8_t raw[32])
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ptouch_getstatus(ptouch_dev ptdev)
|
int ptouch_getstatus(ptouch_dev ptdev, int timeout)
|
||||||
{
|
{
|
||||||
char cmd[]="\x1biS"; /* 1B 69 53 = ESC i S = Status info request */
|
char cmd[]="\x1biS"; /* 1B 69 53 = ESC i S = Status info request */
|
||||||
uint8_t buf[32];
|
uint8_t buf[32] = {};
|
||||||
int i, r, tx=0, tries=0;
|
int i, r, tx=0, tries=0, maxtries=timeout*10;
|
||||||
struct timespec w;
|
struct timespec w;
|
||||||
|
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_getstatus() with NULL ptdev\n"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
|
ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
|
||||||
while (tx == 0) {
|
while (tx == 0) {
|
||||||
w.tv_sec=0;
|
w.tv_sec=0;
|
||||||
@@ -279,21 +369,16 @@ int ptouch_getstatus(ptouch_dev ptdev)
|
|||||||
fprintf(stderr, _("read error: %s\n"), libusb_error_name(r));
|
fprintf(stderr, _("read error: %s\n"), libusb_error_name(r));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
tries++;
|
++tries;
|
||||||
if (tries > 10) {
|
if (timeout && tries > maxtries) {
|
||||||
fprintf(stderr, _("timeout while waiting for status response\n"));
|
fprintf(stderr, _("timeout (%i sec) while waiting for status response\n"), timeout);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tx == 32) {
|
if (tx == 32) {
|
||||||
if (buf[0]==0x80 && buf[1]==0x20) {
|
if (buf[0]==0x80 && buf[1]==0x20) {
|
||||||
memcpy(ptdev->status, buf, 32);
|
memcpy(ptdev->status, buf, 32);
|
||||||
ptdev->tape_width_px=0;
|
ptdev->tape_width_px = ptouch_calc_tape_px(ptdev, buf[10]);
|
||||||
for (i=0; tape_info[i].mm > 0; i++) {
|
|
||||||
if (tape_info[i].mm == buf[10]) {
|
|
||||||
ptdev->tape_width_px=tape_info[i].px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ptdev->tape_width_px == 0) {
|
if (ptdev->tape_width_px == 0) {
|
||||||
fprintf(stderr, _("unknown tape width of %imm, please report this.\n"), buf[10]);
|
fprintf(stderr, _("unknown tape width of %imm, please report this.\n"), buf[10]);
|
||||||
}
|
}
|
||||||
@@ -319,13 +404,69 @@ int ptouch_getstatus(ptouch_dev ptdev)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ptouch_get_dpi(ptouch_dev ptdev)
|
||||||
|
{
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_get_dpi() with NULL ptdev\n"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return ptdev->devinfo->dpi;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ptouch_calc_tape_px(ptouch_dev ptdev, const uint8_t tape_width_mm)
|
||||||
|
{
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_cal_tape_width() with NULL ptdev\n"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int tape_width_px = 0;
|
||||||
|
for (int i=0; tape_info[i].mm > 0; ++i) {
|
||||||
|
if (tape_info[i].mm == tape_width_mm) {
|
||||||
|
if (ptdev->devinfo->dpi == 180) {
|
||||||
|
tape_width_px = tape_info[i].px;
|
||||||
|
} else if (ptdev->devinfo->dpi == 360) {
|
||||||
|
tape_width_px = tape_info[i].px * 2;
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, _("printer with %d dpi not supported\n"), ptdev->devinfo->dpi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tape_width_px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO: The actual number of maximum lines should be calculated according to
|
||||||
|
printer resolution, tapewidth and fontsize */
|
||||||
|
/* printer resolution is planned to be taken into account when calculating
|
||||||
|
tape_width in px */
|
||||||
|
int ptouch_get_max_lines(ptouch_dev ptdev, int fontsize_px)
|
||||||
|
{
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_get_max_lines() with NULL ptdev\n"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (fontsize_px <= 0) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_get_max_lines() with invalid fontsize_px\n"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
fprintf(stderr, _("debug: calculated max lines %d \n"), ptdev->tape_width_px / fontsize_px);
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
size_t ptouch_get_tape_width(ptouch_dev ptdev)
|
size_t ptouch_get_tape_width(ptouch_dev ptdev)
|
||||||
{
|
{
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_get_tape_width() with NULL ptdev\n"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return ptdev->tape_width_px;
|
return ptdev->tape_width_px;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ptouch_get_max_width(ptouch_dev ptdev)
|
size_t ptouch_get_max_width(ptouch_dev ptdev)
|
||||||
{
|
{
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_get_max_width() with NULL ptdev\n"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return ptdev->devinfo->max_px;
|
return ptdev->devinfo->max_px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -334,6 +475,10 @@ int ptouch_sendraster(ptouch_dev ptdev, uint8_t *data, size_t len)
|
|||||||
uint8_t buf[64];
|
uint8_t buf[64];
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (!ptdev) {
|
||||||
|
fprintf(stderr, _("debug: called ptouch_sendraster() with NULL ptdev\n"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (len > (size_t)(ptdev->devinfo->max_px / 8)) {
|
if (len > (size_t)(ptdev->devinfo->max_px / 8)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -356,11 +501,92 @@ int ptouch_sendraster(ptouch_dev ptdev, uint8_t *data, size_t len)
|
|||||||
|
|
||||||
void ptouch_list_supported()
|
void ptouch_list_supported()
|
||||||
{
|
{
|
||||||
|
const int columns = 5;
|
||||||
printf("Supported printers (some might have quirks)\n");
|
printf("Supported printers (some might have quirks)\n");
|
||||||
for (int i=0; ptdevs[i].vid > 0; i++) {
|
int col=0;
|
||||||
|
for (int i=0; ptdevs[i].vid > 0; ++i) {
|
||||||
if ((ptdevs[i].flags & FLAG_PLITE) != FLAG_PLITE) {
|
if ((ptdevs[i].flags & FLAG_PLITE) != FLAG_PLITE) {
|
||||||
printf("\t%s\n", ptdevs[i].name);
|
printf("%s", ptdevs[i].name);
|
||||||
|
if (strlen(ptdevs[i].name) < 8) {
|
||||||
|
printf("\t");
|
||||||
|
}
|
||||||
|
printf("%c", (col < (columns - 1))?'\t':'\n');
|
||||||
|
++col;
|
||||||
|
col = (col % columns);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
printf("\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* pt_mediatype(const uint8_t media_type)
|
||||||
|
{
|
||||||
|
switch (media_type) {
|
||||||
|
case 0x00: return "No media"; break;
|
||||||
|
case 0x01: return "Laminated tape"; break;
|
||||||
|
case 0x03: return "Non-laminated tape"; break;
|
||||||
|
case 0x04: return "Fabric tape"; break;
|
||||||
|
case 0x11: return "Heat-shrink tube"; break; // Seems wrong, should be 0x17
|
||||||
|
case 0x13: return "Flexi tape"; break;
|
||||||
|
case 0x14: return "Flexible ID tape"; break;
|
||||||
|
case 0x15: return "Satin tape"; break;
|
||||||
|
case 0x17: return "Heat-shrink tube"; break;
|
||||||
|
case 0xff: return "Incompatible tape"; break;
|
||||||
|
default: return "unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* pt_tapecolor(const uint8_t tape_color)
|
||||||
|
{
|
||||||
|
switch (tape_color) {
|
||||||
|
case 0x01: return "White"; break;
|
||||||
|
case 0x02: return "Other"; break;
|
||||||
|
case 0x03: return "Clear"; break;
|
||||||
|
case 0x04: return "Red"; break;
|
||||||
|
case 0x05: return "Blue"; break;
|
||||||
|
case 0x06: return "Yellow"; break;
|
||||||
|
case 0x07: return "Green"; break;
|
||||||
|
case 0x08: return "Black"; break;
|
||||||
|
case 0x09: return "Clear"; break;
|
||||||
|
case 0x20: return "Matte White"; break;
|
||||||
|
case 0x21: return "Matte Clear"; break;
|
||||||
|
case 0x22: return "Matte Silver"; break;
|
||||||
|
case 0x23: return "Satin Gold"; break;
|
||||||
|
case 0x24: return "Satin Silver"; break;
|
||||||
|
case 0x30: return "Blue (TZe-5[345]5)"; break;
|
||||||
|
case 0x31: return "Red (TZe-435)"; break;
|
||||||
|
case 0x40: return "Fluorescent Orange"; break;
|
||||||
|
case 0x41: return "Fluorescent Yellow"; break;
|
||||||
|
case 0x50: return "Berry Pink (TZe-MQP35)"; break;
|
||||||
|
case 0x51: return "Light Gray (TZe-MQL35)"; break;
|
||||||
|
case 0x52: return "Lime Green (TZe-MQG35)"; break;
|
||||||
|
case 0x60: return "Yellow"; break;
|
||||||
|
case 0x61: return "Pink"; break;
|
||||||
|
case 0x62: return "Blue"; break;
|
||||||
|
case 0x70: return "Heat-shrink Tube"; break;
|
||||||
|
case 0x71: return "Heat-shrink Tube white"; break;
|
||||||
|
case 0x90: return "White(Flex. ID)"; break;
|
||||||
|
case 0x91: return "Yellow(Flex. ID)"; break;
|
||||||
|
case 0xf0: return "Cleaning"; break;
|
||||||
|
case 0xf1: return "Stencil"; break;
|
||||||
|
case 0xff: return "Incompatible"; break;
|
||||||
|
default: return "unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* pt_textcolor(const uint8_t text_color)
|
||||||
|
{
|
||||||
|
switch (text_color) {
|
||||||
|
case 0x01: return "White"; break;
|
||||||
|
case 0x02: return "Other"; break;
|
||||||
|
case 0x04: return "Red"; break;
|
||||||
|
case 0x05: return "Blue"; break;
|
||||||
|
case 0x08: return "Black"; break;
|
||||||
|
case 0x0a: return "Gold"; break;
|
||||||
|
case 0x62: return "Blue(F)"; break;
|
||||||
|
case 0xf0: return "Cleaning"; break;
|
||||||
|
case 0xf1: return "Stencil"; break;
|
||||||
|
case 0xff: return "Incompatible"; break;
|
||||||
|
default: return "unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+527
-263
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
|||||||
|
# Enable non-root access for known ptouch printers
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2001", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2002", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2004", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2007", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2011", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2019", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "201f", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "202c", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "202d", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2030", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2031", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2041", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "205e", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "205f", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2060", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2061", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2062", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2064", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2065", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2073", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2074", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "20af", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "20df", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "20e0", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "20e1", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2201", MODE="0660", TAG+="uaccess"
|
||||||
|
SUBSYSTEM == "usb", ATTRS{idVendor} == "04f9", ATTRS{idProduct} == "2203", MODE="0660", TAG+="uaccess"
|
||||||
Reference in New Issue
Block a user