Major code cleanup.

- Make all internal functions "static".
- Make sure each module's header and implementation file match.
- Remove all library-like functionality from main.c, so only
  the actual frontend remains in main.c.
- Add C++ brackets to all header files.

That effectively leaves the various module C files as something like
an "avrdude library", with main.c being the currently only frontend
program for that library.  In theory, it should be possible to write
different frontends using the same library backend functions though.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@722 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch
2007-01-24 22:43:46 +00:00
parent 1cae809b9b
commit 07c1079415
39 changed files with 935 additions and 634 deletions

View File

@@ -19,8 +19,8 @@
/* $Id$ */
#ifndef __config_h__
#define __config_h__
#ifndef config_h
#define config_h
#include "lists.h"
#include "pindefs.h"
@@ -52,6 +52,8 @@ extern int lineno;
extern char * infile;
extern LISTID string_list;
extern LISTID number_list;
extern LISTID part_list;
extern LISTID programmers;
extern char default_programmer[];
extern char default_parallel[];
extern char default_serial[];
@@ -66,6 +68,10 @@ extern YYSTYPE yylval;
extern char string_buf[MAX_STR_CONST];
extern char *string_buf_ptr;
#ifdef __cplusplus
extern "C" {
#endif
int yyparse(void);
@@ -89,12 +95,14 @@ TOKEN * keyword(int primary);
void print_token(TOKEN * tkn);
PROGRAMMER * new_programmer(void);
AVRPART * new_part(void);
AVRPART * dup_part(AVRPART * d);
void pyytext(void);
char * dup_string(char * str);
int read_config(char * file);
#ifdef __cplusplus
}
#endif
#endif