diff options
| author | default <nobody@localhost> | 2026-08-26 08:17:03 +0200 |
|---|---|---|
| committer | default <nobody@localhost> | 2026-08-26 08:17:03 +0200 |
| commit | 319d5cae0e632e1891f442194afe5e36aa48e6c4 (patch) | |
| tree | 7bc2a70a725a635ae00b28266bc0c79be4ef3195 /main.c | |
| parent | 120308074813de49fea6728259b5d78a907ea9b2 (diff) | |
Use snac_op in list_maint().
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -332,7 +332,7 @@ int main(int argc, char *argv[]) } if (strcmp(cmd, "lists") == 0) { /** **/ - xs *lol = list_maint(&snac, NULL, 0); + xs *lol = list_maint(&snac, NULL, OP_LIST); const xs_list *l; xs_list_foreach(lol, l) { @@ -389,7 +389,7 @@ int main(int argc, char *argv[]) return usage(cmd); if (strcmp(cmd, "list_members") == 0) { /** **/ - xs *lid = list_maint(&snac, url, 4); + xs *lid = list_maint(&snac, url, OP_FIND); if (lid != NULL) { xs *lcont = list_members(&snac, lid, NULL, OP_LIST); @@ -410,10 +410,10 @@ int main(int argc, char *argv[]) } if (strcmp(cmd, "list_create") == 0) { /** **/ - xs *lid = list_maint(&snac, url, 4); + xs *lid = list_maint(&snac, url, OP_FIND); if (lid == NULL) { - xs *n_lid = list_maint(&snac, url, 1); + xs *n_lid = list_maint(&snac, url, OP_ADD); printf("New list named '%s' created (%s)\n", url, n_lid); } else @@ -423,10 +423,10 @@ int main(int argc, char *argv[]) } if (strcmp(cmd, "list_remove") == 0) { /** **/ - xs *lid = list_maint(&snac, url, 4); + xs *lid = list_maint(&snac, url, OP_FIND); if (lid != NULL) { - list_maint(&snac, lid, 2); + list_maint(&snac, lid, OP_DEL); printf("List '%s' (%s) deleted\n", url, lid); } else @@ -439,7 +439,7 @@ int main(int argc, char *argv[]) const char *account = GET_ARGV(); if (account != NULL) { - xs *lid = list_maint(&snac, url, 4); + xs *lid = list_maint(&snac, url, OP_FIND); if (lid != NULL) { xs *actor = NULL; @@ -466,7 +466,7 @@ int main(int argc, char *argv[]) const char *account = GET_ARGV(); if (account != NULL) { - xs *lid = list_maint(&snac, url, 4); + xs *lid = list_maint(&snac, url, OP_FIND); if (lid != NULL) { xs *md5 = xs_md5_hex(account, strlen(account)); |