Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 3c320da604
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (39 sloc) 1.245 kb
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifndef LIBSAUCE_H
#define LIBSAUCE_H
#define RECORD_SIZE 128
#define COMMENT_SIZE 64
#define SAUCE_ID "SAUCE"
typedef struct {
char id[ 6 ];
char version[ 3 ];
char title[ 36 ];
char author[ 21 ];
char group[ 21 ];
char date[ 9 ];
long filesize;
unsigned char datatype;
unsigned char filetype;
unsigned short tinfo1;
unsigned short tinfo2;
unsigned short tinfo3;
unsigned short tinfo4;
unsigned char comments;
unsigned char flags;
char filler[ 23 ];
char **comment_lines;
} sauce;
sauce* sauce_read_filename( char *filename );
sauce* sauce_read_file( FILE *file );
void _read_record( FILE *file, sauce *record );
void _read_comments( FILE *file, char **comment_lines, int comments );
int sauce_write_filename( char *filename, sauce *record );
int sauce_write_file( FILE *file, sauce *record );
int _write_record( FILE *file, sauce * record );
int sauce_remove_filename( char *filename );
int sauce_remove_file( FILE *file );
Jump to Line
Something went wrong with that request. Please try again.