Changeset 1379c96e


Ignore:
Timestamp:
May 6, 2024, 1:16:32 PM (7 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
ac16a55
Parents:
123e8b9
Message:

formatting changes to programs

Location:
doc/theses/mike_brooks_MMath/programs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/mike_brooks_MMath/programs/lst-issues-intrusive.run.c

    r123e8b9 r1379c96e  
    2222struct req {
    2323        int pri, rqr;
    24         LIST_ENTRY(req) x;
     24        LIST_ENTRY(req) d;
    2525};
    26 
    2726LIST_HEAD(reql, req);
    2827
     
    3029LIST_INIT(&reqs);
    3130
    32 struct req
    33         r1 = {1, 42},
    34         r2 = {2, 42};
     31struct req r1 = {1, 42}, r2 = {2, 42};
    3532
    36 LIST_INSERT_HEAD(
    37         &reqs, &r2, x);
    38 LIST_INSERT_HEAD(
    39         &reqs, &r1, x);
     33LIST_INSERT_HEAD(&reqs, &r2, d);
     34LIST_INSERT_HEAD(&reqs, &r1, d);
    4035
    4136
     
    5045
    5146struct req *cur;
    52 LIST_FOREACH(cur, &reqs, x)
     47LIST_FOREACH(cur, &reqs, d)
    5348        printf("{%d %d} ", cur->pri, cur->rqr);
    5449printf("\n");
  • doc/theses/mike_brooks_MMath/programs/lst-issues-multi-static.run.c

    r123e8b9 r1379c96e  
    2626LIST_HEAD(reql, req);
    2727
    28 struct reql reqs_pri_global;
     28struct reql reqs_pri;
    2929struct reql reqs_rqr_42;
    3030struct reql reqs_rqr_17;
    3131struct reql reqs_rqr_99;
    3232
    33 LIST_INIT(&reqs_pri_global);
     33LIST_INIT(&reqs_pri);
    3434LIST_INIT(&reqs_rqr_42);
    3535LIST_INIT(&reqs_rqr_17);
     
    4444        r99a = {3, 99};
    4545
    46 LIST_INSERT_HEAD(&reqs_pri_global, &r17c, by_pri);
    47 LIST_INSERT_HEAD(&reqs_pri_global, &r99a, by_pri);
    48 LIST_INSERT_HEAD(&reqs_pri_global, &r17b, by_pri);
    49 LIST_INSERT_HEAD(&reqs_pri_global, &r42b, by_pri);
    50 LIST_INSERT_HEAD(&reqs_pri_global, &r17a, by_pri);
    51 LIST_INSERT_HEAD(&reqs_pri_global, &r42a, by_pri);
     46LIST_INSERT_HEAD(&reqs_pri, &r17c, by_pri);
     47LIST_INSERT_HEAD(&reqs_pri, &r99a, by_pri);
     48LIST_INSERT_HEAD(&reqs_pri, &r17b, by_pri);
     49LIST_INSERT_HEAD(&reqs_pri, &r42b, by_pri);
     50LIST_INSERT_HEAD(&reqs_pri, &r17a, by_pri);
     51LIST_INSERT_HEAD(&reqs_pri, &r42a, by_pri);
    5252
    5353LIST_INSERT_HEAD(&reqs_rqr_42, &r42b, by_rqr);
     
    6767
    6868struct req *cur;
    69 LIST_FOREACH(cur, &reqs_pri_global, by_pri)
     69LIST_FOREACH(cur, &reqs_pri, by_pri)
    7070        printf("{%d %d} ", cur->pri, cur->rqr);
    7171printf("| ");
  • doc/theses/mike_brooks_MMath/programs/lst-issues-wrapped-byref.run.cpp

    r123e8b9 r1379c96e  
    2222struct req {
    2323        int pri, rqr;
     24
    2425};
    2526
    2627
     28list<req *> reqs;
    2729
    2830
    29 list<req*> reqs;
     31req r1 = {1, 42}, r2 = {2, 42};
    3032
    31 
    32 req
    33         r1 = {1, 42},
    34         r2 = {2, 42};
    35 
    36 reqs.push_front(
    37         &r2);
    38 reqs.push_front(
    39         &r1);
     33reqs.push_front(&r2);
     34reqs.push_front(&r1);
    4035
    4136
  • doc/theses/mike_brooks_MMath/programs/lst-issues-wrapped-emplaced.run.cpp

    r123e8b9 r1379c96e  
    2222struct req {
    2323        int pri, rqr;
     24
    2425};
    25 
    26 
    2726
    2827
     
    3231
    3332
    34 
    35 
    36 reqs.emplace_front(
    37         2, 42);
    38 reqs.emplace_front(
    39         1, 42);
     33reqs.emplace_front(2, 42);
     34reqs.emplace_front(1, 42);
    4035
    4136
Note: See TracChangeset for help on using the changeset viewer.