libaps-general Mailing List for Application Print Services Library
Brought to you by:
brianpirie,
tranter
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
(16) |
May
(2) |
Jun
(12) |
Jul
(3) |
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
---|
From: Dag <lon...@ge...> - 2000-12-14 18:15:39
|
Hi, I have had a look at libaps and I have found a couple of problems for whi= ch=20 patches are included below. The orignals are from cvs kdesupport a couple= of=20 days ago. Patches: attrcommon.patch fixes a crash when reading fonts. utils.patch corrects check for failure to open a file in CopyFileSpecial(= ). lprtransport.patch deals with two things: 1. To be able to print the test page to my printer (hl-730 via ghostscrip= t) I=20 had to a) add the input file to the gs command :) and b) supress headers = (lpr=20 -h option) which I made as a new treatment under 'case LPR_IMPL_BSD:'. I = am=20 sure this is not the best and adeqvate way to do it but at least I get th= e=20 test page out. 2. Changes the way the if-filter is treated so that no filter is added if= the=20 filter masterfile is missing. I found that if the 'if' entry exists in th= e=20 printcap file, a valid filter must exists or else nothing is printed. Question: What does the lpr -l option have to do with flagBinary? -l is listed as 'use a filter' in my man pages. ---- What's the general state of the project? Is it scheduled to be used by=20 someone (Corel for instance)? Whats the state of the QT interface? I have compiled and run it and it=20 crashes on closedown but this may be my program, it is a very quick hack. Regards, Dag=00 |
From: Mark P. <mp...@va...> - 2000-09-05 21:41:39
|
Hi all, I could use a little help here. It may well be that I'm doing something wrong, but I seem to have a memory leak. I've reduced it down to a small test case, and was hoping you could look at what I'm doing and see the problem. I compile the attached C program with this command line: gcc -g -Wall -laps aps_test.c -o prntest Run it with a valid printer queue as the sole parameter: ./prntest lp0 Output will be the virtual memory size (from /proc) for the process, and the difference from the previous iteration, like this: $ ./prntest hp4050 Total Virtual: 1712128 Change: 1712128 Total Virtual: 1716224 Change: 4096 Total Virtual: 1720320 Change: 4096 Total Virtual: 1724416 Change: 4096 Total Virtual: 1724416 Change: 0 Total Virtual: 1728512 Change: 4096 Total Virtual: 1728512 Change: 0 Total Virtual: 1732608 Change: 4096 Total Virtual: 1736704 Change: 4096 Total Virtual: 1736704 Change: 0 Total Virtual: 1740800 Change: 4096 Total Virtual: 1740800 Change: 0 .... This example was from a queue that had six jobs. Because I'm getting info out of the /proc file system, this will need to be run under Linux. I've noticed that it leaks memory faster the more items are in the queue. Thanks in advance for any help you can give me. Please let me know if I'm doing something stupid in the code. The code is appended to the end of this message. -- ------------------------------------------------------ Mark Pruett VA Linux Systems mp...@va... Open Source Printing ------------------------------------------------------ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <aps.h> /*------------------------------------------------------------------- -------------------------------------------------------------------*/ void test (char *queue) { Aps_QueueHandle globalQueueHandle; Aps_Result result; Aps_PrinterHandle printerHandle = NULL; char tempstr [1024]; int heap = 0; static int pheap = 0; FILE *pipe; if (Aps_OpenPrinter (queue, &printerHandle) == APS_SUCCESS) { if ((result = Aps_PrinterOpenQueue (printerHandle, &globalQueueHandle)) == APS_SUCCESS) { // printf ("Got printer queue from handle.\n"); } } if (Aps_Succeeded(result)) { Aps_QuickPrinterQInfo **printerQInfo; int numElements; result = Aps_QueueMakeQuickPrinterQInfoArray(globalQueueHandle, &printerQInfo, &numElements); /* Report the change in virtual memory. */ sprintf (tempstr, "cat /proc/%d/stat | cut -d ' ' -f 23", getpid()); pipe = popen (tempstr, "r"); fgets (tempstr, 1024, pipe); heap = atoi (tempstr); printf ("Total Virtual: %d Change: %d\n", heap, heap-pheap); pclose (pipe); pheap = heap; Aps_ReleaseBuffer (printerQInfo); Aps_ReleaseHandle(printerHandle); Aps_ReleaseHandle(globalQueueHandle); } } /*------------------------------------------------------------------- -------------------------------------------------------------------*/ int main (int argc, char ** argv) { if (argc != 2) { printf ("Expected a printer queue parameter.\n"); return 0; } while (1) { test (argv[1]); sleep (1); } return 0; } |
From: Brian P. <br...@co...> - 2000-09-05 21:20:15
|
Hi Mark, This mailing list is the best place. Brian Mark Pruett wrote: > Hi, > > What's the preferred way for reporting problems/bugs > in libaps? > > -- > ------------------------------------------------------ > Mark Pruett VA Linux Systems > mp...@va... Open Source Printing > ------------------------------------------------------ > _______________________________________________ > Libaps-general mailing list > Lib...@li... > http://lists.sourceforge.net/mailman/listinfo/libaps-general |
From: Mark P. <mp...@va...> - 2000-09-05 21:02:04
|
Hi, What's the preferred way for reporting problems/bugs in libaps? -- ------------------------------------------------------ Mark Pruett VA Linux Systems mp...@va... Open Source Printing ------------------------------------------------------ |
From: Brian P. <br...@co...> - 2000-07-28 21:27:47
|
Hi Michael, I've had a look at the project you've been working on, and it is very interesting. I can certainly see how SysAPS would fit well into what you're doing, as both projects need to solve some of the same problems. You're right that the CUPS support currently in SysAPS is fairly minimal; we began implementing a CUPS-specific transport, but it hasn't come very far at all yet. We'd certainly welcome any collaboration you'd like to do in this area. We've also been experimenting with a Qt-based print dialog box to sit ontop of CUPS. I like a lot of what is planned / in progress for the KDE Print dialog box, and see the potential to combine the best ideas of both into a single dialog box. I've attached screen grabs of what we have so far. The basic idea is to provide a tabbed dialog box that can easily be added to for application or context specific pages. The "Page Settings" and "Options" pages contain settings that a user / sysadmin could potentially set as defaults for future jobs. The idea is that these same pages could also appear in Control Center. The "Page Settings" page contains a fixed set of job attributes that are commonly available from a wide range of printers. The "Options" page contains a list of all available job attributes. The idea here is to have a dynamic UI that can display attributes from PPD files or other sources without requiring the UI to be programmed to know about these attributes ahead of time. All of this code is now in the CVS repository at libaps.sourceforge.net. I should also mention that I will be travelling for a month, and most likely out of reach of email. In my absence, you should direction any questions or discussions about the SysAPS project to the mailing list at lib...@li.... There will be other people here at Corel involved in the project monitoring the mailing list, and this discussion should be able to continue in my absence. Brian Pirie |
From: Waldo B. <ba...@kd...> - 2000-07-25 22:27:48
|
Hiya, Some portability patches by Michael Matz <ma...@if...> from KDE cvs. Split into two seperate patches. Cheers, Waldo revision 1.4 date: 2000/07/19 00:49:13; author: matz; state: Exp; lines: +7 -4 trying to substitute corels (is that the author?) abominations of advanced shell substitutions with sed calls (like ${value%%:*} with sed -e 's/:.*$//' ) ---------------------------- revision 1.3 date: 2000/06/26 17:45:58; author: matz; state: Exp; lines: +46 -46 Arg. How good, that I have a strong stomach. This was full of bla=`expr BLA ...` where BLA was supposed to be an environment var. ---------------------------- Index: configure.in =================================================================== RCS file: /home/kde/kdesupport/libaps/configure.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- configure.in 2000/06/19 09:49:24 1.2 +++ configure.in 2000/06/26 17:45:58 1.3 @@ -91,7 +91,7 @@ no = : key [default|all][class[,...]]: [default][channel{+-}class[,...]]], - [if test $APSCFG_DEBUG -ne 0; then + [if test "$APSCFG_DEBUG" -ne 0; then if test "$enableval" = "no"; then value=":" else @@ -103,7 +103,7 @@ ) APSCFG_DEBUG_TRACE=0 APSCFG_DEBUG_DEF_CHANNELS="" -if test $APSCFG_DEBUG -eq 0; then +if test "$APSCFG_DEBUG" -eq 0; then AC_MSG_RESULT(no: debugging disabled) else channels=${value#*:} @@ -112,12 +112,12 @@ for class in $classes; do case $class in all) APSCFG_DEBUG_TRACE=31;; - default) APSCFG_DEBUG_TRACE=`expr APSCFG_DEBUG_TRACE | 15 `;; - msg) APSCFG_DEBUG_TRACE=`expr APSCFG_DEBUG_TRACE | 1 `;; - warn) APSCFG_DEBUG_TRACE=`expr APSCFG_DEBUG_TRACE | 2 `;; - error) APSCFG_DEBUG_TRACE=`expr APSCFG_DEBUG_TRACE | 4 `;; - fixme) APSCFG_DEBUG_TRACE=`expr APSCFG_DEBUG_TRACE | 8 `;; - trace) APSCFG_DEBUG_TRACE=`expr APSCFG_DEBUG_TRACE | 16 `;; + default) APSCFG_DEBUG_TRACE=`expr $APSCFG_DEBUG_TRACE | 15 `;; + msg) APSCFG_DEBUG_TRACE=`expr $APSCFG_DEBUG_TRACE | 1 `;; + warn) APSCFG_DEBUG_TRACE=`expr $APSCFG_DEBUG_TRACE | 2 `;; + error) APSCFG_DEBUG_TRACE=`expr $APSCFG_DEBUG_TRACE | 4 `;; + fixme) APSCFG_DEBUG_TRACE=`expr $APSCFG_DEBUG_TRACE | 8 `;; + trace) APSCFG_DEBUG_TRACE=`expr $APSCFG_DEBUG_TRACE | 16 `;; # *) AC_MSG_WARN("Unrecognized trace class: $class");; esac done @@ -127,17 +127,17 @@ APSCFG_DEBUG_DEF_CHANNELS="$channels" classes="" - if test `expr APSCFG_DEBUG_TRACE & 1 ` -ne 0; then + if test `expr $APSCFG_DEBUG_TRACE & 1 ` -ne 0; then classes="${classes}msg,"; fi - if test `expr APSCFG_DEBUG_TRACE & 2 ` -ne 0; then + if test `expr $APSCFG_DEBUG_TRACE & 2 ` -ne 0; then classes="${classes}warn,"; fi - if test `expr APSCFG_DEBUG_TRACE & 4 ` -ne 0; then + if test `expr $APSCFG_DEBUG_TRACE & 4 ` -ne 0; then classes="${classes}error,"; fi - if test `expr APSCFG_DEBUG_TRACE & 8 ` -ne 0; then + if test `expr $APSCFG_DEBUG_TRACE & 8 ` -ne 0; then classes="${classes}fixme,"; fi - if test `expr APSCFG_DEBUG_TRACE & 16 ` -ne 0; then + if test `expr $APSCFG_DEBUG_TRACE & 16 ` -ne 0; then classes="${classes}trace,"; fi - if test $APSCFG_DEBUG_TRACE -eq 0; then + if test "$APSCFG_DEBUG_TRACE" -eq 0; then classes="no" else classes=${classes%,} @@ -153,7 +153,7 @@ [if test "$enableval" != "no"; then APSCFG_PROFILE=1; else APSCFG_PROFILE=0; fi] ) -if test $APSCFG_PROFILE -eq 0; then +if test "$APSCFG_PROFILE" -eq 0; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) @@ -192,7 +192,7 @@ [if test "$enableval" = "no"; then APSCFG_INLINE=0; else APSCFG_INLINE=1; fi] ) -if test $APSCFG_INLINE -eq 0; then +if test "$APSCFG_INLINE" -eq 0; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) @@ -201,14 +201,14 @@ dnl Create Settings dnl -- make sure we only export true/false values to avoid regenerating dnl config.h for nothing -AC_DEFINE_UNQUOTED(APSCFG_DEBUG, `expr APSCFG_DEBUG != 0 `) +AC_DEFINE_UNQUOTED(APSCFG_DEBUG, `expr $APSCFG_DEBUG != 0 `) AC_DEFINE_UNQUOTED(APSCFG_DEBUG_TRACE, $APSCFG_DEBUG_TRACE) -AC_DEFINE_UNQUOTED(APSCFG_DEBUG_PARANOID, `expr APSCFG_DEBUG_PARANOID != 0 `) +AC_DEFINE_UNQUOTED(APSCFG_DEBUG_PARANOID, `expr $APSCFG_DEBUG_PARANOID != 0 `) AC_DEFINE_UNQUOTED(APSCFG_DEBUG_DEF_CHANNELS, "$APSCFG_DEBUG_DEF_CHANNELS") -AC_DEFINE_UNQUOTED(APSCFG_INLINE, `expr APSCFG_INLINE != 0 `) +AC_DEFINE_UNQUOTED(APSCFG_INLINE, `expr $APSCFG_INLINE != 0 `) dnl we don't export these right now -dnl AC_DEFINE_UNQUOTED(APSCFG_OPTIMIZE, `expr APSCFG_OPTIMIZE != 0 `) -dnl AC_DEFINE_UNQUOTED(APSCFG_PROFILE, `expr APSCFG_PROFILE != 0 `) +dnl AC_DEFINE_UNQUOTED(APSCFG_OPTIMIZE, `expr $APSCFG_OPTIMIZE != 0 `) +dnl AC_DEFINE_UNQUOTED(APSCFG_PROFILE, `expr $APSCFG_PROFILE != 0 `) dnl config.h: Package information dnl PACKAGE and VERSION symbols exported by AM_INIT_AUTOMAKE line @@ -219,8 +219,8 @@ dnl CFLAGS CFLAGS="-O$APSCFG_OPTIMIZE" -if test $APSCFG_DEBUG -ne 0; then CFLAGS="$CFLAGS -g`expr APSCFG_DEBUG - 1 `"; fi -if test $APSCFG_PROFILE -ne 0; then CFLAGS="$CFLAGS -p"; fi +if test "$APSCFG_DEBUG" -ne 0; then CFLAGS="$CFLAGS -g`expr $APSCFG_DEBUG - 1 `"; fi +if test "$APSCFG_PROFILE" -ne 0; then CFLAGS="$CFLAGS -p"; fi CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" CFLAGS="$CFLAGS -Wmissing-declarations -Wpointer-arith" CXXFLAGS="$CFLAGS -Woverloaded-virtual" @@ -229,13 +229,13 @@ dnl config.h: Compiler tests AC_CHECK_SIZEOF(char, 1) dnl produces SIZEOF_CHAR -if test $ac_cv_sizeof_char -ne 1; then +if test "$ac_cv_sizeof_char" -ne 1; then AC_MSG_WARN([sizeof(char) != 1 -- May cause problems with module trackmem.c. (char *)-based arithmetic is used in trackmem.c for locating structures at negative offsets and for sizing buffers of arbitrary length.]) fi AC_CHECK_SIZEOF(int, 4) dnl produces SIZEOF_INT -if test $ac_cv_sizeof_int -lt 4; then +if test "$ac_cv_sizeof_int" -lt 4; then AC_MSG_WARN([sizeof(int) < 4 -- Most functions expect at least 32 bits. For simplicity, most integers are assumed to be at least 32 bits in size and capable of holding unsigned values of up to 2^32-1.]) @@ -262,25 +262,25 @@ dnl - if not, we will use max(sizeof(int), sizeof(double), sizeof(void *)) dnl and round to nearest multiple of sizeof(int) APSCFG_MALLOC_DATAALIGN=0 - if test $ac_cv_sizeof_double -gt $ac_cv_sizeof_int; then - if test $ac_cv_sizeof_double -gt $ac_cv_sizeof_void_p; then - APSCFG_MALLOC_DATAALIGN=$ac_cv_sizeof_double + if test "$ac_cv_sizeof_double" -gt "$ac_cv_sizeof_int"; then + if test "$ac_cv_sizeof_double" -gt "$ac_cv_sizeof_void_p"; then + APSCFG_MALLOC_DATAALIGN="$ac_cv_sizeof_double" else - APSCFG_MALLOC_DATAALIGN=$ac_cv_sizeof_void_p + APSCFG_MALLOC_DATAALIGN="$ac_cv_sizeof_void_p" fi else - if test $ac_cv_sizeof_int -gt $ac_cv_sizeof_void_p; then - APSCFG_MALLOC_DATAALIGN=$ac_cv_sizeof_int + if test "$ac_cv_sizeof_int" -gt "$ac_cv_sizeof_void_p"; then + APSCFG_MALLOC_DATAALIGN="$ac_cv_sizeof_int" else - APSCFG_MALLOC_DATAALIGN=$ac_cv_sizeof_void_p + APSCFG_MALLOC_DATAALIGN="$ac_cv_sizeof_void_p" fi fi - APSCFG_MALLOC_DATAALIGN=`expr APSCFG_MALLOC_DATAALIGN + ac_cv_sizeof_int - 1 ` - APSCFG_MALLOC_DATAALIGN=`expr APSCFG_MALLOC_DATAALIGN / ac_cv_sizeof_int * ac_cv_sizeof_int ` - if test $APSCFG_MALLOC_DATAALIGN -lt 16; then + APSCFG_MALLOC_DATAALIGN=`expr $APSCFG_MALLOC_DATAALIGN + $ac_cv_sizeof_int - 1 ` + APSCFG_MALLOC_DATAALIGN=`expr $APSCFG_MALLOC_DATAALIGN / $ac_cv_sizeof_int * ac_cv_sizeof_int ` + if test "$APSCFG_MALLOC_DATAALIGN" -lt 16; then APSCFG_MALLOC_USERALIGN=16 else - APSCFG_MALLOC_USERALIGN=$APSCFG_MALLOC_DATAALIGN + APSCFG_MALLOC_USERALIGN="$APSCFG_MALLOC_DATAALIGN" fi ;; esac @@ -305,14 +305,14 @@ if test $APSCFG_LPR_BUILD -ne 0; then APSCFG_TRANSPORTS="${APSCFG_TRANSPORTS} lpr" fi -AC_DEFINE_UNQUOTED(APSCFG_LPR_BUILD, `expr APSCFG_LPR_BUILD != 0 `) +AC_DEFINE_UNQUOTED(APSCFG_LPR_BUILD, `expr $APSCFG_LPR_BUILD != 0 `) AC_ARG_ENABLE(lpr-networks, [ --enable-lpr-networks let LPR daemon manage networks [default=no]], [if test "$enableval" != "no"; then APSCFG_LPR_LET_DAEMON_MANAGE_NETWORKS=1; else APSCFG_LPR_LET_DAEMON_MANAGE_NETWORKS=0; fi] ) -AC_DEFINE_UNQUOTED(APSCFG_LPR_LET_DAEMON_MANAGE_NETWORKS, `expr APSCFG_LPR_LET_DAEMON_MANAGE_NETWORKS != 0 `) +AC_DEFINE_UNQUOTED(APSCFG_LPR_LET_DAEMON_MANAGE_NETWORKS, `expr $APSCFG_LPR_LET_DAEMON_MANAGE_NETWORKS != 0 `) dnl config.h: CUPS Transport @@ -323,15 +323,15 @@ [if test "$enableval" != "no"; then APSCFG_CUPS_BUILD=1; else APSCFG_CUPS_BUILD=0; fi] ) -if test $APSCFG_CUPS_BUILD -ne 0; then +if test "$APSCFG_CUPS_BUILD" -ne 0; then AC_CHECK_HEADERS(cups/cups.h) - if test $ac_cv_header_cups_cups_h = "no"; then + if test "$ac_cv_header_cups_cups_h" = "no"; then AC_MSG_WARN("CUPS Transport disabled: unable to find cups/cups.h"); APSCFG_CUPS_BUILD=0 fi fi -AC_DEFINE_UNQUOTED(APSCFG_CUPS_BUILD, `expr APSCFG_CUPS_BUILD != 0 `) -if test $APSCFG_CUPS_BUILD -ne 0; then +AC_DEFINE_UNQUOTED(APSCFG_CUPS_BUILD, `expr $APSCFG_CUPS_BUILD != 0 `) +if test "$APSCFG_CUPS_BUILD" -ne 0; then APSCFG_TRANSPORTS="${APSCFG_TRANSPORTS} cups" fi @@ -349,7 +349,7 @@ AC_CHECK_FUNCS(pathconf) APSCFG_MAX_PATH_SIZE=1024 AC_MSG_CHECKING("for max path size using pathconf") -if test $ac_cv_func_pathconf = "yes"; then +if test "$ac_cv_func_pathconf" = "yes"; then AC_TRY_RUN([ #include <stdlib.h> #include <stdio.h> @@ -373,13 +373,13 @@ } ], [ APSCFG_MAX_PATH_SIZE_TEST=`cat ./conftestPathMax` - if test $APSCFG_MAX_PATH_SIZE_TEST -eq -1; then + if test "$APSCFG_MAX_PATH_SIZE_TEST" -eq -1; then AC_MSG_RESULT("infinite"); APSCFG_MAX_PATH_SIZE=-1 - else if test $APSCFG_MAX_PATH_SIZE_TEST -le 0; then + else if test "$APSCFG_MAX_PATH_SIZE_TEST" -le 0; then AC_MSG_RESULT("undefined : assuming $APSCFG_MAX_PATH_SIZE bytes"); else - APSCFG_MAX_PATH_SIZE=$APSCFG_MAX_PATH_SIZE_TEST + APSCFG_MAX_PATH_SIZE="$APSCFG_MAX_PATH_SIZE_TEST" AC_MSG_RESULT("success : got $APSCFG_MAX_PATH_SIZE bytes") fi fi Index: configure.in =================================================================== RCS file: /home/kde/kdesupport/libaps/configure.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- configure.in 2000/06/26 17:45:58 1.3 +++ configure.in 2000/07/19 00:49:13 1.4 @@ -106,9 +106,11 @@ if test "$APSCFG_DEBUG" -eq 0; then AC_MSG_RESULT(no: debugging disabled) else - channels=${value#*:} - classes=${value%%:*} - classes=${classes//,/ } + channels=`echo $value | sed -e 's/[^:]*://'` + classes=`echo $value | sed -e 's/:.*$//'` + IFS=${IFS= } + save_IFS=$IFS + IFS="," for class in $classes; do case $class in all) APSCFG_DEBUG_TRACE=31;; @@ -121,6 +123,7 @@ # *) AC_MSG_WARN("Unrecognized trace class: $class");; esac done + IFS=$save_IFS if test "$channels" = "default"; then channels="all+error,all+fixme" fi @@ -140,7 +143,7 @@ if test "$APSCFG_DEBUG_TRACE" -eq 0; then classes="no" else - classes=${classes%,} + classes=`echo $classes | sed -e 's/,$//'` fi AC_MSG_RESULT(classes: ${classes} channels: ${APSCFG_DEBUG_DEF_CHANNELS}) |
From: Waldo B. <ba...@kd...> - 2000-07-20 19:35:02
|
Please discuss problems about libaps on "lib...@li..." See http://lists.sourceforge.net/mailman/listinfo/libaps-general On Thu, 20 Jul 2000, Martin A. Marques wrote: > OK, what I got is a Solaris SPARC 8 and I'm trying to compile the latest > kde cvs download (this morming I downloaded) and I got an error trying > to compile kdesupport. This is the output: > > make[4]: Entering directory `/space/pruebas/kde/kdesupport/libaps/src' > /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. > -I./.. -I./.. > /include -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes > -Wmissing-declara > tions -Wpointer-arith -c attrcommon.c > mkdir .libs > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./.. -I./../include -O2 -Wall > -Wmissing-proto > types -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith > -Wp,-MD,.deps/a > ttrcommon.pp -c attrcommon.c -fPIC -DPIC -o .libs/attrcommon.o > In file included from ../config.h:120, > from apsinternal.h:30, > from attrcommon.c:30: > .../acconfiginclude.h:220: parse error > make[4]: *** [attrcommon.lo] Error 1 > make[4]: Leaving directory `/space/pruebas/kde/kdesupport/libaps/src' > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory `/space/pruebas/kde/kdesupport/libaps' > make[2]: *** [all-recursive-am] Error 2 > make[2]: Leaving directory `/space/pruebas/kde/kdesupport/libaps' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/space/pruebas/kde/kdesupport' > make: *** [all-recursive-am] Error 2 > > any idea on what it could be or if I should post this on someother > list??? -- Make way, KDE/Linux is coming to a desktop near you! |
From: Brian P. <br...@co...> - 2000-06-20 14:21:33
|
> Good :-) here is another one. Credits go to Stephan Kulow <co...@kd...> > this time. > > To quote: > replacing bash macros with sh syntax. $(( 1 + 2 )) doesn't work for other > shells. `expr 1 + 2` does Stephan's changes are now committed. Newest code is in CVS @ sourceforge. |
From: Waldo B. <ba...@kd...> - 2000-06-19 21:52:24
|
On Mon, 19 Jun 2000, you wrote: > Thanks for passing on that patch, Waldo. David's changes are now committed > into CVS. > > Brian Good :-) here is another one. Credits go to Stephan Kulow <co...@kd...> this time. To quote: replacing bash macros with sh syntax. $(( 1 + 2 )) doesn't work for other shells. `expr 1 + 2` does Cheers, Waldo -- Make way, KDE/Linux is coming to a desktop near you! |
From: Brian P. <br...@co...> - 2000-06-19 21:34:04
|
Thanks for passing on that patch, Waldo. David's changes are now committed into CVS. Brian Waldo Bastian wrote: > Hiya, > > attached is a patch for compiling libaps with builddir != sourcedir. > > Patch by David Faure <fa...@kd...> > > Would it be somehow possible to install libaps without installing to /etc? > Currently libaps is the only part of KDE for which you need to be root to > install it. > > Cheers, > Waldo > -- > Make way, KDE/Linux is coming to a desktop near you! > > ------------------------------------------------------------------------ > Name: builddir.patch > builddir.patch Type: Plain Text (text/plain) > Encoding: base64 |
From: Brian P. <br...@co...> - 2000-06-19 20:54:56
|
Thanks Waldo! We've now fixed this error. The updated documentation is now on the web site, and also on the sourceforge CVS server. Brian |
From: Waldo B. <ba...@kd...> - 2000-06-19 19:21:09
|
On Mon, 19 Jun 2000, you wrote: > Hi, > > naggin' you again :). No problem, at least someone who cares what I do :-) > Are you going to put the printer config stuff in > KPrinter class, too? Yes, well, maybe :-) The other option is to have "KPrinter" and have let's say "KPrinterConfig" which inherits "KPrinter". And then "KPrinter" just provides read-access to the printer attributes and with KPrinterConfig you can change them as well. The latter would only be needed by the yet to be made "configure printer" dialog. > Seems like no piece of sysAPS should stay i the > KPrinter API - so all sysAPS related things will be accessed via KPrinter > methods, right? Yes. That's the idea. > I have no idea how you are going to implement all your > things from your RFC...putting all into the KPrinter class? I wanna help, > but i dont know how :).... Well, I don't have a clear idea about how to do everything yet. It's basically just playing around and then see how things fit in. Just some random thoughts: 1) If possible, I would like to load libaps and all printer stuff on demand only. I am not sure if that is feasible or whether that makes actual sense, but on first sight it makes sense I guess. Anyway, that means that the API should not contain direct references to libaps. No idea if this turns out to be a silly idea. 2) Does libaps report paper-sizes to you? I get error-code 6. I have added code to default to a default list of paper-size in this case, but would like to use the paper-sizes reported by libaps. Any thoughts on this? Or am I supposed to configure the paper-sizes first with the yet-non-existing printer configuration dialog? :-] Cheers, Waldo -- Make way, KDE/Linux is coming to a desktop near you! |
From: Waldo B. <ba...@kd...> - 2000-06-15 22:05:05
|
Hiya, api.html contains: 3.7.4.12 Aps_AttrQuickGetPageSizeOptions() Obtains a list of available pre-defined pages sizes. Aps_Result Aps_AttrQuickGetAvailPageSizeOptions( Aps_JobAttrHandle jobAttributes, Aps_PageSize ***pageSizes, int *numPageSizes); Aps_AttrQuickGetAvailPageSizeOptions should be Aps_AttrQuickGetPageSizeOptions Cheers, Waldo -- Make way, KDE/Linux is coming to a desktop near you! |
From: Waldo B. <ba...@kd...> - 2000-06-15 18:52:43
|
Hiya, attached is a patch for compiling libaps with builddir != sourcedir. Patch by David Faure <fa...@kd...> Would it be somehow possible to install libaps without installing to /etc? Currently libaps is the only part of KDE for which you need to be root to install it. Cheers, Waldo -- Make way, KDE/Linux is coming to a desktop near you! |
From: Waldo B. <ba...@kd...> - 2000-06-14 00:25:02
|
On Tue, 13 Jun 2000, you wrote: > Hi Waldo, > > > E.g. with a printcap entry like: > > > > lp|ap|arpa|ucbarpa|LA-180 DecWriter III:\ > > > > I get "ap" as name. I rather would be able to show "LA-180 DecWriter III" > > to the user. > > Coincidentally, this is something that I've been working on today. The > heuristic that I'm using is, when a printcap entry has multiple alias > names, to prefer the first one that contains a space character as the > primary name for that printer. Do you think this rule of thumb will cover > most situations? The alternative that I thought of was to select the > longest of the names. Maybe you could differentiate between "primary name" and "human readable name" I can imagine that CUPS or so allows you to set a description for a printer. Such a description could then be used as the "human readable name". > > Slightly related, all strings are represented as "const char *". Assuming > > that in some cases these strings are user defined it would be usefull to > > define in the API what the character encoding of such a string is > > supposed to be. utf8 seems a good candidate to me. > > I can certainly see the use in this. I have to admit that I am not > personally an expert in different character encodings nor > localization/globalization issues in general. Can you give me more > information on what this character set is, and what alternatives we could > potentially specify? The idea is that there are more characters than defined by ASCII and that there are even more characters as fit in a single byte. A character encoding defines a way to map a set of characters to byte-values. The most simple ones are those that map a single character to a single byte-value. Examples of such encodings are ASCII, latin-1, latin-2, etc. It is obvious that such an encoding can never define more than 256 characters. It is equally obvious that there are characters which have a byte-value defined in one encoding, but not in another encoding. Since this started to become a bit of a mess, people invented unicode. unicode defines a lot of characters and gives them all a unique value. Typically they gave them a value that fits in 16 bits. Since a lot of computer programs think of text as sequences of bytes (char) an encoding mechanism has been introduced that encodes these 16-bit unicode values into one or more(!) bytes in a sort of clever way, this is called utf8. If you have characters in a certain encoding it is always possible to convert them to unicode. E.g. you can translate every latin1 string to a corresponding unicode string. The other way around is not true, a unicode string might contain characters that don't have a representation in latin1. With utf8 you do not have this problem. Unfortunately not everyone today uses utf8, some still use e.g. latin1 (because if you only write english texts you don't really need these other characters much). A users "locale" defines which encoding this user typically uses e.g. for filenames and such. Assuming that you don't want to discriminate anyone who happens to use a certain range of characters the options for defining a encoding in an interface are basically limited to "utf8" because it can represent every possible character, or "the encoding specified in the locale" since that is the one that the user has choosen. Note that the user could have chosen to use utf8 in his locale. E.g. all filenames are typically encoded with "the encoding specified in the locale". The problem of using "the encoding specified in the locale" is that the string might originate from another system/other user which might have another locale and that you then have to convert this to the locale in use by this user and in such a conversion you might loose information. For a more accurate description of this topic see http://www.unicode.org. Cheers, Waldo -- Make way, KDE/Linux is coming to a desktop near you! |
From: Waldo B. <ba...@kd...> - 2000-06-14 00:25:01
|
On Tue, 13 Jun 2000, you wrote: > Waldo, > > > I'm working on migrating KDE 2.x to a APS based printing solution. As > > such I have added v1.0 of libaps to kdesupport. Since it needs to write > > to /etc it needs to be root so I haven't made it install by default. So > > you need to pass --with-aps when configuring kdesupport. > > Suffice it to say that I'm very interested in what you're doing here, and > what you have in mind. Is any of your code available (e.g. committed) yet, > or are you still working on it locally? > > Brian See below for what I have in mind :-) I have some code which I will commit to kdelibs/kprint this afternoon. It doesn't do much yet though. Cheers, Waldo RFC: Printing in KDE 2.0 ======================== Date: May 22, 2000 Author: Waldo Bastian Printing support in KDE has not been changed since KDE 1.1.2. As such it is not completely up to spec with the rest of KDE 2.0. In this document a printing architecture for KDE 2.0 is proposed. Requirements ============ Four different desired printing related abilities can be identified within KDE: 1) The ability of a user to select a printer from the list of installed printers to be used for a print request and to select, possibly application specific, options for the print request. 2) The ability of a user to be notified of the status of his outstanding print requests and the ability for the user to cancel outstanding print requests. 3) The ability of an application to query the properties of the printer used for a certain print request as well as options specified by the user for this specific print request. 4) The ability of a user to add and configure a printer. Status in KDE 1.1.2 =================== Ad 1) QPrintDialog provides this functionality in KDE 1.1.2. The drawbacks are that this dialog does not fit in well with the KDE translation meachanism and that it is not possible to add application specific options to this dialog. Ad 2) In KDE 1.1.2 applications exists which provide this functionality. The user has to start these applications explicitly. There is no integration with the application that issued the print-request. Ad 3) The QPrinter class provides basic information about the printer and the specific print request, mostly based on information supplied by the user. Ad 4) KDE 1.1.2 provides no way to do this. Proposed KDE 2.0 printing architecture ====================================== I suggest to adopt sysAPS as API to access the operating systems printing system, e.g. CUPS or LPR: KDE -> sysAPS -> IPP -> CUPS -> filters -> driver -> backend -> LPR -> filters -> driver -> backend Other printing systems can be supported by adding support for them to sysAPS. To quote the sysAPS homepage: "This project, driven by Corel, provides a unified API for accessing printing-specific services outside the realm of the graphics API. This includes querying & controlling features of a given printer model, sending jobs, accessing queues and configuration." sysAPS is under LGPL, is written in C and has both a C as well as an optional C++ API. It is a rather young project so it should not be a problem to adapt to any specific wishes in the API. You can find them at http://sourceforge.net/project/?group_id=2328. Based on sysAPS it will be relatively straightforward to meet KDEs printing requirements: 1) A KPrintDialog based on KDIalogBase should be made. It can use sysAPS to query for available printers and enable/disable available options based on the capabilities of the selected printer. 2) A notification/control interface should be made for printing job-control. sysAPS seems to provide all necassery functionality. We only need to provide the UI. Maybe this can be part of kio_uiserver. Maybe it should be made a seperate application. 3) For now the QPrinter class seems to be adequate. It might be desirable to embed this class in a KPrinter class to make it possible to add KDE wide options not provided by Qt. In addition this class could give access to a printer's PPD file allowing applications to fine tune their print output. 4) A kcontrol module should be written which allows printer configuration. sysAPI seems to provided al necassery functionality. Only the GUI part needs to be added. Considerations ============== *) The proposed printing architecture is not limited to Postscript output, although that is what the Qt printing classes produce. *) The proposed sysAPS library can be used by non-KDE applications, including command line tools. Although the GNOME project is not interested in cooperation in this area, there are no compelling technical reasons which prevent them from adopting sysAPS, now or in the future. -- Make way, KDE/Linux is coming to a desktop near you! |
From: Brian P. <br...@co...> - 2000-06-13 20:02:32
|
Waldo, > I'm working on migrating KDE 2.x to a APS based printing solution. As such I > have added v1.0 of libaps to kdesupport. Since it needs to write to /etc it > needs to be root so I haven't made it install by default. So you need to pass > --with-aps when configuring kdesupport. Suffice it to say that I'm very interested in what you're doing here, and what you have in mind. Is any of your code available (e.g. committed) yet, or are you still working on it locally? Brian |
From: Brian P. <br...@co...> - 2000-06-13 19:55:24
|
Hi Waldo, > E.g. with a printcap entry like: > > lp|ap|arpa|ucbarpa|LA-180 DecWriter III:\ > > I get "ap" as name. I rather would be able to show "LA-180 DecWriter III" to > the user. Coincidentally, this is something that I've been working on today. The heuristic that I'm using is, when a printcap entry has multiple alias names, to prefer the first one that contains a space character as the primary name for that printer. Do you think this rule of thumb will cover most situations? The alternative that I thought of was to select the longest of the names. > Slightly related, all strings are represented as "const char *". Assuming > that in some cases these strings are user defined it would be usefull to > define in the API what the character encoding of such a string is supposed to > be. utf8 seems a good candidate to me. I can certainly see the use in this. I have to admit that I am not personally an expert in different character encodings nor localization/globalization issues in general. Can you give me more information on what this character set is, and what alternatives we could potentially specify? -- Brian Pirie Project Leader - Printing Technologies Corel Corporation br...@co... (613) 728-8200 x1407 |
From: Waldo B. <ba...@kd...> - 2000-06-13 19:45:21
|
Hiya, I'm working on migrating KDE 2.x to a APS based printing solution. As such I have added v1.0 of libaps to kdesupport. Since it needs to write to /etc it needs to be root so I haven't made it install by default. So you need to pass --with-aps when configuring kdesupport. I also started looking at a simple print dialog based on libAPS and one of the first things that I noted was that, using LPR as spooler, the names of the printers are a bit cryptic. E.g. with a printcap entry like: lp|ap|arpa|ucbarpa|LA-180 DecWriter III:\ I get "ap" as name. I rather would be able to show "LA-180 DecWriter III" to the user. Slightly related, all strings are represented as "const char *". Assuming that in some cases these strings are user defined it would be usefull to define in the API what the character encoding of such a string is supposed to be. utf8 seems a good candidate to me. Cheers, Waldo -- Make way, KDE/Linux is coming to a desktop near you! |
From: Brian P. <br...@co...> - 2000-05-30 16:54:30
|
Stephan, This is a very good point! If you dig into the code, you'll see that there is already a certain amount of support implemented for this, but it needs to be made accessible at the API level via a simple function. Internally, LprJobDispatch() passes on the document title via the docTitle member of Aps_QuickJobInfo. The new API function would just need to provide a means of setting this Aps_QuickJobInfo structure member in a particular job. Stephan Heigl wrote: > Hi, > > what about adding a function to the JobDispatching stuff to name jobs or pass > comments along with jobs so the user see a comment in his/her printmon > program instead of mysty these ID's. > > regards > > stephan > > _______________________________________________ > Libaps-general mailing list > Lib...@li... > http://lists.sourceforge.net/mailman/listinfo/libaps-general -- Brian Pirie Project Leader - Printing Technologies Corel Corporation br...@co... (613) 728-8200 x1407 |
From: Stephan H. <st...@he...> - 2000-05-30 15:27:07
|
Hi, what about adding a function to the JobDispatching stuff to name jobs or pass comments along with jobs so the user see a comment in his/her printmon program instead of mysty these ID's. regards stephan |
From: Jeff B. <kl...@ma...> - 2000-04-28 21:09:13
|
From: "Jeff Brown" <jef...@co...> Subject: Idea for attributes -- Comparing / Calculating difference Date: Tuesday, March 07, 2000 1:35 am Hello, I was just thinking that it would be useful to be able to perform a few special operations on Job attributes to increase efficiency and perhaps improve functionality as well. Things of this nature could be useful for doing things like selective updating, or marking settings which differ from defaults in a UI, or assist in logging or debugging by indicating explicitely what has changed from one run to another. Brian: Since this is your baby, what do you think? [Loosly C-style pseudo-code] /* Compare a setting between attr1 and attr2 */ Aps_Result Aps_AttrCompare(Aps_JobAttrHandle attr1, Aps_JobAttrHandle attr2, const char *attributeID, int *equal) { if ((attr1 has attributeID) && (attr2 has attributeID)) { *equal = (attr1.attributeID == attr2.attributeID); return APS_SUCCESS; } else { *equal = FALSE; return APS_NOT_FOUND; } } /* Report settings in attr1 that are not in attr2 or different from those in attr2 */ /* ie. attr2 is reference copy and attr1 is local storage */ /* N.B. target not created if no diffs... */ Aps_Result Aps_AttrDiffAll(Aps_JobAttrHandle attr1, Aps_JobAttrHandle attr2, Apr_JobAttrHandle *target) { foreach(attributeID in attr1) { int equal; if (APS_NOT_FOUND == Aps_AttrCompare(attr1, attr2, attributeID, & equal) || (equal)) { if (! *target) *target = new Aps_JobAttrHandle; Aps_AttrSetSetting(*targer, attributeID, attr1); } } return APS_SUCCESS; } /* Update settings which differ from attr1 to attr2 into attr2 */ /* ie. attr2 is reference copy and attr1 is local storage */ Aps_Result Aps_AttrUpdateAll(Aps_JobAttrHandle attr1, Aps_JobAttrHandle attr2) { return Aps_AttrDiffAll(attr1, attr2, attr2); } /* Enumerate attributes through a callback */ Aps_Result Aps_AttrEnumerate(Aps_JobAttrHandle attr, int (*enumfunc)(Aps_JobAttrHandle, const char *attributeID)) { foreach(attributeID in attr) { if (enumfunc(attr, attributeID)) break; } return APS_SUCCESS; } |
From: Jeff B. <kl...@ma...> - 2000-04-28 21:02:50
|
From: "Jeff Brown" <jef...@co...> Subject: Identification of object types Date: Wednesday, February 09, 2000 5:22 pm APS needs a mechanism for providing the application with the type of an object given its handle. This could be used if the application caches objects aggressively and needs to find out what they are. Alternately, it could be used to protect filter functions from being applied to the wrong type of object. Note, the problem with filters applies only to those created as callbacks by the application. APS handles internally checks the target object type before applying a filter. Jeff Brown (x5625). |
From: Jeff B. <kl...@ma...> - 2000-04-28 21:02:46
|
From: "Jeff Brown" <jef...@co...> Subject: Common printer configuration storage Date: Friday, February 18, 2000 5:29 pm Hello everyone, Since a significant part of the new APS involves installation and configuration of printers, it makes sense for these things to become externally visible to the system in some pre-defined standard way. However this is a non-trivial matter as APS must be made to communicate with MANY different potential underlying transports. Therefore APS may need to provide information in many different forms to satisfy each... ... or it may not. It may simply write out configuration information in some standard form to a directory under /etc/. That way all of the information is available, not just the subset that may or may not be understood by a given transport. This also gives us a great place to store any configuration elements that would be processed by APS internally (like translations of various types, header page creation, accounting and logging, etc...) Assuming APS gets a common repository for printer configuration information, then what? Well... should APS be told to use that information exclusively, or should the user be able to indicate that he/she wants APS to be "friendly" to some other installed print system. This brings about several possible behaviours: 1. APS uses its internal records exclusively and verifies/regenerates configuration files for subordinate transports 2. APS stores everything it knows in its internal records but allows the user to choose one of the following: a. work blindly (do not verify external configuration files) b. check for inconsistencies, and import any differences c. check for inconsistencies, and report any differences d. as with 'c' but grant the user the option of importing differences, ignoring them, or obliterating them. As for why this is necessary, consider the case of the print filters. For LPR, APS knows many things the transport does not, and could not ever hope to know, namely, what KIND of printer is attached, and HOW to communicate with it (what driver). APS therefore needs to get in the middle somehow and either intercept traffic before it enters the transport, or after it exits but before it reaches the printer. The most flexible option is to intercept traffic just before it gets sent to the printer, and thankfully, this is a simple task: you just set up a print filter. Under LPR (and in most other cases), the transport receives data blindly... eg. in some arbitrary format. It does not may any attempt to format it for the printer, nor should it, as its sole purpose is to pass what it receives down the pipe. For the user's benefit, however, APS has to get in there and make sure that all it well and that you're not trying to do anything stupid like print postscript to a non-postscript printer, or print a JPEG file without first translating that into the a representation that the printer can understand. APS depends on filters inserted into the output stream to perform all of the necessary translations on behalf of the user. However doing so requires knowledge of what kind of printer you have, what it understands, what paper sizes it handles, how it should do colour correction, dithering, downsampling or upsampling, and what drivers exist to help us out. Ideally, a filter should be provided with a single parameter: What printer am I? It should then look up in the APS database to find out anything else it needs. First it should pass the data through a common filter script used by APS to convert the source data to a common representation (Postscript seems like a good idea). Then it should use another common APS script to perform the other required transformations. Finally it should take the output and send it to the correct driver for printing... As this step may vary from transport to transport, it is unwise for it to be accomplished by a common APS script and should really be done on a per-transport basis. Sorry... I have to run to catch a train! Thoughts anyone? Jeff Brown. (x5625) From: "Brian Pirie" <br...@co...> Subject: Re: Common printer configuration storage Date: Tuesday, February 22, 2000 12:23 pm Hi Jeff, This issue is the programming work that I've been looking at recently. The basic mechanism is to create a per-printer configuration file, with per-user and system-wide copies. This allows for individual user configuration of their printing preferences without affecting other users, while also allowing the sysadmin to do machine-wide configuration. (I know that I haven't responded to each individual issues raised in your posting, but I hope to talk about your ideas in more detail when I can give this the attention it deserves.) Brian |
From: Jeff B. <kl...@ma...> - 2000-04-28 21:02:45
|
From: "Jeff Brown" <jef...@co...> Subject: Verification of named objects / components Date: Monday, February 14, 2000 1:08 pm Idea: ===== Perform additional verifications of all named object / components which are to be handled by APS. For example, check string length for maximum size and contents for invalid characters. Proposal: ========= Create a set of standard functions to be used in performing validation of names and parameters on a semi-automatic basis. Such functions would use a constant description of the type of tests to be performed and would adjust/modify any names as required by the implementation. The description may be either explicit, as in a table, or implicit, by the code structure itself, or a mixture of both. Explicit description: Aps_Result verifyName(const StringCharacteristics *table, const char *inString, char *outString) { <code uses the table to perform a series of checks then copies the input parameter to the provided buffer> <returns: APS_NAME_TOO_LONG (error), APS_NAME_TRUNCATED (warning), APS_NAME_INVALID_CONTENTS (error), APS_NAME_TRANSLATED (warning), APS_NAME_REJECTED (generic error), etc... } Implicit description: Aps_Result LprPrinterVerifyName(const char *inString, char *outString) { <code performs checks directly and knows the special layout required by this subsystem> <returns as above> } Mixture: Aps_Result LprPrinterVerifyName(const char *inString, char *outString) { <for routine checks; code uses generic functions with an explicit description of what is being tested> <for special checks; code performs special verifications knowing the layout required by this subsystem> <returns as above> Affected areas: =============== Any subsystems which must deal with input from the application (directly or indirectly). eg. Perform checks for validity of printer names - APS may admit names with spaces and of a certain length - Lpr does not admit names containing control characters, spaces, and may limit name length due to constraints imposed by underlying filesystem or server. (eg. Lpr printer names should not exceed 30 or so characters because some daemon and client implementations use small fixed length buffers for communication purposes) - Direct consequence: if spaces, control chars or ':', '\', etc... are admitted, LprAddPrinter will gladly insert an invalid entry into your printcap file for you. LprRemovePrinter will not be able to remove the new entry because it will not know of its existence. eg. Check job names for control characters - Lpr will get confused if presented with a \n in any name or title eg. Translate document infomation - docTitle is presented to Lpr using the "T" tag in its control files. Again '\n' will confuse Lpr but we do not wish to fail in this case. It would be preferable to transparently modify/encode the provided data instead. eg. Testing filename/pathname length - APS deals with filenames in many areas using fixed-length buffers. While one could assume filenames will never exceed MAX_FILENAME_LENGTH (sp?), the code would be somewhat cleaner if this check were done explicitely. At the same time, testing for invalid characters in filenames may save APS some backing out if file-open fails. eg. Asking the filesystem what it can do - Some filesystems are not case-sensitive or have different restrictions from elsewhere. A validation operation could ask the filesystem if it can handle a particular filename, and fail gracefully. Ideas anyone? Feb. 14, 2000, Jeff Brown (x5625) |