src/shared/util.h
author Tero Marttila <terom@fixme.fi>
Mon, 25 Jan 2010 02:48:41 +0200
changeset 71 01b021e406e9
parent 4 49362b34116c
permissions -rw-r--r--
pt_cache_size
4
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
#ifndef SHARED_UTIL_H
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
#define SHARED_UTIL_H
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
#include <stddef.h>
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     6
/**
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
 * Replace the file extension in the given path buffer with the given extension, which should be of the form ".foo"
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
 */
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
int chfext (char *path, size_t len, const char *newext);
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
/**
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
 * Copy filesystem path with new file extension
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
 */
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
int path_with_fext (const char *path, char *buf, size_t len, const char *newext);
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
49362b34116c open cache as .tmp, and rename to .cache when done
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
#endif