Browse Source

changed convention for includes

master
mort 9 years ago
parent
commit
cb76403607
6 changed files with 22 additions and 16 deletions
  1. 7
    6
      src/cms_build.c
  2. 3
    2
      src/cms_err.c
  3. 4
    3
      src/cms_page.c
  4. 2
    1
      src/cms_page.h
  5. 3
    2
      src/cms_post.c
  6. 3
    2
      src/cms_util.c

+ 7
- 6
src/cms_build.c View File

@@ -1,9 +1,3 @@
#include "cms_build.h"
#include "cms_err.h"
#include "cms_files.h"
#include "cms_util.h"
#include "cms_page.h"
#include "cms_post.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
@@ -11,6 +5,13 @@
#include <stdlib.h>
#include <string.h>

#include "cms_build.h"
#include "cms_err.h"
#include "cms_files.h"
#include "cms_util.h"
#include "cms_page.h"
#include "cms_post.h"

cms_err* cms_build_make_tree(cms_page* root, char* path, char* dirname)
{
DIR* dp = opendir(path);

+ 3
- 2
src/cms_err.c View File

@@ -1,13 +1,14 @@
#include "cms_err.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>

#ifdef DEBUG
#include <error.h>
#endif

#include "cms_err.h"


static char* get_error_message(cms_err* err)
{
switch (err->code)

+ 4
- 3
src/cms_page.c View File

@@ -1,12 +1,13 @@
#include "cms_page.h"
#include "cms_err.h"
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <dirent.h>
#include <sys/types.h>
#include <errno.h>

#include "cms_page.h"
#include "cms_err.h"
#include <stdlib.h>

#define PREFIX_LENGTH 5

cms_page* cms_page_create()

+ 2
- 1
src/cms_page.h View File

@@ -1,9 +1,10 @@
#ifndef CMS_PAGE_H
#define CMS_PAGE_H

#include <stddef.h>

#include "cms_err.h"
#include "cms_post.h"
#include <stddef.h>

typedef struct cms_page
{

+ 3
- 2
src/cms_post.c View File

@@ -1,9 +1,10 @@
#include "cms_post.h"
#include "cms_err.h"
#include <stdlib.h>
#include <stddef.h>
#include <string.h>

#include "cms_post.h"
#include "cms_err.h"

#define PREFIX_LENGTH 5

cms_post* cms_post_create()

+ 3
- 2
src/cms_util.c View File

@@ -1,5 +1,3 @@
#include "cms_util.h"
#include "cms_err.h"
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
@@ -11,6 +9,9 @@
#include <sys/types.h>
#include <errno.h>

#include "cms_util.h"
#include "cms_err.h"

int cms_util_file_exists(char* fname)
{
int f = open(fname, O_RDONLY);

Loading…
Cancel
Save