From 1ec675ad1e64303929186dba795aa9280d0ec83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Sch=C3=B6bel?= <jonathan@xn--schbel-yxa.info> Date: Mon, 20 Jun 2022 18:16:35 +0200 Subject: [PATCH] added cms cms will be the base "object", that performs all neccessary actions. --- sefht.geany | 6 +++++- src/Makefile.am | 2 ++ src/cms.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ src/cms.h | 35 ++++++++++++++++++++++++++++++++++ src/macro.h | 33 ++++++++++++++++++++++++++++++++ src/main.c | 9 +++++++++ 6 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 src/cms.c create mode 100644 src/cms.h create mode 100644 src/macro.h diff --git a/sefht.geany b/sefht.geany index 7f08fc4..9301b86 100644 --- a/sefht.geany +++ b/sefht.geany @@ -29,7 +29,11 @@ long_line_column=72 [files] current_page=0 -FILE_NAME_0=865;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Fmain.c;0;8 +FILE_NAME_0=935;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Fmain.c;0;8 +FILE_NAME_1=974;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Fcms.c;0;8 +FILE_NAME_2=594;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Fcms.h;0;8 +FILE_NAME_3=903;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Fmacro.h;0;8 +FILE_NAME_4=226;Make;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2FMakefile.am;0;8 [VTE] last_dir=/home/jonathan/Dokumente/projekte/prgm/internet/web/SeFHT/src diff --git a/src/Makefile.am b/src/Makefile.am index d2b8540..d13e2dd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,3 +6,5 @@ bin_PROGRAMS = sefht.fcgi sefht_fcgi_SOURCES = sefht_fcgi_SOURCES += main.c +sefht_fcgi_SOURCES += macro.h +sefht_fcgi_SOURCES += cms.c cms.h diff --git a/src/cms.c b/src/cms.c new file mode 100644 index 0000000..805cb12 --- /dev/null +++ b/src/cms.c @@ -0,0 +1,50 @@ +/* + * cms.c + * + * Copyright 2022 Jonathan Schöbel <jonathan@Ubermos-2019> + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * + */ + + +#include <stdlib.h> + +#include "macro.h" + +#include "cms.h" + +struct SH_Cms * +SH_Cms_new () +{ + struct SH_Cms * cms; + cms = malloc (sizeof (struct SH_Cms)); + + if (cms == NULL) { + EXIT; + } + + return cms; +} + +void +SH_Cms_free (struct SH_Cms * cms) +{ + free (cms); + return; +} + diff --git a/src/cms.h b/src/cms.h new file mode 100644 index 0000000..6f6e97a --- /dev/null +++ b/src/cms.h @@ -0,0 +1,35 @@ +/* + * cms.h + * + * Copyright 2022 Jonathan Schöbel <jonathan@Ubermos-2019> + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * + */ + + +#ifndef _CMS_H +#define _CMS_H +struct SH_Cms +{ + // +}; + +struct SH_Cms * SH_Cms_new (); +void SH_Cms_free (struct SH_Cms * cms); + +#endif /* _CMS_H */ diff --git a/src/macro.h b/src/macro.h new file mode 100644 index 0000000..c86b702 --- /dev/null +++ b/src/macro.h @@ -0,0 +1,33 @@ +/* + * macro.h + * + * Copyright 2022 Jonathan Schöbel <jonathan@Ubermos-2019> + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * + */ + + +#ifndef _MACRO_H +#define _MACRO_H + +#include <stdlib.h> + + +#define EXIT exit (EXIT_FAILURE) + +#endif /* _MACRO_H */ diff --git a/src/main.c b/src/main.c index 60e080b..68e5091 100644 --- a/src/main.c +++ b/src/main.c @@ -23,9 +23,18 @@ #include <stdio.h> +#include "cms.h" int main(int argc, char **argv) { + /* startup */ + struct SH_Cms * cms = SH_Cms_new (); + /* startup */ + + /* shutdown */ + SH_Cms_free (cms); + /* shutdown */ + return 0; } -- GitLab