Skip to content

Commit ec8579c

Browse files
author
srdja
committed
Renaming Vector to Array
1 parent 72c8712 commit ec8579c

File tree

15 files changed

+1670
-1696
lines changed

15 files changed

+1670
-1696
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Collections-C
22
=============
33

4-
A library of generic container types including a list, vector, hashtable, deque etc..
4+
A library of generic container types including a list, array, hashtable, deque etc..
55

66
####Dependencies
77
- gcc
@@ -15,7 +15,7 @@ These packages can usually be installed through your distributions package manag
1515
Building on windows requires [MinGW](http://mingw.org) which provides all the tools needed to build the project.
1616

1717
#### Building the project
18-
In the project directory, run the following commands: `./autogen.sh` then run `./configure`. If autogen complains that it couldn't find a directory named "m4", run: `mkdir m4` and then `./autogen.sh`.
18+
In the project directory, run the following commands: `./autogen.sh` then run `./configure`. If autogen complains that it couldn't find a directory named "m4", run: `mkdir m4` and then `./autogen.sh`.
1919

2020
At this point we should be able to build the project by running:
2121
```
@@ -28,7 +28,7 @@ make check
2828

2929
#### Examples
3030

31-
HashTable:
31+
HashTable:
3232
```c
3333
HashTable *table = hashtable_new();
3434

@@ -40,20 +40,20 @@ char *removed = hashtable_remove("foo"); // removes the key and returns the valu
4040

4141
hashtable_destroy(table);
4242
```
43-
Vector (dynamic array):
43+
Array (dynamic array):
4444
```c
45-
Vector *vec = vector_new();
45+
Array *vec = array_new();
4646
47-
vector_add(vec, "foo");
48-
vector_add(vec, "bar");
49-
vector_add(vec, "baz");
47+
array_add(vec, "foo");
48+
array_add(vec, "bar");
49+
array_add(vec, "baz");
5050
51-
char *foo = vector_get(vec, 0);
52-
char *baz = vector_get(vec, 2);
51+
char *foo = array_get(vec, 0);
52+
char *baz = array_get(vec, 2);
5353
54-
char *removed = vector_remove_at(vec, 1);
54+
char *removed = array_remove_at(vec, 1);
5555
56-
vector_destroy(vec);
56+
array_destroy(vec);
5757
```
5858
TreeSet (sorted set):
5959
```c

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
AC_PREREQ([2.68])
55
AC_INIT([libcollectc], [0.0.0], [srdjan.panic@ymail.com])
6-
AC_CONFIG_SRCDIR([src/vector.c])
6+
AC_CONFIG_SRCDIR([src/array.c])
77
AC_CONFIG_HEADERS([config.h])
88

99
#Setup automake

0 commit comments

Comments
 (0)