Hide struct inside cpp file.

Removed my testing inspiration from tip file.
This commit is contained in:
Sanel Zukan 2008-02-12 14:52:10 +00:00
parent ed9c4a0228
commit 0ad832e770
3 changed files with 9 additions and 10 deletions

View File

@ -11,8 +11,16 @@
*/ */
#include "Fortune.h" #include "Fortune.h"
#include <netinet/in.h> #include <netinet/in.h>
#include <ctype.h> #include <ctype.h>
#include <stdio.h>
struct FortuneFile {
FILE* str_file;
FILE* dat_file;
StrFile data;
};
FortuneFile* fortune_open(const char* str_path, const char* dat_path) { FortuneFile* fortune_open(const char* str_path, const char* dat_path) {
FILE* sp = fopen(str_path, "r"); FILE* sp = fopen(str_path, "r");

View File

@ -13,7 +13,6 @@
#ifndef __FORTUNE_H__ #ifndef __FORTUNE_H__
#define __FORTUNE_H__ #define __FORTUNE_H__
#include <stdio.h>
#include <edelib/String.h> #include <edelib/String.h>
/* /*
@ -36,13 +35,7 @@ struct StrFile {
char stuff[4]; // long aligned space, stuff[0] is delimiter char stuff[4]; // long aligned space, stuff[0] is delimiter
}; };
struct FortuneFile { struct FortuneFile;
FILE* str_file;
FILE* dat_file;
StrFile data;
};
// TODO: this should be a class
FortuneFile* fortune_open(const char* str_path, const char* dat_path); FortuneFile* fortune_open(const char* str_path, const char* dat_path);
void fortune_close(FortuneFile* f); void fortune_close(FortuneFile* f);

View File

@ -16,8 +16,6 @@ or comments on EDE forum, EDE bug reporting system (on project page), or check m
current maintainers located in AUTHORS file. current maintainers located in AUTHORS file.
% %
You can download latest release on http://equinox-project.org. You can download latest release on http://equinox-project.org.
bla bla
% %
If you are interested to help us, don't hesitate to write or visit our page. If you are interested to help us, don't hesitate to write or visit our page.
You don't have to be a coding guru nor have expirience in GUI programming. If you don't have any You don't have to be a coding guru nor have expirience in GUI programming. If you don't have any