From: Andre Noll Date: Mon, 6 Jul 2009 21:27:01 +0000 (+0200) Subject: Remove remaining references to paraslash. X-Git-Tag: v0.1.0~28 X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=commitdiff_plain;h=2dba3a38dcfe721842404f01e9b2adb59c302604;hp=aaedc06d0448b048c7d41074985f9ee81e93d077 Remove remaining references to paraslash. Mostly trivial stuff. We can't change the magic string though, so this will have to stay "PARASLASH" for the rest of eternity. --- diff --git a/fsck.c b/fsck.c index bd1b556..00f14f3 100644 --- a/fsck.c +++ b/fsck.c @@ -121,8 +121,8 @@ static int _write_all(int fd, const char *buf, size_t len) return write_all(fd, buf, &len); } -/** - * Paraslash's version of malloc(). +/* + * Wrapper for malloc(). * * \param size The desired new size. * @@ -147,7 +147,7 @@ __must_check __malloc static void *fsck_malloc(size_t size) } /** - * Paraslash's version of calloc(). + * Allocate memory and fill with zeros. * * \param size The desired new size. * diff --git a/gcc-compat.h b/gcc-compat.h index 5d905ed..20e07fc 100644 --- a/gcc-compat.h +++ b/gcc-compat.h @@ -13,7 +13,7 @@ # define __printf(p,q) __attribute__ ((format (printf, p, q))) /* * as direct use of __printf(p,q) confuses doxygen, here are two extra macros - * for those values p,q that are actually used by paraslash. + * for those values p,q that are actually used by libosl. */ #define __printf_1_2 __printf(1,2) #define __printf_2_3 __printf(2,3) diff --git a/osl.c b/osl.c index a9dcc29..5a0dde8 100644 --- a/osl.c +++ b/osl.c @@ -331,8 +331,8 @@ err: * \param map The memory mapping of the index file. * \param desc The values found in the index header are returned here. * - * Read the index header, check for the paraslash magic string and the table version number. - * Read all information stored in the index header into \a desc. + * Read the index header, check for the osl magic string and the table version + * number. Read all information stored in the index header into \a desc. * * \return Standard. * @@ -349,7 +349,7 @@ int read_table_desc(struct osl_object *map, struct osl_table_description *desc) if (map->size < MIN_INDEX_HEADER_SIZE(1)) return -E_OSL_SHORT_TABLE; - if (strncmp(buf + IDX_PARA_MAGIC, PARA_MAGIC, strlen(PARA_MAGIC))) + if (strncmp(buf + IDX_OSL_MAGIC, OSL_MAGIC, strlen(OSL_MAGIC))) return -E_OSL_NO_MAGIC; version = read_u8(buf + IDX_VERSION); if (version < MIN_TABLE_VERSION || version > MAX_TABLE_VERSION) @@ -484,7 +484,7 @@ static int create_table_index(struct osl_table *t) buf = calloc(1, size); if (!buf) return -E_OSL_NOMEM; - sprintf(buf + IDX_PARA_MAGIC, "%s", PARA_MAGIC); + sprintf(buf + IDX_OSL_MAGIC, "%s", OSL_MAGIC); write_u8(buf + IDX_TABLE_FLAGS, t->desc->flags); write_u8(buf + IDX_DIRTY_FLAG, 0); write_u8(buf + IDX_VERSION, CURRENT_TABLE_VERSION); diff --git a/osl_core.h b/osl_core.h index df32b60..3359aa7 100644 --- a/osl_core.h +++ b/osl_core.h @@ -133,7 +133,7 @@ _static_inline_ struct osl_column_description *get_column_description( */ enum index_header_offsets { /** Bytes 0-8: PARASLASH. */ - IDX_PARA_MAGIC = 0, + IDX_OSL_MAGIC = 0, /** Byte 9: Dirty flag (nonzero if table is mapped). */ IDX_DIRTY_FLAG = 9, /** Byte 10: osl table version number. */ @@ -165,7 +165,7 @@ enum index_column_desc_offsets { }; /** Magic string contained in the header of the index file of each osl table. */ -#define PARA_MAGIC "PARASLASH" +#define OSL_MAGIC "PARASLASH" /** * The minimal number of bytes for a column in the index header.