Re: [9fans] native library: linking err

2011-03-15 Thread Steve Simon
graphviz package in my contrib is (I believe) documented here:

http://www.graphviz.org/

 Would that be the right choice when I care mostly drawing areas filled with
 color and pattern, with some basic text functions?

sounds like a job for pic(1) - A friend of troff. Troff has a postscript 
backend,
and you can generate postscript files using somthing like:

pic drawing.ms | troff -ms | lp -d stdout  drawing.ps

and then, if you like

ps2pdf drawing.ps  drawing.pdf

-Steve



Re: [9fans] native library: linking err

2011-03-15 Thread Peter A. Cejchan
 sounds like a job for pic(1) - A friend of troff. Troff has a  postscript
backend,


pic if fine, but I think it can't do areas delimited by bezier curves, and
filled w/color+hash, does it?

BTW, ps2pdf (it is a part of gs, isn't it?) emitted a (huge) bitmap wrapped
in pdf, last time I used it ... did anything change?

the dichotomy in raster/vector always irritated me
(e.g., why do we have grap/graph, when  a raster/vector backends would do
the work, for all alikes, cleaner, imho)...but it is another story...

Well. I followed the hints given earlier in this thread, and, voila,
everything compiles and links fine by now, the update is on contrib

the  ugly rendering of hash patterns is not due to the porting issues, it is
present in original (gnu-ish) distro as well ... will need some diving into
PS language, I'm afraid...
Thank you all for help,

++pac


Re: [9fans] native library: linking err

2011-03-15 Thread Peter A. Cejchan
st...@quintile.net wrote:

 graphviz package in my contrib is (I believe) documented here:

 graphviz is OK, i just wanted to steal some ps-generating functions from
psgen.c (in dotneato/common) but i was not sure abou the meaning of some
params...
do you think that psgen.c would be a candidate for a lightweight PS-emitting
lib??

Thanks,
++pac.


Re: [9fans] native library: linking err

2011-03-14 Thread Peter A. Cejchan
the error message is like this:

8l box.8 pslib.8 ...
??none?? incompatible type signetures c2d44e4 (pslib.8) and affc2df4
(pslist.8) for dlst_freenode

what does it mean?
++pac


Re: [9fans] native library: linking err

2011-03-14 Thread Charles Forsyth
it means that dlst_freenode is declared as one type in the scope of pslib.c
and another different type in the scope of pslist.c, which is wrong.---BeginMessage---
the error message is like this:

8l box.8 pslib.8 ...
??none?? incompatible type signetures c2d44e4 (pslib.8) and affc2df4
(pslist.8) for dlst_freenode

what does it mean?
++pac
---End Message---


Re: [9fans] native library: linking err

2011-03-14 Thread Peter A. Cejchan
sorry, type is void *fn()


Re: [9fans] native library: linking err

2011-03-14 Thread Lucio De Re
On Mon, Mar 14, 2011 at 11:42:13AM +0100, Peter A. Cejchan wrote:
 
 sorry, type is void *fn()

or void *fn(void) ?

You may, if I'm guessing right, have to tighten up.  It's more complicated
than I can get my mind around...

Lucio.



Re: [9fans] native library: linking err

2011-03-14 Thread Peter A. Cejchan
void *dlist_newnode(DLIST *l, int size);
the code is on 'contrib/pac', see earlier in this thread,
thanks,

++pac


Re: [9fans] native library: linking err

2011-03-14 Thread Charles Forsyth
PSDoc is fully declared in ps_util.c but not
ps_list.c because only ps_util.c includes ps_intern.h
which provides the full declaration.

in ps_list.h, DLIST refers to PSDoc in the declarations of DLIST.malloc
and DLIST.free, so the type of DLIST in ps_list.c (ps_list.8) is not
the same as the type of DLIST in ps_util.c (ps_util.8), and that in turn
is reflected in the type of functions taking DLIST as a parameter type.

Ideally, you'd include ps_intern.h in ps_list.c but the type system
in this library is such a mess, because the modularity is really 
pseudo-modularity
(ps_intern.h needs ght_hash_table.h and probably others as well).
Really they should just declare everything the library needs in one file.

You can hack round it by adding
#pragma incomplete PSDoc
to pslib.h, after the typedef declaring PSDoc.
It's not correct, because PSDoc isn't really an incomplete (opaque) type,
but the structure is so messed up it's probably not worth fussing over it.



[9fans] native library: linking err

2011-03-11 Thread Peter A. Cejchan
hi, friends!!

i've (almost) ported the pslib library, natively, compiles fine, but the 8l
complaints when linking it to a simple prog. the stuff is on
/n/sources/contrib/pac/sys/src/libpslib-0.4.1.tbz
read the file 'BUGS'
please, help,
thanks, have a great weekend,

peter (aka ++pac)