Skip to content

Commit 813f892

Browse files
committed
Fix typos in GIF pattern
- rename constant `IMAGE_SEPARATOR_MAGIC` => SEPARATOR - comment "indices" - the `pixelAspect` field
1 parent a534e2a commit 813f892

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

patterns/gif.hexpat

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#define LABEL_APPLICATION 0xFF
99
#define LABEL_PLAINTEXT 0x01
1010

11-
// Indentifier Magics
12-
#define IMAGE_SEPERATOR_MAGIC 0x2C
11+
// Identifier Magics
12+
#define IMAGE_SEPARATOR_MAGIC 0x2C
1313
#define EXTENSION_INTRODUCER_MAGIC 0x21
1414
#define GIF_TRAILER_MAGIC 0x3B
1515

@@ -68,7 +68,7 @@ struct LogicalScreenDescriptor {
6868
u16 height;
6969
GCT_Flags gctFlags;
7070
u8 bgColorIndex;
71-
u8 pixelAscpet;
71+
u8 pixelAspect;
7272
if (gctFlags.enabled) {
7373
Color gct[std::math::pow(2, gctFlags.size + 1)];
7474
}
@@ -84,7 +84,7 @@ struct ImageDescriptor {
8484
Color lct[std::math::pow(2, flags.lctSize + 1)];
8585
}
8686
u8 lzwMinCode [[comment("This byte determines the initial number of bits used for LZW codes in the image data")]];
87-
DataSubBlocks lzwCompressedData [[comment("Data is pallet indecies either into current LDC or GCT and is compressed using LZW")]];
87+
DataSubBlocks lzwCompressedData [[comment("Data is pallet indices either into current LDC or GCT and is compressed using LZW")]];
8888
};
8989

9090
struct CommentExtension {
@@ -130,7 +130,7 @@ struct Extension {
130130

131131
struct Block {
132132
u8 identifier [[format("format::identifier_name")]];
133-
if(identifier == IMAGE_SEPERATOR_MAGIC) ImageDescriptor i [[inline]];
133+
if(identifier == IMAGE_SEPARATOR_MAGIC) ImageDescriptor i [[inline]];
134134
if(identifier == EXTENSION_INTRODUCER_MAGIC) Extension e [[inline]];
135135
if(identifier == GIF_TRAILER_MAGIC) break;
136136
u8 blockTerminator;
@@ -153,14 +153,14 @@ namespace format {
153153
};
154154

155155
fn block_name(ref Block b) {
156-
if(b.identifier == IMAGE_SEPERATOR_MAGIC) return "Image Descriptor";
156+
if(b.identifier == IMAGE_SEPARATOR_MAGIC) return "Image Descriptor";
157157
if(b.identifier == EXTENSION_INTRODUCER_MAGIC) return "Extension";
158158
if(b.identifier == GIF_TRAILER_MAGIC) return "Trailer";
159159
return "Unknown Block Type";
160160
};
161161

162162
fn identifier_name(u8 identifier) {
163-
if(identifier == IMAGE_SEPERATOR_MAGIC) return "Image Separator";
163+
if(identifier == IMAGE_SEPARATOR_MAGIC) return "Image Separator";
164164
if(identifier == EXTENSION_INTRODUCER_MAGIC) return "Extension Introducer";
165165
if(identifier == GIF_TRAILER_MAGIC) return "GIF Trailer";
166166
return "Unknown Identifier";

0 commit comments

Comments
 (0)