mirror of
https://github.com/janet-lang/janet
synced 2024-12-27 17:00:27 +00:00
Add %t formatter to janet.
Was not present in printf and family.
This commit is contained in:
parent
33283b1b6e
commit
3c64596ea1
16
jpm
16
jpm
@ -738,25 +738,25 @@ int main(int argc, const char **argv) {
|
|||||||
(def defines (make-defines (opt opts :defines {})))
|
(def defines (make-defines (opt opts :defines {})))
|
||||||
(def cc (opt opts :compiler default-compiler))
|
(def cc (opt opts :compiler default-compiler))
|
||||||
(def cflags [;(getcflags opts) ;janet-cflags])
|
(def cflags [;(getcflags opts) ;janet-cflags])
|
||||||
(check-cc)
|
(check-cc)
|
||||||
(print "compiling " cimage_dest " to " oimage_dest "...")
|
(print "compiling " cimage_dest " to " oimage_dest "...")
|
||||||
(create-dirs oimage_dest)
|
(create-dirs oimage_dest)
|
||||||
(if is-win
|
(if is-win
|
||||||
(shell cc ;defines "/c" ;cflags (string "/Fo" oimage_dest) cimage_dest)
|
(shell cc ;defines "/c" ;cflags (string "/Fo" oimage_dest) cimage_dest)
|
||||||
(shell cc "-c" cimage_dest ;defines ;cflags "-o" oimage_dest))
|
(shell cc "-c" cimage_dest ;defines ;cflags "-o" oimage_dest))
|
||||||
(if has-cpp
|
(if has-cpp
|
||||||
(let [linker (opt opts (if is-win :cpp-linker :cpp-compiler) default-cpp-linker)
|
(let [linker (opt opts (if is-win :cpp-linker :cpp-compiler) default-cpp-linker)
|
||||||
cppflags [;(getcppflags opts) ;janet-cflags]]
|
cppflags [;(getcppflags opts) ;janet-cflags]]
|
||||||
(print "linking " dest "...")
|
(print "linking " dest "...")
|
||||||
(if is-win
|
(if is-win
|
||||||
(shell linker ;ldflags (string "/OUT:" dest) oimage_dest ;lflags)
|
(shell linker ;ldflags (string "/OUT:" dest) oimage_dest ;lflags)
|
||||||
(shell linker ;cppflags ;ldflags `-o` dest oimage_dest ;lflags)))
|
(shell linker ;cppflags ;ldflags `-o` dest oimage_dest ;lflags)))
|
||||||
(let [linker (opt opts (if is-win :linker :compiler) default-linker)]
|
(let [linker (opt opts (if is-win :linker :compiler) default-linker)]
|
||||||
(print "linking " dest "...")
|
(print "linking " dest "...")
|
||||||
(create-dirs dest)
|
(create-dirs dest)
|
||||||
(if is-win
|
(if is-win
|
||||||
(shell linker ;ldflags (string "/OUT:" dest) oimage_dest ;lflags)
|
(shell linker ;ldflags (string "/OUT:" dest) oimage_dest ;lflags)
|
||||||
(shell linker ;cflags ;ldflags `-o` dest oimage_dest ;lflags)))))))
|
(shell linker ;cflags ;ldflags `-o` dest oimage_dest ;lflags)))))))
|
||||||
|
|
||||||
#
|
#
|
||||||
# Installation and Dependencies
|
# Installation and Dependencies
|
||||||
|
@ -955,6 +955,9 @@ void janet_buffer_format(
|
|||||||
janet_description_b(b, argv[arg]);
|
janet_description_b(b, argv[arg]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 't':
|
||||||
|
janet_buffer_push_cstring(b, typestr(argv[arg]));
|
||||||
|
break;
|
||||||
case 'M':
|
case 'M':
|
||||||
case 'm':
|
case 'm':
|
||||||
case 'N':
|
case 'N':
|
||||||
|
Loading…
Reference in New Issue
Block a user