diff options
author | joerg <joerg@FreeBSD.org> | 1996-03-24 18:55:39 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-03-24 18:55:39 +0000 |
commit | 18d2a8c9e5387edcde838e92ed58f3612eae5509 (patch) | |
tree | 80feac0531a85adb4f38e22d68a6af44b6835fcb /lib/libdisk/chunk.c | |
parent | 4f2da6c6e432a586e31d4261f9c4110e109e428a (diff) | |
download | FreeBSD-src-18d2a8c9e5387edcde838e92ed58f3612eae5509.zip FreeBSD-src-18d2a8c9e5387edcde838e92ed58f3612eae5509.tar.gz |
Make libdisk C++ aware:
- add __BEGIN_DECLS and __END_DECLS,
- add a bunch of ``const'' qualifiers all over the place,
- rename the `private' struct member into `private_data' to avoid the
clash with the C++ keyword.
Diffstat (limited to 'lib/libdisk/chunk.c')
-rw-r--r-- | lib/libdisk/chunk.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/libdisk/chunk.c b/lib/libdisk/chunk.c index 906911a..a34b348 100644 --- a/lib/libdisk/chunk.c +++ b/lib/libdisk/chunk.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: chunk.c,v 1.14.2.2 1995/06/05 02:24:25 jkh Exp $ + * $Id: chunk.c,v 1.15 1995/06/11 19:29:32 rgrimes Exp $ * */ @@ -75,8 +75,8 @@ void Free_Chunk(struct chunk *c1) { if(!c1) return; - if(c1->private && c1->private_free) - (*c1->private_free)(c1->private); + if(c1->private_data && c1->private_free) + (*c1->private_free)(c1->private_data); if(c1->part) Free_Chunk(c1->part); if(c1->next) @@ -94,8 +94,8 @@ Clone_Chunk(struct chunk *c1) c2 = new_chunk(); if (!c2) err(1,"malloc failed"); *c2 = *c1; - if (c1->private && c1->private_clone) - c2->private = c2->private_clone(c2->private); + if (c1->private_data && c1->private_clone) + c2->private_data = c2->private_clone(c2->private_data); c2->name = strdup(c2->name); c2->next = Clone_Chunk(c2->next); c2->part = Clone_Chunk(c2->part); @@ -103,7 +103,8 @@ Clone_Chunk(struct chunk *c1) } int -Insert_Chunk(struct chunk *c2, u_long offset, u_long size, char *name, chunk_e type, int subtype, u_long flags) +Insert_Chunk(struct chunk *c2, u_long offset, u_long size, const char *name, + chunk_e type, int subtype, u_long flags) { struct chunk *ct,*cs; @@ -176,8 +177,8 @@ Insert_Chunk(struct chunk *c2, u_long offset, u_long size, char *name, chunk_e t } int -Add_Chunk(struct disk *d, long offset, u_long size, char *name, chunk_e type, - int subtype, u_long flags) +Add_Chunk(struct disk *d, long offset, u_long size, const char *name, + chunk_e type, int subtype, u_long flags) { struct chunk *c1,*c2,ct; u_long end = offset + size - 1; |