Files

56 lines
1.4 KiB
C
Raw Permalink Normal View History

2023-02-25 12:06:52 -05:00
/*
2023-02-25 12:09:57 -05:00
Copyright 2022-2023 0xf8.dev@proton.me
2023-02-25 12:06:52 -05:00
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2023-02-25 12:06:52 -05:00
#ifndef __MAIN_H__
#define __MAIN_H__
2023-02-25 12:06:53 -05:00
#include <locale.h>
2023-02-25 12:06:52 -05:00
#include <memory.h>
2023-02-25 12:06:53 -05:00
// #include <ncurses.h>
#include <notcurses/notcurses.h>
2023-02-25 12:06:52 -05:00
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
2023-02-25 12:06:53 -05:00
#include <pthread.h>
#include <time.h>
2023-02-25 12:06:52 -05:00
#include <unistd.h>
typedef unsigned long size;
typedef unsigned int uint;
struct string {
2023-02-25 12:06:54 -05:00
char *s;
size length;
2023-02-25 12:06:52 -05:00
};
struct bignumber_t {
2023-02-25 12:06:54 -05:00
uint matrix[5][3];
uint mimick;
2023-02-25 12:06:52 -05:00
};
struct string *alloc_string(uint l);
void free_string(struct string *s);
// pads a number with 0's
2023-06-03 15:35:34 -04:00
struct string *pad_int(int n);
2023-02-25 12:06:52 -05:00
// this creates a bignumber_t
2023-02-25 12:06:54 -05:00
struct bignumber_t *bignumber(int start, uint mimick);
2023-02-25 12:06:52 -05:00
// this draws a big number
2023-02-25 12:06:53 -05:00
void drawbignumber(struct bignumber_t *, int sec, int startx, int starty, struct ncplane *place);
2023-02-25 12:06:52 -05:00
#endif // __MAIN_H__