|
From: <Mee...@us...> - 2012-02-18 20:27:04
|
Revision: 3771
http://sc2.svn.sourceforge.net/sc2/?rev=3771&view=rev
Author: Meep-Eep
Date: 2012-02-18 20:26:58 +0000 (Sat, 18 Feb 2012)
Log Message:
-----------
Literacy.
Modified Paths:
--------------
trunk/sc2/src/libs/uio/debug.c
trunk/sc2/src/libs/uio/match.c
trunk/sc2/src/libs/uio/match.h
Modified: trunk/sc2/src/libs/uio/debug.c
===================================================================
--- trunk/sc2/src/libs/uio/debug.c 2012-02-13 01:10:40 UTC (rev 3770)
+++ trunk/sc2/src/libs/uio/debug.c 2012-02-18 20:26:58 UTC (rev 3771)
@@ -473,7 +473,7 @@
O_RDONLY, tempDir);
if (handles[i - 1] == NULL) {
if (errno == ENOENT) {
- // No match; we keep what's typed litterally.
+ // No match; we keep what's typed literally.
newArgs[i - 1] = argv[i];
continue;
}
@@ -703,7 +703,7 @@
match_MATCH_PREFIX);
} else {
dirList = uio_getDirList(debugContext->cwd, cpath, pattern,
- match_MATCH_LITTERAL);
+ match_MATCH_LITERAL);
}
#endif
if (dirList == NULL) {
Modified: trunk/sc2/src/libs/uio/match.c
===================================================================
--- trunk/sc2/src/libs/uio/match.c 2012-02-13 01:10:40 UTC (rev 3770)
+++ trunk/sc2/src/libs/uio/match.c 2012-02-18 20:26:58 UTC (rev 3771)
@@ -37,9 +37,9 @@
static inline match_MatchContext *match_allocMatchContext(void);
static inline void match_freeMatchContext(match_MatchContext *context);
-static inline match_LitteralContext *match_newLitteralContext(char *pattern);
-static inline match_LitteralContext *match_allocLitteralContext(void);
-static inline void match_freeLitteralContext(match_LitteralContext *context);
+static inline match_LiteralContext *match_newLiteralContext(char *pattern);
+static inline match_LiteralContext *match_allocLiteralContext(void);
+static inline void match_freeLiteralContext(match_LiteralContext *context);
static inline match_PrefixContext *match_newPrefixContext(char *pattern);
static inline match_PrefixContext *match_allocPrefixContext(void);
static inline void match_freePrefixContext(match_PrefixContext *context);
@@ -85,9 +85,9 @@
*contextPtr = match_allocMatchContext();
(*contextPtr)->type = type;
switch (type) {
- case match_MATCH_LITTERAL:
- result = match_prepareLitteral(pattern,
- &(*contextPtr)->u.litteral);
+ case match_MATCH_LITERAL:
+ result = match_prepareLiteral(pattern,
+ &(*contextPtr)->u.literal);
break;
case match_MATCH_PREFIX:
result = match_preparePrefix(pattern, &(*contextPtr)->u.prefix);
@@ -122,8 +122,8 @@
match_Result
match_matchPattern(match_MatchContext *context, const char *string) {
switch (context->type) {
- case match_MATCH_LITTERAL:
- return match_matchLitteral(context->u.litteral, string);
+ case match_MATCH_LITERAL:
+ return match_matchLiteral(context->u.literal, string);
case match_MATCH_PREFIX:
return match_matchPrefix(context->u.prefix, string);
case match_MATCH_SUFFIX:
@@ -168,8 +168,8 @@
switch (context->type) {
#if 0
- case match_MATCH_LITTERAL:
- return match_errorStringLitteral(context->u.litteral, result);
+ case match_MATCH_LITERAL:
+ return match_errorStringLiteral(context->u.literal, result);
case match_MATCH_PREFIX:
return match_errorStringPrefix(context->u.prefix, result);
case match_MATCH_SUFFIX:
@@ -193,8 +193,8 @@
void
match_freeContext(match_MatchContext *context) {
switch (context->type) {
- case match_MATCH_LITTERAL:
- match_freeLitteral(context->u.litteral);
+ case match_MATCH_LITERAL:
+ match_freeLiteral(context->u.literal);
break;
case match_MATCH_PREFIX:
match_freePrefix(context->u.prefix);
@@ -239,43 +239,43 @@
}
-// *** Litteral part ***
+// *** Literal part ***
match_Result
-match_prepareLitteral(const char *pattern,
- match_LitteralContext **contextPtr) {
- *contextPtr = match_newLitteralContext(uio_strdup(pattern));
+match_prepareLiteral(const char *pattern,
+ match_LiteralContext **contextPtr) {
+ *contextPtr = match_newLiteralContext(uio_strdup(pattern));
return match_OK;
}
match_Result
-match_matchLitteral(match_LitteralContext *context, const char *string) {
+match_matchLiteral(match_LiteralContext *context, const char *string) {
return (strcmp(context->pattern, string) == 0) ?
match_MATCH : match_NOMATCH;
}
void
-match_freeLitteral(match_LitteralContext *context) {
+match_freeLiteral(match_LiteralContext *context) {
uio_free(context->pattern);
- match_freeLitteralContext(context);
+ match_freeLiteralContext(context);
}
-static inline match_LitteralContext *
-match_newLitteralContext(char *pattern) {
- match_LitteralContext *result;
+static inline match_LiteralContext *
+match_newLiteralContext(char *pattern) {
+ match_LiteralContext *result;
- result = match_allocLitteralContext();
+ result = match_allocLiteralContext();
result->pattern = pattern;
return result;
}
-static inline match_LitteralContext *
-match_allocLitteralContext(void) {
- return uio_malloc(sizeof (match_LitteralContext));
+static inline match_LiteralContext *
+match_allocLiteralContext(void) {
+ return uio_malloc(sizeof (match_LiteralContext));
}
static inline void
-match_freeLitteralContext(match_LitteralContext *context) {
+match_freeLiteralContext(match_LiteralContext *context) {
uio_free(context);
}
Modified: trunk/sc2/src/libs/uio/match.h
===================================================================
--- trunk/sc2/src/libs/uio/match.h 2012-02-13 01:10:40 UTC (rev 3770)
+++ trunk/sc2/src/libs/uio/match.h 2012-02-18 20:26:58 UTC (rev 3771)
@@ -31,7 +31,7 @@
typedef enum {
- match_MATCH_LITTERAL = 0,
+ match_MATCH_LITERAL = 0,
match_MATCH_PREFIX,
match_MATCH_SUFFIX,
match_MATCH_SUBSTRING,
@@ -52,7 +52,7 @@
#define match_ECUSTOM -3
#define match_ENOTINIT -4
-typedef struct match_LitteralContext match_LitteralContext;
+typedef struct match_LiteralContext match_LiteralContext;
typedef struct match_PrefixContext match_PrefixContext;
typedef struct match_SuffixContext match_SuffixContext;
typedef struct match_SubStringContext match_SubStringContext;
@@ -87,7 +87,7 @@
struct match_MatchContext {
match_MatchType type;
union {
- match_LitteralContext *litteral;
+ match_LiteralContext *literal;
match_PrefixContext *prefix;
match_SuffixContext *suffix;
match_SubStringContext *subString;
@@ -100,7 +100,7 @@
} u;
};
-struct match_LitteralContext {
+struct match_LiteralContext {
char *pattern;
};
@@ -134,11 +134,11 @@
};
#endif
-match_Result match_prepareLitteral(const char *pattern,
- match_LitteralContext **contextPtr);
-match_Result match_matchLitteral(match_LitteralContext *context,
+match_Result match_prepareLiteral(const char *pattern,
+ match_LiteralContext **contextPtr);
+match_Result match_matchLiteral(match_LiteralContext *context,
const char *string);
-void match_freeLitteral(match_LitteralContext *context);
+void match_freeLiteral(match_LiteralContext *context);
match_Result match_preparePrefix(const char *pattern,
match_PrefixContext **contextPtr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|