LibreOffice Module onlineupdate (master) 1
Functions
mar_extract.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <onlineupdate/mar_private.h>
#include <onlineupdate/mar.h>
Include dependency graph for mar_extract.c:

Go to the source code of this file.

Functions

static int mar_ensure_parent_dir (const char *path)
 
static int mar_test_callback (MarFile *mar, const MarItem *item, void *unused)
 
int mar_extract (const char *path)
 Extract a MAR file to the current working directory. More...
 

Function Documentation

◆ mar_ensure_parent_dir()

static int mar_ensure_parent_dir ( const char *  path)
static

Definition at line 21 of file mar_extract.c.

References mar_ensure_parent_dir().

Referenced by mar_ensure_parent_dir(), and mar_test_callback().

◆ mar_extract()

int mar_extract ( const char *  path)

Extract a MAR file to the current working directory.

Parameters
pathThe path to the MAR file to extract. This path must be compatible with fopen.
Returns
A non-zero value if an error occurs.

Definition at line 73 of file mar_extract.c.

References mar_close(), mar_enum_items(), mar_open(), mar_test_callback(), and NULL.

Referenced by main().

◆ mar_test_callback()

static int mar_test_callback ( MarFile mar,
const MarItem item,
void *  unused 
)
static

Definition at line 38 of file mar_extract.c.

References _O_BINARY, BLOCKSIZE, FILE, MarItem_::flags, mar_ensure_parent_dir(), mar_read(), and MarItem_::name.

Referenced by mar_extract().