Changeset ad7a6c9 in mainline for uspace/app/sbi/src/stree.c


Ignore:
Timestamp:
2011-03-30T13:10:24Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4ae90f9
Parents:
6e50466 (diff), d6b81941 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/stree.c

    r6e50466 rad7a6c9  
    11/*
    2  * Copyright (c) 2010 Jiri Svoboda
     2 * Copyright (c) 2011 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    397397}
    398398
     399/** Allocate new @c switch statement.
     400 *
     401 * @return      New @c if statement
     402 */
     403stree_switch_t *stree_switch_new(void)
     404{
     405        stree_switch_t *switch_s;
     406
     407        switch_s = calloc(1, sizeof(stree_switch_t));
     408        if (switch_s == NULL) {
     409                printf("Memory allocation failed.\n");
     410                exit(1);
     411        }
     412
     413        return switch_s;
     414}
     415
    399416/** Allocate new @c while statement.
    400417 *
     
    548565
    549566        return if_clause;
     567}
     568
     569/** Allocate new @c when clause.
     570 *
     571 * @return      New @c when clause
     572 */
     573stree_when_t *stree_when_new(void)
     574{
     575        stree_when_t *when_c;
     576
     577        when_c = calloc(1, sizeof(stree_when_t));
     578        if (when_c == NULL) {
     579                printf("Memory allocation failed.\n");
     580                exit(1);
     581        }
     582
     583        return when_c;
    550584}
    551585
Note: See TracChangeset for help on using the changeset viewer.