summaryrefslogtreecommitdiff
path: root/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.c
blob: 34d17260c0136ff14f769c9c3c72e8b868028511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
typedef struct QuadTree {
  double Data;
  struct QuadTree *Children[4];
} QT;

void Sum3rdChildren(QT *T,
              double *Result) {
  double Ret;
  if (T == 0) { Ret = 0;
  } else {
    QT *Child3 =
      T[0].Children[3];
    double V;
    Sum3rdChildren(Child3, &V);
    Ret = V + T[0].Data;
  }
  *Result = Ret;
}
personal git repositories of Harald Welte. Your mileage may vary