File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -794,9 +794,7 @@ static const char *get_fmt_mapping(char c) {
794794 if (format_mappings [i ].c == c )
795795 return format_mappings [i ].mapping ;
796796 }
797- #ifndef JANET_PLAN9
798797 janet_assert (0 , "bad format mapping" );
799- #endif
800798}
801799
802800static const char * scanformat (
@@ -1025,10 +1023,19 @@ void janet_buffer_format(
10251023 char form [MAX_FORMAT ], item [MAX_ITEM ];
10261024 char width [3 ], precision [3 ];
10271025 int nb = 0 ; /* number of bytes in added item */
1026+ #ifdef JANET_PLAN9
1027+ if (* strfrmt == 'r' ){
1028+ rerrstr (item , MAX_ITEM );
1029+ nb = strlen (item );
1030+ } else
1031+ #endif
10281032 if (++ arg >= argc )
10291033 janet_panic ("not enough values for format" );
10301034 strfrmt = scanformat (strfrmt , form , width , precision );
10311035 switch (* strfrmt ++ ) {
1036+ #ifdef JANET_PLAN9
1037+ case 'r' : break ;
1038+ #endif
10321039 case 'c' : {
10331040 nb = snprintf (item , MAX_ITEM , form , (int )
10341041 janet_getinteger (argv , arg ));
You can’t perform that action at this time.
0 commit comments