9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] native library: linking err
@ 2011-03-11 13:52 Peter A. Cejchan
  2011-03-14  9:01 ` Peter A. Cejchan
  0 siblings, 1 reply; 12+ messages in thread
From: Peter A. Cejchan @ 2011-03-11 13:52 UTC (permalink / raw)


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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20110311/c089e00f/attachment.html>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-11 13:52 [9fans] native library: linking err Peter A. Cejchan
@ 2011-03-14  9:01 ` Peter A. Cejchan
  2011-03-14  9:33   ` Charles Forsyth
  0 siblings, 1 reply; 12+ messages in thread
From: Peter A. Cejchan @ 2011-03-14  9:01 UTC (permalink / raw)


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20110314/bb31f794/attachment.html>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-14  9:01 ` Peter A. Cejchan
@ 2011-03-14  9:33   ` Charles Forsyth
  2011-03-14 10:19     ` Peter A. Cejchan
  0 siblings, 1 reply; 12+ messages in thread
From: Charles Forsyth @ 2011-03-14  9:33 UTC (permalink / raw)


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.
-------------- next part --------------
An embedded message was scrubbed...
From: "Peter A. Cejchan" <tyapca7 at gmail.com>
Subject: Re: [9fans] native library: linking err
Date: Mon, 14 Mar 2011 10:01:10 +0100
Size: 3285
URL: <http://mail.9fans.net/private/9fans/attachments/20110314/5a5a601d/attachment.mht>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-14  9:33   ` Charles Forsyth
@ 2011-03-14 10:19     ` Peter A. Cejchan
  2011-03-14 10:42       ` Peter A. Cejchan
  2011-03-14 18:33       ` Charles Forsyth
  0 siblings, 2 replies; 12+ messages in thread
From: Peter A. Cejchan @ 2011-03-14 10:19 UTC (permalink / raw)


dlst_freenode is declared in pslist.h, which is included
in pslict.c as well as in pslist.h
the type is 'void'

thanks, ++pac


On Mon, Mar 14, 2011 at 10:33 AM, Charles Forsyth <forsyth at terzarima.net>wrote:

> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20110314/3beef3c4/attachment.html>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-14 10:19     ` Peter A. Cejchan
@ 2011-03-14 10:42       ` Peter A. Cejchan
  2011-03-14 11:48         ` Lucio De Re
  2011-03-14 18:33       ` Charles Forsyth
  1 sibling, 1 reply; 12+ messages in thread
From: Peter A. Cejchan @ 2011-03-14 10:42 UTC (permalink / raw)


sorry, type is void *fn()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20110314/8387caa2/attachment.html>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-14 10:42       ` Peter A. Cejchan
@ 2011-03-14 11:48         ` Lucio De Re
  2011-03-14 14:12           ` Peter A. Cejchan
  0 siblings, 1 reply; 12+ messages in thread
From: Lucio De Re @ 2011-03-14 11:48 UTC (permalink / raw)


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.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-14 11:48         ` Lucio De Re
@ 2011-03-14 14:12           ` Peter A. Cejchan
  0 siblings, 0 replies; 12+ messages in thread
From: Peter A. Cejchan @ 2011-03-14 14:12 UTC (permalink / raw)


void *dlist_newnode(DLIST *l, int size);
the code is on 'contrib/pac', see earlier in this thread,
thanks,

++pac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20110314/08fe7c20/attachment.html>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-14 10:19     ` Peter A. Cejchan
  2011-03-14 10:42       ` Peter A. Cejchan
@ 2011-03-14 18:33       ` Charles Forsyth
  2011-03-15  7:56         ` Peter A. Cejchan
  1 sibling, 1 reply; 12+ messages in thread
From: Charles Forsyth @ 2011-03-14 18:33 UTC (permalink / raw)


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.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-14 18:33       ` Charles Forsyth
@ 2011-03-15  7:56         ` Peter A. Cejchan
  2011-03-15  8:50           ` Steve Simon
  0 siblings, 1 reply; 12+ messages in thread
From: Peter A. Cejchan @ 2011-03-15  7:56 UTC (permalink / raw)


folks,
thank you very much, I'll try to follow the ideas outlined,
despite it was probably a crazy idea to port such a dinosaur (sorry, uwe),
so,
do we have some decent function collection to emit PostScript??
I thought first that I'll find them in /sys/src/cmd/map/,
but I was wrong;
then, I tried to figure out what is in
contrib/steve/graphviz/dotneato/common/psgen.c
it looks fine but lacks documentaion,
steve??
Would that be the right choice when I care mostly drawing areas filled with
color and pattern, with some basic text functions?
I have to apologize for intruding, as I am a self-made programmer, I only
have 1 semester of intro to Fortran in  1979(?)

;-)

cheers, and thanks again,
++pac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20110315/98fc8a9a/attachment.html>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-15  7:56         ` Peter A. Cejchan
@ 2011-03-15  8:50           ` Steve Simon
  2011-03-15  9:11             ` Peter A. Cejchan
  2011-03-15  9:25             ` Peter A. Cejchan
  0 siblings, 2 replies; 12+ messages in thread
From: Steve Simon @ 2011-03-15  8:50 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-15  8:50           ` Steve Simon
@ 2011-03-15  9:11             ` Peter A. Cejchan
  2011-03-15  9:25             ` Peter A. Cejchan
  1 sibling, 0 replies; 12+ messages in thread
From: Peter A. Cejchan @ 2011-03-15  9:11 UTC (permalink / raw)


> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20110315/469b7ca5/attachment.html>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9fans] native library: linking err
  2011-03-15  8:50           ` Steve Simon
  2011-03-15  9:11             ` Peter A. Cejchan
@ 2011-03-15  9:25             ` Peter A. Cejchan
  1 sibling, 0 replies; 12+ messages in thread
From: Peter A. Cejchan @ 2011-03-15  9:25 UTC (permalink / raw)


<steve at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.9fans.net/private/9fans/attachments/20110315/9a0b6fef/attachment.html>


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-03-15  9:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-11 13:52 [9fans] native library: linking err Peter A. Cejchan
2011-03-14  9:01 ` Peter A. Cejchan
2011-03-14  9:33   ` Charles Forsyth
2011-03-14 10:19     ` Peter A. Cejchan
2011-03-14 10:42       ` Peter A. Cejchan
2011-03-14 11:48         ` Lucio De Re
2011-03-14 14:12           ` Peter A. Cejchan
2011-03-14 18:33       ` Charles Forsyth
2011-03-15  7:56         ` Peter A. Cejchan
2011-03-15  8:50           ` Steve Simon
2011-03-15  9:11             ` Peter A. Cejchan
2011-03-15  9:25             ` Peter A. Cejchan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).