Menu

#43 prom_printf() doesn't support %%

1.0
open
nobody
None
False
2015-03-29
2015-01-20
No

The line

printf("percent %% symbol\n");

will produce

percent  symbol

At the moment, this is not a real issue as the kernel doesn't use %%. Only processes have this opportunity, and only then because printf() is a hack to prom_printf(). Ideally, prom_printf() should support the %% notation too.

Discussion

  • Brian Ruthven

    Brian Ruthven - 2015-01-20
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,11 @@
     The line
    +
     ~~~~
     printf("percent %% symbol\n");
     ~~~~
    +
     will produce
    +
     ~~~~
     percent  symbol
     ~~~~
    
     
  • Brian Ruthven

    Brian Ruthven - 2015-03-29

    I'm leaning towards "will not fix", because we don't need it in the kernel. The only reason to squeeze it in, along with the facility to pass in a NULL output buf pointer, would be to feed back into the SDCC distribution as a potential printf_tiny() function for Z80 to mirror the MCC51 version originally translated into Z80 in the first place.

     

Log in to post a comment.

MongoDB Logo MongoDB