ObjFW  Diff

Differences From Artifact [a037efd8d4]:

To Artifact [af49de697f]:

  • File src/OFStream.h — part of check-in [4b56450a24] at 2013-11-24 17:28:31 on branch trunk — of_asprintf: Change %k to %C and %K to %S.

    This reverts 2943b43. It turned out that using %C and %S is possible,
    even when mixing code with Cocoa code, as it is possible to introduce
    __attribute__((format(__OFString__, ...))) to Clang which just handles
    %C and %S as being of_unichar_t instead of unichar like they are handled
    for __attribute__((format(__NSString__, ...))).

    The Clang patch for __attribute__((format(__OFString__, ...))) has been
    submitted, but is not upstream yet, thus the changes for that are not
    being committed yet. (user: js, size: 37660) [annotate] [blame] [check-ins using]


983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
- (size_t)writeLine: (OFString*)string
	   encoding: (of_string_encoding_t)encoding;

/*!
 * @brief Writes a formatted string into the stream.
 *
 * See printf for the format syntax. As an addition, %@ is available as format
 * specifier for objects, %k for of_unichar_t and %K for const of_unichar_t*.
 *
 * @param format A string used as format
 * @return The number of bytes written
 */
- (size_t)writeFormat: (OFConstantString*)format, ...;

/*!
 * @brief Writes a formatted string into the stream.
 *
 * See printf for the format syntax. As an addition, %@ is available as format
 * specifier for objects, %k for of_unichar_t and %K for const of_unichar_t*.
 *
 * @param format A string used as format
 * @param arguments The arguments used in the format string
 * @return The number of bytes written
 */
- (size_t)writeFormat: (OFConstantString*)format
	    arguments: (va_list)arguments;







|










|







983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
- (size_t)writeLine: (OFString*)string
	   encoding: (of_string_encoding_t)encoding;

/*!
 * @brief Writes a formatted string into the stream.
 *
 * See printf for the format syntax. As an addition, %@ is available as format
 * specifier for objects, %C for of_unichar_t and %S for const of_unichar_t*.
 *
 * @param format A string used as format
 * @return The number of bytes written
 */
- (size_t)writeFormat: (OFConstantString*)format, ...;

/*!
 * @brief Writes a formatted string into the stream.
 *
 * See printf for the format syntax. As an addition, %@ is available as format
 * specifier for objects, %C for of_unichar_t and %S for const of_unichar_t*.
 *
 * @param format A string used as format
 * @param arguments The arguments used in the format string
 * @return The number of bytes written
 */
- (size_t)writeFormat: (OFConstantString*)format
	    arguments: (va_list)arguments;