diff --git a/README/API_AND_NAMESPACE.md b/README/API_AND_NAMESPACE.md index 60eebb5..151a3a4 100644 --- a/README/API_AND_NAMESPACE.md +++ b/README/API_AND_NAMESPACE.md @@ -66,7 +66,7 @@ All of the information above is useful for anyone who wants to browse Tidy's sou ## Behind the scenes -The first thing we need to do is have the internal version of the function that we want to add. Tidy has module that handles localization: `language.h/c`. In the header is where we define the interface to LibTidy, which should be namespaced according to the discussion above. We can declare: +The first thing we need to do is have the internal version of the function that we want to add. Tidy has a module that handles localization: `language.h/c`. In the header is where we define the interface to LibTidy, which should be namespaced according to the discussion above. We can declare: ~~~ ctmbstr TY_(tidyLocalizedString)( uint messageType ); @@ -78,7 +78,7 @@ Now you have a decision to make: if you plan to use this function internally, yo ## The API -Once implemented, we want a pretty, public-facing name for our `tidyLocalizedString()` function, which appropriate is `tidyLocalizedString()`. Add the declaration to `tidy.h`: +Once implemented, we want a pretty, public-facing name for our `tidyLocalizedString()` function, which appropriately is `tidyLocalizedString()`. Add the declaration to `tidy.h`: ~~~ TIDY_EXPORT ctmbstr TIDY_CALL tidyLocalizedString( uint messageType ); @@ -102,4 +102,3 @@ For a more complicated example that demonstrates how to use opaque types (and al - implement iteration for structures with multiple records. - write a function in `tidylib.c` that converts between the exposed, opaque type and the internal, implementation type. - further reinforce how functionality is added to the API. - diff --git a/README/ATTRIBUTES.md b/README/ATTRIBUTES.md index 79ec167..0615998 100644 --- a/README/ATTRIBUTES.md +++ b/README/ATTRIBUTES.md @@ -11,13 +11,13 @@ Tidy’s large number of attributes are supported via number of files: So, to add a new `attribute=value`, on one or more existing tags, consists of the following simple steps - - 1. `tidyenum.h` - Give the attribute an internal name, like `TidyAttr_XXXX`, and thus a value. While there were some initial steps to keep this `TidyAttrId` enumeration alphabetic, now just add the new `TidyAttr_XXXX` just before the last entry `N_TIDY_ATTRIBS`. + 1. `tidyenum.h` - Give the attribute an internal name, like `TidyAttr_XXXX`, and thus a value. Please try to keep this enumeration in alphabetical order. 2. `attrs.c` - Assign the string value of the attribute. Of course this must be unique. And then assign a `function` to verify the attribute value. There are already a considerable number of defined functions to verify specific attribute values, but maybe this new attribute requires a new function, so that should be written, and defined. 3. `attrdict.c` - If this attribute only relates to specific tags, then it should be added to their list. There are some general attributes that are allowed on every, or most tags, so this new attribute and value should be added accordingly. - 4. `tags.c` - Now the new attribute will be verified for each tag it is associate with in the `tag_defs[]` table. Like for example the `