aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-04-06 19:03:54 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2019-04-06 19:03:54 +0200
commit79f2dc7d04c0abc1cba3f2727d462dc88ed9e44f (patch)
treee99e53fb0b4bb7014ab4437b0033865793c0ea72
parentAdd unval. (diff)
downloadcalp-79f2dc7d04c0abc1cba3f2727d462dc88ed9e44f.tar.gz
calp-79f2dc7d04c0abc1cba3f2727d462dc88ed9e44f.tar.xz
Rename get_property to get_attributes.
-rw-r--r--src/guile_interface.scm.c10
-rw-r--r--src/main.c4
-rw-r--r--src/vcal.c2
-rw-r--r--src/vcal.h2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/guile_interface.scm.c b/src/guile_interface.scm.c
index d4a7021f..1a843f4a 100644
--- a/src/guile_interface.scm.c
+++ b/src/guile_interface.scm.c
@@ -44,7 +44,7 @@ SCM_DEFINE (vcomponent_get_attribute, "%vcomponent-get-attribute", 2, 0, 0,
vcomponent* cal = scm_foreign_object_ref (calendar, 0);
char* key = scm_to_utf8_stringn(scm_string_upcase(attr), NULL);
- content_line* c = get_property (cal, key);
+ content_line* c = get_attributes (cal, key);
free(key);
if (c == NULL) return SCM_BOOL_F;
@@ -71,7 +71,7 @@ SCM_DEFINE (vcomponent_get_property, "%vcomponent-get-property", 3, 0, 0,
char* key = scm_to_utf8_stringn(scm_string_upcase(attr), NULL);
char* prop_key = scm_to_utf8_stringn(scm_string_upcase(prop), NULL);
- content_line* cl = get_property (comp, key);
+ content_line* cl = get_attributes (comp, key);
free(key);
if (cl == NULL) return SCM_BOOL_F;
@@ -98,14 +98,14 @@ SCM_DEFINE (vcomponent_set_attr_x, "%vcomponent-set-attribute!", 3, 0, 0,
vcomponent* com = scm_foreign_object_ref (component, 0);
char* key = scm_to_utf8_stringn(scm_string_upcase(attr), NULL);
- content_line* c = get_property (com, key);
+ content_line* c = get_attributes (com, key);
/* Create the position in the TRIE if it doesn't already exist */
if (c == NULL) {
/* Insert empty key since this allows me to use the helper
* function */
vcomponent_push_val(com, key, "");
- c = get_property (com, key);
+ c = get_attributes (com, key);
} else {
/*
* The SCM representation of an object is usually initialized
@@ -263,7 +263,7 @@ SCM_DEFINE(vcomponent_prop_list, "%vcomponent-property-list", 2, 0, 0,
vcomponent* comp = scm_foreign_object_ref (component, 0);
char* key = scm_to_utf8_stringn(scm_string_upcase(attr), NULL);
- content_line* cl = get_property (comp, key);
+ content_line* cl = get_attributes (comp, key);
free(key);
if (cl == NULL) return SCM_BOOL_F;
diff --git a/src/main.c b/src/main.c
index 40dc705f..fabca811 100644
--- a/src/main.c
+++ b/src/main.c
@@ -24,7 +24,7 @@ int arg_shift (arg* a) {
#define GETSET(C, KEY) \
vcomponent_push_val((C), (KEY), "DUMMY VALUE"); \
- INFO_F("cline = %p", get_property((C), (KEY)));
+ INFO_F("cline = %p", get_attributes((C), (KEY)));
/*
* Tests defined here instead of in own header to ensure that all the
@@ -84,7 +84,7 @@ int main (int argc, char** argv) {
printf("%s | %s\n",
filename,
- get_property(ev, "SUMMARY")->cval->key.mem);
+ get_attributes(ev, "SUMMARY")->cval->key.mem);
}
}
} else if (strcmp(args.argv[0], "-g") == 0) {
diff --git a/src/vcal.c b/src/vcal.c
index 297ed52e..c0ac6182 100644
--- a/src/vcal.c
+++ b/src/vcal.c
@@ -78,7 +78,7 @@ INIT_F(vcomponent, const char* type, const char* filename) {
return 0;
}
-content_line* get_property (vcomponent* ev, const char* key) {
+content_line* get_attributes (vcomponent* ev, const char* key) {
size_t len = strlen(key) + 1;
char* cpy = (char*) (calloc(sizeof(*cpy), len));
strncpy (cpy, key, len);
diff --git a/src/vcal.h b/src/vcal.h
index eff1f06f..9b0e4893 100644
--- a/src/vcal.h
+++ b/src/vcal.h
@@ -89,7 +89,7 @@ INIT_F(vcomponent, const char* type);
INIT_F(vcomponent, const char* type, const char* filename);
FREE_F(vcomponent);
-content_line* get_property (vcomponent* ev, const char* key);
+content_line* get_attributes (vcomponent* ev, const char* key);
int add_content_line (vcomponent* ev, content_line* c);