Changeset 5904 for branches


Ignore:
Timestamp:
Oct 9, 2015 10:56:09 AM (9 years ago)
Author:
gah
Message:

first pass on new build

Location:
branches/1.5/pkgs
Files:
19 added
6 moved

Legend:

Unmodified
Added
Removed
  • branches/1.5/pkgs/PdbToVtk/pdbToVtk.c

    r5903 r5904  
    191191    for (i = 0, hPtr = Tcl_FirstHashEntry(atomTablePtr, &iter); hPtr != NULL;
    192192         hPtr = Tcl_NextHashEntry(&iter), i++) {
    193         PdbAtom *atomPtr = Tcl_GetHashValue(hPtr);
     193        PdbAtom *atomPtr;
     194
     195        atomPtr = Tcl_GetHashValue(hPtr);
    194196        array[i] = atomPtr;
    195197    }
     
    689691        Tcl_AppendToObj(objPtr, mesg, -1);
    690692    }
    691 #if 0
    692693    for (hPtr = Tcl_FirstHashEntry(&atomTable, &iter); hPtr != NULL;
    693694         hPtr = Tcl_NextHashEntry(&iter)) {
    694         PdbAtom *atomPtr = Tcl_GetHashValue(hPtr);
     695        PdbAtom *atomPtr;
     696
     697        atomPtr = Tcl_GetHashValue(hPtr);
    695698        fprintf(stderr, "%d %s %d connections\n", atomPtr->ordinal,
    696699                elements[atomPtr->number].symbol, atomPtr->numConnections);
    697700    }
    698 #endif
    699701    sprintf(mesg, "POINT_DATA %d\n", atomTable.numEntries);
    700702    Tcl_AppendToObj(objPtr, mesg, -1);
     
    722724/*
    723725 * ------------------------------------------------------------------------
    724  *  RpPdbToVtk_Init --
     726 *  Rappture_pdb_to_vtk_Init --
    725727 *
    726728 *  Invoked when the Rappture GUI library is being initialized
     
    732734 */
    733735int
    734 RpPdbToVtk_Init(Tcl_Interp *interp)
     736Rappture_pdb_to_vtk_Init(Tcl_Interp *interp)
    735737{
    736738    /* install the widget command */
  • branches/1.5/pkgs/diffview/diff.pdf

    • Property svn:executable deleted
  • branches/1.5/pkgs/diffview/diffview.c

    r5903 r5904  
    414414};
    415415
    416 /*
    417  * ------------------------------------------------------------------------
    418  *  RpDiffview_Init --
    419  *
    420  *  Invoked when the Rappture GUI library is being initialized
    421  *  to install the "diffview" widget into the interpreter.
    422  *
    423  *  Returns TCL_OK if successful, or TCL_ERROR (along with an error
    424  *  message in the interp) if anything goes wrong.
    425  * ------------------------------------------------------------------------
    426  */
    427 int
    428 RpDiffview_Init(interp)
    429     Tcl_Interp *interp;         /* interpreter being initialized */
    430 {
    431     static char *script = "source [file join $RapptureGUI::library scripts diffview.tcl]";
    432 
    433     /* install the widget command */
    434     Tcl_CreateObjCommand(interp, "Rappture::Diffview", DiffviewObjCmd,
    435         NULL, NULL);
    436 
    437     /* load the default bindings */
    438     if (Tcl_Eval(interp, script) != TCL_OK) {
    439         return TCL_ERROR;
    440     }
    441 
    442     return TCL_OK;
    443 }
    444416
    445417/*
     
    27962768    }
    27972769}
     2770
     2771/*
     2772 * ------------------------------------------------------------------------
     2773 *  Rappture_diffview_Init --
     2774 *
     2775 *  Invoked when the Rappture GUI library is being initialized
     2776 *  to install the "diffview" widget into the interpreter.
     2777 *
     2778 *  Returns TCL_OK if successful, or TCL_ERROR (along with an error
     2779 *  message in the interp) if anything goes wrong.
     2780 * ------------------------------------------------------------------------
     2781 */
     2782int
     2783Rappture_diffview_Init(interp)
     2784    Tcl_Interp *interp;         /* interpreter being initialized */
     2785{
     2786    static char *script = "source [file join $RapptureGUI::library scripts diffview.tcl]";
     2787
     2788    /* install the widget command */
     2789    Tcl_CreateObjCommand(interp, "Rappture::diffview", DiffviewObjCmd,
     2790        NULL, NULL);
     2791
     2792    /* load the default bindings */
     2793    if (Tcl_Eval(interp, script) != TCL_OK) {
     2794        return TCL_ERROR;
     2795    }
     2796    return TCL_OK;
     2797}
  • branches/1.5/pkgs/hotspot/hotspot.c

    r5903 r5904  
    18271827/*
    18281828 * ------------------------------------------------------------------------
    1829  *  RpCanvHotspot_Init --
     1829 *  Rappture_canvas_hotspot_Init --
    18301830 *
    18311831 *  Invoked when the Rappture GUI library is being initialized
     
    18371837 */
    18381838int
    1839 RpCanvHotspot_Init(interp)
     1839Rappture_canvas_hotspot_Init(interp)
    18401840    Tcl_Interp *interp;         /* interpreter being initialized */
    18411841{
  • branches/1.5/pkgs/listbox/listbox.c

    r5903 r5904  
    3333 * RCS: @(#) $Id: tkListbox.c,v 1.29.2.5 2007/04/29 02:24:02 das Exp $
    3434 */
    35 #include "tkPort.h"
    36 #include "default.h"
    37 #include "tkInt.h"
    38 
    39 #ifdef WIN32
    40 #include "tkWinInt.h"
     35
     36#include <stdlib.h>
     37#include <string.h>
     38#include <X11/Xatom.h>
     39#include <X11/Xproto.h>
     40
     41#include <tcl.h>
     42#include <tk.h>
     43
     44#define BLACK           "#000000"
     45#define WHITE           "#ffffff"
     46
     47#define NORMAL_BG       "#d9d9d9"
     48#define ACTIVE_BG       "#ececec"
     49#define SELECT_BG       "#c3c3c3"
     50#define DISABLED        "#a3a3a3"
     51
     52#define DEF_LISTBOX_BG_MONO             WHITE
     53#define DEF_LISTBOX_BORDER_WIDTH        "1"
     54#define DEF_LISTBOX_CURSOR              ""
     55#define DEF_LISTBOX_DISABLED_FG         DISABLED
     56#define DEF_LISTBOX_EXPORT_SELECTION    "1"
     57#define DEF_LISTBOX_HEIGHT              "10"
     58#define DEF_LISTBOX_HIGHLIGHT_BG        NORMAL_BG
     59#define DEF_LISTBOX_LIST_VARIABLE       ""
     60#define DEF_LISTBOX_SCROLL_COMMAND      ""
     61#define DEF_LISTBOX_SELECT_BD           "0"
     62#define DEF_LISTBOX_SELECT_COLOR        SELECT_BG
     63#define DEF_LISTBOX_SELECT_FG_MONO      WHITE
     64#define DEF_LISTBOX_SELECT_MODE         "browse"
     65#define DEF_LISTBOX_SELECT_MONO         BLACK
     66#define DEF_LISTBOX_SET_GRID            "0"
     67#define DEF_LISTBOX_STATE               "normal"
     68#define DEF_LISTBOX_TAKE_FOCUS          (char *) NULL
     69#define DEF_LISTBOX_WIDTH               "20"
     70
     71#if defined(__WIN32__) || defined(_WIN32) || defined(__MINGW32__)
     72#define DEF_LISTBOX_ACTIVE_STYLE        "underline"
     73#define DEF_LISTBOX_BG_COLOR            "SystemWindow"
     74#define DEF_LISTBOX_FG                  NORMAL_FG
     75#define DEF_LISTBOX_FONT                "TkDefaultFont"
     76#define DEF_LISTBOX_HIGHLIGHT           HIGHLIGHT
     77#define DEF_LISTBOX_HIGHLIGHT_WIDTH     "1"
     78#define DEF_LISTBOX_RELIEF              "sunken"
     79#define DEF_LISTBOX_SELECT_FG_COLOR     SELECT_FG
     80#else
     81#   if defined(MAC_OSX_TK)
     82#define DEF_LISTBOX_ACTIVE_STYLE        "dotbox"
     83#define DEF_LISTBOX_BG_COLOR            WHITE
     84#define DEF_LISTBOX_FG                  BLACK
     85#define DEF_LISTBOX_FONT                "TkTextFont"
     86#define DEF_LISTBOX_HIGHLIGHT           BLACK
     87#define DEF_LISTBOX_HIGHLIGHT_WIDTH     "0"
     88#define DEF_LISTBOX_RELIEF              "solid"
     89#define DEF_LISTBOX_SELECT_FG_COLOR     SELECT_FG
     90#   else
     91#define DEF_LISTBOX_ACTIVE_STYLE        "dotbox"
     92#define DEF_LISTBOX_BG_COLOR            WHITE
     93#define DEF_LISTBOX_FG                  BLACK
     94#define DEF_LISTBOX_FONT                "TkDefaultFont"
     95#define DEF_LISTBOX_HIGHLIGHT           BLACK
     96#define DEF_LISTBOX_HIGHLIGHT_WIDTH     "1"
     97#define DEF_LISTBOX_RELIEF              "sunken"
     98#define DEF_LISTBOX_SELECT_FG_COLOR     BLACK
     99#   endif
    41100#endif
    42101
     
    523582/*
    524583 * ------------------------------------------------------------------------
    525  *  RpListbox_Init --
    526  *
    527  *  Invoked when the Rappture GUI library is being initialized
     584 *  Rappture_listbox_Init --
     585 *
     586 *  Invoked when the Rappture listbox library is being initialized
    528587 *  to install the Rappture "listbox" widget.
    529588 *
     
    533592 */
    534593int
    535 RpListbox_Init(interp)
     594Rappture_listbox_Init(interp)
    536595    Tcl_Interp *interp;         /* interpreter being initialized */
    537596{
     
    821880             */
    822881            for (i = 0; i < listPtr->nElements; i++) {
    823                 if (Tcl_FindHashEntry(listPtr->selection, (char *)i) != NULL) {
     882                long key;
     883                key = index;
     884                if (Tcl_FindHashEntry(listPtr->selection,(char *)key) != NULL) {
    824885                    sprintf(indexStringRep, "%d", i);
    825886                    Tcl_AppendElement(interp, indexStringRep);
     
    13611422        }
    13621423        case SELECTION_INCLUDES: {
     1424            long key = first;
    13631425            if (objc != 4) {
    13641426                Tcl_WrongNumArgs(interp, 3, objv, "index");
     
    13671429            Tcl_SetObjResult(interp,
    13681430                    Tcl_NewBooleanObj((Tcl_FindHashEntry(listPtr->selection,
    1369                             (char *)first) != NULL)));
     1431                            (char *)key) != NULL)));
    13701432            result = TCL_OK;
    13711433            break;
     
    15591621    Tcl_HashEntry *entry;
    15601622    ItemAttr *attrs;
    1561 
    1562     entry = Tcl_CreateHashEntry(listPtr->itemAttrTable, (char *)index, &new);
     1623    long key = index;
     1624
     1625    entry = Tcl_CreateHashEntry(listPtr->itemAttrTable, (char *)key, &new);
    15631626    if (new) {
    15641627        attrs = (ItemAttr *) ckalloc(sizeof(ItemAttr));
     
    20652128         */
    20662129        if (listPtr->state & STATE_NORMAL) {
    2067             if (Tcl_FindHashEntry(listPtr->selection, (char *)i) != NULL) {
     2130            long key = i;
     2131            if (Tcl_FindHashEntry(listPtr->selection, (char *)key) != NULL) {
    20682132                /* Selected items are drawn differently. */
    20692133                gc = listPtr->selTextGC;
     
    22402304            listPtr->borderWidth, listPtr->relief);
    22412305    if (listPtr->highlightWidth > 0) {
    2242         GC fgGC, bgGC;
    2243 
     2306        GC bgGC;
     2307
     2308        /* There's no public stub for TkpDrawHighlightBorder, so fall back
     2309         * to Tk_DrawFocusHighlight.  Only on problem on the Mac.  */
    22442310        bgGC = Tk_GCForColor(listPtr->highlightBgColorPtr, pixmap);
    2245         if (listPtr->flags & GOT_FOCUS) {
    2246             fgGC = Tk_GCForColor(listPtr->highlightColorPtr, pixmap);
    2247             TkpDrawHighlightBorder(tkwin, fgGC, bgGC,
    2248                     listPtr->highlightWidth, pixmap);
    2249         } else {
    2250             TkpDrawHighlightBorder(tkwin, bgGC, bgGC,
    2251                     listPtr->highlightWidth, pixmap);
    2252         }
     2311        Tk_DrawFocusHighlight(tkwin, bgGC, listPtr->highlightWidth,
     2312                pixmap);
    22532313    }
    22542314#ifndef TK_NO_DOUBLE_BUFFERING
     
    27432803     */
    27442804    for (i = first; i <= last; i++) {
     2805        long key = i;
    27452806        /* Remove selection information */
    2746         entry = Tcl_FindHashEntry(listPtr->selection, (char *)i);
     2807        entry = Tcl_FindHashEntry(listPtr->selection, (char *)key);
    27472808        if (entry != NULL) {
    27482809            listPtr->numSelected--;
     
    27502811        }
    27512812
    2752         entry = Tcl_FindHashEntry(listPtr->itemAttrTable, (char *)i);
     2813        entry = Tcl_FindHashEntry(listPtr->itemAttrTable, (char *)key);
    27532814        if (entry != NULL) {
    27542815            ckfree((char *)Tcl_GetHashValue(entry));
     
    34173478     */
    34183479    for (i = first; i <= last; i++) {
    3419         entry = Tcl_FindHashEntry(listPtr->selection, (char *)i);
     3480        long key = i;
     3481        entry = Tcl_FindHashEntry(listPtr->selection, (char *)key);
    34203482        if (entry != NULL) {
    34213483            if (!select) {
     
    34293491            if (select) {
    34303492                entry = Tcl_CreateHashEntry(listPtr->selection,
    3431                         (char *)i, &new);
     3493                        (char *)key, &new);
    34323494                Tcl_SetHashValue(entry, (ClientData) NULL);
    34333495                listPtr->numSelected++;
     
    35053567    Tcl_DStringInit(&selection);
    35063568    for (i = 0; i < listPtr->nElements; i++) {
    3507         entry = Tcl_FindHashEntry(listPtr->selection, (char *)i);
     3569        long key = i;
     3570        entry = Tcl_FindHashEntry(listPtr->selection, (char *)key);
    35083571        if (entry != NULL) {
    35093572            if (needNewline) {
     
    37873850    if (offset > 0) {
    37883851        for (i = last; i >= first; i--) {
    3789             entry = Tcl_FindHashEntry(table, (char *)i);
     3852            long key = i;
     3853            entry = Tcl_FindHashEntry(table, (char *)key);
    37903854            if (entry != NULL) {
    37913855                clientData = Tcl_GetHashValue(entry);
    37923856                Tcl_DeleteHashEntry(entry);
    3793                 entry = Tcl_CreateHashEntry(table, (char *)(i + offset), &new);
     3857                entry = Tcl_CreateHashEntry(table, (char *)(key+offset), &new);
    37943858                Tcl_SetHashValue(entry, clientData);
    37953859            }
     
    37973861    } else {
    37983862        for (i = first; i <= last; i++) {
    3799             entry = Tcl_FindHashEntry(table, (char *)i);
     3863            long key = i;
     3864            entry = Tcl_FindHashEntry(table, (char *)key);
    38003865            if (entry != NULL) {
    38013866                clientData = Tcl_GetHashValue(entry);
    38023867                Tcl_DeleteHashEntry(entry);
    3803                 entry = Tcl_CreateHashEntry(table, (char *)(i + offset), &new);
     3868                entry = Tcl_CreateHashEntry(table, (char *)(key+offset), &new);
    38043869                Tcl_SetHashValue(entry, clientData);
    38053870            }
  • branches/1.5/pkgs/placard/placard.c

    r5903 r5904  
    413413
    414414
    415 /*
    416  * ------------------------------------------------------------------------
    417  *  RpCanvPlacard_Init --
    418  *
    419  *  Invoked when the Rappture GUI library is being initialized
    420  *  to install the "placard" item on the Tk canvas widget.
    421  *
    422  *  Returns TCL_OK if successful, or TCL_ERROR (along with an error
    423  *  message in the interp) if anything goes wrong.
    424  * ------------------------------------------------------------------------
    425  */
    426 int
    427 RpCanvPlacard_Init(interp)
    428     Tcl_Interp *interp;         /* interpreter being initialized */
    429 {
    430     Tk_CreateItemType(&rpPlacardType);
    431 
    432     Tk_DefineBitmap(interp, Tk_GetUid("rp_ellipsis"),
    433         (char*)ellipsis_bits, ellipsis_width, ellipsis_height);
    434 
    435     return TCL_OK;
    436 }
    437415
    438416/*
     
    14591437    return;
    14601438}
     1439
     1440/*
     1441 * ------------------------------------------------------------------------
     1442 *  Rappture_canvas_placard_Init --
     1443 *
     1444 *  Invoked when the Rappture GUI library is being initialized
     1445 *  to install the "placard" item on the Tk canvas widget.
     1446 *
     1447 *  Returns TCL_OK if successful, or TCL_ERROR (along with an error
     1448 *  message in the interp) if anything goes wrong.
     1449 * ------------------------------------------------------------------------
     1450 */
     1451int
     1452Rappture_canvas_placard_Init(interp)
     1453    Tcl_Interp *interp;         /* interpreter being initialized */
     1454{
     1455    Tk_CreateItemType(&rpPlacardType);
     1456
     1457    Tk_DefineBitmap(interp, Tk_GetUid("rp_ellipsis"),
     1458        (char*)ellipsis_bits, ellipsis_width, ellipsis_height);
     1459
     1460    return TCL_OK;
     1461}
Note: See TracChangeset for help on using the changeset viewer.