Skip to content

Commit

Permalink
Rearrange SCDoc.cpp
Browse files Browse the repository at this point in the history
* move a forward declared function to the top of the file
* move around & rename header includes for C++ style
  • Loading branch information
mossheim committed Jul 24, 2017
1 parent b9e3acf commit d58438e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions SCDoc/SCDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@
*
************************************************************************/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "SCDoc.h"
#include <cstdlib>
#include <cstdio>
#include <string>

#ifdef _WIN32
# include <locale> // codecvt_utf8_utf16
# include <codecvt> // wstring_convert
#endif // _WIN32

extern void error(const char *fmt, ...); // for scdoc_parse_file

DocNode * scdoc_parse_run(int partial);
void scdocrestart (FILE *input_file);
Expand Down Expand Up @@ -185,8 +192,8 @@ void doc_node_dump(DocNode *n) {
_doc_node_dump(n,0,1);
}

extern void error(const char *fmt, ...);

// @TODO: use bfs::path and _wfopen on Windows
DocNode * scdoc_parse_file(const char *fn, int mode) {
FILE *fp;
DocNode *n;
Expand Down

0 comments on commit d58438e

Please sign in to comment.