Skip to content

Commit 27907f7

Browse files
committed
massive file creation
1 parent 44fc648 commit 27907f7

18 files changed

Lines changed: 183 additions & 6 deletions

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Simple GNU Makefile for the project
2-
31
CC := gcc
4-
CFLAGS := -std=C99 -Wall -Wextra -O2 -g
2+
CFLAGS := -std=c11 -Iinclude -Wall -Wextra -O2 -g
3+
# libs go here
54
LDFLAGS :=
65

76
SRCDIR := src
@@ -26,6 +25,7 @@ $(BUILDDIR) $(BINDIR):
2625
mkdir -p $@
2726

2827
clean:
28+
# delete build and bin directories
2929
rm -rf $(BUILDDIR) $(BINDIR)
3030

3131
run: all

bin/htop-clone

6.85 KB
Binary file not shown.

include/config.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef CONFIG_H
2+
#define CONFIG_H
3+
4+
/* Simple configuration API (stub) */
5+
6+
int config_load(const char *path);
7+
8+
#endif /* CONFIG_H */

include/machine.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef MACHINE_H
2+
#define MACHINE_H
3+
4+
/* Machine/system info API (stub) */
5+
6+
int machine_init(void);
7+
void machine_poll(void);
8+
9+
#endif /* MACHINE_H */

include/manager.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef MANAGER_H
2+
#define MANAGER_H
3+
4+
/* Manager API (stub) */
5+
6+
int manager_init(void);
7+
void manager_shutdown(void);
8+
9+
#endif /* MANAGER_H */

include/network.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef NETWORK_H
2+
#define NETWORK_H
3+
4+
/* Network API (stub) */
5+
6+
int network_init(void);
7+
void network_poll(void);
8+
9+
#endif /* NETWORK_H */

include/process.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef PROCESS_H
2+
#define PROCESS_H
3+
4+
/* Process handling API (stub) */
5+
6+
int process_init(void);
7+
void process_poll(void);
8+
9+
#endif /* PROCESS_H */

include/project.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#ifndef PROJECT_H
2+
#define PROJECT_H
3+
4+
/* Central project header: includes commonly used headers and project headers. */
5+
6+
#include <stdio.h>
7+
#include <stdlib.h>
8+
9+
#include "config.h"
10+
#include "utils.h"
11+
#include "manager.h"
12+
#include "process.h"
13+
#include "machine.h"
14+
#include "network.h"
15+
#include "ui.h"
16+
17+
#endif /* PROJECT_H */
18+

include/ui.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#ifndef UI_H
2+
#define UI_H
3+
4+
/* UI API (stub) */
5+
6+
int ui_init(void);
7+
void ui_draw(void);
8+
void ui_shutdown(void);
9+
10+
#endif /* UI_H */
11+
#ifndef UI_H
12+
#define UI_H
13+
14+
void ui_init(void);
15+
16+
#endif /* UI_H */

include/utils.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef UTILS_H
2+
#define UTILS_H
3+
4+
#include <stdarg.h>
5+
6+
/* Utility helpers (stub) */
7+
8+
void log_msg(const char *fmt, ...);
9+
10+
#endif /* UTILS_H */

0 commit comments

Comments
 (0)