src/xzdec/xzdec.c File Reference

Simple single-threaded tool to uncompress .xz or .lzma files. More...

#include "sysdefs.h"
#include "lzma.h"
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include "getopt.h"
#include "physmem.h"

Defines

#define TOOL_FORMAT   "xz"

Functions

static void lzma_attribute ((noreturn))
static void set_default_memlimit (void)
static uint64_t str_to_uint64 (const char *value)
 Converts a string to uint64_t.
static void parse_options (int argc, char **argv)
 Parses command line options.
static void uncompress (lzma_stream *strm, FILE *file, const char *filename)
int main (int argc, char **argv)

Variables

static uint64_t memlimit
 Number of bytes to use memory at maximum.
static const char * argv0
 Program name to be shown in error messages.

Detailed Description

Simple single-threaded tool to uncompress .xz or .lzma files.


Function Documentation

static void set_default_memlimit ( void   )  [static]

Finds out the amount of physical memory in the system, and sets a default memory usage limit.

References memlimit, and physmem().

Referenced by parse_options().

static uint64_t str_to_uint64 ( const char *  value  )  [static]

Converts a string to uint64_t.

This is rudely copied from src/xz/util.c and modified a little. :-(

References argv0.

static void parse_options ( int  argc,
char **  argv 
) [static]

Parses command line options.

References memlimit, set_default_memlimit(), and str_to_uint64().


Variable Documentation

uint64_t memlimit [static]

Number of bytes to use memory at maximum.

Referenced by parse_options(), and set_default_memlimit().

const char* argv0 [static]

Program name to be shown in error messages.

Referenced by str_to_uint64().


Generated on Tue Oct 6 14:02:23 2009 for XZ Utils by  doxygen 1.6.1