Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #70 from jmkuhn/stdout
Browse files Browse the repository at this point in the history
STDOUT -> stdout (Fix #69)
  • Loading branch information
jmkuhn authored Sep 27, 2018
2 parents 720f0e6 + e5b7867 commit c5170ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/fmtspec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function printfmt(io::IO, fs::FormatSpec, x)
end
end

printfmt(fs::FormatSpec, x) = printfmt(STDOUT, fs, x)
printfmt(fs::FormatSpec, x) = printfmt(stdout, fs, x)

fmt(fs::FormatSpec, x) = sprint(printfmt, fs, x)
fmt(spec::AbstractString, x) = fmt(FormatSpec(spec), x)
4 changes: 2 additions & 2 deletions src/formatexpr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ function printfmt(io::IO, fe::FormatExpr, args...)
end

printfmt(io::IO, fe::AbstractString, args...) = printfmt(io, FormatExpr(fe), args...)
printfmt(fe::Union{AbstractString,FormatExpr}, args...) = printfmt(STDOUT, fe, args...)
printfmt(fe::Union{AbstractString,FormatExpr}, args...) = printfmt(stdout, fe, args...)

printfmtln(io::IO, fe::Union{AbstractString,FormatExpr}, args...) = (printfmt(io, fe, args...); println(io))
printfmtln(fe::Union{AbstractString,FormatExpr}, args...) = printfmtln(STDOUT, fe, args...)
printfmtln(fe::Union{AbstractString,FormatExpr}, args...) = printfmtln(stdout, fe, args...)

format(fe::Union{AbstractString,FormatExpr}, args...) =
sprint(printfmt, fe, args...)

0 comments on commit c5170ab

Please sign in to comment.