ICU 58 SpoofChecker API Changes

Size: px
Start display at page:

Download "ICU 58 SpoofChecker API Changes"

Transcription

1 ICU 58 SpoofChecker API Changes This is a proposal for changes to the SpoofChecker API in Java and C++. The changes are intended to reflect the most recent version of UTS 39. SpoofChecker API Changes, Java / Single script confusable test. When testing whether two identifiers are confusable, report that they are if both are from the same script and they are visually confusable. Note: this test is not applicable to a check of a single ICU 4.6 / public static final int SINGLE_SCRIPT_CONFUSABLE = 1; / Mixed script confusable test. <p>when checking a single identifier, report a problem if the identifier contains multiple scripts, and is also confusable with some other identifier in a single script. <p>when testing whether two identifiers are confusable, report that they are if the two IDs are visually confusable, and and at least one contains characters from more than one ICU 4.6 / public static final int MIXED_SCRIPT_CONFUSABLE = 2; / Whole script confusable test. <p>when checking a single identifier, report a problem if The identifier is of a single script, and there exists a confusable identifier in another script. <p>when testing whether two Identifiers are confusable, report that they are if each is of a single script, the scripts of the two identifiers are different, and the identifiers are visually ICU 4.6 / public static final int WHOLE_SCRIPT_CONFUSABLE = 4; / When performing the two string {@link SpoofChecker#areConfusable} test, this flag in the return value indicates that the two strings are visually confusable and that they are from the same script, according to UTS 39 section ICU 4.6 / public static final int SINGLE_SCRIPT_CONFUSABLE = 1; / When performing the two string {@link SpoofChecker#areConfusable} test, this flag in the return value indicates that the two strings are visually confusable and that they are not from the same script, according to UTS 39 section ICU 4.6 / public static final int MIXED_SCRIPT_CONFUSABLE = 2; / When performing the two string {@link SpoofChecker#areConfusable} test, this flag in the return value indicates that the two strings are visually confusable and that they are not from the same script but both of them are single script strings, according to UTS 39 section ICU 4.6 / public static final int WHOLE_SCRIPT_CONFUSABLE = 4; / Enable this flag in "setchecks" to turn on all types of confusables. You may set the checks to some subset of SINGLE_SCRIPT_CONFUSABLE, MIXED_SCRIPT_CONFUSABLE, or WHOLE_SCRIPT_CONFUSABLE to make {@link SpoofChecker#areConfusable} return only those types of confusables. <p>note: if you wish to use {@link SpoofChecker#getSkeleton}, it is required that you enable at least one of the CONFUSABLE flags. / public static final int CONFUSABLE = SINGLE_SCRIPT_CONFUSABLE MIXED_SCRIPT_CONFUSABLE WHOLE_SCRIPT_CONFUSABLE; / Any Case Modifier for confusable identifier tests. <p>when specified, consider all characters, of any case, when looking for confusables. If ANY_CASE is not specified, identifiers being checked are assumed to have been case folded, and upper case conusable characters will not be ICU 4.6 / public static final int ANY_CASE = 8; / Check that an identifier is no looser than the specified RestrictionLevel. The default if this is not called This API is ICU internal only. / public static final int RESTRICTION_LEVEL = 16; / Check that an identifier does not This API is ICU internal only. / / This API is deprecated and no longer affects the behavior of ICU 58 This API was deprecated in UTS 39 revision 11 and is no longer used. / public static final int ANY_CASE = 8; / Check that an identifier satisfies the requirements for the restriction level specified in {@link SpoofChecker.Builder#setRestrictionLevel}. The default restriction level is ICU 58 / public static final int RESTRICTION_LEVEL = 16; / Check that an identifier does not mix numbers from different numbering systems. For more information, see UTS 39 section ICU 58 /

2 public static final int MIXED_NUMBERS = 128; public static final int MIXED_NUMBERS = 128; / Specify the source form of the spoof data Spoof Checker. The inputs correspond to the Unicode data file s confusables.txt and confusableswholescript.txt as described in Unicode UAX 39. The syntax of the source data is as described in UAX 39 for these files, and the content of these files is acceptable confusables the Reader of confusable characters definitions, as found in file confusables.txt from confusableswholescript the Reader of whole script confusables definitions, as found in the file xonfusableswholescript.txt from ParseException To report syntax errors in the ICU 4.6 / public Builder setdata(reader confusables, Reader confusableswholescript ) throws ParseException, java.io.ioexception { / Set the loosest restriction level allowed. The default if this is not called is HIGHLY_RESTRICTIVE. This method also sets restrictionlevel The loosest restriction level self This API is ICU internal only. / public Builder setrestrictionlevel(restrictionlevel restrictionlevel) { / The numerics found in the string, if MIXED_NUMBERS was set; This API is ICU internal only. / public UnicodeSet numerics; / The restriction level that the text meets, if RESTRICTION_LEVEL is set; This API is ICU internal only. / public RestrictionLevel restrictionlevel; / Get the "skeleton" for an identifier string. Skeletons are a transformation of the input string; Two strings are confusable if their skeletons are identical. See Unicode UAX 39 for additional information. Using skeletons directly makes it possible to quickly check whether an identifier is confusable with any of some large set of existing identifiers, by creating an efficiently searchable collection of the skeletons. Skeletons are computed using the algorithm and data describe in Unicode UAX 39. The latest proposed update, UAX 39 Version 8 draft 1, says "the tables SL, SA, and ML were still problematic, and discouraged from use in [Uniocde] 7.0. They were thus removed from version 8.0" In light of this, the default mapping data included with ICU 55 uses the / Specify the source form of the spoof data Spoof Checker. The inputs correspond to the Unicode data file confusables.txt as described in Unicode UAX 39. The syntax of the source data is as described in UAX 39 for these files, and the content of these files is acceptable confusables the Reader of confusable characters definitions, as found in file confusables.txt from ParseException To report syntax errors in the ICU 58 / public Builder setdata(reader confusables) throws ParseException, IOException { //... } / Deprecated as of ICU 58; use {@link SpoofChecker.Builder#setData(Reader confusables)} confusables the Reader of confusable characters definitions, as found in file confusables.txt from confusableswholescript No longer ParseException To report syntax errors in the ICU 58 / public Builder setdata(reader confusables, Reader confusableswholescript) throws ParseException, IOException { setdata(confusables); return this; } / Set the loosest restriction level allowed. The default if this is not called is MODERATELY_RESTRICTIVE. This method also enables the RESTRICTION_LEVEL restrictionlevel The loosest restriction level ICU 58 / public Builder setrestrictionlevel(restrictionlevel restrictionlevel) { / The numerics found in the string, if MIXED_NUMBERS was set; otherwise ICU 58 / public UnicodeSet numerics; / The restriction level that the text meets, if RESTRICTION_LEVEL is set; otherwise ICU 58 / public RestrictionLevel restrictionlevel; / Get the "skeleton" for an identifier string. Skeletons are a transformation of the input string; Two strings are confusable if their skeletons are identical. See Unicode UAX 39 for additional information. Using skeletons directly makes it possible to quickly check whether an identifier is confusable with any of some large set of existing identifiers, by creating an efficiently searchable collection of the skeletons. Skeletons are computed using the algorithm and data describe d in Unicode UAX str The input string whose skeleton will be The output skeleton ICU 58 /

3 Unicode 7 MA (Multi script Any case) table data for the other type options (Single Script, Any Case), (Single Script, Lower Case) and (Multi Script, Lower type The type of skeleton, corresponding to which of the Unicode confusable data tables to use. The default is Mixed Script, Lowercase. Allowed options are SINGLE_SCRIPT_CONFUSABLE and ANY_CASE_CONFUSABLE. The two flags may be id The input identifier whose skeleton will be The output skeleton ICU 4.6 / public String getskeleton(int type, String id) { public String getskeleton(charsequence str) { //... } / Calls {@link SpoofChecker#getSkeleton(CharSequence id)}. Starting with ICU 55, the "type" parameter has been ignored, and starting with ICU 58, the parameter has been type No longer supported. Prior to ICU 55, was used to specify the mapping table SL, SA, ML, or id The input identifier whose skeleton will be The output skeleton ICU 58 / public String getskeleton(int type, CharSequence id) { return getskeleton(id); } SpoofChecker API Changes, C++ typedef enum USpoofChecks { typedef enum USpoofChecks { / Enable this flag in {@link uspoof_setchecks} to turn on all types of confusables. You may set the checks to some subset of SINGLE_SCRIPT_CONFUSABLE, MIXED_SCRIPT_CONFUSABLE, or WHOLE_SCRIPT_CONFUSABLE to make {@link uspoof_areconfusable} return only those types of confusables. <p>note: if you wish to use {@link uspoof_getskeleton}, it is required that you enable at least one of the CONFUSABLE uspoof_getskeleton / USPOOF_CONFUSABLE = 7, / Single script confusable test. When testing whether two identifiers are confusable, report that they are if both are from the same script and they are visually confusable. Note: this test is not applicable to a check of a single identifier. / USPOOF_SINGLE_SCRIPT_CONFUSABLE = 1, / Mixed script confusable test. When checking a single identifier, report a problem if the identifier contains multiple scripts, and is confusable with some other identifier in a single script When testing whether two identifiers are confusable, report that they are if the two IDs are visually confusable, and at least one contains characters from more than one script. / USPOOF_MIXED_SCRIPT_CONFUSABLE = 2, / Whole script confusable test. When checking a single identifier, report a problem if The identifier is of a single script, and there exists a confusable identifier in another script. When testing whether two identifiers are confusable, report that they are if each is of a single script, the scripts of the two identifiers are different, and the identifiers are visually confusable. / USPOOF_WHOLE_SCRIPT_CONFUSABLE = 4, / Any Case Modifier for confusable identifier tests. If specified, consider all characters, of any case, when looking for confusables. If USPOOF_ANY_CASE is not specified, identifiers being checked are assumed to have been case folded. Upper case confusable characters will not be checked. Selects between Lower Case Confusable and Any Case Confusable. / USPOOF_ANY_CASE = 8, / Check that an identifier is no looser than the specified RestrictionLevel. / When performing the two string {@link uspoof_areconfusable} test, this flag in the return value indicates that the two strings are visually confusable and that they are not from the same script, according to UTS 39 section uspoof_areconfusable / USPOOF_SINGLE_SCRIPT_CONFUSABLE = 1, / When performing the two string {@link uspoof_areconfusable} test, this flag in the return value indicates that the two strings are visually confusable and that they are not from the same script, according to UTS 39 section uspoof_areconfusable / USPOOF_MIXED_SCRIPT_CONFUSABLE = 2, / When performing the two string {@link uspoof_areconfusable} test, this flag in the return value indicates that the two strings are visually confusable and that they are not from the same script but both of them are single script strings, according to UTS 39 section uspoof_areconfusable / USPOOF_WHOLE_SCRIPT_CONFUSABLE = 4, #ifndef U_HIDE_DEPRECATED_API / This flag is deprecated and no longer affects the behavior of ICU 58 This API was deprecated in UTS 39 revision 11 and is no longer used. / USPOOF_ANY_CASE = 8, #endif / U_HIDE_DEPRECATED_API / / Check that an identifier is no looser than the specified RestrictionLevel.

4 The default if uspoof_setrestrictionlevel() is not called is HIGHLY_RESTRICTIVE. If USPOOF_AUX_INFO is enabled the actual restriction level of the identifier being tested will also be returned by ICU 51 / USPOOF_RESTRICTION_LEVEL = 16, The default if {@link uspoof_setrestrictionlevel} is not called is MODERATELY_RESTRICTIVE. If USPOOF_AUX_INFO is enabled the actual restriction level of the identifier being tested will also be returned by ICU 51 / USPOOF_RESTRICTION_LEVEL = 16, struct USpoofCheckResult; typedef struct USpoofCheckResult USpoofCheckResult; / Create a USpoofCheckResult, used by the {@link uspoof_check} class of functions to return information about the identifier. Information includes: <ul> <li>a bitmask of the checks that failed</li> <li>the identifier's restriction level (UTS 39 section 5.2)</li> <li>the set of numerics in the string (UTS 39 section 5.3)</li> status The error code, set if this function encounters a the newly created ICU 58 / U_STABLE USpoofCheckResult U_EXPORT2 uspoof_opencheckresult(uerrorcode status); / Close a USpoofCheckResult, freeing any memory that was being held by its checkresult The instance of USpoofCheckResult to ICU 58 / U_STABLE void U_EXPORT2 uspoof_closecheckresult(uspoofcheckresult checkresult); #if U_SHOW_CPLUSPLUS_API U_NAMESPACE_BEGIN / \class LocalUSpoofCheckResultPointer "Smart pointer" class, closes a USpoofCheckResult via {@link uspoof_closecheckresult}. For most methods see the LocalPointerBase base ICU 58 / U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closecheckresult); U_NAMESPACE_END #endif / Gets the bitmask of failing checks from a checkresult The instance of An integer value with bits set for any potential or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled ICU 58 / uspoof_getcheckresultchecks(const USpoofCheckResult checkresult, UErrorCode status); / Gets the URestrictionLevel from a checkresult The instance of The restriction level contained in the ICU 58 / U_STABLE URestrictionLevel U_EXPORT2 uspoof_getcheckresultrestrictionlevel(const USpoofCheckResult checkresult, UErrorCode status); / Gets the set of numerics from a USpoofCheckResult. Ownership of the returned USet remains with the USpoofCheckResult.

5 @param checkresult The instance of The set of numerics contained in the ICU 58 / U_STABLE const USet U_EXPORT2 uspoof_getcheckresultnumerics(const USpoofCheckResult checkresult, UErrorCode status); / Get the "skeleton" for an identifier. Skeletons are a transformation of the input identifier; Two identifiers are confusable if their skeletons are identical. See Unicode UAX #39 for additional information. Using skeletons directly makes it possible to quickly check whether an identifier is confusable with any of some large set of existing identifiers, by creating an efficiently searchable collection of the sc The type The type of skeleton, corresponding to which of the Unicode confusable data tables to use. The default is Mixed Script, Lowercase. Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and USPOOF_ANY_CASE. The two flags may be id The input identifier whose skeleton will be length The length of the input identifier, expressed in 16 bit UTF 16 code units, or 1 if the string is zero dest The output buffer, to receive the skeleton destcapacity The length of the output buffer, in 16 bit units. The destcapacity may be zero, in which case the function will return the actual length of the status The error code, set if an error occurred while perform the The length of the skeleton string. The returned length is always that of the complete skeleton, even when the supplied buffer is too small (or of zero ICU 4.2 / uspoof_getskeleton(const USpoofChecker sc, uint32_t type, const UChar id, int32_t length, UChar dest, int32_t destcapacity, UErrorCode status); / Open a Spoof Checker from the source form of the spoof data. The two inputs correspond to the Unicode data files confusables.txt and confusableswholescript.txt as described in Unicode UAX #39. The syntax of the source data is as described in UAX #39 for these files, and the content of these files is acceptable input. The character encoding of the (char ) input text is UTF confusables a pointer to the confusable characters definitions, as found in file confusables.txt from confusableslen The length of the confusables text, or 1 if the input string is zero confusableswholescript a pointer to the whole script confusables definitions, as found in the file confusableswholescript.txt from confusableswholescriptlen The length of the whole script confusables text, or 1 if the input string is zero errtype In the event of an error in the input, indicates which of the input files contains the error. The value is one of USPOOF_SINGLE_SCRIPT_CONFUSABLE or USPOOF_WHOLE_SCRIPT_CONFUSABLE, or zero if no errors are pe In the event of an error in the input, receives the position in the input text (line, offset) of the status an in/out ICU UErrorCode. Among the possible errors is U_PARSE_ERROR, which is used to report syntax errors in the A spoof checker that uses the rules from the input ICU 4.2 / U_STABLE USpoofChecker U_EXPORT2 uspoof_openfromsource(const char confusables, int32_t confusableslen, const char confusableswholescript, int32_t confusableswholescriptlen, int32_t errtype, UParseError pe, UErrorCode / Get the "skeleton" for an identifier. Skeletons are a transformation of the input identifier; Two identifiers are confusable if their skeletons are identical. See Unicode UAX #39 for additional information. Using skeletons directly makes it possible to quickly check whether an identifier is confusable with any of some large set of existing identifiers, by creating an efficiently searchable collection of the sc The type No longer used; you may pass any number. Originally, controlled which of the Unicode confusable data tables to ICU id The input identifier whose skeleton will be length The length of the input identifier, expressed in 16 bit UTF 16 code units, or 1 if the string is zero dest The output buffer, to receive the skeleton destcapacity The length of the output buffer, in 16 bit units. The destcapacity may be zero, in which case the function will return the actual length of the status The error code, set if an error occurred while perform the The length of the skeleton string. The returned length is always that of the complete skeleton, even when the supplied buffer is too small (or of zero ICU uspoof_areconfusable / uspoof_getskeleton(const USpoofChecker sc, uint32_t type, const UChar id, int32_t length, UChar dest, int32_t destcapacity, UErrorCode status); / Open a Spoof Checker from the source form of the spoof data. The input corresponds to the Unicode data file confusables.txt as described in Unicode UAX #39. The syntax of the source data is as described in UAX #39 for this file, and the content of this file is acceptable input. The character encoding of the (char ) input text is UTF confusables a pointer to the confusable characters definitions, as found in file confusables.txt from confusableslen The length of the confusables text, or 1 if the input string is zero confusableswholescript Deprecated in ICU 58. No longer confusableswholescriptlen Deprecated in ICU 58. No longer errtype In the event of an error in the input, indicates which of the input files contains the error. The value is one of USPOOF_SINGLE_SCRIPT_CONFUSABLE or USPOOF_WHOLE_SCRIPT_CONFUSABLE, or zero if no errors are pe In the event of an error in the input, receives the position in the input text (line, offset) of the status an in/out ICU UErrorCode. Among the possible errors is U_PARSE_ERROR, which is used to report syntax errors in the A spoof checker that uses the rules from the input ICU 4.2 / U_STABLE USpoofChecker U_EXPORT2 uspoof_openfromsource(const char confusables, int32_t confusableslen, const char confusableswholescript, int32_t confusableswholescriptlen, int32_t errtype, UParseError pe, UErrorCode status);

6 status); C++ Option A: New uspoof_check functions to take a CheckResult parameter / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with uspoof_setchecks(). This version of {@link uspoof_check} accepts a USpoofCheckResult, which returns additional information about the identifier. For more information, see {@link sc The id The identifier to be checked for possible issues, in UTF 16 checkresult An instance of USpoofCheckResult to be filled with details about the identifier. Can be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's TRUE if the identifier failed any checks; FALSE ICU 58 / U_STABLE UBool U_EXPORT2 uspoof_checkwithcheckresult(const USpoofChecker sc, const UChar id, int32_t length, USpoofCheckResult checkresult, UErrorCode status); / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with uspoof_setchecks(). This version of {@link uspoof_check} accepts a USpoofCheckResult, which returns additional information about the identifier. For more information, see {@link sc The id A identifier to be checked for possible issues, in UTF8 length the length of the string to be checked, or 1 if the string is zero checkresult An instance of USpoofCheckResult to be filled with details about the identifier. Can be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's TRUE if the identifier failed any checks; FALSE ICU 58 / U_STABLE UBool U_EXPORT2 uspoof_checkutf8withcheckresult(const USpoofChecker sc, const char id, int32_t length, USpoofCheckResult checkresult, UErrorCode status); #if U_SHOW_CPLUSPLUS_API / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with sc The id A identifier to be checked for possible checkresult An instance of USpoofCheckResult to be filled with details about the identifier. Can be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's TRUE if the identifier failed any checks; FALSE ICU 58 / U_STABLE UBool U_EXPORT2 uspoof_checkunicodestringwithcheckresult(const USpoofChecker sc, const icu::unicodestring &id,

7 USpoofCheckResult checkresult, UErrorCode status); #endif C++ Option B: Re brand deprecated "position" parameter on existing uspoof_check functions The change can be made binary compatible with previous versions. The first int sized piece of memory associated with a USpoofCheckResult can be a special unique byte sequence that the function can use to determine with reasonable accuracy if the caller passed in an int32_t or a USpoofCheckResult. / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with sc The id The identifier to be checked for possible issues, in UTF 16 length the length of the string to be checked, expressed in 16 bit UTF 16 code units, or 1 if the string is zero position Deprecated in ICU 51. Always returns zero. Originally, an out parameter for the index of the first string position that failed a check. This parameter may be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's An integer value with bits set for any potential or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled ICU 4.2 / uspoof_check(const USpoofChecker sc, const UChar id, int32_t length, int32_t position, UErrorCode status); / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with sc The id A identifier to be checked for possible issues, in UTF8 length the length of the string to be checked, or 1 if the string is zero position Deprecated in ICU 51. Always returns zero. Originally, an out parameter for the index of the first string position that failed a check. This parameter may be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's return If the input contains invalid UTF 8 sequences, a status of U_INVALID_CHAR_FOUND will be An integer value with bits set for any potential or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled ICU 4.2 / uspoof_checkutf8(const USpoofChecker sc, const char id, int32_t length, int32_t position, UErrorCode status); #if U_SHOW_CPLUSPLUS_API / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with sc The USpoofChecker / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with sc The id The identifier to be checked for possible issues, in UTF 16 length the length of the string to be checked, expressed in 16 bit UTF 16 code units, or 1 if the string is zero checkresult An instance of {@link USpoofCheckResult} to be populated with details about this identifier. This parameter may be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's An integer value with bits set for any potential or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled ICU 58 / uspoof_check(const USpoofChecker sc, const UChar id, int32_t length, USpoofCheckResult checkresult, UErrorCode status); / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with sc The id A identifier to be checked for possible issues, in UTF8 length the length of the string to be checked, or 1 if the string is zero checkresult An instance of {@link USpoofCheckResult} to be populated with details about this identifier. This parameter may be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's return If the input contains invalid UTF 8 sequences, a status of U_INVALID_CHAR_FOUND will be An integer value with bits set for any potential or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled ICU 58 / uspoof_checkutf8(const USpoofChecker sc, const char id, int32_t length, USpoofCheckResult checkresult, UErrorCode status); #if U_SHOW_CPLUSPLUS_API / Check the specified string for possible issues. The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with sc The id A identifier to be checked for possible checkresult An instance of {@link USpoofCheckResult} to be

8 @param id A identifier to be checked for possible position Deprecated in ICU 51. Always returns zero. Originally, an out parameter for the index of the first string position that failed a check. This parameter may be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's An integer value with bits set for any potential or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled ICU 4.2 / uspoof_checkunicodestring(const USpoofChecker sc, const icu::unicodestring &id, int32_t position, UErrorCode status); populated with details about this identifier. This parameter may be status The error code, set if an error occurred while perform the check. Spoofing or issues detected with the input not reported here, but through the function's An integer value with bits set for any potential or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled ICU 58 / uspoof_checkunicodestring(const USpoofChecker sc, const icu::unicodestring &id, USpoofCheckResult checkresult, UErrorCode status); #endif #endif

Armide Documentation. Release Kyle Mayes

Armide Documentation. Release Kyle Mayes Armide Documentation Release 0.3.1 Kyle Mayes December 19, 2014 Contents 1 Introduction 1 1.1 Features.................................................. 1 1.2 License..................................................

More information

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above P.G.TRB - COMPUTER SCIENCE Total Marks : 50 Time : 30 Minutes 1. C was primarily developed as a a)systems programming language b) general purpose language c) data processing language d) none of the above

More information

Types, Variables, and Constants

Types, Variables, and Constants , Variables, and Constants What is a Type The space in which a value is defined Space All possible allowed values All defined operations Integer Space whole numbers +, -, x No divide 2 tj Why Types No

More information

Jansson Documentation

Jansson Documentation Jansson Documentation Release 1.0.4 Petri Lehtinen August 20, 2013 CONTENTS i ii This is the documentation for Jansson 1.0.4, last updated August 20, 2013. Contents: CONTENTS 1 2 CONTENTS CHAPTER ONE

More information

3/7/2018. Sometimes, Knowing Which Thing is Enough. ECE 220: Computer Systems & Programming. Often Want to Group Data Together Conceptually

3/7/2018. Sometimes, Knowing Which Thing is Enough. ECE 220: Computer Systems & Programming. Often Want to Group Data Together Conceptually University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 220: Computer Systems & Programming Structured Data in C Sometimes, Knowing Which Thing is Enough In MP6, we

More information

FLICONV-API. Generated by Doxygen

FLICONV-API. Generated by Doxygen FLICONV-API 1 1.8.13 Contents 1 FLUC ICONV Interface 1 1.1 CCSID's, encoding strings and defines................................ 1 1.2 Compatibility mode.......................................... 2 1.3

More information

ECE260: Fundamentals of Computer Engineering

ECE260: Fundamentals of Computer Engineering Accessing and Addressing Memory James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy American

More information

Introduction to C# Applications

Introduction to C# Applications 1 2 3 Introduction to C# Applications OBJECTIVES To write simple C# applications To write statements that input and output data to the screen. To declare and use data of various types. To write decision-making

More information

ECE260: Fundamentals of Computer Engineering

ECE260: Fundamentals of Computer Engineering Accessing and Addressing Memory James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy American

More information

Mellanox Scalable Hierarchical Aggregation and Reduction Protocol (SHARP) API Guide. Version 1.0

Mellanox Scalable Hierarchical Aggregation and Reduction Protocol (SHARP) API Guide. Version 1.0 Mellanox Scalable Hierarchical Aggregation and Reduction Protocol (SHARP) API Guide Version 1.0 Table of Contents Copyright... 3 Introduction... 4 Class Index... 5 File Index... 6 Class Documentation...

More information

Input from Files. Buffered Reader

Input from Files. Buffered Reader Input from Files Buffered Reader Input from files is always text. You can convert it to ints using Integer.parseInt() We use BufferedReaders to minimize the number of reads to the file. The Buffer reads

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

CS 580 FINAL EXAM. Fall April 29, 2014

CS 580 FINAL EXAM. Fall April 29, 2014 CS 580 FINAL EXAM Fall 201 April 29, 2014 You are to build a range tree for your final exam. A range tree is a tree where each node contains a minimum and a maximum value as well as a linked list to store

More information

A skeleton file has been provided for you to use in both checkpoints.

A skeleton file has been provided for you to use in both checkpoints. University of Illinois, Urbana-Champaign ECE190 MP5 Website Crawler Program Description: In this MP, you need to write a C program to process a list of websites given to you in a series of text files.

More information

Developer s Guide. BlackBerry. Address Book API. Version 2.0

Developer s Guide. BlackBerry. Address Book API. Version 2.0 Developer s Guide BlackBerry Address Book API Version 2.0 BlackBerry Address Book API, Version 2.0 Last revised 10/04/2000 Part Number: PDF-02738-001 (This document is part of the Extended API manual.)

More information

Open Mobile API Specification

Open Mobile API Specification Securing the future of mobile services Open Mobile API Specification Errata 1 Open Mobile API Specification Errata for V3.1 Copyright 2016 SIMalliance Ltd. The information contained in this document may

More information

CSE 333 Midterm Exam Sample Solution 5/10/13

CSE 333 Midterm Exam Sample Solution 5/10/13 Question 1. (18 points) Consider these two C files: a.c void f(int p); int main() { f(17); return 0; b.c void f(char *p) { *p = 'x'; (a) Why is the program made from a.c and b.c incorrect? What would you

More information

16-Dec-10. Consider the following method:

16-Dec-10. Consider the following method: Boaz Kantor Introduction to Computer Science IDC Herzliya Exception is a class. Java comes with many, we can write our own. The Exception objects, along with some Java-specific structures, allow us to

More information

AET60 BioCARDKey. Application Programming Interface. Subject to change without prior notice

AET60 BioCARDKey. Application Programming Interface.  Subject to change without prior notice AET60 BioCARDKey Application Programming Interface Subject to change without prior notice Table of Contents 1.0. Introduction... 3 2.0. Application Programming Interface... 4 2.1. Overview...4 2.2. Data

More information

CANopen Win API. Version TK Engineering Oy

CANopen Win API. Version TK Engineering Oy Author SB/HL Checked Approved Type Guideline Name CANopen Win API Department R&D File Name CANopen Win API - API Documentation.odt Revision $Rev: $ Copyright TK Engineering Oy. All rights reserved. Reproduction,

More information

High Level Design IOD KV Store FOR EXTREME-SCALE COMPUTING RESEARCH AND DEVELOPMENT (FAST FORWARD) STORAGE AND I/O

High Level Design IOD KV Store FOR EXTREME-SCALE COMPUTING RESEARCH AND DEVELOPMENT (FAST FORWARD) STORAGE AND I/O Date: January 10, 2013 High Level Design IOD KV Store FOR EXTREME-SCALE COMPUTING RESEARCH AND DEVELOPMENT (FAST FORWARD) STORAGE AND I/O LLNS Subcontract No. Subcontractor Name Subcontractor Address B599860

More information

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19 Data Storage Geoffrey Brown Bryce Himebaugh Indiana University August 9, 2016 Geoffrey Brown, Bryce Himebaugh 2015 August 9, 2016 1 / 19 Outline Bits, Bytes, Words Word Size Byte Addressable Memory Byte

More information

Avro Specification

Avro Specification Table of contents 1 Introduction...2 2 Schema Declaration... 2 2.1 Primitive Types... 2 2.2 Complex Types...2 2.3 Names... 5 3 Data Serialization...6 3.1 Encodings... 6 3.2 Binary Encoding...6 3.3 JSON

More information

Extensions for the programming language C to support new character data types VERSION FOR PDTR APPROVAL BALLOT. Contents

Extensions for the programming language C to support new character data types VERSION FOR PDTR APPROVAL BALLOT. Contents Extensions for the programming language C to support new character data types VERSION FOR PDTR APPROVAL BALLOT Contents 1 Introduction... 2 2 General... 3 2.1 Scope... 3 2.2 References... 3 3 The new typedefs...

More information

struct Properties C struct Types

struct Properties C struct Types struct Properties 1 The C struct mechanism is vaguely similar to the Java/C++ class mechanisms: - supports the creation of user-defined data types - struct types encapsulate data members struct Location

More information

Java: framework overview and in-the-small features

Java: framework overview and in-the-small features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Java: framework overview and in-the-small features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer

More information

CUDA Toolkit CUPTI User's Guide. DA _v01 September 2012

CUDA Toolkit CUPTI User's Guide. DA _v01 September 2012 CUDA Toolkit CUPTI User's Guide DA-05679-001_v01 September 2012 Document Change History Ver Date Resp Reason for change v01 2011/1/19 DG Initial revision for CUDA Tools SDK 4.0 v02 2012/1/5 DG Revisions

More information

Recitation #11 Malloc Lab. November 7th, 2017

Recitation #11 Malloc Lab. November 7th, 2017 18-600 Recitation #11 Malloc Lab November 7th, 2017 1 2 Important Notes about Malloc Lab Malloc lab has been updated from previous years Supports a full 64 bit address space rather than 32 bit Encourages

More information

Array. Prepared By - Rifat Shahriyar

Array. Prepared By - Rifat Shahriyar Java More Details Array 2 Arrays A group of variables containing values that all have the same type Arrays are fixed length entities In Java, arrays are objects, so they are considered reference types

More information

2. C99 standard guarantees uniqueness of characters for internal names. A. 12 B. 26 C. 31 D. 48

2. C99 standard guarantees uniqueness of characters for internal names. A. 12 B. 26 C. 31 D. 48 1. How can you make an infinite loop in C? A. while(1) { } B. loop:... goto loop; C. for(;;) { } D. All answers are right 2. C99 standard guarantees uniqueness of characters for internal names. A. 12 B.

More information

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 11: Bit fields, unions, pointers to functions Cristina Nita-Rotaru Lecture 11/ Fall 2013 1 Structures recap Holds multiple items as a unit Treated as scalar in C: can be

More information

PROFESSOR: DR.JALILI BY: MAHDI ESHAGHI

PROFESSOR: DR.JALILI BY: MAHDI ESHAGHI PROFESSOR: DR.JALILI BY: MAHDI ESHAGHI 1 2 Overview Distributed OZ Java RMI CORBA IDL IDL VS C++ CORBA VS RMI 3 Distributed OZ Oz Language Multi paradigm language, strong support for compositionality and

More information

CS 33. Introduction to C. Part 5. CS33 Intro to Computer Systems V 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

CS 33. Introduction to C. Part 5. CS33 Intro to Computer Systems V 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. CS 33 Introduction to C Part 5 CS33 Intro to Computer Systems V 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. Basic Data Types int short char -2,147,483,648 2,147,483,647-32,768 32,767-128

More information

OSAL, ObjectOrientation in C. Embedded C in the past. application. Simple and easy:

OSAL, ObjectOrientation in C. Embedded C in the past. application. Simple and easy: Embedded C in the past Simple and easy: application hw OS CPU A specific hardware A proper operation system Development and test with the given platform Embedded C The past - today Helper tools and equipment

More information

Contents of Lecture 3

Contents of Lecture 3 Contents of Lecture 3 Repetition of matrices double a[3][4]; double* b; double** c; Terminology Linkage Types Conversions Jonas Skeppstedt (js@cs.lth.se) Lecture 3 2014 1 / 33 A global matrix: double a[3][4]

More information

Binghamton University. CS-140 Fall Data Types in Java

Binghamton University. CS-140 Fall Data Types in Java Data Types in Java 1 CS-211 2015 Example Class: Car How Cars are Described Make Model Year Color Owner Location Mileage Actions that can be applied to cars Create a new car Transfer ownership Move to a

More information

CSC209H Lecture 4. Dan Zingaro. January 28, 2015

CSC209H Lecture 4. Dan Zingaro. January 28, 2015 CSC209H Lecture 4 Dan Zingaro January 28, 2015 Strings (King Ch 13) String literals are enclosed in double quotes A string literal of n characters is represented as a n+1-character char array C adds a

More information

RM0327 Reference manual

RM0327 Reference manual Reference manual Multi-Target Trace API version 1.0 Overview Multi-Target Trace (MTT) is an application instrumentation library that provides a consistent way to embed instrumentation into a software application,

More information

Programming in C++ 4. The lexical basis of C++

Programming in C++ 4. The lexical basis of C++ Programming in C++ 4. The lexical basis of C++! Characters and tokens! Permissible characters! Comments & white spaces! Identifiers! Keywords! Constants! Operators! Summary 1 Characters and tokens A C++

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

TIP570-SW-95 QNX-Neutrino Device Driver TIP570 16/8 Channel 12 Bit ADC and 8 Channel 12 Bit DAC on SBS PCI40 Carrier

TIP570-SW-95 QNX-Neutrino Device Driver TIP570 16/8 Channel 12 Bit ADC and 8 Channel 12 Bit DAC on SBS PCI40 Carrier TIP570-SW-95 QNX-Neutrino Device Driver TIP570 16/8 Channel 12 Bit ADC and 8 Channel 12 Bit DAC on SBS PCI40 Carrier Version 1.0.x Reference Manual Issue 1.0 January 2002 TEWS TECHNOLOGIES GmbH Am Bahnhof

More information

Reinventing the Enlightenment Object System

Reinventing the Enlightenment Object System Reinventing the Enlightenment Object System Tom Hacohen Samsung Electronics Open Source Group tom.hacohen@samsung.com @TomHacohen FOSDEM 2015 Main Goals Unify Code Main Goals Unify Code Many different

More information

C interfaces to HSL routines. J. D. Hogg. Version 1.0 5th December Numerical Analysis Group Internal Report

C interfaces to HSL routines. J. D. Hogg. Version 1.0 5th December Numerical Analysis Group Internal Report 2011-1 Numerical Analysis Group Internal Report C interfaces to HSL routines J. D. Hogg Version 1.0 5th December 2011 Copyright (c) 2011 Science and Technology Facilities Council C interfaces to HSL routines

More information

CS Spring 05 - MidTerm

CS Spring 05 - MidTerm CS1411-160 - Spring 05 - MidTerm March 8, 2005 1. When working at the keyboard, the user generates a newline character by pressing the Enter or Return key. 2. In the design of a flag-controlled loop, the

More information

The OpenVX User Data Object Extension

The OpenVX User Data Object Extension The OpenVX User Data Object Extension The Khronos OpenVX Working Group, Editor: Jesse Villarreal Version 1.0 (provisional), Wed, 13 Feb 2019 16:07:15 +0000 Table of Contents 1. Introduction.............................................................................................

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

Communications API. TEAM A : Communications and Integration Group. April 15, 1995

Communications API. TEAM A : Communications and Integration Group. April 15, 1995 Communications API TEAM A : Communications and Integration Group April 15, 1995 1 Introduction This document specifies the API provided by the Communications and Integration group for use in the AMC system.

More information

Dynamic Allocation in C

Dynamic Allocation in C Dynamic Allocation in C C Pointers and Arrays 1 The previous examples involved only targets that were declared as local variables. For serious development, we must also be able to create variables dynamically,

More information

IntWritable w1 = new IntWritable(163); IntWritable w2 = new IntWritable(67); assertthat(comparator.compare(w1, w2), greaterthan(0));

IntWritable w1 = new IntWritable(163); IntWritable w2 = new IntWritable(67); assertthat(comparator.compare(w1, w2), greaterthan(0)); factory for RawComparator instances (that Writable implementations have registered). For example, to obtain a comparator for IntWritable, we just use: RawComparator comparator = WritableComparator.get(IntWritable.class);

More information

Cuckoo Monitor Documentation

Cuckoo Monitor Documentation Cuckoo Monitor Documentation Release 1.3 Jurriaan Bremer Oct 03, 2017 Contents 1 Requirements 3 2 Required packages 5 3 Compilation 7 4 Components 9 4.1 C Framework...............................................

More information

TYPES, VALUES AND DECLARATIONS

TYPES, VALUES AND DECLARATIONS COSC 2P90 TYPES, VALUES AND DECLARATIONS (c) S. Thompson, M. Winters 1 Names, References, Values & Types data items have a value and a type type determines set of operations variables Have an identifier

More information

int fnvgetconfig(handle h, UINT32 id, const void *cfg, size_t sz);... 4

int fnvgetconfig(handle h, UINT32 id, const void *cfg, size_t sz);... 4 RP-VL-UTIL-V1 Developer s Guide [ Contents ] 1. Introduction... 1 2. Building Environment... 1 3. Operating Environment... 1 4. Function Explanation... 2 4.1. Common API for Transmitting and Receiving...

More information

Converting a Lowercase Letter Character to Uppercase (Or Vice Versa)

Converting a Lowercase Letter Character to Uppercase (Or Vice Versa) Looping Forward Through the Characters of a C String A lot of C string algorithms require looping forward through all of the characters of the string. We can use a for loop to do that. The first character

More information

CMPSC 311 Exam 2. March 27, 2015

CMPSC 311 Exam 2. March 27, 2015 Name: Section: 11:15 1:25 CMPSC 311 Exam 2 March 27, 2015 Closed book, closed neighbor, no electronic tools or additional papers. You may not share or discuss exam questions with anyone. 1 Short Questions

More information

Pointers, Dynamic Data, and Reference Types

Pointers, Dynamic Data, and Reference Types Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation The new operator The delete operator Dynamic Memory Allocation for Arrays 1 C++ Data Types simple

More information

eprosima Dynamic Fast Buffers User Manual Version 0.2.0

eprosima Dynamic Fast Buffers User Manual Version 0.2.0 eprosima Dynamic Fast Buffers User Manual Version 0.2.0 The Middleware Experts eprosima 2013 1 eprosima Proyectos y Sistemas de Mantenimiento SL Ronda del poniente 2 1ºG 28760 Tres Cantos Madrid Tel: +

More information

DEPARTMENT OF MATHS, MJ COLLEGE

DEPARTMENT OF MATHS, MJ COLLEGE T. Y. B.Sc. Mathematics MTH- 356 (A) : Programming in C Unit 1 : Basic Concepts Syllabus : Introduction, Character set, C token, Keywords, Constants, Variables, Data types, Symbolic constants, Over flow,

More information

Creating a String Data Type in C

Creating a String Data Type in C C Programming Creating a String Data Type in C For this assignment, you will use the struct mechanism in C to implement a data type that models a character string: struct _String { char data; dynamically-allocated

More information

PusleIR Multitouch Screen Software SDK Specification. Revision 4.0

PusleIR Multitouch Screen Software SDK Specification. Revision 4.0 PusleIR Multitouch Screen Software SDK Specification Revision 4.0 Table of Contents 1. Overview... 3 1.1. Diagram... 3 1.1. PulseIR API Hierarchy... 3 1.2. DLL File... 4 2. Data Structure... 5 2.1 Point

More information

CSC2/454 Programming Languages Design and Implementation Records and Arrays

CSC2/454 Programming Languages Design and Implementation Records and Arrays CSC2/454 Programming Languages Design and Implementation Records and Arrays Sreepathi Pai November 6, 2017 URCS Outline Scalar and Composite Types Arrays Records and Variants Outline Scalar and Composite

More information

Kurt Schmidt. October 30, 2018

Kurt Schmidt. October 30, 2018 to Structs Dept. of Computer Science, Drexel University October 30, 2018 Array Objectives to Structs Intended audience: Student who has working knowledge of Python To gain some experience with a statically-typed

More information

Character Encodings. Fabian M. Suchanek

Character Encodings. Fabian M. Suchanek Character Encodings Fabian M. Suchanek 22 Semantic IE Reasoning Fact Extraction You are here Instance Extraction singer Entity Disambiguation singer Elvis Entity Recognition Source Selection and Preparation

More information

Pointers. 1 Background. 1.1 Variables and Memory. 1.2 Motivating Pointers Massachusetts Institute of Technology

Pointers. 1 Background. 1.1 Variables and Memory. 1.2 Motivating Pointers Massachusetts Institute of Technology Introduction to C++ Massachusetts Institute of Technology ocw.mit.edu 6.096 Pointers 1 Background 1.1 Variables and Memory When you declare a variable, the computer associates the variable name with a

More information

Linked Lists. C Linked List

Linked Lists. C Linked List Linked Lists 1 A linked list is a data structure that uses a "chain" of node objects, connected by pointers, to organize a collection of user data values. Here's a fairly typical conceptual view of a doubly-linked

More information

Linux SDK for UPnP Devices v1.4

Linux SDK for UPnP Devices v1.4 Linux SDK for UPnP Devices v1.4 Linux SDK for UPnP Devices v1.4 Contents 1 Introduction............................................................. 5 2 License...................................................................

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

EL6483: Brief Overview of C Programming Language

EL6483: Brief Overview of C Programming Language EL6483: Brief Overview of C Programming Language EL6483 Spring 2016 EL6483 EL6483: Brief Overview of C Programming Language Spring 2016 1 / 30 Preprocessor macros, Syntax for comments Macro definitions

More information

Dotstack Porting Guide.

Dotstack Porting Guide. dotstack TM Dotstack Porting Guide. dotstack Bluetooth stack is a C library and several external interfaces that needs to be implemented in the integration layer to run the stack on a concrete platform.

More information

This resource describes how to program the myrio in C to perform timer interrupts.

This resource describes how to program the myrio in C to perform timer interrupts. Resource 07 Timer interrupts This resource describes how to program the myrio in C to perform timer interrupts. C.07.1 Main thread: background Initializing the timer interrupt is similar to initializing

More information

Crit-bit Trees. Adam Langley (Version )

Crit-bit Trees. Adam Langley (Version ) CRITBIT CWEB OUTPUT 1 Crit-bit Trees Adam Langley (agl@imperialviolet.org) (Version 20080926) 1. Introduction This code is taken from Dan Bernstein s qhasm and implements a binary crit-bit (alsa known

More information

A Fast Review of C Essentials Part I

A Fast Review of C Essentials Part I A Fast Review of C Essentials Part I Structural Programming by Z. Cihan TAYSI Outline Program development C Essentials Functions Variables & constants Names Formatting Comments Preprocessor Data types

More information

StackwalkerAPI Programmer s Guide

StackwalkerAPI Programmer s Guide Paradyn Parallel Performance Tools StackwalkerAPI Programmer s Guide 8.1 Release Mar 2013 Computer Sciences Department University of Wisconsin Madison Madison, WI 53706 Computer Science Department University

More information

Lecture 4: Outline. Arrays. I. Pointers II. III. Pointer arithmetic IV. Strings

Lecture 4: Outline. Arrays. I. Pointers II. III. Pointer arithmetic IV. Strings Lecture 4: Outline I. Pointers A. Accessing data objects using pointers B. Type casting with pointers C. Difference with Java references D. Pointer pitfalls E. Use case II. Arrays A. Representation in

More information

strucenv: Structured Environment Variables, User Guide and API Reference Version 1 CML

strucenv: Structured Environment Variables, User Guide and API Reference Version 1 CML strucenv: Structured Environment Variables, User Guide and API Reference Version 1 CML00066-01 Code Magus Limited (England reg. no. 4024745) Number 6, 69 Woodstock Road Oxford, OX2 6EY, United Kingdom

More information

Agenda. The main body and cout. Fundamental data types. Declarations and definitions. Control structures

Agenda. The main body and cout. Fundamental data types. Declarations and definitions. Control structures The main body and cout Agenda 1 Fundamental data types Declarations and definitions Control structures References, pass-by-value vs pass-by-references The main body and cout 2 C++ IS AN OO EXTENSION OF

More information

Binghamton University. CS-211 Fall Syntax. What the Compiler needs to understand your program

Binghamton University. CS-211 Fall Syntax. What the Compiler needs to understand your program Syntax What the Compiler needs to understand your program 1 Pre-Processing Any line that starts with # is a pre-processor directive Pre-processor consumes that entire line Possibly replacing it with other

More information

CS 261 Fall Mike Lam, Professor Integer Encodings

CS 261 Fall Mike Lam, Professor   Integer Encodings CS 261 Fall 2018 Mike Lam, Professor https://xkcd.com/571/ Integer Encodings Integers Topics C integer data types Unsigned encoding Signed encodings Conversions Integer data types in C99 1 byte 2 bytes

More information

Crit-bit Trees. Adam Langley (Version )

Crit-bit Trees. Adam Langley (Version ) Crit-bit Trees Adam Langley (agl@imperialviolet.org) (Version 20080926) 1. Introduction This code is taken from Dan Bernstein s qhasm and implements a binary crit-bit (alsa known as PATRICA) tree for NUL

More information

22c:111 Programming Language Concepts. Fall Types I

22c:111 Programming Language Concepts. Fall Types I 22c:111 Programming Language Concepts Fall 2008 Types I Copyright 2007-08, The McGraw-Hill Company and Cesare Tinelli. These notes were originally developed by Allen Tucker, Robert Noonan and modified

More information

Progress DataDirect OpenAccess TM SDK 8.1. Upgrade Notes

Progress DataDirect OpenAccess TM SDK 8.1. Upgrade Notes Progress DataDirect OpenAccess TM SDK 8.1 Upgrade Notes September 2016 Contents OPENACCESS SDK VERSION 8.1... 5 HIGHLIGHTS... 5 OpenAccess SDK SQL Engine and IP SDK... 5 OpenAccess SDK Server... 5 OpenAccess

More information

AET60 API version 1.4 February Introduction...3 Features...3 Application Programming Interface...4

AET60 API version 1.4 February Introduction...3 Features...3 Application Programming Interface...4 Version 1.4 02-2007 Unit 1008, 10th Floor, Hongkong International Trade and Exhibition Centre 1 Trademart Drive, Kowloon Bay, Hong Kong Tel: +852 2796 7873 Fax: +852 2796 1286 Email: info@acs.com.hk Website:

More information

Pointers, Pointers, Pointers!

Pointers, Pointers, Pointers! Pointers, Pointers, Pointers! Pointers, Pointers, Pointers, Pointers, Pointers, Pointers, Pointers, Pointers, Pointers, Pointers, Pointers, Pointers, Pointers! Colin Gordon csgordon@cs.washington.edu University

More information

BSON C++ API. Version by Sans Pareil Technologies, Inc. Generated by Doxygen Thu Feb :32:39

BSON C++ API. Version by Sans Pareil Technologies, Inc. Generated by Doxygen Thu Feb :32:39 BSON C++ API Version 2.5.1 by Sans Pareil Technologies, Inc. Generated by Doxygen 1.8.3 Thu Feb 28 2013 10:32:39 Contents 1 BSON C++ API Documentation 1 1.1 Contents................................................

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

Marek Szyprowski Samsung R&D Institute Poland

Marek Szyprowski Samsung R&D Institute Poland Marek Szyprowski m.szyprowski@samsung.com Samsung R&D Institute Poland Quick Introduction to Linux DRM A few words on atomic KMS API Exynos DRM IPP subsystem New API proposal Some code examples Summary

More information

Computer Components. Software{ User Programs. Operating System. Hardware

Computer Components. Software{ User Programs. Operating System. Hardware Computer Components Software{ User Programs Operating System Hardware What are Programs? Programs provide instructions for computers Similar to giving directions to a person who is trying to get from point

More information

Nabto Serial Link Protocol

Nabto Serial Link Protocol Nabto Serial Link Protocol Nabto TM Nabto Serial Link Protocol Page 1 of 22 Contents Vocabulary... 4 Introduction... 5 Access Control... 5 Connection type... 5 Access Control List... 5 Protocol details...

More information

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010 CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011 Lectures 1-22 Moaaz Siddiq Asad Ali Latest Mcqs MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please

More information

Introduction to Computing Lecture 01: Introduction to C

Introduction to Computing Lecture 01: Introduction to C Introduction to Computing Lecture 01: Introduction to C Assist.Prof.Dr. Nükhet ÖZBEK Ege University Department of Electrical&Electronics Engineering ozbek.nukhet@gmail.com Topics Introduction to C language

More information

grib_api.h File Reference

grib_api.h File Reference grib_api.h File Reference Copyright 2005-2013 ECMWF. More... Defines #define GRIB_API_VERSION (GRIB_API_MAJOR_VERSION*10000+G RIB_API_MINOR_VERSION*100+GRIB_API_REVISION_VERSI ON) #define GRIB_SECTION_PRODUCT

More information

Stream Model of I/O. Basic I/O in C

Stream Model of I/O. Basic I/O in C Stream Model of I/O 1 A stream provides a connection between the process that initializes it and an object, such as a file, which may be viewed as a sequence of data. In the simplest view, a stream object

More information

CSE 333 Midterm Exam 5/10/13

CSE 333 Midterm Exam 5/10/13 Name There are 5 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed book, closed notes, closed

More information

Reladomo Test Resource

Reladomo Test Resource October 16, 2006 Table of Contents 1. Creating test cases using Reladomo objects. 1 2. MithraTestResource Introduction 1 3. MithraTestResource Detailed API.. 3 4.. 4 5. Test data file format.. 5 1. Creating

More information

Do not start the test until instructed to do so!

Do not start the test until instructed to do so! Instructions: Print your name in the space provided below. This examination is closed book and closed notes, aside from the permitted one-page formula sheet. No calculators or other electronic devices

More information

MODERN AND LUCID C++ ADVANCED

MODERN AND LUCID C++ ADVANCED Informatik MODERN AND LUCID C++ ADVANCED for Professional Programmers Prof. Peter Sommerlad Thomas Corbat Director of IFS Research Assistant Rapperswil, FS 2016 LIBRARY API/ABI DESIGN PIMPL IDIOM HOURGLASS

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Avro Specification

Avro Specification Table of contents 1 Introduction...2 2 Schema Declaration... 2 2.1 Primitive Types... 2 2.2 Complex Types...2 2.3 Names... 5 2.4 Aliases... 6 3 Data Serialization...6 3.1 Encodings... 7 3.2 Binary Encoding...7

More information

Common Persistent Memory POSIX* Runtime (CPPR) API Reference (MS21) API Reference High Performance Data Division

Common Persistent Memory POSIX* Runtime (CPPR) API Reference (MS21) API Reference High Performance Data Division Common Persistent Memory POSIX* Runtime (CPPR) API Reference High Performance Data Division INTEL FEDERAL, LLC PROPRIETARY December 2017 Generated under Argonne Contract number: B609815 DISTRIBUTION STATEMENT:

More information

IBM Informix Large Object Locator DataBlade Module User s Guide

IBM Informix Large Object Locator DataBlade Module User s Guide IBM Informix Large Object Locator DataBlade Module User s Guide Version 1.2A March 2003 Part No. CT1V1NA Note: Before using this information and the product it supports, read the information in the appendix

More information

COMP6700/2140 Data and Types

COMP6700/2140 Data and Types COMP6700/2140 Data and Types Alexei B Khorev and Josh Milthorpe Research School of Computer Science, ANU February 2017 Alexei B Khorev and Josh Milthorpe (RSCS, ANU) COMP6700/2140 Data and Types February

More information