From edee81e3ae97aca57d513b0ce239c79b9d29c969 Mon Sep 17 00:00:00 2001 From: AnonymusRaccoon Date: Thu, 12 Mar 2020 18:31:11 +0100 Subject: [PATCH] Coding style --- src/otherget.c | 13 ++++++++----- src/strangeget.c | 24 ++++++++++++------------ src/xmlget.c | 6 +++--- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/otherget.c b/src/otherget.c index 9fb1dba..8a4b075 100644 --- a/src/otherget.c +++ b/src/otherget.c @@ -1,11 +1,14 @@ -// -// Created by anonymus-raccoon on 3/2/20. -// +/* +** EPITECH PROJECT, 2020 +** My3D +** File description: +** otherget +*/ #include "xml.h" char *xml_gettmpstring(node *n, const char *key, char *def) { - char *ret = xml_gettempprop(n, key); - return ret ? ret : def; + char *ret = xml_gettempprop(n, key); + return ret ? ret : def; } \ No newline at end of file diff --git a/src/strangeget.c b/src/strangeget.c index 3b3a615..3922d08 100644 --- a/src/strangeget.c +++ b/src/strangeget.c @@ -42,22 +42,22 @@ bool xml_hasproperty(node *n, const char *key) bool xml_propcontains(node *n, const char *key, const char *tofind) { - char *tmp = xml_gettempprop(n, key); + char *tmp = xml_gettempprop(n, key); - return tmp && my_strstr(tmp, tofind); + return tmp && my_strstr(tmp, tofind); } bool xml_getbool(node *n, const char *key, bool default_value) { - char *tmp = xml_gettempprop(n, key); + char *tmp = xml_gettempprop(n, key); - if (tmp && !my_strcmp(tmp, "true")) - return (true); - if (tmp && !my_strcmp(tmp, "True")) - return (true); - if (tmp && !my_strcmp(tmp, "false")) - return (false); - if (tmp && !my_strcmp(tmp, "False")) - return (false); - return (default_value); + if (tmp && !my_strcmp(tmp, "true")) + return (true); + if (tmp && !my_strcmp(tmp, "True")) + return (true); + if (tmp && !my_strcmp(tmp, "false")) + return (false); + if (tmp && !my_strcmp(tmp, "False")) + return (false); + return (default_value); } \ No newline at end of file diff --git a/src/xmlget.c b/src/xmlget.c index 2490f2d..1d5ae63 100644 --- a/src/xmlget.c +++ b/src/xmlget.c @@ -28,9 +28,9 @@ char *xml_getproperty(node *n, const char *key) char *prop = xml_gettempprop(n, key); if (prop) { - my_str_replace(prop, "\\n", '\n'); - return (my_strdup(prop)); - } + my_str_replace(prop, "\\n", '\n'); + return (my_strdup(prop)); + } return (NULL); }