Add module "src/main.c"

This commit is contained in:
Alex Kotov 2021-11-21 06:29:09 +05:00
parent 0981683f1e
commit 199910811c
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 17 additions and 2 deletions

View file

@ -21,6 +21,7 @@ MODULES_SRC = \
src/atoms.c \
src/constraints.c \
src/drw.c \
src/dwm.c \
src/helpers.c \
src/layouts.c \
src/settings.c \
@ -37,7 +38,7 @@ DWM_SRC = \
MODULES_HDR = $(MODULES_SRC:.c=.h)
DWM_HDR = $(DWM_SRC:.c=.h)
SRC = $(MODULES_SRC) src/dwm.c
SRC = $(MODULES_SRC) src/main.c
HDR = $(MODULES_HDR) src/config.def.h
OBJ = $(SRC:.c=.o)

View file

@ -1,3 +1,5 @@
#include "dwm.h"
#include "atoms.h"
#include "helpers.h"
#include "layouts.h"
@ -274,7 +276,7 @@ static void (*handler[LASTEvent])(XEvent*) = {
#include "dwm/layouts.c"
#include "dwm/xerror.c"
int main(int argc, char *argv[])
int dwm_main(int argc, char *argv[])
{
if (argc == 2 && !strcmp("-v", argv[1])) {
die("polytreewm-"VERSION);

6
src/dwm.h Normal file
View file

@ -0,0 +1,6 @@
#ifndef _DWM_H
#define _DWM_H
int dwm_main(int argc, char *argv[]);
#endif // _DWM_H

6
src/main.c Normal file
View file

@ -0,0 +1,6 @@
#include "dwm.h"
int main(int argc, char *argv[])
{
return dwm_main(argc, argv);
}