Tags:
create new tag
, view all tags
I haven't updated the diary again in a few days, but I have been doing somethings, primarily related to learning C, specifically:
  • Learning more about macros — see Cpl Macros
  • <something else>
  • Reading some tutorials on C (at least a little)

See:

Contents

Notes

Still reading header files, back to Xproto.h. In this file we see the xEvent struct (a very long definition, a union of many substructs), enclosed as follows:

typedef struct _xEvent {
...
} xEvent;

Questions:

  • Naming convention: what does _xEvent mean
  • Naming convention: what does xEvent mean
  • How do programmers easily make sense of such a large structure? My natural tendency would be to draw a picture — what do others do?

It includes a union of a lot of different things, one example is the following:

   struct {
            CARD32 pad00 B32;
       Window event B32, window B32;
   } destroyNotify;

I don't really understand lines like CARD32 pad00 B32; it looks like a variable declaration, but:

  • What is the variable name pad00?
  • What is the B32? It is a macro, defined in Xmd.h: #define B32 :32 in other words, it changes Window event B32, window B32; to Window event :32, window :32; which makes them "accessible" as bit fields, "for OS'es that need them" (paraphrasing a comment in that or some other header file).
  • IIRC, CARD32 is a 32 bit cardinal (counting?) number, i.e., starting at 1 (??) and unsigned?

I'm jumping to a conclusion, but I'm guessing that pad00 is something to pad out the first four bytes with zeros. I'm getting a sense for the structure of the xEvent, but I'm confused about the first four bytes — surely they are not 0 for most events — need to dig some more (I guess — I think I saw that documented somewhere — need to refind that documentation).

  • KDevelop will apparently only import an existing project if it uses Automake 1.4 (has Makefile.am files) — with a quick look (a grep, should use a find) I don't see any — will try find. Ok, find * -iname makefile finds Makefile's, but no Makefile.am's.

  • The bit about the bit fields brings up a question — would it be easier to read the preprocessed c files? I think in the case of the bit fields, it would have been more obvious, but, I think in general, I should be better off with the non-preprocessed files, as the macros are intended to make things easier for a human to read. (IIUC).

On the 27th:

  • I started reading Part I. Using X Window System and the Graphical User Interface — I get the impression it may try to teach me how to develop X, but that may be a misinterpretation. I plan to spend some time reading more of this site tomorrow. Only problem is that it is written in what I guess is Italian english. Still, I've managed to read German, Austrian, Japanese, and even English english, so it may be possible. wink

Darn! Looks like a pretty good course, good looking, professional sounding. Three problems:

  • It's not free (and not real easy to order — you have to go through a distributor — looks like the X Windows course is about $72 from something like TechDepot (an Office Depot company) — closed the link and don't want to look for it again, you might find it from this [[http://www.altavista.com/web/results?q=FTLinuxCourse+%22x+windows%22&pptt=FTLinuxCourse%7Fx+windows&ppps=8][Alta Vista search. (Base course is on the order of $72, other courses portions that I found seemed to also be $72, but something was $144, and something else was $18, IIRC. Here is a link to one TechDepot page.
  • Reading the Table of Contents for the X course, it does not appear to address modifying the X server.
  • Although the sample course materials appeared sometimes to use better english than some of the promotional materials on the site, I'm not sure I want to pay to wade through something in Italian english. (Actually, one of my early thoughts was to offer to translate their course text into "American" english — don't want to do that for free for a non-free product, and don't feel like contacting them to start a negotiatom. (And don't think it's really going to meet my needs anyway.)

  • Wrote to the xfree86 devel list asking if anyone uses KDevelop to develop X.

Got a response from Daniel Stone who does use KDevelop. Wrote back to him to ask how he imported X into KDevelop.

  • So, what's my next step here at the NCACC library (with no Linux or email access)? I could go to cheaptickets.com and investigate flights to California, or ???. I already looked up kimput (not much found, maybe it's an outdated program) and Gideon (looks like it is KDevelop 3).

Contributors

  • () RandyKramer - 26 Apr 2003
  • If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your WikiName.

Page Ratings

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2003-04-30 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look