VirtualBox

Changeset 51770 in vbox for trunk/src/bldprogs


Ignore:
Timestamp:
Jul 1, 2014 6:14:02 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94611
Message:

Merged in iprt++ dev branch.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/bldprogs/bin2c.c

    r48959 r51770  
    5757            "  -width <n>   number of bytes per line (default: 16)\n"
    5858            "  -break <n>   break every <n> lines    (default: -1)\n"
    59             "  -ascii       show ASCII representation of binary as comment\n",
    60             argv0);
     59            "  -ascii       show ASCII representation of binary as comment\n"
     60            "  -export      emit DECLEXPORT\n"
     61            "  --append     append to the output file (default: truncate)\n"
     62            , argv0);
    6163
    6264    return 1;
     
    7274    size_t        uMask = 0;
    7375    int           fAscii = 0;
     76    int           fAppend = 0;
    7477    int           fExport = 0;
    7578    long          iBreakEvery = -1;
     
    105108        }
    106109        else if (!strcmp(argv[iArg], "-ascii"))
    107         {
    108110            fAscii = 1;
    109         }
     111        else if (!strcmp(argv[iArg], "--append"))
     112            fAppend = 1;
    110113        else if (!strcmp(argv[iArg], "-export"))
    111         {
    112114            fExport = 1;
    113         }
    114115        else if (!strcmp(argv[iArg], "-width"))
    115116        {
     
    153154    }
    154155
    155     pFileOut = fopen(argv[iArg+2], "wb");
     156    pFileOut = fopen(argv[iArg+2], fAppend ? "a" : "w"); /* no b! */
    156157    if (!pFileOut)
    157158    {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette