File: structdef.c

package info (click to toggle)
libffi-c-perl 0.15-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 484 kB
  • sloc: perl: 1,517; ansic: 57; sh: 19; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 224 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdint.h>
#include <stdio.h>

typedef struct {
  uint8_t red;
  uint8_t green;
  uint8_t blue;
} color_t;

void
print_color(color_t *c)
{
  printf("[%02x %02x %02x]\n",
    c->red,
    c->green,
    c->blue
  );
}