summaryrefslogtreecommitdiffstats
path: root/dimension
diff options
context:
space:
mode:
Diffstat (limited to 'dimension')
-rw-r--r--dimension/main.c3
-rw-r--r--dimension/parse.c10
-rw-r--r--dimension/realize.c2
3 files changed, 8 insertions, 7 deletions
diff --git a/dimension/main.c b/dimension/main.c
index 708184d..f780484 100644
--- a/dimension/main.c
+++ b/dimension/main.c
@@ -39,7 +39,8 @@ static void print_usage(FILE *file, const char *arg0);
static void print_version(FILE *file);
int
-main(int argc, char **argv) {
+main(int argc, char **argv)
+{
/*
* Parse the command-line options
*/
diff --git a/dimension/parse.c b/dimension/parse.c
index 3216962..fc067cf 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -562,7 +562,7 @@ dmnsn_eval_zeroary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
{
dmnsn_astnode ret = dmnsn_copy_astnode(astnode);
- switch(astnode.type) {
+ switch (astnode.type) {
case DMNSN_AST_PI:
dmnsn_make_ast_float(&ret, 4*atan(1.0));
break;
@@ -688,7 +688,7 @@ dmnsn_eval_unary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
long n = *(long *)rhs.ptr;
ret = dmnsn_copy_astnode(astnode);
- switch(astnode.type) {
+ switch (astnode.type) {
case DMNSN_AST_DOT_X:
case DMNSN_AST_DOT_Y:
case DMNSN_AST_DOT_Z:
@@ -792,7 +792,7 @@ dmnsn_eval_unary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
double n = *(double *)rhs.ptr;
ret = dmnsn_copy_astnode(astnode);
- switch(astnode.type) {
+ switch (astnode.type) {
case DMNSN_AST_DOT_X:
case DMNSN_AST_DOT_Y:
case DMNSN_AST_DOT_Z:
@@ -895,7 +895,7 @@ dmnsn_eval_unary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
} else if (rhs.type == DMNSN_AST_STRING) {
ret = dmnsn_copy_astnode(astnode);
- switch(astnode.type) {
+ switch (astnode.type) {
case DMNSN_AST_ASC:
dmnsn_make_ast_integer(&ret, ((char *)rhs.ptr)[0]);
break;
@@ -1571,7 +1571,7 @@ dmnsn_eval_ternary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
dmnsn_array_get(astnode.children, 2, &iffalse);
test = dmnsn_eval_scalar(test, symtable);
- switch(astnode.type) {
+ switch (astnode.type) {
case DMNSN_AST_TERNARY:
dmnsn_assert(test.type == DMNSN_AST_INTEGER,
"Conditional expression evaluated to non-integer.");
diff --git a/dimension/realize.c b/dimension/realize.c
index 160bf79..563327c 100644
--- a/dimension/realize.c
+++ b/dimension/realize.c
@@ -456,7 +456,7 @@ dmnsn_realize_pigment_modifiers(dmnsn_astnode astnode, dmnsn_pigment *pigment)
dmnsn_assert(astnode.type == DMNSN_AST_PIGMENT_MODIFIERS,
"Expected pigment modifiers.");
- DMNSN_ARRAY_FOREACH(dmnsn_astnode *, modifier, astnode.children) {
+ DMNSN_ARRAY_FOREACH (dmnsn_astnode *, modifier, astnode.children) {
switch (modifier->type) {
case DMNSN_AST_TRANSFORMATION:
pigment->trans = dmnsn_matrix_mul(