blob: f85704e8daec1fe1f92a00fbe445a22c150b5b0e (
plain)
1 /**
2 * Copyright (C) 2021 Aaron Ball <nullspoon@oper.io>
3 *
4 * Noteless is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Noteless is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with noteless. If not, see <http://www.gnu.org/licenses/>.
16 */
17 #include <stdlib.h>
18 #include <stdio.h>
19 #include <string.h>
20 #include <sys/stat.h>
21 #include <time.h>
22
23 #include "common.h"
24
25 #ifndef noteless_note_h
26 #define noteless_note_h
27
28 #define file_width 256
29
30 typedef struct {
31 char extension[32];
32 char path[256];
33 char name[256];
34 time_t mtime;
35 } note;
36
37 void note_new(note*, char*);
38
39 int note_create(note*, char*);
40
41 int note_date_cmp(const void*, const void*);
42
43 void note_cpy(note*, note*);
44
45 int note_edit(note*, char*);
46
47 int note_cat(note*);
48
49 int note_rm(note*);
50
51 int note_search(note*, char*, int);
52
53 #endif
|