tempus/src/main.h

42 lines
783 B
C

#ifndef __MAIN_H__
#define __MAIN_H__
#include <math.h>
#include <memory.h>
#include <ncurses.h>
#include <time.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
typedef unsigned long size;
typedef unsigned int uint;
struct string {
char *s;
size length;
};
struct bignumber_t {
uint matrix[5][3];
uint mimick;
uint index;
};
struct string *alloc_string(uint l);
void free_string(struct string *s);
// pads a number with 0's
struct string *pad_int(int n, uint pad, uint maxsize);
// this creates a bignumber_t
struct bignumber_t *bignumber(int start, uint index, uint mimick);
// this draws a big number
void drawbignumber(struct bignumber_t *, int sec, int startx, int starty);
#endif // __MAIN_H__