Changeset 1c0cef0 in mainline


Ignore:
Timestamp:
2013-09-14T19:39:45Z (11 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3f03199, b7adc22
Parents:
9e59c3b8 (diff), d7b7f5e (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 initial version of HTTP downloader.

Files:
9 added
8 edited

Legend:

Unmodified
Added
Removed
  • .bzrignore

    r9e59c3b8 r1c0cef0  
    273273uspace/app/df/df
    274274uspace/dist/app/df
     275uspace/app/download/download
     276uspace/dist/app/download
  • boot/Makefile.common

    r9e59c3b8 r1c0cef0  
    174174        $(USPACE_PATH)/app/dnscfg/dnscfg \
    175175        $(USPACE_PATH)/app/dnsres/dnsres \
     176        $(USPACE_PATH)/app/download/download \
    176177        $(USPACE_PATH)/app/edit/edit \
    177178        $(USPACE_PATH)/app/inet/inet \
  • tools/config.py

    r9e59c3b8 r1c0cef0  
    363363def create_output(mkname, mcname, config, rules):
    364364        "Create output configuration"
    365        
    366         timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
     365
     366        timestamp_unix = int(time.time())
     367        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(timestamp_unix))
    367368       
    368369        sys.stderr.write("Fetching current revision identifier ... ")
     
    423424                outmc.write('#define REVISION %s\n' % revision)
    424425                defs += ' "-DREVISION=%s"' % revision
     426       
     427        outmk.write('TIMESTAMP_UNIX = %d\n' % timestamp_unix)
     428        outmc.write('#define TIMESTAMP_UNIX %d\n' % timestamp_unix)
     429        defs += ' "-DTIMESTAMP_UNIX=%d"\n' % timestamp_unix
    425430       
    426431        outmk.write('TIMESTAMP = %s\n' % timestamp)
  • uspace/Makefile

    r9e59c3b8 r1c0cef0  
    4242        app/dnscfg \
    4343        app/dnsres \
     44        app/download \
    4445        app/edit \
    4546        app/getterm \
     
    234235        lib/gui \
    235236        lib/hound \
     237        lib/http \
    236238        lib/softrend \
    237239        lib/draw \
     
    239241        lib/nic \
    240242        lib/ext4 \
     243        lib/uri \
    241244        lib/usb \
    242245        lib/usbhost \
  • uspace/Makefile.common

    r9e59c3b8 r1c0cef0  
    141141LIBBITHENGE_PREFIX = $(LIB_PREFIX)/bithenge
    142142
     143LIBHTTP_PREFIX = $(LIB_PREFIX)/http
     144LIBURI_PREFIX = $(LIB_PREFIX)/uri
     145
    143146ifeq ($(STATIC_NEEDED),y)
    144147        STATIC_BUILD = y
  • uspace/app/wavplay/drec.c

    r9e59c3b8 r1c0cef0  
    213213        wave_header_t header;
    214214        fseek(rec.file, sizeof(header), SEEK_SET);
    215         const char *error;
    216         if (ret != EOK) {
    217                 printf("Error parsing wav header: %s.\n", error);
     215        if (ret != EOK) {
     216                printf("Error parsing wav header\n");
    218217                goto cleanup;
    219218        }
  • uspace/lib/c/generic/io/asprintf.c

    r9e59c3b8 r1c0cef0  
    5050}
    5151
     52int vprintf_size(const char *fmt, va_list args)
     53{
     54        printf_spec_t ps = {
     55                asprintf_str_write,
     56                asprintf_wstr_write,
     57                NULL
     58        };
     59       
     60        return printf_core(fmt, &ps, args);
     61}
     62
     63int printf_size(const char *fmt, ...)
     64{
     65        va_list args;
     66        va_start(args, fmt);
     67        int ret = vprintf_size(fmt, args);
     68        va_end(args);
     69       
     70        return ret;
     71}
     72
    5273/** Allocate and print to string.
    5374 *
     
    6182int asprintf(char **strp, const char *fmt, ...)
    6283{
    63         printf_spec_t ps = {
    64                 asprintf_str_write,
    65                 asprintf_wstr_write,
    66                 NULL
    67         };
    68        
    6984        va_list args;
    7085        va_start(args, fmt);
    71        
    72         int ret = printf_core(fmt, &ps, args);
     86        int ret = vprintf_size(fmt, args);
    7387        va_end(args);
    7488       
  • uspace/lib/c/include/stdio.h

    r9e59c3b8 r1c0cef0  
    124124extern int vsnprintf(char *, size_t, const char *, va_list);
    125125
     126extern int printf_size(const char *, ...)
     127    PRINTF_ATTRIBUTE(1, 2);
     128extern int vprintf_size(const char *, va_list);
     129
    126130/* File stream functions */
    127131extern FILE *fopen(const char *, const char *);
Note: See TracChangeset for help on using the changeset viewer.