aboutsummaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/misc.c b/src/misc.c
index 5728323..23d90b0 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -16,7 +16,9 @@ static char *GetSymbolName(const char *str);
static void ReplaceSymbol(char **str, const char *name, const char *value);
/** Determine if a character is a space character. */
-int IsSpace(char ch) {
+int
+IsSpace(char ch)
+{
switch(ch) {
case ' ':
case '\t':
@@ -29,7 +31,9 @@ int IsSpace(char ch) {
}
/** Determine if a character is a valid for a shell variable. */
-int IsSymbolic(char ch) {
+int
+IsSymbolic(char ch)
+{
if(ch >= 'A' && ch <= 'Z') {
return 1;
@@ -67,7 +71,9 @@ char *GetSymbolName(const char *str) {
}
/** Replace "name" with "value" in str (reallocates if needed). */
-void ReplaceSymbol(char **str, const char *name, const char *value) {
+void
+ReplaceSymbol(char **str, const char *name, const char *value)
+{
char *temp;
int strLength;
@@ -122,7 +128,9 @@ void ReplaceSymbol(char **str, const char *name, const char *value) {
}
/** Perform shell-like macro path expansion. */
-void ExpandPath(char **path) {
+void
+ExpandPath(char **path)
+{
char *name;
char *value;
@@ -147,7 +155,9 @@ void ExpandPath(char **path) {
}
/** Trim leading and trailing whitespace from a string. */
-void Trim(char *str) {
+void
+Trim(char *str)
+{
int length;
int start;