Changeset 5a6cc679 in mainline for uspace/lib/trackmod


Ignore:
Timestamp:
2018-01-31T02:21:24Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

Location:
uspace/lib/trackmod
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/trackmod/protracker.c

    r132ab5d1 r5a6cc679  
    7979 * @return         EOK on success, EINVAL if tag is not recognized.
    8080 */
    81 static int smp_tag_decode(uint8_t *tag, size_t *channels)
     81static errno_t smp_tag_decode(uint8_t *tag, size_t *channels)
    8282{
    8383        size_t nentries = sizeof(smp_tags) / sizeof(smptag_desc_t);
     
    138138 * @return       EOK on success, ENOMEM if out of memory, EIO on I/O error.
    139139 */
    140 static int protracker_load_patterns(FILE *f, trackmod_module_t *module)
     140static errno_t protracker_load_patterns(FILE *f, trackmod_module_t *module)
    141141{
    142142        size_t cells;
    143143        size_t i, j;
    144         int rc;
     144        errno_t rc;
    145145        size_t nread;
    146146        uint32_t *buf = NULL;
     
    191191 * @return       EOk on success, ENOMEM if out of memory, EIO on I/O error.
    192192 */
    193 static int protracker_load_samples(FILE *f, protracker_smp_t *smp,
     193static errno_t protracker_load_samples(FILE *f, protracker_smp_t *smp,
    194194    trackmod_module_t *module)
    195195{
    196         int rc;
     196        errno_t rc;
    197197        size_t i;
    198198        uint8_t ftval;
     
    256256 *                or if any error is found in the format of the file.
    257257 */
    258 int trackmod_protracker_load(char *fname, trackmod_module_t **rmodule)
     258errno_t trackmod_protracker_load(char *fname, trackmod_module_t **rmodule)
    259259{
    260260        FILE *f = NULL;
     
    269269        size_t i;
    270270        size_t nread;
    271         int rc;
     271        errno_t rc;
    272272
    273273        f = fopen(fname, "rb");
  • uspace/lib/trackmod/protracker.h

    r132ab5d1 r5a6cc679  
    3939#include "types/trackmod.h"
    4040
    41 extern int trackmod_protracker_load(char *, trackmod_module_t **);
     41extern errno_t trackmod_protracker_load(char *, trackmod_module_t **);
    4242
    4343#endif
  • uspace/lib/trackmod/trackmod.c

    r132ab5d1 r5a6cc679  
    152152}
    153153
    154 int trackmod_module_load(char *fname, trackmod_module_t **rmodule)
    155 {
    156         int rc;
     154errno_t trackmod_module_load(char *fname, trackmod_module_t **rmodule)
     155{
     156        errno_t rc;
    157157
    158158        rc = trackmod_xm_load(fname, rmodule);
     
    780780 * @param rmodplay Place to store pointer to module playback object
    781781 */
    782 int trackmod_modplay_create(trackmod_module_t *module,
     782errno_t trackmod_modplay_create(trackmod_module_t *module,
    783783    unsigned smp_freq, trackmod_modplay_t **rmodplay)
    784784{
  • uspace/lib/trackmod/trackmod.h

    r132ab5d1 r5a6cc679  
    4040
    4141extern trackmod_module_t *trackmod_module_new(void);
    42 extern int trackmod_module_load(char *, trackmod_module_t **);
     42extern errno_t trackmod_module_load(char *, trackmod_module_t **);
    4343extern void trackmod_module_destroy(trackmod_module_t *);
    44 extern int trackmod_modplay_create(trackmod_module_t *, unsigned,
     44extern errno_t trackmod_modplay_create(trackmod_module_t *, unsigned,
    4545    trackmod_modplay_t **);
    4646extern void trackmod_modplay_destroy(trackmod_modplay_t *);
  • uspace/lib/trackmod/xm.c

    r132ab5d1 r5a6cc679  
    5353 * @return EOK on success, EIO on format error, ENOMEM if out of memory.
    5454 */
    55 static int trackmod_xm_load_order_list(xm_hdr_t *xm_hdr, trackmod_module_t *module)
     55static errno_t trackmod_xm_load_order_list(xm_hdr_t *xm_hdr, trackmod_module_t *module)
    5656{
    57         int rc;
     57        errno_t rc;
    5858        size_t i;
    5959
     
    9494 * @return        EOK on success, EINVAL if there is error in the coded data.
    9595 */
    96 static int trackmod_xm_decode_pattern(uint8_t *data, size_t dsize,
     96static errno_t trackmod_xm_decode_pattern(uint8_t *data, size_t dsize,
    9797    trackmod_pattern_t *pattern)
    9898{
     
    162162 * @return EOK on success, EIO on format error, ENOMEM if out of memory.
    163163 */
    164 static int trackmod_xm_load_patterns(FILE *f, trackmod_module_t *module)
     164static errno_t trackmod_xm_load_patterns(FILE *f, trackmod_module_t *module)
    165165{
    166166        size_t i;
     
    173173        uint8_t *buf = NULL;
    174174        long seek_amount;
    175         int rc;
     175        errno_t rc;
    176176        int ret;
    177177
     
    281281 * @return EOK on success, EIO on format error, ENOMEM if out of memory.
    282282 */
    283 static int trackmod_xm_load_instruments(xm_hdr_t *xm_hdr, FILE *f,
     283static errno_t trackmod_xm_load_instruments(xm_hdr_t *xm_hdr, FILE *f,
    284284    trackmod_module_t *module)
    285285{
     
    297297        void *smp_data;
    298298        long pos;
    299         int rc;
     299        errno_t rc;
    300300        int ret;
    301301
     
    422422 *                or if any error is found in the format of the file.
    423423 */
    424 int trackmod_xm_load(char *fname, trackmod_module_t **rmodule)
     424errno_t trackmod_xm_load(char *fname, trackmod_module_t **rmodule)
    425425{
    426426        FILE *f = NULL;
     
    429429        size_t nread;
    430430        size_t hdr_size;
    431         int rc;
     431        errno_t rc;
    432432
    433433        f = fopen(fname, "rb");
  • uspace/lib/trackmod/xm.h

    r132ab5d1 r5a6cc679  
    3939#include "types/trackmod.h"
    4040
    41 extern int trackmod_xm_load(char *, trackmod_module_t **);
     41extern errno_t trackmod_xm_load(char *, trackmod_module_t **);
    4242
    4343#endif
Note: See TracChangeset for help on using the changeset viewer.