Changeset a46da63 in mainline for libc/generic/io/stream.c


Ignore:
Timestamp:
2006-06-16T20:50:51Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
153a209
Parents:
b34fab6
Message:

big code cleanup, compile with -Wall -Werror to enforce better coding
there is currently one warning that requires attention, please review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/io/stream.c

    rb34fab6 ra46da63  
    2828 */
    2929
    30  /** @addtogroup libc
     30/** @addtogroup libc
    3131 * @{
    3232 */
     
    7474                        return -1;
    7575                }
    76                 ((char *)buf)[i++] = r0;
     76                ((char *) buf)[i++] = r0;
    7777        }
    7878        return i;
     
    8282{
    8383        int i;
    84         ipcarg_t r0,r1;
    8584
    8685        for (i = 0; i < count; i++)
    87                 async_msg(streams[1].phone, CONSOLE_PUTCHAR, ((const char *)buf)[i]);
     86                async_msg(streams[1].phone, CONSOLE_PUTCHAR, ((const char *) buf)[i]);
    8887       
    8988        return count;
     
    9190
    9291
    93 
    9492static stream_t open_stdin(void)
    9593{
    9694        stream_t stream;
    97         int phoneid;
    98         int res;
    9995       
    10096        if (console_phone < 0) {
     
    105101       
    106102        stream.r = read_stdin;
     103        stream.w = NULL;
    107104        stream.param = 0;
    108105        stream.phone = console_phone;
     
    114111{
    115112        stream_t stream;
    116         int res;
    117113
    118114        if (console_phone < 0) {
     
    122118        }
    123119       
     120        stream.r = NULL;
    124121        stream.w = write_stdout;
    125122        stream.phone = console_phone;
    126123        stream.param = 0;
     124       
    127125        return stream;
    128126}
     
    140138        while (((streams[c].w) || (streams[c].r)) && (c < FDS))
    141139                c++;
     140       
    142141        if (c == FDS)
    143142                return EMFILE;
     
    157156                return c;
    158157        }
     158       
    159159        if (!strcmp(fname, "null")) {
    160160                streams[c].w = write_null;
    161161                return c;
    162162        }
     163       
     164        return -1;
    163165}
    164166
     
    190192
    191193
    192  /** @}
     194/** @}
    193195 */
    194  
    195  
Note: See TracChangeset for help on using the changeset viewer.