d4a904414d
commite1f8d769f4
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 10 08:53:07 2022 -0500 update authors commit3e5525f1a6
Merge:f4ba1770
1c21abc5
Author: Orion Henry <orionz@users.noreply.github.com> Date: Wed Mar 9 14:36:29 2022 -0500 Merge pull request #304 from jkankiewicz/c_api_exp Fix "fmt" workflow step violations commit1c21abc5a3
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Wed Mar 9 11:13:01 2022 -0800 Fix CMake and Rust code formatting issues. commitf4ba1770a9
Merge:bf1ae609
f41b30d1
Author: Orion Henry <orionz@users.noreply.github.com> Date: Wed Mar 9 12:05:58 2022 -0500 Merge pull request #300 from jkankiewicz/c_api_exp Add unit test suites for the `AMlistSet*` and `AMmapSet*` functions commitf41b30d118
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 22:08:36 2022 -0800 Added a brief description of the `AmObjType` enum. Added the `AmStatus` enum to the enum docs page. commitaf7386a482
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 21:50:52 2022 -0800 Added a unit test suite for the `AMlistSet*` functions. commit1eb70c6eee
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 21:42:42 2022 -0800 Added the rest of the `AMlistSet*` functions. Started the enum tags at `1` so they won't be inherently false. Alphabetized enum tags for the docs. Improved the docs. commit6489cba13b
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 18:01:46 2022 -0800 Alphabetize functions in the docs. commit74c245b82d
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 07:54:25 2022 -0800 Fix a typo in `AMmapSetObject()`'s documentation. commitb2a879ba4e
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 06:24:22 2022 -0800 Append missing EOF linefeed. commitfbf0f29b66
Merge:c56d54b5
bf1ae609
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 01:08:12 2022 -0800 Merge branch 'c_api_exp' of https://github.com/automerge/automerge-rs into c_api_exp commitc56d54b565
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 01:07:11 2022 -0800 Added unit test cases for the new `AMmapSet*` functions by @orionz. Moved the unit test cases for the `AMmapSet*` functions into their own unit test suite. commit7e59b55760
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Tue Mar 8 01:01:47 2022 -0800 Edited the Doxygen documentation. commitbf1ae60913
Author: Orion Henry <orion.henry@gmail.com> Date: Mon Mar 7 11:59:22 2022 -0500 fmt commite82a7cc78e
Merge:a44e69d2
965c2d56
Author: Orion Henry <orionz@users.noreply.github.com> Date: Mon Mar 7 11:55:32 2022 -0500 Merge pull request #299 from jkankiewicz/c_api_exp Enable unit testing of the C API commit965c2d56c3
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Mon Mar 7 06:37:36 2022 -0800 Enable unit testing of the C API. commita44e69d2c7
Author: Orion Henry <orion.henry@gmail.com> Date: Sun Mar 6 14:00:46 2022 -0500 remove datatype mapset commit88153c44e7
Merge:41512e9c
c6194e97
Author: Orion Henry <orionz@users.noreply.github.com> Date: Sun Mar 6 10:32:39 2022 -0500 Merge pull request #298 from jkankiewicz/rebase_c_api_exp Rebase the "c_api_exp" branch on the "experiment" branch commitc6194e9732
Merge:a2d745c8
41512e9c
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Sun Mar 6 01:09:56 2022 -0800 Merge branch 'c_api_exp' into rebase_c_api_exp commita2d745c8d9
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Sun Mar 6 00:44:37 2022 -0800 Replace the `utils::import_value` function with the `utils::import_scalar` function. Exclude `# Safety` comments from the documentation. commit0681e28b40
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 16:04:17 2022 -0500 support new as_ref api commit916e23fcc2
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 15:56:27 2022 -0500 fmt commit71cd6a1f18
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 15:54:38 2022 -0500 lock data at 64 bit - no c_long commite00bd4c201
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 15:27:55 2022 -0500 verbose commit39d157c554
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 14:56:23 2022 -0500 clippy cleanup commit7f650fb8e0
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Wed Feb 23 02:14:06 2022 -0800 Added Doxygen documentation generation. Renamed `AMDatatype` to `AmDataType`. Reorganized the `AmDataType` tags. Renamed `AMfree()` to `AMdestroy()`. Renamed `AMclone()` to `AMdup()`. commitb0b803eef8
Author: Orion Henry <orion.henry@gmail.com> Date: Tue Feb 22 11:30:42 2022 -0500 get simple test passing commitcab9017ffa
Author: Orion Henry <orion.henry@gmail.com> Date: Wed Feb 9 15:50:44 2022 -0500 rework to return a queriable result commita557e848f3
Author: Jason Kankiewicz <you@example.com> Date: Mon Feb 14 14:38:00 2022 -0800 Add a CI step to run the CMake build of the C bindings for @alexjg. commitc8c0c72f3b
Author: Jason Kankiewicz <you@example.com> Date: Mon Feb 14 14:09:58 2022 -0800 Add CMake instructions for @orionz. commitfb62c4b02a
Author: Jason Kankiewicz <you@example.com> Date: Thu Feb 10 23:28:54 2022 -0800 Add CMake support. commit7bc3bb6850
Author: Jason Kankiewicz <you@example.com> Date: Thu Feb 10 22:49:53 2022 -0800 Replace *intptr_t in C function signatures. commit60395a2db0
Author: Orion Henry <orion.henry@gmail.com> Date: Sun Feb 6 18:59:19 2022 -0500 am_pop and am_pop_value commitb1e88047d2
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Feb 3 19:43:36 2022 -0500 break the ground commit41512e9c78
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 16:04:17 2022 -0500 support new as_ref api commitbcee6a9623
Merge:cf98f78d
9a89db3f
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 15:58:19 2022 -0500 Merge remote-tracking branch 'origin/experiment' into c_api_exp commitcf98f78dd1
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 15:56:27 2022 -0500 fmt commit3c1f449c5c
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 15:54:38 2022 -0500 lock data at 64 bit - no c_long commit2c2ec0b0c5
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 15:27:55 2022 -0500 verbose commitb72b9c989a
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Mar 3 14:56:23 2022 -0500 clippy cleanup commit3ba28f91cc
Author: Jason Kankiewicz <jason.kankiewicz@gmail.com> Date: Wed Feb 23 02:14:06 2022 -0800 Added Doxygen documentation generation. Renamed `AMDatatype` to `AmDataType`. Reorganized the `AmDataType` tags. Renamed `AMfree()` to `AMdestroy()`. Renamed `AMclone()` to `AMdup()`. commit8564e5b753
Author: Orion Henry <orion.henry@gmail.com> Date: Tue Feb 22 11:30:42 2022 -0500 get simple test passing commit60835e6ae7
Author: Orion Henry <orion.henry@gmail.com> Date: Wed Feb 9 15:50:44 2022 -0500 rework to return a queriable result commit89466d9e8c
Author: Jason Kankiewicz <you@example.com> Date: Mon Feb 14 14:38:00 2022 -0800 Add a CI step to run the CMake build of the C bindings for @alexjg. commite2485bd5fd
Author: Jason Kankiewicz <you@example.com> Date: Mon Feb 14 14:09:58 2022 -0800 Add CMake instructions for @orionz. commitb5cc7dd63d
Author: Jason Kankiewicz <you@example.com> Date: Thu Feb 10 23:28:54 2022 -0800 Add CMake support. commit685536f0cf
Author: Jason Kankiewicz <you@example.com> Date: Thu Feb 10 22:49:53 2022 -0800 Replace *intptr_t in C function signatures. commitc1c6e7bb66
Author: Orion Henry <orion.henry@gmail.com> Date: Sun Feb 6 18:59:19 2022 -0500 am_pop and am_pop_value commite68c8d347e
Author: Orion Henry <orion.henry@gmail.com> Date: Thu Feb 3 19:43:36 2022 -0500 break the ground
36 lines
701 B
C
36 lines
701 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
#include "automerge.h"
|
|
|
|
#define MAX_BUFF_SIZE 4096
|
|
|
|
int main() {
|
|
int n = 0;
|
|
int data_type = 0;
|
|
char buff[MAX_BUFF_SIZE];
|
|
char obj[MAX_BUFF_SIZE];
|
|
AMresult* res = NULL;
|
|
|
|
printf("begin\n");
|
|
|
|
AMdoc* doc = AMcreate();
|
|
|
|
printf("AMconfig()...");
|
|
AMconfig(doc, "actor", "aabbcc");
|
|
printf("pass!\n");
|
|
|
|
printf("AMmapSetStr()...\n");
|
|
res = AMmapSetStr(doc, NULL, "string", "hello world");
|
|
if (AMresultStatus(res) != AM_STATUS_COMMAND_OK)
|
|
{
|
|
printf("AMmapSet() failed: %s\n", AMerrorMessage(res));
|
|
return 1;
|
|
}
|
|
AMclear(res);
|
|
printf("pass!\n");
|
|
|
|
AMdestroy(doc);
|
|
printf("end\n");
|
|
}
|