1. 24 Sep, 2021 1 commit
    • Richard M Kreuter's avatar
      Restrict the usage of the (former) string table to resource names. · d979f621
      Richard M Kreuter authored
      Addresses bug #116.
      
      tl;dr all resource names are strings in `motifd`, but not all strings
      are resource names. To whatever degree it's useful to communicate
      resource names by index, use a different code path for that than for
      strings.
      
      Suggested bottom-up reading order:
      
      src/motif/lisp/string-base.lisp: change the Lisp-side global table
      into a table of symbols, and encapsulate that table in a couple
      interfaces for the rest of the system.
      
      src/motif/lisp/internals.lisp: remove the old string table variable &
      declare the interfaces from string-base.lisp as forward declarations
      for the rest of the system.
      
      src/motif/lisp/xt-types.lisp: add "toolkit type" name,
      :RESOURCE-NAME, and get rid of :STRING-TOKEN.
      
      src/motif/lisp/conversion.lisp: This is the heart of the matter. Add a
      case to TOOLKIT-WRITE-VALUE for :RESOURCE-NAME: resource names are
      written using MESSAGE-WRITE-RESOURCE-NAME. Change
      MESSAGE-WRITE-RESOURCE-LIST and MESSAGE-WRITE-RESOURCE-NAMES to call
      MESSAGE-WRITE-RESOURCE-NAME. Remove any "tokenization" from
      MESSAGE-WRITE-STRING. Add a case to TOOLKIT-READ-VALUE for
      :RESOURCE-NAME, & remove the case for :STRING-TOKEN. As far as Lisp is
      concerned above the level of this file's abstractions, there are only
      resource name symbols, no tokens, no strings.
      
      src/motif/server/global.h: add a custom "resource representation name"
      for resource names, ExtRResourceName; and a fake one for resource
      names' indices in the global table. Also kill the representation name
      for string tokens.
      
      src/motif/server/tables.h and src/motif/server/tables.c: add
      resource_name_tag, remove string_token_tag. Rename the string_table to
      resource_name_table. Remove tokenize_string (nobody needs it).
      
      src/motif/server/server.c: add resource_name_tag's initialization,
      remove string_token_tag.
      
      src/motif/server/datatrans.h and src/motif/server/datatrans.c: the
      counterparts of the changes in conversion.lisp. Add
      message_read_resource_name, and get toolkit_read_value to use it by
      supplying ExtRResourceName in message_read_resource_list and
      message_read_resource_names. Add error stub for writing resource
      names (nothing needs to write them back to Lisp). Remove "tokenizing"
      from the I/O path for strings. Get rid of the string_token I/O
      functions, but add a case in toolkit_read_value for the one code path
      where string_token was important (in callbacks.c, described below).
      
      src/motif/lisp/prototypes.lisp: now that there's a "toolkit type" of
      :RESOURCE-NAME, use it as an annotation in any DEF-TOOLKIT-REQUEST
      forms that need it. (%GET-VALUES and %SET-VALUES already used
      :RESOURCE-LIST and :RESOURCE-NAMES respectively, so the changes in
      conversion.lisp take care of those.
      
      src/motif/lisp/widgets.lisp: because conversion.lisp now knows how to
      turn resource name symbols into indices directly,
      CONVERT-RESOURCE-LIST and CONVERT-RESOURCE-NAMES, and any other
      runtime conversion of a resource name symbol into a string goes away.
      
      src/motif/lisp/callbacks.lisp: because conversion.lisp now knows how
      to turn resource name symbols into indices directly, runtime
      conversion of resource name symbols into strings goes away. (And so
      most of the lines of diff in this file are just renaming arguments
      from SYM-NAME to NAME, since there's no longer a non-symbol name.)
      
      src/motif/server/callbacks.c: this is the trickiest bit. (Context:
      when setting/removing/invoking callbacks, motifd uses the index of the
      callback list name, rather than the name itself, for the callback
      function's client_data. This is presumably an optimization: to avoid
      having to looking up a name when the callback gets invoked. This
      appears to have been the only reason the string_token "toolkit type"
      was present; since the uses of these indices is so contained, it
      seemed simplest to get rid of that type entirely.) In RXtAddCallback
      and RxtRemoveCallback, replace the use of the resource representation,
      ExtRStringToken, with ExtRResourceNameIndex, so that
      toolkit_read_value will return the index of a resource name sent from
      Lisp, rather than the resource name itself; and in CallbackHandler,
      bypass the toolkit_write/message_write layer, and instead tag and put
      the resource name index directly.
      
      src/motif/lisp/interface-build.lisp: use the interfaces added to
      string-base.lisp for building the C-side header file, which is now
      named ResourceNameTable.h.
      
      src/motif/server/GNUmakefile: change dependency from StringTable.h to
      ResourceNameTable.h.
      d979f621
  2. 22 Sep, 2021 1 commit
  3. 20 Sep, 2021 4 commits
  4. 11 Aug, 2021 1 commit
    • Raymond Toy's avatar
      Include debug symbols in motifd · a2dfe20d
      Raymond Toy authored
      Add -g flag so that debug symbols are included in motifd.  I don't
      think there's really any reason not to do this, and makes debugging
      motifd releases easier.
      a2dfe20d
  5. 06 Jul, 2021 3 commits
  6. 31 May, 2021 4 commits
  7. 08 May, 2021 2 commits
  8. 07 May, 2021 2 commits
  9. 10 Apr, 2021 2 commits
  10. 09 Apr, 2021 2 commits
  11. 23 Mar, 2021 2 commits
  12. 13 Feb, 2021 2 commits
  13. 05 Feb, 2021 2 commits
  14. 04 Feb, 2021 5 commits
  15. 30 Jan, 2021 3 commits
  16. 15 Jan, 2021 1 commit
    • Raymond Toy's avatar
      Minor tweak to put use the right EI_OSABI value · ef9fc1bc
      Raymond Toy authored
      Previously, the EI_OSABI value was either ELFOSAB_SOLARIS for solaris
      or ELFOSABI_FREEBSD for everything else.  Let's update this to include
      NetBSD and Linux.  Unlikely we'll ever support other things like
      HP-UX, AIX, IRIX, Tru64, etc.
      
      The value currently doesn't seem matter, but it seems nice to get it
      right.
      ef9fc1bc
  17. 13 Jan, 2021 2 commits
  18. 12 Jan, 2021 1 commit