Author: akhaldi
Date: Sat Mar 2 12:01:27 2013
New Revision: 58392
URL:
http://svn.reactos.org/svn/reactos?rev=58392&view=rev
Log:
[SAL]
* Add _Inout_updates_bytes_to_, _Inout_updates_bytes_to_opt_, _Inout_updates_opt_z_,
_Out_writes_z_, _Post_readable_byte_size_, _Post_readable_size_ and _Scanf_format_string_
annotations.
Modified:
trunk/reactos/include/psdk/sal.h
Modified: trunk/reactos/include/psdk/sal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sal.h?rev=583…
==============================================================================
--- trunk/reactos/include/psdk/sal.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/sal.h [iso-8859-1] Sat Mar 2 12:01:27 2013
@@ -700,10 +700,10 @@
//#define _Inout_updates_bytes_all_(size)
//#define _Inout_updates_bytes_all_opt_(size)
#define _Inout_updates_bytes_opt_(size)
_SAL2_NAME(_Inout_updates_bytes_opt_) _Group_(_Pre_opt_bytecap_(size)
[SA_Pre(Valid=SA_Yes)] [SA_Post(Valid=SA_Yes)])
-#define _Inout_updates_bytes_to_(size,count)
_SAL2_NAME(_Inout_updates_bytes_to_) _Group_(_Out_writes_bytes_to_(size,count)
[SA_Pre(Valid=SA_Yes)] [SA_Pre(ValidBytes="\n" _SA_SPECSTRIZE(count))] )
-#define _Inout_updates_bytes_to_opt_(size,count)
_SAL2_NAME(_Inout_updates_bytes_to_opt_) _Group_(_Out_writes_bytes_to_opt_(size,count)
[SA_Pre(Valid=SA_Yes)] [SA_Pre(ValidBytes="\n" _SA_SPECSTRIZE(count))] )
+#define _Inout_updates_bytes_to_(size,count)
_SAL2_NAME(_Inout_updates_bytes_to_) _Group_(_Out_writes_bytes_to_(size,count)
[SA_Pre(Valid=SA_Yes)] [SA_Pre(ValidBytes="\n" _SA_SPECSTRIZE(count))])
+#define _Inout_updates_bytes_to_opt_(size,count)
_SAL2_NAME(_Inout_updates_bytes_to_opt_) _Group_(_Out_writes_bytes_to_opt_(size,count)
[SA_Pre(Valid=SA_Yes)] [SA_Pre(ValidBytes="\n" _SA_SPECSTRIZE(count))])
#define _Inout_updates_opt_(size)
_SAL2_NAME(_Inout_updates_opt_) _Group_(_Pre_opt_cap_(size) [SA_Pre(Valid=SA_Yes)]
[SA_Post(Valid=SA_Yes)])
-//#define _Inout_updates_opt_z_(size)
+#define _Inout_updates_opt_z_(size)
_SAL2_NAME(_Inout_updates_opt_z_) _Group_(_Pre_opt_cap_(size) [SA_Pre(Valid=SA_Yes)]
[SA_Post(Valid=SA_Yes)] [SA_Pre(NullTerminated=SA_Yes)] [SA_Post(NullTerminated=SA_Yes)])
//#define _Inout_updates_to_(size,count)
//#define _Inout_updates_to_opt_(size,count)
#define _Inout_updates_z_(size)
_SAL2_NAME(_Inout_updates_z_) _Group_(_Pre_cap_(size) [SA_Pre(Valid=SA_Yes)]
[SA_Post(Valid=SA_Yes)] [SA_Pre(NullTerminated=SA_Yes)] [SA_Post(NullTerminated=SA_Yes)])
@@ -793,7 +793,7 @@
//#define _Out_writes_to_ptr_opt_(ptr)
//#define _Out_writes_to_ptr_opt_z_(ptr)
//#define _Out_writes_to_ptr_z_(ptr)
-//#define _Out_writes_z_(size)
+#define _Out_writes_z_(size)
_SAL2_NAME(_Out_writes_z_) _Group_(_Pre_cap_(size) [SA_Post(Valid=SA_Yes)] _Post_z_)
#define _Out_z_bytecap_(size)
_SAL11_NAME(_Out_z_bytecap_) _Group_(_Pre_bytecap_(size) [SA_Post(Valid=SA_Yes)]
_Post_z_)
//#define _Out_z_bytecap_c_(size)
#define _Out_z_bytecap_post_bytecount_(cap,count)
_SAL11_NAME(_Out_z_bytecap_post_bytecount_) _Group_(_Pre_bytecap_(cap)
[SA_Post(Valid=SA_Yes)] _Post_z_bytecount_(count))
@@ -871,8 +871,8 @@
#define _Post_notnull_
_SAL2_NAME(_Post_notnull_) _Group_([SA_Post(Null=SA_No)])
//#define _Post_null_
#define _Post_ptr_invalid_
_SAL2_NAME(_Post_ptr_invalid_) _Group_([SA_Post(Valid=SA_No)])
-#define _Post_readable_byte_size_(size)
_SAL2_NAME(_Post_readable_byte_size_) _Group_([SA_Post(ValidBytes="\n"
_SA_SPECSTRIZE(size))] [SA_Post(Valid=SA_Yes)] )
-//#define _Post_readable_size_(size)
+#define _Post_readable_byte_size_(size)
_SAL2_NAME(_Post_readable_byte_size_) _Group_([SA_Post(ValidBytes="\n"
_SA_SPECSTRIZE(size))] [SA_Post(Valid=SA_Yes)])
+#define _Post_readable_size_(size)
_SAL2_NAME(_Post_readable_size_) _Group_([SA_Post(ValidElements="\n"
_SA_SPECSTRIZE(size))] [SA_Post(Valid=SA_Yes)])
#define _Post_satisfies_(cond)
_SAL2_NAME(_Post_satisfies_) _Group_([SAL_post]
[SAL_annotes(Name="SAL_satisfies", p1=_SA_SPECSTRIZE(cond))])
#define _Post_valid_
_SAL2_NAME(_Post_valid_) _Group_([SA_Post(Valid=SA_Yes)])
#define _Post_writable_byte_size_(size)
_SAL2_NAME(_Post_writable_byte_size_) _Group_([SA_Post(WritableBytes="\n"
_SA_SPECSTRIZE(size))] )
@@ -1040,7 +1040,7 @@
//#define _Ret_z_cap_(size)
//#define _Ret_z_count_(size)
#define _Return_type_success_(expr)
_SAL2_NAME(_Return_type_success_) _Group_([SA_Success(Condition=_SA_SPECSTRIZE(expr))])
-//#define _Scanf_format_string_
+#define _Scanf_format_string_
_SAL2_NAME(_Scanf_format_string_) _Group_([SA_FormatString(Style="scanf")])
//#define _Scanf_s_format_string_
#define _Struct_size_bytes_(size)
_SAL2_NAME(_Struct_size_bytes_) _Group_(_Writable_bytes_(byteCount(size)))
#define _Success_(expr) _SAL2_NAME(_Success_)
_Group_([SA_Success(Condition=_SA_SPECSTRIZE(expr))])