About Xalloc()/Xfree() function used in liblbxutil library.

pcpa at mandriva.com.br pcpa at mandriva.com.br
Sat Sep 15 07:57:04 PDT 2007


Quoting Tadashi Koike <t-koike at pop01.odn.ne.jp>:

>
> Hello everyone,
>
> (I am weak in English, so please forgive the error of the English sentence)
>
> I have a question about Xalloc() function used in liblbxutil library.
>
> I am using Fedora 7 to build Xorg 7.3 tree.
>
> On lib/liblbxutil/src/libx_zlib/lbx_zlib.c file, the Xalloc() is
> used by ZlibInit() function, and Xfree() is used by ZlibFree().
>
> Compiling liblbxutil library finished fine. but when I researched
> <INST_DIR>/lib/liblbxutil.a , I could not find symbols of
> Xalloc()/Xfree() functions in that library.
>
> I tryed below:
>
>  # cd <INST_DIR>/lib
>  # nm liblbxutil.a | egrep 'X(alloc|free)'
>      U Xalloc
>      U Xfree
>      U Xalloc
>      U Xfree
>      U Xalloc
>      U Xfree
>  #
>
> I found that these functions are declared in "lbx_zlib.h" with
> extern declaration.
>
> ... Maybe I think that these functions are on libXdmcp.(a,so).
>
> From the first, XFIXES Extention is related with xserver, so
> there is no problem on compiling xserver (it requires libXdmcp),
> I guess.
>
> But I think when "Library and server implementations are separate"
> (reference: lib/liblbxutil/README), that dependence should be
> got rid of.
>
> Other libraries use Xmalloc()/Xfree() that is defined in Xlibint.h .
> I think that lbx_zlib.c should use the same function as other
> libraries.
>
> ---
> Sorry I began to studying X Window System recently, so please
> give me some lectures/ideas about that.
>
> Sincerely yours,
>
> - Tadashi Koike, Japan

  Hi,
  I believe you could use ctags and GLOBAL to make it easier to understand the
source code.

  ctags:    http://ctags.sourceforge.net/
  global:   http://www.gnu.org/software/global/
  some info about git in Xorg: 
http://www.freedesktop.org/wiki/Infrastructure/git/Users

  But you should have ctags and global as packages available to install, and
the sources of X server/libraries/drivers for Fedora 7 easily accessible.
  Don't know about Fedora, but on Mandriva the git package isn't the git scm,
but GNU Interactive Tools, and one can easily fall for that :-)

Paulo






More information about the xorg mailing list