{"action":"created","issue":{"url":"https://api.github.com/repos/runrev/livecode/issues/1701","labels_url":"https://api.github.com/repos/runrev/livecode/issues/1701/labels{/name}","comments_url":"https://api.github.com/repos/runrev/livecode/issues/1701/comments","events_url":"https://api.github.com/repos/runrev/livecode/issues/1701/events","html_url":"https://github.com/runrev/livecode/pull/1701","id":55145180,"number":1701,"title":"[[libsystem]] Add new \"system foundation\" library","user":{"login":"peter-b","id":47528,"avatar_url":"https://avatars.githubusercontent.com/u/47528?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-b","html_url":"https://github.com/peter-b","followers_url":"https://api.github.com/users/peter-b/followers","following_url":"https://api.github.com/users/peter-b/following{/other_user}","gists_url":"https://api.github.com/users/peter-b/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-b/subscriptions","organizations_url":"https://api.github.com/users/peter-b/orgs","repos_url":"https://api.github.com/users/peter-b/repos","events_url":"https://api.github.com/users/peter-b/events{/privacy}","received_events_url":"https://api.github.com/users/peter-b/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/runrev/livecode/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/runrev/livecode/labels/reviewed","name":"reviewed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-22T12:00:48Z","updated_at":"2015-01-27T15:23:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/runrev/livecode/pulls/1701","html_url":"https://github.com/runrev/livecode/pull/1701","diff_url":"https://github.com/runrev/livecode/pull/1701.diff","patch_url":"https://github.com/runrev/livecode/pull/1701.patch"},"body":"As the LCB standard library grows, there's an increasing amount of library code that's been introduced (mostly by me) to provide a consistent wrapper for low-level platform APIs (for example, reading and writing files).\r\n\r\nThis has mostly been stuffed into `libfoundation`. However, `libfoundation` really was supposed to be a type library rather than a system services library.  @runrevmark and I discussed this recently and determined that it would be better to separate out the system services code into a separate library eventually, but that for the time being we should introduce a \"sublibrary\" of `libfoundation`.\r\n\r\nThis changeset introduces a new `<foundation-system.h>` header, which defines a large number of C API functions using the `MCS` prefix.  So far, these include:\r\n\r\n* `MCSFile`: file and filesystem operations\r\n* `MCSStream`: C stdio-compatible streams based on `MCStream`\r\n* `MCSRandom`: Random number generation\r\n* `MCSCommandLine`: Command-line argument handling\r\n\r\nThis pull request includes & supersedes #1687 and #1679.\r\n\r\n## Notes\r\n\r\n1. Rather than having separate \"public\" and \"private\" headers, each of the public `system-foo.h` headers includes private definitions guarded by an `#ifdef __MCS_INTERNAL_API__` macro. The `system-private.h` header just defines `__MCS_INTERNAL_API__` and then `#include`s the public headers.\r\n2. Instead of putting header guards in each of the `system-foo.h` headers, there's only a header guard on the main `libfoundation-system.h` header.  The `system-foo.h` headers cause a preprocessing error if they're not being included via the main header.\r\n3. All of the system foundation library public API is exported with C linkage."},"comment":{"url":"https://api.github.com/repos/runrev/livecode/issues/comments/71665472","html_url":"https://github.com/runrev/livecode/pull/1701#issuecomment-71665472","issue_url":"https://api.github.com/repos/runrev/livecode/issues/1701","id":71665472,"user":{"login":"runrevfraser","id":5311346,"avatar_url":"https://avatars.githubusercontent.com/u/5311346?v=3","gravatar_id":"","url":"https://api.github.com/users/runrevfraser","html_url":"https://github.com/runrevfraser","followers_url":"https://api.github.com/users/runrevfraser/followers","following_url":"https://api.github.com/users/runrevfraser/following{/other_user}","gists_url":"https://api.github.com/users/runrevfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/runrevfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runrevfraser/subscriptions","organizations_url":"https://api.github.com/users/runrevfraser/orgs","repos_url":"https://api.github.com/users/runrevfraser/repos","events_url":"https://api.github.com/users/runrevfraser/events{/privacy}","received_events_url":"https://api.github.com/users/runrevfraser/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T15:23:52Z","updated_at":"2015-01-27T15:23:52Z","body":"Will need some post-merge cleanup for Visual Studio and Xcode project files and the Android makefiles."}}