separator module #1
Loading…
Reference in a new issue
No description provided.
Delete branch "krizej/modfetch:sepmodule"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
first module which uses the config :-)
@ -0,0 +22,4 @@
static size_t sep_char_length = 1;
void init(char **config) {
for(char *opt = *config; opt != NULL; opt = *++config) {
for(...)
->for (...)
same for if
why not functions though boy
functions are simply built different
that is why their braces should be on a new line ;-)
@ -0,0 +23,4 @@
void init(char **config) {
for(char *opt = *config; opt != NULL; opt = *++config) {
if(!strncmp(opt, "sep", 3)) {
instead of
!
use== 0
, same in the if below@ -0,0 +35,4 @@
if(*value != 0) { // todo: see if there are any more characters that should be rejected
sep_char_length = strlen(value);
sep_char = malloc(sep_char_length + 1);
in all the mallocs do
sizeof(type)
even if the size is 1 byte@ -0,0 +18,4 @@
const char *module_name(void) { return "sep"; }
static size_t length = 8;
static char *sep_char = "-";
implicitly cast the literal to
char*
because of a warningthat produces basically the same warning but don't worry i've found a way :-)
turn it back to "-"
converts minutes into hours :-(
?M]9ADEWFE\x91W3H²Àow;½MG{d?\x81¸\x96XnbDK<sQm¥B5<{5\x9cGH?¯\xadj¤W\x84E«·[]\x85[q<kxe\x9e|j·I\x85¹\x9c¹D¤t\x81YÀ\\s>´}\x94\x9fOo6\x9b·\x9a\\w\x81tW]³81
\x92VMW>K f1a28fb6b4