#include /* addToPoint.c */ typedef struct { double x, y; } Point; void addToPoint(Point * p, const Point * d) /*@{}@XPC{structure pointers as @B {references}}*/ { p->x += d->x; /*@{}@XPC{@B {structure pointer dereferencing}:}*/ p->y += d->y; /*@{}@XPC{{} @CP {p->x} @CP style {symbol} {= p->x = (*p).x} {}}*/ } int main() { Point p = {3.0, 4.0}, q = {1.2, 2.3}; printf("p = (%f, %f)\n", p.x, p.y); addToPoint(&p, &q); /*@{}@XPC{structure references as arguments} */ printf("p = (%f, %f)\n", p.x, p.y); return 0; }