File: color.c

package info (click to toggle)
libffi-platypus-perl 2.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,860 kB
  • sloc: perl: 7,388; ansic: 6,862; cpp: 53; sh: 19; makefile: 14
file content (17 lines) | stat: -rw-r--r-- 283 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdint.h>
#include <string.h>

typedef struct color_t {
   char    name[8];
   uint8_t red;
   uint8_t green;
   uint8_t blue;
} color_t;

color_t
color_increase_red(color_t color, uint8_t amount)
{
  strcpy(color.name, "reddish");
  color.red += amount;
  return color;
}