From ed6a0629425910ab2b5a134d90b4ed9bcb7567cf Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Fri, 12 Apr 2013 08:07:16 +0200 Subject: [PATCH] Multi line comments in case we every want to support C89. --- spine-c/example/main.c | 4 ++-- spine-c/include/spine/extension.h | 24 ++++++++++++------------ spine-c/src/spine/Animation.c | 10 +++++----- spine-c/src/spine/Atlas.c | 6 +++--- spine-c/src/spine/Attachment.c | 4 ++-- spine-c/src/spine/AttachmentLoader.c | 4 ++-- spine-c/src/spine/RegionAttachment.c | 4 ++-- spine-c/src/spine/Slot.c | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/spine-c/example/main.c b/spine-c/example/main.c index c325d93f3..3002cf92d 100644 --- a/spine-c/example/main.c +++ b/spine-c/example/main.c @@ -72,8 +72,8 @@ void _ExampleRegionAttachment_dispose (Attachment* attachment) { } void _ExampleRegionAttachment_draw (Attachment* attachment, Slot* slot) { - // ExampleRegionAttachment* self = (ExampleRegionAttachment*)attachment; - // Draw or queue region for drawing. + /* ExampleRegionAttachment* self = (ExampleRegionAttachment*)attachment; + Draw or queue region for drawing. */ } RegionAttachment* RegionAttachment_create (const char* name, AtlasRegion* region) { diff --git a/spine-c/include/spine/extension.h b/spine-c/include/spine/extension.h index 168a22621..ff5e0da6b 100644 --- a/spine-c/include/spine/extension.h +++ b/spine-c/include/spine/extension.h @@ -108,48 +108,48 @@ char* _Util_readFile (const char* path, int* length); char* _readFile (const char* path, int* length); -void _Skeleton_init (Skeleton* self, SkeletonData* data, // +void _Skeleton_init (Skeleton* self, SkeletonData* data, /**/ void (*dispose) (Skeleton* skeleton)); void _Skeleton_deinit (Skeleton* self); /**/ -void _Attachment_init (Attachment* self, const char* name, AttachmentType type, // - void (*dispose) (Attachment* self), // +void _Attachment_init (Attachment* self, const char* name, AttachmentType type, /**/ + void (*dispose) (Attachment* self), /**/ void (*draw) (Attachment* self, struct Slot* slot)); void _Attachment_deinit (Attachment* self); /**/ -void _RegionAttachment_init (RegionAttachment* self, const char* name, // - void (*dispose) (Attachment* self), // +void _RegionAttachment_init (RegionAttachment* self, const char* name, /**/ + void (*dispose) (Attachment* self), /**/ void (*draw) (Attachment* self, struct Slot* slot)); void _RegionAttachment_deinit (RegionAttachment* self); /**/ -void _Timeline_init (Timeline* self, // - void (*dispose) (Timeline* self), // +void _Timeline_init (Timeline* self, /**/ + void (*dispose) (Timeline* self), /**/ void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)); void _Timeline_deinit (Timeline* self); /**/ -void _CurveTimeline_init (CurveTimeline* self, int frameCount, // - void (*dispose) (Timeline* self), // +void _CurveTimeline_init (CurveTimeline* self, int frameCount, /**/ + void (*dispose) (Timeline* self), /**/ void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)); void _CurveTimeline_deinit (CurveTimeline* self); /**/ -void _AtlasPage_init (AtlasPage* self, const char* name, // +void _AtlasPage_init (AtlasPage* self, const char* name, /**/ void (*dispose) (AtlasPage* self)); void _AtlasPage_deinit (AtlasPage* self); /**/ -void _AttachmentLoader_init (AttachmentLoader* self, // - void (*dispose) (AttachmentLoader* self), // +void _AttachmentLoader_init (AttachmentLoader* self, /**/ + void (*dispose) (AttachmentLoader* self), /**/ Attachment* (*newAttachment) (AttachmentLoader* self, Skin* skin, AttachmentType type, const char* name)); void _AttachmentLoader_deinit (AttachmentLoader* self); void _AttachmentLoader_setError (AttachmentLoader* self, const char* error1, const char* error2); diff --git a/spine-c/src/spine/Animation.c b/spine-c/src/spine/Animation.c index b3d0a1150..e33933f24 100644 --- a/spine-c/src/spine/Animation.c +++ b/spine-c/src/spine/Animation.c @@ -70,8 +70,8 @@ typedef struct _TimelineVtable { void (*dispose) (Timeline* self); } _TimelineVtable; -void _Timeline_init (Timeline* self, // - void (*dispose) (Timeline* self), // +void _Timeline_init (Timeline* self, /**/ + void (*dispose) (Timeline* self), /**/ void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) { CONST_CAST(_TimelineVtable*, self->vtable) = NEW(_TimelineVtable); VTABLE(Timeline, self) ->dispose = dispose; @@ -96,8 +96,8 @@ static const float CURVE_LINEAR = 0; static const float CURVE_STEPPED = -1; static const int CURVE_SEGMENTS = 10; -void _CurveTimeline_init (CurveTimeline* self, int frameCount, // - void (*dispose) (Timeline* self), // +void _CurveTimeline_init (CurveTimeline* self, int frameCount, /**/ + void (*dispose) (Timeline* self), /**/ void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) { _Timeline_init(SUPER(self), dispose, apply); self->curves = CALLOC(float, (frameCount - 1) * 6); @@ -203,7 +203,7 @@ void _BaseTimeline_dispose (Timeline* timeline) { } /* Many timelines have structure identical to struct BaseTimeline and extend CurveTimeline. **/ -struct BaseTimeline* _BaseTimeline_create (int frameCount, int frameSize, // +struct BaseTimeline* _BaseTimeline_create (int frameCount, int frameSize, /**/ void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) { struct BaseTimeline* self = NEW(struct BaseTimeline); diff --git a/spine-c/src/spine/Atlas.c b/spine-c/src/spine/Atlas.c index d3f449522..3dd3e9bf4 100644 --- a/spine-c/src/spine/Atlas.c +++ b/spine-c/src/spine/Atlas.c @@ -35,7 +35,7 @@ typedef struct _AtlasPageVtable { void (*dispose) (AtlasPage* self); } _AtlasPageVtable; -void _AtlasPage_init (AtlasPage* self, const char* name, // +void _AtlasPage_init (AtlasPage* self, const char* name, /**/ void (*dispose) (AtlasPage* self)) { CONST_CAST(_AtlasPageVtable*, self->vtable) = NEW(_AtlasPageVtable); VTABLE(AtlasPage, self) ->dispose = dispose; @@ -283,11 +283,11 @@ Atlas* Atlas_readAtlas (const char* begin, int length, const char* dir) { Atlas* Atlas_readAtlasFile (const char* path) { Atlas* atlas = 0; - // Get directory from atlas path. + /* Get directory from atlas path. */ const char* lastForwardSlash = strrchr(path, '/'); const char* lastBackwardSlash = strrchr(path, '\\'); const char* lastSlash = lastForwardSlash > lastBackwardSlash ? lastForwardSlash : lastBackwardSlash; - if (lastSlash == path) lastSlash++; // Never drop starting slash. + if (lastSlash == path) lastSlash++; /* Never drop starting slash. */ int dirLength = lastSlash ? lastSlash - path : 0; char* dir = MALLOC(char, dirLength + 1); memcpy(dir, path, dirLength); diff --git a/spine-c/src/spine/Attachment.c b/spine-c/src/spine/Attachment.c index 61774d87f..ffa83dfe9 100644 --- a/spine-c/src/spine/Attachment.c +++ b/spine-c/src/spine/Attachment.c @@ -36,8 +36,8 @@ typedef struct _AttachmentVtable { void (*dispose) (Attachment* self); } _AttachmentVtable; -void _Attachment_init (Attachment* self, const char* name, AttachmentType type, // - void (*dispose) (Attachment* self), // +void _Attachment_init (Attachment* self, const char* name, AttachmentType type, /**/ + void (*dispose) (Attachment* self), /**/ void (*draw) (Attachment* self, struct Slot* slot)) { CONST_CAST(_AttachmentVtable*, self->vtable) = NEW(_AttachmentVtable); diff --git a/spine-c/src/spine/AttachmentLoader.c b/spine-c/src/spine/AttachmentLoader.c index 2a1bcf227..65e1d4e43 100644 --- a/spine-c/src/spine/AttachmentLoader.c +++ b/spine-c/src/spine/AttachmentLoader.c @@ -36,8 +36,8 @@ typedef struct _AttachmentLoaderVtable { void (*dispose) (AttachmentLoader* self); } _AttachmentLoaderVtable; -void _AttachmentLoader_init (AttachmentLoader* self, // - void (*dispose) (AttachmentLoader* self), // +void _AttachmentLoader_init (AttachmentLoader* self, /**/ + void (*dispose) (AttachmentLoader* self), /**/ Attachment* (*newAttachment) (AttachmentLoader* self, Skin* skin, AttachmentType type, const char* name)) { CONST_CAST(_AttachmentLoaderVtable*, self->vtable) = NEW(_AttachmentLoaderVtable); VTABLE(AttachmentLoader, self) ->dispose = dispose; diff --git a/spine-c/src/spine/RegionAttachment.c b/spine-c/src/spine/RegionAttachment.c index 37fe4ab32..dba55a589 100644 --- a/spine-c/src/spine/RegionAttachment.c +++ b/spine-c/src/spine/RegionAttachment.c @@ -31,8 +31,8 @@ namespace spine { #endif -void _RegionAttachment_init (RegionAttachment* self, const char* name, // - void (*dispose) (Attachment* self), // +void _RegionAttachment_init (RegionAttachment* self, const char* name, /**/ + void (*dispose) (Attachment* self), /**/ void (*draw) (Attachment* self, struct Slot* slot)) { self->scaleX = 1; self->scaleY = 1; diff --git a/spine-c/src/spine/Slot.c b/spine-c/src/spine/Slot.c index 72a949e10..b36d03990 100644 --- a/spine-c/src/spine/Slot.c +++ b/spine-c/src/spine/Slot.c @@ -70,7 +70,7 @@ void Slot_setToBindPose (Slot* self) { Attachment* attachment = 0; if (self->data->attachmentName) { - // Find slot index. + /* Find slot index. */ int i; for (i = 0; i < self->skeleton->data->slotCount; ++i) { if (self->data == self->skeleton->data->slots[i]) {