mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Minor formatting changes to conform to conventions.
This commit is contained in:
@@ -79,7 +79,8 @@ func _convertDarwinBooleanToBool(x: DarwinBoolean) -> Bool {
|
||||
@_transparent
|
||||
@warn_unused_result
|
||||
public func && <T : BooleanType>(
|
||||
lhs: T, @autoclosure rhs: () -> DarwinBoolean
|
||||
lhs: T,
|
||||
@autoclosure rhs: () -> DarwinBoolean
|
||||
) -> Bool {
|
||||
return lhs.boolValue ? rhs().boolValue : false
|
||||
}
|
||||
@@ -87,7 +88,8 @@ public func && <T : BooleanType>(
|
||||
@_transparent
|
||||
@warn_unused_result
|
||||
public func || <T : BooleanType>(
|
||||
lhs: T, @autoclosure rhs: () -> DarwinBoolean
|
||||
lhs: T,
|
||||
@autoclosure rhs: () -> DarwinBoolean
|
||||
) -> Bool {
|
||||
return lhs.boolValue ? true : rhs().boolValue
|
||||
}
|
||||
@@ -145,35 +147,53 @@ public var stderr : UnsafeMutablePointer<FILE> {
|
||||
|
||||
@warn_unused_result
|
||||
@_silgen_name("_swift_Darwin_open")
|
||||
func _swift_Darwin_open(path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt, _ mode: mode_t) -> CInt
|
||||
func _swift_Darwin_open(
|
||||
path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t
|
||||
) -> CInt
|
||||
|
||||
@warn_unused_result
|
||||
@_silgen_name("_swift_Darwin_openat")
|
||||
func _swift_Darwin_openat(fd: CInt,
|
||||
_ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt, _ mode: mode_t) -> CInt
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t
|
||||
) -> CInt
|
||||
|
||||
@warn_unused_result
|
||||
public func open(path: UnsafePointer<CChar>, _ oflag: CInt) -> CInt {
|
||||
public func open(
|
||||
path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt
|
||||
) -> CInt {
|
||||
return _swift_Darwin_open(path, oflag, 0)
|
||||
}
|
||||
|
||||
@warn_unused_result
|
||||
public func open(path: UnsafePointer<CChar>, _ oflag: CInt,
|
||||
_ mode: mode_t) -> CInt {
|
||||
public func open(
|
||||
path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t
|
||||
) -> CInt {
|
||||
return _swift_Darwin_open(path, oflag, mode)
|
||||
}
|
||||
|
||||
@warn_unused_result
|
||||
public func openat(fd: CInt, _ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt) -> CInt {
|
||||
public func openat(
|
||||
fd: CInt,
|
||||
_ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt
|
||||
) -> CInt {
|
||||
return _swift_Darwin_openat(fd, path, oflag, 0)
|
||||
}
|
||||
|
||||
@warn_unused_result
|
||||
public func openat(fd: CInt, _ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt, _ mode: mode_t) -> CInt {
|
||||
public func openat(
|
||||
fd: CInt,
|
||||
_ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t
|
||||
) -> CInt {
|
||||
return _swift_Darwin_openat(fd, path, oflag, mode)
|
||||
}
|
||||
|
||||
@@ -183,7 +203,7 @@ internal func _swift_Darwin_fcntl(
|
||||
fd: CInt,
|
||||
_ cmd: CInt,
|
||||
_ value: CInt
|
||||
) -> CInt
|
||||
) -> CInt
|
||||
|
||||
@warn_unused_result
|
||||
@_silgen_name("_swift_Darwin_fcntlPtr")
|
||||
@@ -191,13 +211,13 @@ internal func _swift_Darwin_fcntlPtr(
|
||||
fd: CInt,
|
||||
_ cmd: CInt,
|
||||
_ ptr: UnsafeMutablePointer<Void>
|
||||
) -> CInt
|
||||
) -> CInt
|
||||
|
||||
@warn_unused_result
|
||||
public func fcntl(
|
||||
fd: CInt,
|
||||
_ cmd: CInt
|
||||
) -> CInt {
|
||||
) -> CInt {
|
||||
return _swift_Darwin_fcntl(fd, cmd, 0)
|
||||
}
|
||||
|
||||
@@ -206,7 +226,7 @@ public func fcntl(
|
||||
fd: CInt,
|
||||
_ cmd: CInt,
|
||||
_ value: CInt
|
||||
) -> CInt {
|
||||
) -> CInt {
|
||||
return _swift_Darwin_fcntl(fd, cmd, value)
|
||||
}
|
||||
|
||||
@@ -215,7 +235,7 @@ public func fcntl(
|
||||
fd: CInt,
|
||||
_ cmd: CInt,
|
||||
_ ptr: UnsafeMutablePointer<Void>
|
||||
) -> CInt {
|
||||
) -> CInt {
|
||||
return _swift_Darwin_fcntlPtr(fd, cmd, ptr)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user