Changeset 27dc170 in mainline


Ignore:
Timestamp:
2005-05-11T17:08:53Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
93ca46f
Parents:
d34657e
Message:

const qualifier for print functions

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/ega.h

    rd34657e r27dc170  
    3636
    3737extern void ega_init(void);
    38 extern void ega_putchar(char ch);
     38extern void ega_putchar(const char ch);
    3939
    4040static void ega_check_cursor(void);
  • arch/ia32/src/drivers/ega.c

    rd34657e r27dc170  
    7777}
    7878
    79 void ega_putchar(char ch)
     79void ega_putchar(const char ch)
    8080{
    8181        pri_t pri;
     
    111111}
    112112
    113 void putchar(char ch)
     113void putchar(const char ch)
    114114{
    115115        ega_putchar(ch);
  • arch/ia64/src/putchar.c

    rd34657e r27dc170  
    3131#include <arch/ski/ski.h>
    3232
    33 void putchar(char ch)
     33void putchar(const char ch)
    3434{
    3535        __asm__ (
  • arch/mips/src/putchar.c

    rd34657e r27dc170  
    3333#define VIDEORAM        0xA000000
    3434
    35 void putchar(char ch)
     35void putchar(const char ch)
    3636{
    3737        __u32 status = cp0_status_read();
  • include/print.h

    rd34657e r27dc170  
    3636#define INT32   4
    3737
    38 static void print_str(char *str);
    39 static void print_fixed_hex(__native num, int width);
    40 static  void print_number(__native num, int base);
     38static void print_str(const char *str);
     39static void print_fixed_hex(const __native num, const int width);
     40static void print_number(const __native num, const int base);
    4141
    42 extern void putchar(char c);
    43 extern void printf(char *fmt, ...);
     42extern void putchar(const char c);
     43extern void printf(const char *fmt, ...);
    4444
    4545#endif
  • include/putchar.h

    rd34657e r27dc170  
    3030#define __PUTCHAR_H__
    3131
    32 extern void putchar(char ch);
     32extern void putchar(const char ch);
    3333
    3434#endif
  • src/debug/print.c

    rd34657e r27dc170  
    4545 *
    4646 */
    47 void print_str(char *str)
     47void print_str(const char *str)
    4848{
    4949        int i = 0;
     
    6666 *
    6767 */
    68 void print_fixed_hex(__native num, int width)
     68void print_fixed_hex(const __native num, const int width)
    6969{
    7070        int i;
     
    8585 *
    8686 */
    87 void print_number(__native num, int base)
    88 {
     87void print_number(const __native num, const int base)
     88{
     89        int val = num;
    8990        char d[sizeof(__native)*8+1];           /* this is good enough even for base == 2 */
    9091        int i = sizeof(__native)*8-1;
    9192   
    9293        do {
    93                 d[i--] = digits[num % base];
    94         } while (num /= base);
     94                d[i--] = digits[val % base];
     95        } while (val /= base);
    9596       
    9697        d[sizeof(__native)*8] = 0;     
     
    133134 *
    134135 */
    135 void printf(char *fmt, ...)
     136void printf(const char *fmt, ...)
    136137{
    137138        int irqpri, i = 0;
Note: See TracChangeset for help on using the changeset viewer.