The top of the code for both programs:
main.c
Code:
#define TRUE 1
#define FALSE 0
#define DEBUG 1 // Verbose output, handy for development
#define SUPERDEBUG 0 // VERY verbose output! Annoying but helpful.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "rssparse.c"
extern int ProcessRSSFeed(char *filename);
int FileExists(char *filename);
int GetFileSize(char *filename);
void DebugMsg (char *message, char *info);
void Fatal (char *message, char *info);
void SDebugMsg (char *message, char *info);
struct weatherdata{
int temp;
char *status;
int humidity;
int windspeed;
char winddirection;
float barometer;
int dewpoint;
int heatindex;
int windchill;
int visibility;
} current;
int main(void){
.....Code goes here
rssparse.c
Code:
static int ClosingTag(char *buffer, char *tag);
int ProcessRSSFeed(char *filename);
static void Cut (char *begin, char *end);
static void ParseBracketTag(char *buffer);
static void ParseHTML(char *buffer);
static void ParseXML(char *buffer);
extern int FileExists(char *filename);
extern int GetFileSize(char *filename);
extern void DebugMsg (char *message, char *info);
extern void Fatal (char *string, char *buffer);
extern void SDebugMsg (char *message, char *info);
extern struct weatherdata current;
static int ClosingTag(char *buffer, char *tag){
.....more code goes here
Note that I did try quzah's advice (included in above code, in fact), and got the following:
rssparse.c: In function `ParseHTML':
rssparse.c:161: error: invalid use of undefined type `struct weatherdata'
rssparse.c:162: error: invalid use of undefined type `struct weatherdata'
rssparse.c:163: error: invalid use of undefined type `struct weatherdata'
rssparse.c:164: error: invalid use of undefined type `struct weatherdata'
rssparse.c:165: error: invalid use of undefined type `struct weatherdata'
rssparse.c:166: error: invalid use of undefined type `struct weatherdata'
jlpence@linux:~/weather>
Accessing the structures via the exact code listed in my first post.