Aloha!
1.
From: Werner LEMBERG <[EMAIL PROTECTED]>
> > > Does the following snippet, compiled as a small program, works for
> > > you?
> > >
> > > #include <stdio.h>
> > > #include <sys/time.h>
> > >
> > > void
> > > main(void)
> > > {
> > > time_t now = 1154016900;
> > > printf("%s", ctime(&now));
> > > }
> >
> > Starting program:
> > /usr/src/mypackages/latex-cjk/latex-cjk-japanese-wadalab-0.20050817/test
> >
> > Program received signal SIGSEGV, Segmentation fault.
>
> Uh, oh, this looks indeed like a bug on your platform :-( Can you do
> some internet search on problems related to `ctime'? Maybe this has
> already been reported, and a workaround is available. Or maybe the
> code in wftodm is incorrect...
No problemo anymore!
I changed
#include <sys/time.h>
into
#include <time.h>
and it works!
$ ./test
Thu Jul 27 18:15:00 2006
wftodm also works now! Marvellous.
It has the following warnings, but I don't think they're serious.
"
wftodm.c:58: warning: return type defaults to ‘int’
wftodm.c: In function ‘compute_fc’:
wftodm.c:69: warning: ‘return’ with no value, in function returning non-void
wftodm.c:73: warning: ‘return’ with no value, in function returning non-void
wftodm.c: At top level:
wftodm.c:100: warning: return type defaults to ‘int’
wftodm.c: In function ‘readfiles’:
wftodm.c:104: warning: unused variable ‘kcode_low’
wftodm.c: At top level:
wftodm.c:129: warning: return type defaults to ‘int’
wftodm.c: In function ‘main’:
wftodm.c:158: warning: implicit declaration of function ‘output_pfa’
wftodm.c:159: warning: implicit declaration of function ‘output_afm’
wftodm.c: At top level:
wftodm.c:164: warning: return type defaults to ‘int’
wftodm.c:196: warning: return type defaults to ‘int’
wftodm.c:230: warning: return type defaults to ‘int’
wftodm.c: In function ‘output_pfa’:
wftodm.c:242: warning: implicit declaration of function ‘init_crypt’
wftodm.c:243: warning: implicit declaration of function ‘e_putchar’
wftodm.c:247: warning: implicit declaration of function ‘e_printf’
wftodm.c:231: warning: unused variable ‘charlen’
wftodm.c:231: warning: unused variable ‘len’
wftodm.c: At top level:
wftodm.c:301: warning: return type defaults to ‘int’
wftodm.c: In function ‘e_printf’:
wftodm.c:305: warning: pointer targets in passing argument 1 of ‘sprintf’
differ in signedness
wftodm.c:306: warning: pointer targets in passing argument 1 of ‘strlen’ differ
in signedness
wftodm.c: At top level:
wftodm.c:311: warning: return type defaults to ‘int’
wftodm.c: In function ‘e_putchar’:
wftodm.c:313: warning: implicit declaration of function ‘encrypt_char’
wftodm.c: At top level:
wftodm.c:320: warning: return type defaults to ‘int’
wftodm.c:325: warning: return type defaults to ‘int’
wftodm.c: In function ‘init_crypt’:
wftodm.c:323: warning: control reaches end of non-void function
wftodm.c: In function ‘e_putchar’:
wftodm.c:316: warning: control reaches end of non-void function
wftodm.c: In function ‘e_printf’:
wftodm.c:309: warning: control reaches end of non-void function
wftodm.c: In function ‘output_pfa’:
wftodm.c:298: warning: control reaches end of non-void function
wftodm.c: In function ‘output_header’:
wftodm.c:228: warning: control reaches end of non-void function
wftodm.c: In function ‘output_afm’:
wftodm.c:192: warning: control reaches end of non-void function
wftodm.c: In function ‘main’:
wftodm.c:162: warning: control reaches end of non-void function
wftodm.c: In function ‘readfiles’:
wftodm.c:126: warning: control reaches end of non-void function
"
Check out http://lists.debian.org/debian-amd64/2006/07/msg00461.html .
Apparently on my system with libc6-dev, sys/time.h and time.h are two
different files in /usr/lib. Curious.
2.
One small thing is bothering me though (this also happened on i386).
In my Makefile I always had the problem that wftodm would work with
dg, dm, mc and mr, but would fail with mc2 and mr2. When run
manually, all the commands have no problem, but when mc2 and mr2 are
put in a Makefile, they end with "error 192".
./wftodm -FontBase mc2 wadalab-mincho-1-8/min*.ps
make: *** [build-stamp] Fout 192
So I need to put "-" in front of the wftodm command for mc2 and mr2 in
order to ignore the error and continue with the rest.
I think the reason is that wftodm always expects *two* directories as
arguments. I've run
./wftodm -FontBase dm wadalab-sym/jis*.ps
instead of
./wftodm -FontBase dg wadalab-sym/jis*.ps wadalab-gothic-0-13/goth-*.ps
and it too fails with exit code 0300.
"
$ gdb --args ./wftodm -FontBase mc2 wadalab-mincho-1-8/min*.ps
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...Using host libthread_db library
"/lib/libthread_db.so.1".
(gdb) r
Starting program:
/usr/src/mypackages/latex-cjk/latex-cjk-japanese-wadalab-0.20050817/build/wftodm
-FontBase mc2 wadalab-mincho-1-8/min-1-30.ps wadalab-mincho-1-8/min-1-31.ps
wadalab-mincho-1-8/min-1-32.ps wadalab-mincho-1-8/min-1-33.ps
wadalab-mincho-1-8/min-1-34.ps wadalab-mincho-1-8/min-1-35.ps
wadalab-mincho-1-8/min-1-36.ps wadalab-mincho-1-8/min-1-37.ps
wadalab-mincho-1-8/min-1-38.ps wadalab-mincho-1-8/min-1-39.ps
wadalab-mincho-1-8/min-1-3a.ps wadalab-mincho-1-8/min-1-3b.ps
wadalab-mincho-1-8/min-1-3c.ps wadalab-mincho-1-8/min-1-3d.ps
wadalab-mincho-1-8/min-1-3e.ps wadalab-mincho-1-8/min-1-3f.ps
wadalab-mincho-1-8/min-1-40.ps wadalab-mincho-1-8/min-1-41.ps
wadalab-mincho-1-8/min-1-42.ps wadalab-mincho-1-8/min-1-43.ps
wadalab-mincho-1-8/min-1-44.ps wadalab-mincho-1-8/min-1-45.ps
wadalab-mincho-1-8/min-1-46.ps wadalab-mincho-1-8/min-1-47.ps
wadalab-mincho-1-8/min-1-48.ps wadalab-mincho-1-8/min-1-49.ps
wadalab-mincho-1-8/min-1-4a.ps wadalab-mincho-1-8/min-1-4b.ps
wadalab-mincho-1-8/min-1-4c.ps wadalab-mincho-1-8/min-1-4d.ps
wadalab-mincho-1-8/min-1-4e.ps wadalab-mincho-1-8/min-1-4f.ps
wadalab-mincho-1-8/min-1-50.ps wadalab-mincho-1-8/min-1-51.ps
wadalab-mincho-1-8/min-1-52.ps wadalab-mincho-1-8/min-1-53.ps
wadalab-mincho-1-8/min-1-54.ps wadalab-mincho-1-8/min-1-55.ps
wadalab-mincho-1-8/min-1-56.ps wadalab-mincho-1-8/min-1-57.ps
wadalab-mincho-1-8/min-1-58.ps wadalab-mincho-1-8/min-1-59.ps
wadalab-mincho-1-8/min-1-5a.ps wadalab-mincho-1-8/min-1-5b.ps
wadalab-mincho-1-8/min-1-5c.ps wadalab-mincho-1-8/min-1-5d.ps
wadalab-mincho-1-8/min-1-5e.ps wadalab-mincho-1-8/min-1-5f.ps
wadalab-mincho-1-8/min-1-60.ps wadalab-mincho-1-8/min-1-61.ps
wadalab-mincho-1-8/min-1-62.ps wadalab-mincho-1-8/min-1-63.ps
wadalab-mincho-1-8/min-1-64.ps wadalab-mincho-1-8/min-1-65.ps
wadalab-mincho-1-8/min-1-66.ps wadalab-mincho-1-8/min-1-67.ps
wadalab-mincho-1-8/min-1-68.ps wadalab-mincho-1-8/min-1-69.ps
wadalab-mincho-1-8/min-1-6a.ps wadalab-mincho-1-8/min-1-6b.ps
wadalab-mincho-1-8/min-1-6c.ps wadalab-mincho-1-8/min-1-6d.ps
Program exited with code 0300.
"
It's not a big problem; I could always solve it with "-".
Cheers
Danai SAE-HAN
韓達耐
--
题目:《春日》
作者:秦观(1049-1100)
一夕轻雷落万丝,霁光浮瓦碧参差。
有情芍药含春泪,无力蔷薇卧晓枝。
_______________________________________________
Cjk maillist - [email protected]
http://lists.ffii.org/mailman/listinfo/cjk