-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfumolang.h
44 lines (35 loc) · 1.15 KB
/
fumolang.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// -- fumosay: fumolang.h --
// like cowsay, but with funky fumos!
// Fumo Language: Text processing functions
#ifndef FUMO_LANG_H
#define FUMO_LANG_H
#include "fumoutil.h"
#include <stdio.h>
#include <stdbool.h>
#define SET_COLOR(r,g,b) printf("\033[38;2;%hd;%hd;%hdm", r, g, b);
// in fumosay.c
extern int MAX_WIDTH;
extern bool isByakuren;
// Marisa borrowed the ANSI code from github.com/jaseg/lolcat
enum esc_st {
ST_NONE = 0,
ST_ESC_BEGIN,
ST_ESC_STRING,
ST_ESC_CSI,
ST_ESC_STRING_TERM,
ST_ESC_CSI_TERM,
ST_ESC_TERM,
NUM_ST
};
int longestLineWidth(int argc, char **argv);
void paddedBreak(int padding, int (*fumo_say)(const char *, FILE *));
void wordWrapper(int count, char **words, size_t width, size_t bubble,
bool no_wrap, bool cmd, int (*fumo_say)(const char *, FILE *));
static enum esc_st find_escape_sequences(char c, enum esc_st st);
void rgb_interpolate(color *start, color *end, int *r, int *g, int *b, double f);
int lolfumo(const char *str, FILE *dest);
int strlen_real(char *str);
char *getInput(FILE *st, size_t size);
char *replaceTab(char *token, short tabstop);
char **splitWords(char **words, int *count);
#endif