File: sized.h

package info (click to toggle)
libsfdo 0.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 736 kB
  • sloc: ansic: 6,491; python: 111; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef SIZED_H
#define SIZED_H

#include <stddef.h>

#define SFDO_SIZED_LEN(s) (sizeof(s) - 1)

#define SFDO_SIZED_LIT(s) {s, (sizeof(s) - 1)}

#define SFDO_SIZED_CHAR(c) {(char[]){c}, 1}
#define SFDO_SIZED_NUL SFDO_SIZED_CHAR('\0')
#define SFDO_SIZED_SLASH SFDO_SIZED_CHAR('/')

#endif