source: patches/file-5.00-fixes-1.patch @ f81e00b

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since f81e00b was e244b2a, checked in by Jim Gifford <clfs@…>, 15 years ago

Fix File UTF-8 Issues

  • Property mode set to 100644
File size: 2.4 KB
  • magic/Magdir/msdos

    Submitted by: Jim Gifford (jim at cross-lfs dot org)
    Date: 2009-12-16
    Initial Package Version: 5.00
    Upstream Status: Already Applied
    Origin: Jim Gifford
    Description: Fixes Various Build Issues in File
                 Localization Fixes
    
    diff -Naur file-5.00.orig/magic/Magdir/msdos file-5.00/magic/Magdir/msdos
    old new  
    294294>10     string  >\x23                   
    295295>>10    string  !\x2e                   
    296296>>>17   string  <\x5B                   
    297 >>>>10  string  x                       \b, name: %.8s
    298 #UDMA.SYS KEYB.SYS CMD640X2.SYS
     297>>>>10  string  CMD640X2.SYS                    \b, name: %.8s
     298#UDMA.SYS
    299299>10     string  <\x41                   
    300300>>12    string  >\x40                   
    301301>>>10   string  !$                     
    302 >>>>12  string  x                       \b, name: %.8s
    303 #BTCDROM.SYS ASPICD.SYS
     302>>>>12  string  UDMA.SYS                        \b, name: %.8s
     303#CMD640X2.SYS
     304>10     string  <\x41                   
     305>>12    string  >\x40                   
     306>>>10   string  !$                     
     307>>>>12  string  CMD640X2.SYS                    \b, name: %.8s
     308#KEYB.SYS
     309>10     string  <\x41                   
     310>>12    string  >\x40                   
     311>>>10   string  !$                     
     312>>>>12  string  KEYB.SYS                        \b, name: %.8s
     313#BTCDROM.SYS
     314>22     string  >\x40                   
     315>>22    string  <\x5B                   
     316>>>23   string  <\x5B                   
     317>>>>22  string  BTCDROM.SYS                     \b, name: %.8s
     318#ASPICD.SYS
    304319>22     string  >\x40                   
    305320>>22    string  <\x5B                   
    306321>>>23   string  <\x5B                   
    307 >>>>22  string  x                       \b, name: %.8s
     322>>>>22  string  ASPICD.SYS                      \b, name: %.8s
    308323#ATAPICD.SYS
    309324>76     string  \0                     
    310325>>77    string  >\x40                   
    311326>>>77   string  <\x5B                   
    312 >>>>77  string  x                       \b, name: %.8s
     327>>>>77  string  ATAPICD.SYS                     \b, name: %.8s
    313328# test too generic ?
    3143290       byte            0x8c            DOS executable (COM)
    315330# updated by Joerg Jenderek at Oct 2008
  • src/readcdf.c

    diff -Naur file-5.00.orig/src/readcdf.c file-5.00/src/readcdf.c
    old new  
    7575                        if (len > 1) {
    7676                                s = info[i].pi_str.s_buf;
    7777                                if (NOTMIME(ms)) {
    78                                         if (file_printf(ms, ", %s: %.*s", buf,
    79                                             len, s) == -1)
    80                                                 return -1;
     78                                        char vbuf[1024];
     79                                        size_t j;
     80                                        for (j = 0; j < sizeof(vbuf) && len--;
     81                                            j++, s++) {
     82                                                if (*s == '\0')
     83                                                        break;
     84                                                if (isprint((unsigned char)*s))
     85                                                        vbuf[j] = *s;
     86                                        }
     87                                        if (j == sizeof(vbuf))
     88                                                --j;
     89                                        vbuf[j] = '\0';
     90                                        if (vbuf[0]) {
     91                                                if (file_printf(ms, ", %s: %s",
     92                                                    buf, vbuf) == -1)
     93                                                        return -1;
     94                                        }
    8195                                } else if (info[i].pi_id ==
    8296                                        CDF_PROPERTY_NAME_OF_APPLICATION) {
    8397                                        if (strstr(s, "Word"))
Note: See TracBrowser for help on using the repository browser.