Tk Source Code

Check-in [072b83be]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:New files provided by René Zaumseil: some more clean up in generic/rbc, and file generic/rbc/rbcAlloc.c is no more needed
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-510
Files: files | file ages | folders
SHA3-256: 072b83be840597010200071dd17a59bd73ffa3179ca3c411b5c53b0b115abf93
User & Date: fvogel 2018-08-19 14:11:05
Context
2018-08-19
14:12
merge trunk check-in: d222f03a user: fvogel tags: tip-510
14:11
New files provided by René Zaumseil: some more clean up in generic/rbc, and file generic/rbc/rbcAlloc.c is no more needed check-in: 072b83be user: fvogel tags: tip-510
14:06
New files provided by René Zaumseil: elimination of the use of RbcList*() functions check-in: 243a1376 user: fvogel tags: tip-510
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Deleted generic/rbc/rbcAlloc.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
 * rbcAlloc.C --
 *
 *      TODO: Description
 *
 * Copyright (c) 2001 BLT was created by George Howlett.
 * Copyright (c) 2009 RBC was created by Samuel Green, Nicholas Hudson, Stanton Sievers, Jarrod Stormo
 * Copyright (c) 2018 Rene Zaumseil

 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#include "rbcInt.h"

/*
 *----------------------------------------------------------------------
 *
 * RbcCalloc --
 *
 *      TODO: Description
 *
 * Results:
 *      TODO: Results
 *
 * Side Effects:
 *      TODO: Side Effects
 *
 *----------------------------------------------------------------------
 */
void           *
RbcCalloc(
    unsigned int nElems,
    size_t sizeOfElem)
{
    char           *allocPtr;
    size_t          size;

    size = nElems * sizeOfElem;
    allocPtr = ckalloc(size);
    if (allocPtr != NULL) {
        memset(allocPtr, 0, size);
    }
    return allocPtr;
}

/*
 *----------------------------------------------------------------------
 *
 * RbcStrdup --
 *
 *      Create a copy of the string from heap storage.
 *
 * Results:
 *      Returns a pointer to the need string copy.
 *
 * Side Effects:
 *      TODO: Side Effects
 *
 *----------------------------------------------------------------------
 */
char           *
RbcStrdup(
    const char *string)
{
    size_t          size;
    char           *allocPtr;

    size = strlen(string) + 1;
    allocPtr = ckalloc(size * sizeof(char));
    if (allocPtr != NULL) {
        strcpy(allocPtr, string);
    }
    return allocPtr;
}

/* vim: set ts=4 sw=4 sts=4 ff=unix et : */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































Changes to generic/rbc/rbcConfig.c.

434
435
436
437
438
439
440

441

442
443
444
445
446
447
448
449
...
545
546
547
548
549
550
551

552

553
554
555
556
557
558
559
560
...
919
920
921
922
923
924
925

926
927
928
929
930
931

932
933
934
935
936
937
938
939
    Tk_Window tkwin,            /* Not used. */
    char *widgRec,              /* Widget structure record */
    int offset,                 /* Offset in widget record */
    Tcl_FreeProc ** freeProcPtr)
{                               /* Not used. */
    int             value = *(int *) (widgRec + offset);
    char           *result;



    result = RbcStrdup(RbcItoa(value));
    assert(result);
    *freeProcPtr = (Tcl_FreeProc *) Tcl_Free;
    return result;
}

/*
 *----------------------------------------------------------------------
................................................................................
    Tk_Window tkwin,            /* Not used. */
    char *widgRec,              /* Widget structure record */
    int offset,                 /* Offset in widget record */
    Tcl_FreeProc ** freeProcPtr)
{                               /* Not used. */
    int             value = *(int *) (widgRec + offset);
    char           *result;



    result = RbcStrdup(RbcItoa(value));
    assert(result);
    *freeProcPtr = (Tcl_FreeProc *) Tcl_Free;
    return result;
}

/*
 *----------------------------------------------------------------------
................................................................................
    int offset,                 /* offset of Dashes in record */
    Tcl_FreeProc ** freeProcPtr)
{                               /* Memory deallocation scheme to use */
    RbcDashes      *dashesPtr = (RbcDashes *) (widgRec + offset);
    Tcl_DString     dString;
    char           *p;
    char           *result;


    if (dashesPtr->values[0] == 0) {
        return "";
    }
    Tcl_DStringInit(&dString);
    for (p = dashesPtr->values; *p != 0; p++) {

        Tcl_DStringAppendElement(&dString, RbcItoa(*p));
    }
    result = Tcl_DStringValue(&dString);
    if (result == dString.staticSpace) {
        result = RbcStrdup(result);
    }
    *freeProcPtr = (Tcl_FreeProc *) Tcl_Free;
    return result;






>

>
|







 







>

>
|







 







>






>
|







434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
...
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
...
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
    Tk_Window tkwin,            /* Not used. */
    char *widgRec,              /* Widget structure record */
    int offset,                 /* Offset in widget record */
    Tcl_FreeProc ** freeProcPtr)
{                               /* Not used. */
    int             value = *(int *) (widgRec + offset);
    char           *result;
    char            stringInt[200];

    sprintf(stringInt, "%d", value);
    result = RbcStrdup(stringInt);
    assert(result);
    *freeProcPtr = (Tcl_FreeProc *) Tcl_Free;
    return result;
}

/*
 *----------------------------------------------------------------------
................................................................................
    Tk_Window tkwin,            /* Not used. */
    char *widgRec,              /* Widget structure record */
    int offset,                 /* Offset in widget record */
    Tcl_FreeProc ** freeProcPtr)
{                               /* Not used. */
    int             value = *(int *) (widgRec + offset);
    char           *result;
    char            stringInt[200];

    sprintf(stringInt, "%d", value);
    result = RbcStrdup(stringInt);
    assert(result);
    *freeProcPtr = (Tcl_FreeProc *) Tcl_Free;
    return result;
}

/*
 *----------------------------------------------------------------------
................................................................................
    int offset,                 /* offset of Dashes in record */
    Tcl_FreeProc ** freeProcPtr)
{                               /* Memory deallocation scheme to use */
    RbcDashes      *dashesPtr = (RbcDashes *) (widgRec + offset);
    Tcl_DString     dString;
    char           *p;
    char           *result;
    char            stringInt[200];

    if (dashesPtr->values[0] == 0) {
        return "";
    }
    Tcl_DStringInit(&dString);
    for (p = dashesPtr->values; *p != 0; p++) {
        sprintf(stringInt, "%d", *p);
        Tcl_DStringAppendElement(&dString, stringInt);
    }
    result = Tcl_DStringValue(&dString);
    if (result == dString.staticSpace) {
        result = RbcStrdup(result);
    }
    *freeProcPtr = (Tcl_FreeProc *) Tcl_Free;
    return result;

Changes to generic/rbc/rbcGrAxis.c.

4024
4025
4026
4027
4028
4029
4030

4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041

4042

4043
4044
4045
4046
4047
4048
4049
4050
....
4066
4067
4068
4069
4070
4071
4072

4073
4074
4075
4076
4077
4078
4079
....
4085
4086
4087
4088
4089
4090
4091

4092
4093
4094
4095
4096
4097
4098
4099
....
4604
4605
4606
4607
4608
4609
4610

4611
4612
4613
4614
4615
4616
4617
....
4650
4651
4652
4653
4654
4655
4656

4657
4658

4659
4660
4661
4662
4663
4664
4665
4666
    RbcGraph * graphPtr,
    RbcAxis * axisPtr,
    int argc,                   /* Not used. */
    const char **argv)
{                               /* Not used. */
    Tcl_Interp     *interp = graphPtr->interp;
    double          min, max;


    if (graphPtr->flags & RBC_RESET_AXES) {
        RbcResetAxes(graphPtr);
    }
    if (axisPtr->logScale) {
        min = EXP10(axisPtr->axisRange.min);
        max = EXP10(axisPtr->axisRange.max);
    } else {
        min = axisPtr->axisRange.min;
        max = axisPtr->axisRange.max;
    }

    Tcl_AppendElement(interp, RbcDtoa(interp, min));

    Tcl_AppendElement(interp, RbcDtoa(interp, max));
    return TCL_OK;
}

/*
 * ----------------------------------------------------------------------
 *
 * InvTransformOp --
................................................................................
    RbcGraph * graphPtr,
    RbcAxis * axisPtr,
    int argc,                   /* Not used. */
    const char **argv)
{
    int             x;          /* Integer window coordinate */
    double          y;          /* Real graph coordinate */


    if (graphPtr->flags & RBC_RESET_AXES) {
        RbcResetAxes(graphPtr);
    }
    if (Tcl_GetInt(graphPtr->interp, argv[0], &x) != TCL_OK) {
        return TCL_ERROR;
    }
................................................................................
     * element (using either -mapx or -mapy options).
     */
    if (AxisIsHorizontal(graphPtr, axisPtr)) {
        y = RbcInvHMap(graphPtr, axisPtr, (double) x);
    } else {
        y = RbcInvVMap(graphPtr, axisPtr, (double) x);
    }

    Tcl_AppendElement(graphPtr->interp, RbcDtoa(graphPtr->interp, y));
    return TCL_OK;
}

/*
 * ----------------------------------------------------------------------
 *
 * TransformOp --
................................................................................
{
    RbcAxis        *axisPtr;
    Tcl_Interp     *interp = graphPtr->interp;
    double          axisOffset, scrollUnits;
    double          fract;
    double          viewMin, viewMax, worldMin, worldMax;
    double          viewWidth, worldWidth;


    if (NameToAxis(graphPtr, argv[3], &axisPtr) != TCL_OK) {
        return TCL_ERROR;
    }
    worldMin = axisPtr->valueRange.min;
    worldMax = axisPtr->valueRange.max;
    /* Override data dimensions with user-selected limits. */
................................................................................
        axisOffset = worldMax - viewMax;
        scrollUnits = (double) axisPtr->scrollUnits * graphPtr->vScale;
    }
    if (argc == 4) {
        /* Note: Bound the fractions between 0.0 and 1.0 to support
         * "canvas"-style scrolling. */
        fract = axisOffset / worldWidth;

        Tcl_AppendElement(interp, RbcDtoa(interp, CLAMP(fract, 0.0, 1.0)));
        fract = (axisOffset + viewWidth) / worldWidth;

        Tcl_AppendElement(interp, RbcDtoa(interp, CLAMP(fract, 0.0, 1.0)));
        return TCL_OK;
    }
    fract = axisOffset / worldWidth;
    if (GetAxisScrollInfo(interp, argc - 4, argv + 4, &fract,
            viewWidth / worldWidth, scrollUnits) != TCL_OK) {
        return TCL_ERROR;
    }






>











>
|
>
|







 







>







 







>
|







 







>







 







>
|

>
|







4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
....
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
....
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
....
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
....
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
    RbcGraph * graphPtr,
    RbcAxis * axisPtr,
    int argc,                   /* Not used. */
    const char **argv)
{                               /* Not used. */
    Tcl_Interp     *interp = graphPtr->interp;
    double          min, max;
    char stringDouble[TCL_DOUBLE_SPACE];

    if (graphPtr->flags & RBC_RESET_AXES) {
        RbcResetAxes(graphPtr);
    }
    if (axisPtr->logScale) {
        min = EXP10(axisPtr->axisRange.min);
        max = EXP10(axisPtr->axisRange.max);
    } else {
        min = axisPtr->axisRange.min;
        max = axisPtr->axisRange.max;
    }
    Tcl_PrintDouble(NULL, min, stringDouble);
    Tcl_AppendElement(interp, stringDouble);
    Tcl_PrintDouble(NULL, max, stringDouble);
    Tcl_AppendElement(interp, stringDouble);
    return TCL_OK;
}

/*
 * ----------------------------------------------------------------------
 *
 * InvTransformOp --
................................................................................
    RbcGraph * graphPtr,
    RbcAxis * axisPtr,
    int argc,                   /* Not used. */
    const char **argv)
{
    int             x;          /* Integer window coordinate */
    double          y;          /* Real graph coordinate */
    char stringDouble[TCL_DOUBLE_SPACE];

    if (graphPtr->flags & RBC_RESET_AXES) {
        RbcResetAxes(graphPtr);
    }
    if (Tcl_GetInt(graphPtr->interp, argv[0], &x) != TCL_OK) {
        return TCL_ERROR;
    }
................................................................................
     * element (using either -mapx or -mapy options).
     */
    if (AxisIsHorizontal(graphPtr, axisPtr)) {
        y = RbcInvHMap(graphPtr, axisPtr, (double) x);
    } else {
        y = RbcInvVMap(graphPtr, axisPtr, (double) x);
    }
    Tcl_PrintDouble(NULL, y, stringDouble);
    Tcl_AppendElement(graphPtr->interp, stringDouble);
    return TCL_OK;
}

/*
 * ----------------------------------------------------------------------
 *
 * TransformOp --
................................................................................
{
    RbcAxis        *axisPtr;
    Tcl_Interp     *interp = graphPtr->interp;
    double          axisOffset, scrollUnits;
    double          fract;
    double          viewMin, viewMax, worldMin, worldMax;
    double          viewWidth, worldWidth;
    char stringDouble[TCL_DOUBLE_SPACE];

    if (NameToAxis(graphPtr, argv[3], &axisPtr) != TCL_OK) {
        return TCL_ERROR;
    }
    worldMin = axisPtr->valueRange.min;
    worldMax = axisPtr->valueRange.max;
    /* Override data dimensions with user-selected limits. */
................................................................................
        axisOffset = worldMax - viewMax;
        scrollUnits = (double) axisPtr->scrollUnits * graphPtr->vScale;
    }
    if (argc == 4) {
        /* Note: Bound the fractions between 0.0 and 1.0 to support
         * "canvas"-style scrolling. */
        fract = axisOffset / worldWidth;
        Tcl_PrintDouble(interp, CLAMP(fract, 0.0, 1.0), stringDouble);
        Tcl_AppendElement(interp, stringDouble);
        fract = (axisOffset + viewWidth) / worldWidth;
        Tcl_PrintDouble(interp, CLAMP(fract, 0.0, 1.0), stringDouble);
        Tcl_AppendElement(interp, stringDouble);
        return TCL_OK;
    }
    fract = axisOffset / worldWidth;
    if (GetAxisScrollInfo(interp, argc - 4, argv + 4, &fract,
            viewWidth / worldWidth, scrollUnits) != TCL_OK) {
        return TCL_ERROR;
    }

Changes to generic/rbc/rbcGraph.c.

1408
1409
1410
1411
1412
1413
1414

1415
1416
1417
1418
1419
1420
1421
....
1426
1427
1428
1429
1430
1431
1432

1433

1434
1435
1436
1437
1438
1439
1440
1441
....
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
....
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
    Tcl_Interp * interp,
    int argc,                   /* Not used. */
    const char **argv)
{
    double          x, y;
    RbcPoint2D      point;
    RbcAxis2D       axes;


    if (Tcl_ExprDouble(interp, argv[2], &x) != TCL_OK ||
        Tcl_ExprDouble(interp, argv[3], &y) != TCL_OK) {
        return TCL_ERROR;
    }
    if (graphPtr->flags & RBC_RESET_AXES) {
        RbcResetAxes(graphPtr);
................................................................................
     * what the user wants).  */

    /*  Pick the first pair of axes */
    axes.x = RbcGetFirstAxis(graphPtr->axisChain[0]);
    axes.y = RbcGetFirstAxis(graphPtr->axisChain[1]);
    point = RbcInvMap2D(graphPtr, x, y, &axes);


    Tcl_AppendElement(interp, RbcDtoa(interp, point.x));

    Tcl_AppendElement(interp, RbcDtoa(interp, point.y));
    return TCL_OK;
}

/*
 * --------------------------------------------------------------------------
 *
 * TransformOp --
................................................................................
     * Note that the points are always mapped onto the bottom and left
     * axes (which may not be the what the user wants).
     */
    axes.x = RbcGetFirstAxis(graphPtr->axisChain[0]);
    axes.y = RbcGetFirstAxis(graphPtr->axisChain[1]);

    point = RbcMap2D(graphPtr, x, y, &axes);
    Tcl_AppendElement(interp, RbcItoa(ROUND(point.x)));
    Tcl_AppendElement(interp, RbcItoa(ROUND(point.y)));
    return TCL_OK;
}

/*
 *----------------------------------------------------------------------
 *
 * StringToFormat --
................................................................................
        if (marginPtr->varName != NULL) {       /* Trigger variable traces */
            if ((marginPtr->site == RBC_MARGIN_LEFT) ||
                (marginPtr->site == RBC_MARGIN_RIGHT)) {
                size = marginPtr->width;
            } else {
                size = marginPtr->height;
            }
            Tcl_SetVar(graphPtr->interp, marginPtr->varName, RbcItoa(size),
                TCL_GLOBAL_ONLY);
        }
    }
}

/*
 *----------------------------------------------------------------------
 *






>







 







>
|
>
|







 







|
|







 







|
|







1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
....
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
....
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
....
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
    Tcl_Interp * interp,
    int argc,                   /* Not used. */
    const char **argv)
{
    double          x, y;
    RbcPoint2D      point;
    RbcAxis2D       axes;
    char stringDouble[TCL_DOUBLE_SPACE];

    if (Tcl_ExprDouble(interp, argv[2], &x) != TCL_OK ||
        Tcl_ExprDouble(interp, argv[3], &y) != TCL_OK) {
        return TCL_ERROR;
    }
    if (graphPtr->flags & RBC_RESET_AXES) {
        RbcResetAxes(graphPtr);
................................................................................
     * what the user wants).  */

    /*  Pick the first pair of axes */
    axes.x = RbcGetFirstAxis(graphPtr->axisChain[0]);
    axes.y = RbcGetFirstAxis(graphPtr->axisChain[1]);
    point = RbcInvMap2D(graphPtr, x, y, &axes);

    Tcl_PrintDouble(NULL, point.x, stringDouble);
    Tcl_AppendElement(interp, stringDouble);
    Tcl_PrintDouble(NULL, point.y, stringDouble);
    Tcl_AppendElement(interp, stringDouble);
    return TCL_OK;
}

/*
 * --------------------------------------------------------------------------
 *
 * TransformOp --
................................................................................
     * Note that the points are always mapped onto the bottom and left
     * axes (which may not be the what the user wants).
     */
    axes.x = RbcGetFirstAxis(graphPtr->axisChain[0]);
    axes.y = RbcGetFirstAxis(graphPtr->axisChain[1]);

    point = RbcMap2D(graphPtr, x, y, &axes);
    Tcl_AppendPrintfToObj(Tcl_GetObjResult(interp),
                    "%d %d",ROUND(point.x),ROUND(point.y));
    return TCL_OK;
}

/*
 *----------------------------------------------------------------------
 *
 * StringToFormat --
................................................................................
        if (marginPtr->varName != NULL) {       /* Trigger variable traces */
            if ((marginPtr->site == RBC_MARGIN_LEFT) ||
                (marginPtr->site == RBC_MARGIN_RIGHT)) {
                size = marginPtr->width;
            } else {
                size = marginPtr->height;
            }
            Tcl_SetVar2Ex(graphPtr->interp, marginPtr->varName, NULL,
                Tcl_NewIntObj(size), TCL_GLOBAL_ONLY);
        }
    }
}

/*
 *----------------------------------------------------------------------
 *

Changes to generic/rbc/rbcInt.h.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
...
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
...
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
...
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
....
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
....
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
....
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
....
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
....
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
....
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
....
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
....
3080
3081
3082
3083
3084
3085
3086

































































3087
3088
3089
3090
3091
3092
3093
#ifndef _RBCINT
#define _RBCINT

#include <tcl.h>
#include <tclInt.h>             /* only #define's and inline functions */

#define USE_OLD_CANVAS          /* TODO remove */
#include <tk.h>
#include "tkInt.h"

#ifndef _WIN32
#include <X11/Xproto.h>
#endif

#if defined(_WIN32)
#include "tkWinInt.h"
................................................................................
#define RBC_MARGIN_TOP      2
#define RBC_MARGIN_RIGHT    3

/* forward references, defined later */
typedef struct RbcGraph RbcGraph;
typedef struct RbcElement RbcElement;
typedef struct RbcLegend RbcLegend;
typedef struct RbcList RbcList;
typedef struct RbcListNode RbcListNode;
typedef struct RbcBindTable RbcBindTable;
typedef struct RbcChainLink RbcChainLink;
typedef struct RbcTileClient *RbcTile;  /* Opaque type for tiles */
typedef struct RbcPsToken RbcPsToken;
typedef struct RbcPen RbcPen;
typedef struct RbcMarker RbcMarker;
typedef struct RbcCrosshairs RbcCrosshairs;
................................................................................
    Tk_Anchor       anchor;     /* Indicates how the text is anchored around
                                 * its x and y coordinates. */
    RbcPad          padX, padY; /* # pixels padding of around text region */
    short int       leader;     /* # pixels spacing between lines of text */
} RbcTextStyle;

/*
 * RbcListNode --
 *
 * A RbcListNode is the container structure for the RbcList.
 */
typedef struct RbcListNode {
    RbcListNode    *prevPtr;    /* Link to the previous node */
    RbcListNode    *nextPtr;    /* Link to the next node */
    ClientData      clientData; /* Pointer to the data object */
    RbcList        *listPtr;    /* List to eventually insert node */
    union {                     /* Key has one of these forms: */
        const char     *oneWordValue;   /* One-word value for key. */
        int            *words[1];       /* Multiple integer words for key.
                                         * The actual size will be as large
                                         * as necessary for this table's
                                         * keys. */
        char            string[4];      /* String for key.  The actual size
                                         * will be as large as needed to hold
                                         * the key. */
    } key;                      /* MUST BE LAST FIELD IN RECORD!! */
} RbcListNode;

typedef int     (RbcListCompareProc) (
    RbcListNode ** node1Ptr,
    RbcListNode ** node2Ptr);

/*
 * RbcList --
 *
 * A RbcList is a doubly chained list structure.
 */
typedef struct RbcList {
    RbcListNode    *headPtr;    /* Pointer to first element in list */
    RbcListNode    *tailPtr;    /* Pointer to last element in list */
    int             nNodes;     /* Number of node currently in the list. */
    int             type;       /* Type of keys in list. */
} RbcList;

typedef ClientData(
    RbcBindPickProc) (
    ClientData clientData,
    int x,
    int y,
    ClientData * contextPtr);

typedef void    (
    RbcBindTagProc) (
    RbcBindTable * bindTable,
    ClientData object,
    ClientData context,
    RbcList * list);

/*
 * RbcBindTable --
 *
 * Binding structure information:
 */
typedef struct RbcBindTable {
    unsigned int    flags;
................................................................................
    int             state;      /* Last known modifier state.  Used to
                                 * defer picking a new current object
                                 * while buttons are down. */
    ClientData      clientData;
    Tk_Window       tkwin;
    RbcBindPickProc *pickProc;  /* Routine to report the item the mouse is
                                 * currently over. */
    RbcBindTagProc *tagProc;    /* Routine to report tags picked items. */
} RbcBindTable;

/*
 * RbcChainLink --
 *
 * A RbcChainLink is the container structure for the RbcChain.
 */
................................................................................

/* int RbcLineWidth(int w); */
#define RbcLineWidth(w)	(((w) > 1) ? (w) : 0)

/* int RbcPadding(RbcPad w); */
#define RbcPadding(x)	((x).side1 + (x).side2)

/* int RbcListGetLength(RbcList *list); */
#define RbcListGetLength(list) \
	(((list) == NULL) ? 0 : ((RbcList *)list)->nNodes)
/* RbcListNode *RbcListFirstNode(RbcList *list); */
#define RbcListFirstNode(list) \
	(((list) == NULL) ? NULL : ((RbcList *)list)->headPtr)
/* RbcListNode *RbcListLastNode(RbcList *list); */
#define RbcListLastNode(list)	\
	(((list) == NULL) ? NULL : ((RbcList *)list)->tailPtr)
/* RbcListNode *RbcListPrevNode(RbcListNode *node); */
#define RbcListPrevNode(node)	((node)->prevPtr)
/* RbcListNode *RbcListNextNode(RbcListNode *node); */
#define RbcListNextNode(node) 	((node)->nextPtr)
/* char *RbcListGetKey(RbcListNode *node); */
#define RbcListGetKey(node)	\
	(((node)->listPtr->type == TCL_STRING_KEYS) \
		 ? (node)->key.string : (node)->key.oneWordValue)
/* ClientData RbcGetCurrentItem(RbcBindTable *bindPtr); */
#define RbcGetCurrentItem(bindPtr)  ((bindPtr)->currentItem)
/* */
/* ClientData RbcGetBindingData(RbcBindTable *bindPtr); */
#define RbcGetBindingData(bindPtr)  ((bindPtr)->clientData)
/* int RbcChainGetLength(RbcChain *c); */
#define RbcChainGetLength(c)	(((c) == NULL) ? 0 : (c)->nLinks)
................................................................................
/* void RbcChainSetValue(RbcChainLink *l, ClientData value); */
#define RbcChainSetValue(l, value) ((l)->clientData = (ClientData)(value))

/*
 * Function declarations:
 */

/* rbcAlloc.c */
MODULE_SCOPE void *RbcCalloc(
    unsigned int nElem,
    size_t size);
MODULE_SCOPE char *RbcStrdup(
    const char *ptr);

/* rbcBind.c */
MODULE_SCOPE int RbcConfigureBindings(
    Tcl_Interp * interp,
    RbcBindTable * table,
    ClientData item,
    int argc,
    const char **argv);
................................................................................
    ClientData item,
    int objc,
    Tcl_Obj * const *objv);
MODULE_SCOPE RbcBindTable *RbcCreateBindingTable(
    Tcl_Interp * interp,
    Tk_Window tkwin,
    ClientData clientData,
    RbcBindPickProc * pickProc,
    RbcBindTagProc * tagProc);
MODULE_SCOPE void RbcDestroyBindingTable(
    RbcBindTable * table);
MODULE_SCOPE void RbcPickCurrentItem(
    RbcBindTable * table);
MODULE_SCOPE void RbcDeleteBindings(
    RbcBindTable * table,
    ClientData object);
................................................................................
    const char **argv,
    char *widgRec,
    int flags);

/* rbcGraph.c */
MODULE_SCOPE void RbcEventuallyRedrawGraph(
    RbcGraph * graphPtr);
MODULE_SCOPE void RbcGraphTags(
    RbcBindTable * table,
    ClientData object,
    ClientData context,
    RbcList * list);
MODULE_SCOPE int RbcGraphInstCmdProc(
    ClientData clientData,
    Tcl_Interp * interp,
    int argc,
    const char *argv[]);
MODULE_SCOPE void RbcLayoutGraph(
    RbcGraph * graphPtr);
................................................................................
    Tk_Window tkwin,
    ClientData clientData);
MODULE_SCOPE int RbcDestroyTemporaryImage(
    Tcl_Interp * interp,
    Tk_Image tkImage);
MODULE_SCOPE const char *RbcNameOfImage(
    Tk_Image tkImage);

/* rbcList.c */
MODULE_SCOPE RbcList *RbcListCreate(
    int type);
MODULE_SCOPE RbcListNode *RbcListCreateNode(
    RbcList * list,
    const char *key);
MODULE_SCOPE void RbcListReset(
    RbcList * list);
MODULE_SCOPE void RbcListDestroy(
    RbcList * list);
MODULE_SCOPE void RbcListInit(
    RbcList * list,
    int type);
MODULE_SCOPE void RbcListLinkAfter(
    RbcList * list,
    RbcListNode * node,
    RbcListNode * afterNode);
MODULE_SCOPE void RbcListLinkBefore(
    RbcList * list,
    RbcListNode * node,
    RbcListNode * beforeNode);
MODULE_SCOPE void RbcListUnlinkNode(
    RbcListNode * node);
MODULE_SCOPE RbcListNode *RbcListGetNode(
    RbcList * list,
    const char *key);
MODULE_SCOPE void RbcListDeleteNode(
    RbcListNode * node);
MODULE_SCOPE void Rb_ListDeleteNodeByKey(
    RbcList * list,
    const char *key);
MODULE_SCOPE RbcListNode *RbcListAppend(
    RbcList * list,
    const char *key,
    ClientData clientData);
MODULE_SCOPE RbcListNode *RbcListPrepend(
    RbcList * list,
    const char *key,
    ClientData clientData);
MODULE_SCOPE RbcListNode *RbcListGetNthNode(
    RbcList * list,
    int position,
    int direction);
MODULE_SCOPE void RbcListSort(
    RbcList * list,
    RbcListCompareProc * proc);
MODULE_SCOPE int RbcImageIsDeleted(
    Tk_Image tkImage);

/* rbcParse.c */
MODULE_SCOPE void RbcExpandParseValue(
    RbcParseValue * parsePtr,
    int needed);
................................................................................
    int *transXPtr,
    int *transYPtr);
MODULE_SCOPE RbcPoint2D RbcTranslatePoint(
    RbcPoint2D * pointPtr,
    int width,
    int height,
    Tk_Anchor anchor);
MODULE_SCOPE Pixmap RbcCreateTextBitmap(
    Tk_Window tkwin,
    RbcTextLayout * textPtr,
    RbcTextStyle * stylePtr,
    int *widthPtr,
    int *heightPtr);
MODULE_SCOPE void RbcInitTextStyle(
    RbcTextStyle * stylePtr);
MODULE_SCOPE void RbcSetDrawTextStyle(
    RbcTextStyle * stylePtr,
    Tk_Font font,
    GC gc,
    XColor * normalColor,
................................................................................
    Tk_Window tkwin,
    Drawable drawable,
    RbcTile tile,
    XRectangle * rectArr,
    int nRects);

/* rbcUtil.c */
MODULE_SCOPE char *RbcItoa(
    int value);
MODULE_SCOPE char *RbcUtoa(
    unsigned int value);
MODULE_SCOPE char *RbcDtoa(
    Tcl_Interp * interp,
    double value);
MODULE_SCOPE RbcUid RbcGetUid(
    const char *string);
MODULE_SCOPE void RbcFreeUid(
    RbcUid uid);
MODULE_SCOPE RbcUid RbcFindUid(
    char *string);
MODULE_SCOPE RbcOp RbcGetOp(
................................................................................
    int regionY,
    unsigned int regionWidth,
    unsigned int regionHeight,
    unsigned int virtWidth,
    unsigned int virtHeight,
    double theta);


































































/* Windows */
#ifdef _WIN32
#include "rbcWin.h"
#endif

#ifndef _WIN32
#define PurifyPrintf  printf






<

|







 







<
<







 







<

<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







<
<
<
<
<
<
<







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







|
<







 







<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<







 







|
|
|
|
|
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







14
15
16
17
18
19
20

21
22
23
24
25
26
27
28
29
...
312
313
314
315
316
317
318


319
320
321
322
323
324
325
...
411
412
413
414
415
416
417

418

419

































420
421
422
423
424
425
426







427
428
429
430
431
432
433
...
460
461
462
463
464
465
466

467
468
469
470
471
472
473
....
1648
1649
1650
1651
1652
1653
1654

















1655
1656
1657
1658
1659
1660
1661
....
1673
1674
1675
1676
1677
1678
1679







1680
1681
1682
1683
1684
1685
1686
....
1690
1691
1692
1693
1694
1695
1696
1697

1698
1699
1700
1701
1702
1703
1704
....
1760
1761
1762
1763
1764
1765
1766





1767
1768
1769
1770
1771
1772
1773
....
2270
2271
2272
2273
2274
2275
2276















































2277
2278
2279
2280
2281
2282
2283
....
2514
2515
2516
2517
2518
2519
2520






2521
2522
2523
2524
2525
2526
2527
....
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633


2634
2635
2636
2637
2638
2639
2640
....
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
#ifndef _RBCINT
#define _RBCINT

#include <tcl.h>
#include <tclInt.h>             /* only #define's and inline functions */


#include <tk.h>
#include <tkInt.h>

#ifndef _WIN32
#include <X11/Xproto.h>
#endif

#if defined(_WIN32)
#include "tkWinInt.h"
................................................................................
#define RBC_MARGIN_TOP      2
#define RBC_MARGIN_RIGHT    3

/* forward references, defined later */
typedef struct RbcGraph RbcGraph;
typedef struct RbcElement RbcElement;
typedef struct RbcLegend RbcLegend;


typedef struct RbcBindTable RbcBindTable;
typedef struct RbcChainLink RbcChainLink;
typedef struct RbcTileClient *RbcTile;  /* Opaque type for tiles */
typedef struct RbcPsToken RbcPsToken;
typedef struct RbcPen RbcPen;
typedef struct RbcMarker RbcMarker;
typedef struct RbcCrosshairs RbcCrosshairs;
................................................................................
    Tk_Anchor       anchor;     /* Indicates how the text is anchored around
                                 * its x and y coordinates. */
    RbcPad          padX, padY; /* # pixels padding of around text region */
    short int       leader;     /* # pixels spacing between lines of text */
} RbcTextStyle;

/*

 *

 */

































typedef ClientData(
    RbcBindPickProc) (
    ClientData clientData,
    int x,
    int y,
    ClientData * contextPtr);








/*
 * RbcBindTable --
 *
 * Binding structure information:
 */
typedef struct RbcBindTable {
    unsigned int    flags;
................................................................................
    int             state;      /* Last known modifier state.  Used to
                                 * defer picking a new current object
                                 * while buttons are down. */
    ClientData      clientData;
    Tk_Window       tkwin;
    RbcBindPickProc *pickProc;  /* Routine to report the item the mouse is
                                 * currently over. */

} RbcBindTable;

/*
 * RbcChainLink --
 *
 * A RbcChainLink is the container structure for the RbcChain.
 */
................................................................................

/* int RbcLineWidth(int w); */
#define RbcLineWidth(w)	(((w) > 1) ? (w) : 0)

/* int RbcPadding(RbcPad w); */
#define RbcPadding(x)	((x).side1 + (x).side2)


















/* ClientData RbcGetCurrentItem(RbcBindTable *bindPtr); */
#define RbcGetCurrentItem(bindPtr)  ((bindPtr)->currentItem)
/* */
/* ClientData RbcGetBindingData(RbcBindTable *bindPtr); */
#define RbcGetBindingData(bindPtr)  ((bindPtr)->clientData)
/* int RbcChainGetLength(RbcChain *c); */
#define RbcChainGetLength(c)	(((c) == NULL) ? 0 : (c)->nLinks)
................................................................................
/* void RbcChainSetValue(RbcChainLink *l, ClientData value); */
#define RbcChainSetValue(l, value) ((l)->clientData = (ClientData)(value))

/*
 * Function declarations:
 */








/* rbcBind.c */
MODULE_SCOPE int RbcConfigureBindings(
    Tcl_Interp * interp,
    RbcBindTable * table,
    ClientData item,
    int argc,
    const char **argv);
................................................................................
    ClientData item,
    int objc,
    Tcl_Obj * const *objv);
MODULE_SCOPE RbcBindTable *RbcCreateBindingTable(
    Tcl_Interp * interp,
    Tk_Window tkwin,
    ClientData clientData,
    RbcBindPickProc * pickProc);

MODULE_SCOPE void RbcDestroyBindingTable(
    RbcBindTable * table);
MODULE_SCOPE void RbcPickCurrentItem(
    RbcBindTable * table);
MODULE_SCOPE void RbcDeleteBindings(
    RbcBindTable * table,
    ClientData object);
................................................................................
    const char **argv,
    char *widgRec,
    int flags);

/* rbcGraph.c */
MODULE_SCOPE void RbcEventuallyRedrawGraph(
    RbcGraph * graphPtr);





MODULE_SCOPE int RbcGraphInstCmdProc(
    ClientData clientData,
    Tcl_Interp * interp,
    int argc,
    const char *argv[]);
MODULE_SCOPE void RbcLayoutGraph(
    RbcGraph * graphPtr);
................................................................................
    Tk_Window tkwin,
    ClientData clientData);
MODULE_SCOPE int RbcDestroyTemporaryImage(
    Tcl_Interp * interp,
    Tk_Image tkImage);
MODULE_SCOPE const char *RbcNameOfImage(
    Tk_Image tkImage);















































MODULE_SCOPE int RbcImageIsDeleted(
    Tk_Image tkImage);

/* rbcParse.c */
MODULE_SCOPE void RbcExpandParseValue(
    RbcParseValue * parsePtr,
    int needed);
................................................................................
    int *transXPtr,
    int *transYPtr);
MODULE_SCOPE RbcPoint2D RbcTranslatePoint(
    RbcPoint2D * pointPtr,
    int width,
    int height,
    Tk_Anchor anchor);






MODULE_SCOPE void RbcInitTextStyle(
    RbcTextStyle * stylePtr);
MODULE_SCOPE void RbcSetDrawTextStyle(
    RbcTextStyle * stylePtr,
    Tk_Font font,
    GC gc,
    XColor * normalColor,
................................................................................
    Tk_Window tkwin,
    Drawable drawable,
    RbcTile tile,
    XRectangle * rectArr,
    int nRects);

/* rbcUtil.c */
MODULE_SCOPE void *RbcCalloc(
    unsigned int nElem,
    size_t size);
MODULE_SCOPE char *RbcStrdup(
    const char *ptr);


MODULE_SCOPE RbcUid RbcGetUid(
    const char *string);
MODULE_SCOPE void RbcFreeUid(
    RbcUid uid);
MODULE_SCOPE RbcUid RbcFindUid(
    char *string);
MODULE_SCOPE RbcOp RbcGetOp(
................................................................................
    int regionY,
    unsigned int regionWidth,
    unsigned int regionHeight,
    unsigned int virtWidth,
    unsigned int virtHeight,
    double theta);

/* rbcScrollbar.c */
#include <tclOO.h>
MODULE_SCOPE int RbcScrollbarInit(
    Tcl_Interp *interp);
MODULE_SCOPE int RbcScrollbarConstructor(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarDestructor(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarActivate(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarCget(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarConfigure(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarDelta(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarFraction(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarGet(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarIdentify(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);
MODULE_SCOPE int RbcScrollbarSet(
    ClientData clientData,
	Tcl_Interp *interp,
    Tcl_ObjectContext objectContext,
    int objc,
    Tcl_Obj *const objv[]);

/* Windows */
#ifdef _WIN32
#include "rbcWin.h"
#endif

#ifndef _WIN32
#define PurifyPrintf  printf

Changes to generic/rbc/rbcSpline.c.

1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
         */
        if (RbcResizeVector(splY, nIntpPts) != TCL_OK) {
            return TCL_ERROR;
        }
    }
    origPts = (RbcPoint2D *) ckalloc(sizeof(RbcPoint2D) * nOrigPts);
    if (origPts == NULL) {
        Tcl_AppendResult(interp, "can't allocate \"", RbcItoa(nOrigPts),
            "\" points", (char *) NULL);
        return TCL_ERROR;
    }
    intpPts = (RbcPoint2D *) ckalloc(sizeof(RbcPoint2D) * nIntpPts);
    if (intpPts == NULL) {
        Tcl_AppendResult(interp, "can't allocate \"", RbcItoa(nIntpPts),
            "\" points", (char *) NULL);
        ckfree((char *) origPts);
        return TCL_ERROR;
    }
    xArr = x->valueArr;
    yArr = y->valueArr;
    for (i = 0; i < nOrigPts; i++) {
        origPts[i].x = xArr[i];






|
|




|
|







1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
         */
        if (RbcResizeVector(splY, nIntpPts) != TCL_OK) {
            return TCL_ERROR;
        }
    }
    origPts = (RbcPoint2D *) ckalloc(sizeof(RbcPoint2D) * nOrigPts);
    if (origPts == NULL) {
        Tcl_AppendPrintfToObj(Tcl_GetObjResult(interp),
            "can't allocate \"%d\" points", nOrigPts);
        return TCL_ERROR;
    }
    intpPts = (RbcPoint2D *) ckalloc(sizeof(RbcPoint2D) * nIntpPts);
    if (intpPts == NULL) {
        Tcl_AppendPrintfToObj(Tcl_GetObjResult(interp),
            "can't allocate \"%d\" points", nIntpPts);
        ckfree((char *) origPts);
        return TCL_ERROR;
    }
    xArr = x->valueArr;
    yArr = y->valueArr;
    for (i = 0; i < nOrigPts; i++) {
        origPts[i].x = xArr[i];

Changes to generic/rbc/rbcSwitch.c.

202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
                (specPtr->customPtr->clientData, interp, (char *)specPtr->switchName,
                    (char *)string, record, specPtr->offset) != TCL_OK) {
                return TCL_ERROR;
            }
            break;

        default:
            Tcl_AppendResult(interp, "bad switch table: unknown type \"",
                RbcItoa(specPtr->type), "\"", (char *) NULL);
            return TCL_ERROR;
        }
        specPtr++;
    } while ((specPtr->switchName == NULL) &&
        (specPtr->type != RBC_SWITCH_END));
    return TCL_OK;
}






|
|







202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
                (specPtr->customPtr->clientData, interp, (char *)specPtr->switchName,
                    (char *)string, record, specPtr->offset) != TCL_OK) {
                return TCL_ERROR;
            }
            break;

        default:
            Tcl_AppendPrintfToObj(Tcl_GetObjResult(interp),
                "bad switch table: unknown type \"%d\"", specPtr->type);
            return TCL_ERROR;
        }
        specPtr++;
    } while ((specPtr->switchName == NULL) &&
        (specPtr->type != RBC_SWITCH_END));
    return TCL_OK;
}

Changes to generic/rbc/rbcText.c.

22
23
24
25
26
27
28






29
30
31
32
33
34
35
...
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
...
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
    Display * display,
    Drawable drawable,
    GC gc,
    Tk_Font font,
    register int x,
    register int y,
    RbcTextLayout * textPtr);







/*
 *--------------------------------------------------------------
 *
 * DrawTextLayout --
 *
 *      TODO: Description
................................................................................
    }
    return trans;
}

/*
 * -----------------------------------------------------------------
 *
 * RbcCreateTextBitmap --
 *
 *      Draw a bitmap, using the the given window coordinates
 *      as an anchor for the text bounding box.
 *
 * Results:
 *      Returns the bitmap representing the text string.
 *
 * Side Effects:
 *      Bitmap is drawn using the given font and GC in the
 *      drawable at the given coordinates, anchor, and rotation.
 *
 * -----------------------------------------------------------------
 */
Pixmap
RbcCreateTextBitmap(
    Tk_Window tkwin,
    RbcTextLayout * textPtr,    /* Text string to draw */
    RbcTextStyle * tsPtr,       /* Text attributes: rotation, color, font,
                                 * linespacing, justification, etc. */
    int *bmWidthPtr,
    int *bmHeightPtr)
{                               /* Extents of rotated text string */
................................................................................
#endif
    /*
     * Rotate the text by writing the text into a bitmap and rotating
     * the bitmap.  Set the clip mask and origin in the GC first.  And
     * make sure we restore the GC because it may be shared.
     */
    tsPtr->theta = theta;
    bitmap = RbcCreateTextBitmap(tkwin, textPtr, tsPtr, &width, &height);
    if (bitmap == None) {
        return;
    }
    RbcTranslateAnchor(x, y, width, height, tsPtr->anchor, &x, &y);
#ifdef notdef
    theta = FMOD(theta, (double) 90.0);
#endif






>
>
>
>
>
>







 







|













|
|







 







|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
...
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
...
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
    Display * display,
    Drawable drawable,
    GC gc,
    Tk_Font font,
    register int x,
    register int y,
    RbcTextLayout * textPtr);
static Pixmap CreateTextBitmap(
    Tk_Window tkwin,
    RbcTextLayout * textPtr,
    RbcTextStyle * stylePtr,
    int *widthPtr,
    int *heightPtr);

/*
 *--------------------------------------------------------------
 *
 * DrawTextLayout --
 *
 *      TODO: Description
................................................................................
    }
    return trans;
}

/*
 * -----------------------------------------------------------------
 *
 * CreateTextBitmap --
 *
 *      Draw a bitmap, using the the given window coordinates
 *      as an anchor for the text bounding box.
 *
 * Results:
 *      Returns the bitmap representing the text string.
 *
 * Side Effects:
 *      Bitmap is drawn using the given font and GC in the
 *      drawable at the given coordinates, anchor, and rotation.
 *
 * -----------------------------------------------------------------
 */
static Pixmap
CreateTextBitmap(
    Tk_Window tkwin,
    RbcTextLayout * textPtr,    /* Text string to draw */
    RbcTextStyle * tsPtr,       /* Text attributes: rotation, color, font,
                                 * linespacing, justification, etc. */
    int *bmWidthPtr,
    int *bmHeightPtr)
{                               /* Extents of rotated text string */
................................................................................
#endif
    /*
     * Rotate the text by writing the text into a bitmap and rotating
     * the bitmap.  Set the clip mask and origin in the GC first.  And
     * make sure we restore the GC because it may be shared.
     */
    tsPtr->theta = theta;
    bitmap = CreateTextBitmap(tkwin, textPtr, tsPtr, &width, &height);
    if (bitmap == None) {
        return;
    }
    RbcTranslateAnchor(x, y, width, height, tsPtr->anchor, &x, &y);
#ifdef notdef
    theta = FMOD(theta, (double) 90.0);
#endif

Changes to generic/rbc/rbcUtil.c.

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

47
48
49

50




51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

81
82
83

84
85
86
87
88
89
90
91
92
93


94
95








96
97
98
99
100
101
102
103
    int nSpecs,
    const char *string);
static int      LinearOpSearch(
    RbcOpSpec specArr[],
    int nSpecs,
    const char *string);


static char     stringRep[200];

/*
 *--------------------------------------------------------------
 *
 * RbcItoa --
 *
 *      TODO: Description
 *
 * Results:
 *      TODO: Results
 *
 * Side effects:
 *      TODO: Side Effects
 *
 *--------------------------------------------------------------
 */
char           *
RbcItoa(
    int value)

{
    sprintf(stringRep, "%d", value);
    return stringRep;

}





/*
 *--------------------------------------------------------------
 *
 * RbcUtoa --
 *
 *      TODO: Description
 *
 * Results:
 *      TODO: Results
 *
 * Side effects:
 *      TODO: Side Effects
 *
 *--------------------------------------------------------------
 */
char           *
RbcUtoa(
    unsigned int value)
{
    sprintf(stringRep, "%u", value);
    return stringRep;
}

/*
 *--------------------------------------------------------------
 *
 * RbcDtoa --
 *
 *      TODO: Description

 *
 * Results:
 *      TODO: Results

 *
 * Side effects:
 *      TODO: Side Effects
 *
 *--------------------------------------------------------------
 */
char           *
RbcDtoa(
    Tcl_Interp * interp,
    double value)


{
    Tcl_PrintDouble(interp, value, stringRep);








    return stringRep;
}

/*
 * The hash table below is used to keep track of all the RbcUids created
 * so far.
 */
static Tcl_HashTable uidTable;






<
<
<

|

|






|


|

|
|
|
>

<
|
>
|
>
>
>
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|



|

|

<
>


<
>

|


|


<
<
<
>
>

<
>
>
>
>
>
>
>
>
|







19
20
21
22
23
24
25



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53




















54
55
56
57
58
59
60
61

62
63
64

65
66
67
68
69
70
71
72



73
74
75

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    int nSpecs,
    const char *string);
static int      LinearOpSearch(
    RbcOpSpec specArr[],
    int nSpecs,
    const char *string);




/*
 *----------------------------------------------------------------------
 *
 * RbcCalloc --
 *
 *      TODO: Description
 *
 * Results:
 *      TODO: Results
 *
 * Side Effects:
 *      TODO: Side Effects
 *
 *----------------------------------------------------------------------
 */
void           *
RbcCalloc(
    unsigned int nElems,
    size_t sizeOfElem)
{

    char           *allocPtr;
    size_t          size;

    size = nElems * sizeOfElem;
    allocPtr = ckalloc(size);
    if (allocPtr != NULL) {
        memset(allocPtr, 0, size);
    }




















    return allocPtr;
}

/*
 *----------------------------------------------------------------------
 *
 * RbcStrdup --
 *

 *      Create a copy of the string from heap storage.
 *
 * Results:

 *      Returns a pointer to the need string copy.
 *
 * Side Effects:
 *      TODO: Side Effects
 *
 *----------------------------------------------------------------------
 */
char           *



RbcStrdup(
    const char *string)
{

    size_t          size;
    char           *allocPtr;

    size = strlen(string) + 1;
    allocPtr = ckalloc(size * sizeof(char));
    if (allocPtr != NULL) {
        strcpy(allocPtr, string);
    }
    return allocPtr;
}

/*
 * The hash table below is used to keep track of all the RbcUids created
 * so far.
 */
static Tcl_HashTable uidTable;

Changes to generic/rbc/rbcVecMath.c.

1024
1025
1026
1027
1028
1029
1030


1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
    Tcl_Interp *interp,
    char *string,
    RbcVector *vecPtr)
{
    RbcVectorInterpData *dataPtr; /* Interpreter-specific data. */
    RbcVectorObject *vPtr = (RbcVectorObject *) vecPtr;
    RbcParseVector value;


    dataPtr = (vecPtr != NULL) ? vPtr->dataPtr : RbcVectorGetInterpData(interp);
    value.vPtr = RbcVectorNew(dataPtr);
    if (EvaluateExpression(interp, string, &value) != TCL_OK) {
        RbcVectorFree(value.vPtr);
        return TCL_ERROR;
    }
    if (vPtr != NULL) {
        RbcVectorDuplicate(vPtr, value.vPtr);
    } else {
        register int i;
        /* No result vector.  Put values in Tcl_GetString(Tcl_GetObjResult(interp)).  */
        for (i = 0; i < value.vPtr->length; i++) {
            string = RbcDtoa(interp, value.vPtr->valueArr[i]);
            Tcl_AppendElement(interp, string);
        }
    }
    RbcVectorFree(value.vPtr);
    return TCL_OK;
}
/*
 *--------------------------------------------------------------






>
>












|
|







1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
    Tcl_Interp *interp,
    char *string,
    RbcVector *vecPtr)
{
    RbcVectorInterpData *dataPtr; /* Interpreter-specific data. */
    RbcVectorObject *vPtr = (RbcVectorObject *) vecPtr;
    RbcParseVector value;
    char stringDouble[TCL_DOUBLE_SPACE];

    dataPtr = (vecPtr != NULL) ? vPtr->dataPtr : RbcVectorGetInterpData(interp);
    value.vPtr = RbcVectorNew(dataPtr);
    if (EvaluateExpression(interp, string, &value) != TCL_OK) {
        RbcVectorFree(value.vPtr);
        return TCL_ERROR;
    }
    if (vPtr != NULL) {
        RbcVectorDuplicate(vPtr, value.vPtr);
    } else {
        register int i;
        /* No result vector.  Put values in Tcl_GetString(Tcl_GetObjResult(interp)).  */
        for (i = 0; i < value.vPtr->length; i++) {
            Tcl_PrintDouble(NULL, value.vPtr->valueArr[i], stringDouble);
            Tcl_AppendElement(interp, stringDouble);
        }
    }
    RbcVectorFree(value.vPtr);
    return TCL_OK;
}
/*
 *--------------------------------------------------------------

Changes to generic/rbc/rbcVecObjCmd.c.

783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
....
1399
1400
1401
1402
1403
1404
1405
1406
1407

1408
1409
1410
1411
1412
1413
1414
        *vPtrPtr++ = v2Ptr;
        nElem += refSize;
    }
    *vPtrPtr = NULL;

    valueArr = (double *) ckalloc(sizeof(double) * nElem);
    if (valueArr == NULL) {
        Tcl_AppendResult(vPtr->interp, "not enough memory to allocate ",
            RbcItoa(nElem), " vector elements", (char *) NULL);
        return TCL_ERROR;
    }
    /* Merge the values from each of the vectors into the current vector */
    valuePtr = valueArr;
    for (i = 0; i < refSize; i++) {
        for (vPtrPtr = vecArr; *vPtrPtr != NULL; vPtrPtr++) {
            *valuePtr++ = (*vPtrPtr)->valueArr[i + (*vPtrPtr)->first];
................................................................................
    int objc,
    Tcl_Obj * const objv[])
{
    int             nVectors;

    nVectors = objc - 2;
    if ((vPtr->length % nVectors) != 0) {
        Tcl_AppendResult(interp, "can't split vector \"", vPtr->name,
            "\" into ", RbcItoa(nVectors), " even parts.", (char *) NULL);

        return TCL_ERROR;
    }
    if (nVectors > 0) {
        RbcVectorObject *v2Ptr;
        char           *string; /* Name of vector. */
        int             i, j, k;
        int             oldSize, newSize, extra, isNew;






|
|







 







|
|
>







783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
....
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
        *vPtrPtr++ = v2Ptr;
        nElem += refSize;
    }
    *vPtrPtr = NULL;

    valueArr = (double *) ckalloc(sizeof(double) * nElem);
    if (valueArr == NULL) {
        Tcl_AppendPrintfToObj(Tcl_GetObjResult(vPtr->interp),
            "not enough memory to allocate %d vector elements", nElem);
        return TCL_ERROR;
    }
    /* Merge the values from each of the vectors into the current vector */
    valuePtr = valueArr;
    for (i = 0; i < refSize; i++) {
        for (vPtrPtr = vecArr; *vPtrPtr != NULL; vPtrPtr++) {
            *valuePtr++ = (*vPtrPtr)->valueArr[i + (*vPtrPtr)->first];
................................................................................
    int objc,
    Tcl_Obj * const objv[])
{
    int             nVectors;

    nVectors = objc - 2;
    if ((vPtr->length % nVectors) != 0) {
        Tcl_AppendPrintfToObj(Tcl_GetObjResult(interp),
            "can't split vector \"%s\" into %d even parts.",
            vPtr->name, nVectors);
        return TCL_ERROR;
    }
    if (nVectors > 0) {
        RbcVectorObject *v2Ptr;
        char           *string; /* Name of vector. */
        int             i, j, k;
        int             oldSize, newSize, extra, isNew;

Changes to generic/rbc/rbcVector.c.

1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
....
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
....
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
....
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
            valueArr = NULL;
            size = length = 0;
        } else if (freeProc == TCL_VOLATILE) {
            double         *newArr;
            /* Data is volatile. Make a copy of the value array.  */
            newArr = (double *) ckalloc(size * sizeof(double));
            if (newArr == NULL) {
                Tcl_AppendResult(vPtr->interp, "can't allocate ",
                    RbcItoa(size), " elements for vector \"", vPtr->name,
                    "\"", (char *) NULL);
                return TCL_ERROR;
            }
            memcpy((char *) newArr, (char *) valueArr, sizeof(double) * length);
            valueArr = newArr;
            freeProc = TCL_DYNAMIC;
        }

................................................................................
RbcVectorChangeLength(
    RbcVectorObject * vPtr,     /* The vector to change lengths */
    int length)
{                               /* The new size of the vector */
    int             newSize;    /* Size of array in elements */
    double         *newArr;
    Tcl_FreeProc   *freeProc;
    Tcl_Obj        *resultPtr;

    newArr = NULL;
    newSize = 0;
    freeProc = TCL_STATIC;

    if (length > 0) {
        int             wanted, used;
................................................................................
        if (newSize == vPtr->size) {
            /* Same size, use current array. */
            newArr = vPtr->valueArr;
        } else {
            /* Dynamically allocate memory for the new array. */
            newArr = (double *) ckalloc(newSize * sizeof(double));
            if (newArr == NULL) {
                resultPtr = Tcl_NewStringObj("", -1);
                Tcl_AppendStringsToObj(resultPtr, "can't allocate ",
                    RbcItoa(newSize), " elements for vector \"", vPtr->name,
                    "\"", NULL);
                Tcl_SetObjResult(vPtr->interp, resultPtr);
                return TCL_ERROR;
            }
            if (used > wanted) {
                used = wanted;
            }
            /* Copy any previous data */
            if (used > 0) {
................................................................................
{
    RbcVectorInterpData *dataPtr;       /* Interpreter-specific data. */
    RbcVectorObject *vPtr;
    int             isNew;
    char           *nameCopy;

    if (initialSize < 0) {
        Tcl_AppendResult(interp, "bad vector size \"", RbcItoa(initialSize),
            "\"", (char *) NULL);
        return TCL_ERROR;
    }
    dataPtr = RbcVectorGetInterpData(interp);

    nameCopy = RbcStrdup(vecName);
    vPtr = RbcVectorCreate(dataPtr, nameCopy, cmdName, varName, &isNew);
    ckfree((char *) nameCopy);






|
|
|







 







<







 







|
|
|
<
<







 







|
|







1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
....
1683
1684
1685
1686
1687
1688
1689

1690
1691
1692
1693
1694
1695
1696
....
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718


1719
1720
1721
1722
1723
1724
1725
....
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
            valueArr = NULL;
            size = length = 0;
        } else if (freeProc == TCL_VOLATILE) {
            double         *newArr;
            /* Data is volatile. Make a copy of the value array.  */
            newArr = (double *) ckalloc(size * sizeof(double));
            if (newArr == NULL) {
                Tcl_AppendPrintfToObj(Tcl_GetObjResult(vPtr->interp),
                    "can't allocate %d elements for vector \"%s\"",
                    size, vPtr->name);
                return TCL_ERROR;
            }
            memcpy((char *) newArr, (char *) valueArr, sizeof(double) * length);
            valueArr = newArr;
            freeProc = TCL_DYNAMIC;
        }

................................................................................
RbcVectorChangeLength(
    RbcVectorObject * vPtr,     /* The vector to change lengths */
    int length)
{                               /* The new size of the vector */
    int             newSize;    /* Size of array in elements */
    double         *newArr;
    Tcl_FreeProc   *freeProc;


    newArr = NULL;
    newSize = 0;
    freeProc = TCL_STATIC;

    if (length > 0) {
        int             wanted, used;
................................................................................
        if (newSize == vPtr->size) {
            /* Same size, use current array. */
            newArr = vPtr->valueArr;
        } else {
            /* Dynamically allocate memory for the new array. */
            newArr = (double *) ckalloc(newSize * sizeof(double));
            if (newArr == NULL) {
                Tcl_SetObjResult(vPtr->interp, Tcl_ObjPrintf(
                    "can't allocate %d elements for vector \"%s\"",
                    newSize, vPtr->name));


                return TCL_ERROR;
            }
            if (used > wanted) {
                used = wanted;
            }
            /* Copy any previous data */
            if (used > 0) {
................................................................................
{
    RbcVectorInterpData *dataPtr;       /* Interpreter-specific data. */
    RbcVectorObject *vPtr;
    int             isNew;
    char           *nameCopy;

    if (initialSize < 0) {
        Tcl_AppendPrintfToObj(Tcl_GetObjResult(interp),
                    "bad vector size \"%d\"",initialSize);
        return TCL_ERROR;
    }
    dataPtr = RbcVectorGetInterpData(interp);

    nameCopy = RbcStrdup(vecName);
    vPtr = RbcVectorCreate(dataPtr, nameCopy, cmdName, varName, &isNew);
    ckfree((char *) nameCopy);

Changes to unix/Makefile.in.

379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
...
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
...
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
....
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
	ttkInit.o ttkLabel.o ttkLayout.o ttkManager.o ttkNotebook.o \
	ttkPanedwindow.o ttkProgress.o ttkScale.o ttkScrollbar.o ttkScroll.o \
	ttkSeparator.o ttkSquare.o ttkState.o \
	ttkTagSet.o ttkTheme.o ttkTrace.o ttkTrack.o ttkTreeview.o \
	ttkWidget.o ttkStubInit.o

RBC_OBJS = \
	rbcAlloc.o \
        rbcBind.o \
        rbcChain.o \
        rbcConfig.o \
        rbcGraph.o \
        rbcGrAxis.o \
        rbcGrBar.o \
        rbcGrElem.o \
................................................................................
        rbcGrLine.o \
        rbcGrMarker.o \
        rbcGrMisc.o \
        rbcGrPen.o \
        rbcGrPs.o \
        rbcImage.o \
        rbcInt.o \
        rbcList.o \
        rbcParse.o \
        rbcPs.o \
        rbcSpline.o \
        rbcSwitch.o \
        rbcText.o \
        rbcTile.o \
        rbcUtil.o \
................................................................................
	$(TTK_DIR)/ttkTreeview.c \
	$(TTK_DIR)/ttkWidget.c

TTK_STUB_SRCS = \
	$(TTK_DIR)/ttkStubInit.c $(TTK_DIR)/ttkStubLib.c

RBC_SRCS = \
        $(RBC_DIR)/rbcAlloc.c \
        $(RBC_DIR)/rbcBind.c \
        $(RBC_DIR)/rbcChain.c \
        $(RBC_DIR)/rbcConfig.c \
        $(RBC_DIR)/rbcGraph.c \
        $(RBC_DIR)/rbcGrAxis.c \
        $(RBC_DIR)/rbcGrBar.c \
        $(RBC_DIR)/rbcGrElem.c \
................................................................................
        $(RBC_DIR)/rbcGrLine.c \
        $(RBC_DIR)/rbcGrMarker.c \
        $(RBC_DIR)/rbcGrMisc.c \
        $(RBC_DIR)/rbcGrPen.c \
        $(RBC_DIR)/rbcGrPs.c \
        $(RBC_DIR)/rbcImage.c \
        $(RBC_DIR)/rbcInt.c \
        $(RBC_DIR)/rbcList.c \
        $(RBC_DIR)/rbcParse.c \
        $(RBC_DIR)/rbcPs.c \
        $(RBC_DIR)/rbcSpline.c \
        $(RBC_DIR)/rbcSwitch.c \
        $(RBC_DIR)/rbcText.c \
        $(RBC_DIR)/rbcTile.c \
        $(RBC_DIR)/rbcUtil.c \
................................................................................

ttkWidget.o: $(TTK_DIR)/ttkWidget.c
	$(CC) -c $(CC_SWITCHES) $(TTK_DIR)/ttkWidget.c

ttkMacOSXTheme.o: $(MAC_OSX_DIR)/ttkMacOSXTheme.c
	$(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/ttkMacOSXTheme.c

rbcAlloc.o: $(RBC_DIR)/rbcAlloc.c
	$(CC) -c $(CC_SWITCHES) $(RBC_DIR)/rbcAlloc.c

rbcBind.o: $(RBC_DIR)/rbcBind.c
	$(CC) -c $(CC_SWITCHES) $(RBC_DIR)/rbcBind.c

rbcChain.o: $(RBC_DIR)/rbcChain.c
	$(CC) -c $(CC_SWITCHES) $(RBC_DIR)/rbcChain.c

rbcConfig.o: $(RBC_DIR)/rbcConfig.c






<







 







<







 







<







 







<







 







<
<
<







379
380
381
382
383
384
385

386
387
388
389
390
391
392
...
396
397
398
399
400
401
402

403
404
405
406
407
408
409
...
522
523
524
525
526
527
528

529
530
531
532
533
534
535
...
539
540
541
542
543
544
545

546
547
548
549
550
551
552
....
1523
1524
1525
1526
1527
1528
1529



1530
1531
1532
1533
1534
1535
1536
	ttkInit.o ttkLabel.o ttkLayout.o ttkManager.o ttkNotebook.o \
	ttkPanedwindow.o ttkProgress.o ttkScale.o ttkScrollbar.o ttkScroll.o \
	ttkSeparator.o ttkSquare.o ttkState.o \
	ttkTagSet.o ttkTheme.o ttkTrace.o ttkTrack.o ttkTreeview.o \
	ttkWidget.o ttkStubInit.o

RBC_OBJS = \

        rbcBind.o \
        rbcChain.o \
        rbcConfig.o \
        rbcGraph.o \
        rbcGrAxis.o \
        rbcGrBar.o \
        rbcGrElem.o \
................................................................................
        rbcGrLine.o \
        rbcGrMarker.o \
        rbcGrMisc.o \
        rbcGrPen.o \
        rbcGrPs.o \
        rbcImage.o \
        rbcInt.o \

        rbcParse.o \
        rbcPs.o \
        rbcSpline.o \
        rbcSwitch.o \
        rbcText.o \
        rbcTile.o \
        rbcUtil.o \
................................................................................
	$(TTK_DIR)/ttkTreeview.c \
	$(TTK_DIR)/ttkWidget.c

TTK_STUB_SRCS = \
	$(TTK_DIR)/ttkStubInit.c $(TTK_DIR)/ttkStubLib.c

RBC_SRCS = \

        $(RBC_DIR)/rbcBind.c \
        $(RBC_DIR)/rbcChain.c \
        $(RBC_DIR)/rbcConfig.c \
        $(RBC_DIR)/rbcGraph.c \
        $(RBC_DIR)/rbcGrAxis.c \
        $(RBC_DIR)/rbcGrBar.c \
        $(RBC_DIR)/rbcGrElem.c \
................................................................................
        $(RBC_DIR)/rbcGrLine.c \
        $(RBC_DIR)/rbcGrMarker.c \
        $(RBC_DIR)/rbcGrMisc.c \
        $(RBC_DIR)/rbcGrPen.c \
        $(RBC_DIR)/rbcGrPs.c \
        $(RBC_DIR)/rbcImage.c \
        $(RBC_DIR)/rbcInt.c \

        $(RBC_DIR)/rbcParse.c \
        $(RBC_DIR)/rbcPs.c \
        $(RBC_DIR)/rbcSpline.c \
        $(RBC_DIR)/rbcSwitch.c \
        $(RBC_DIR)/rbcText.c \
        $(RBC_DIR)/rbcTile.c \
        $(RBC_DIR)/rbcUtil.c \
................................................................................

ttkWidget.o: $(TTK_DIR)/ttkWidget.c
	$(CC) -c $(CC_SWITCHES) $(TTK_DIR)/ttkWidget.c

ttkMacOSXTheme.o: $(MAC_OSX_DIR)/ttkMacOSXTheme.c
	$(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/ttkMacOSXTheme.c




rbcBind.o: $(RBC_DIR)/rbcBind.c
	$(CC) -c $(CC_SWITCHES) $(RBC_DIR)/rbcBind.c

rbcChain.o: $(RBC_DIR)/rbcChain.c
	$(CC) -c $(CC_SWITCHES) $(RBC_DIR)/rbcChain.c

rbcConfig.o: $(RBC_DIR)/rbcConfig.c

Changes to win/Makefile.in.

394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
	ttkTrace.$(OBJEXT) \
	ttkTrack.$(OBJEXT) \
	ttkTreeview.$(OBJEXT) \
	ttkWidget.$(OBJEXT) \
	ttkStubInit.$(OBJEXT)

RBC_OBJS = \
	rbcAlloc.$(OBJEXT) \
	rbcBind.$(OBJEXT) \
	rbcChain.$(OBJEXT) \
	rbcConfig.$(OBJEXT) \
	rbcGraph.$(OBJEXT) \
	rbcGrAxis.$(OBJEXT) \
	rbcGrBar.$(OBJEXT) \
	rbcGrElem.$(OBJEXT) \






<







394
395
396
397
398
399
400

401
402
403
404
405
406
407
	ttkTrace.$(OBJEXT) \
	ttkTrack.$(OBJEXT) \
	ttkTreeview.$(OBJEXT) \
	ttkWidget.$(OBJEXT) \
	ttkStubInit.$(OBJEXT)

RBC_OBJS = \

	rbcBind.$(OBJEXT) \
	rbcChain.$(OBJEXT) \
	rbcConfig.$(OBJEXT) \
	rbcGraph.$(OBJEXT) \
	rbcGrAxis.$(OBJEXT) \
	rbcGrBar.$(OBJEXT) \
	rbcGrElem.$(OBJEXT) \