Changeset 22399


Ignore:
Timestamp:
2010-07-14T13:05:56+12:00 (14 years ago)
Author:
kjdon
Message:

changes for unimarc, thanks to Yvan Arnaud

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/packages/d2m/MARCtidy.c

    r10385 r22399  
    6565        nline(p, l, buf);
    6666
     67    /* Add 200 subfields after $a - unimarc */
     68    if ( (strncmp(p, "200", 3) == 0) && (strncmp(p + 5, "$a", 2) == 0) )
     69      {
     70        if ( ( format == UNIMARC ) && ( *mrec->subtitle) )
     71          {
     72        strcpy(p, "     $e");
     73        strcpy(l, mrec->subtitle);
     74        nline(p, l, buf);
     75          }
     76      }
    6777
    6878/*      Add 245 subfields after $a */
     
    127137
    128138
    129 /* Add URL as 856 $u                                                 */
     139/* Add URL as 856 $u  (or 300 $a for unimarc)                       */
    130140
    131141   if (*mrec->url)
    132142   {
    133      strcpy(p, "856  $u");
    134      strcpy(l, mrec->url);
    135      nline(p, l, buf);
     143     if (format == UNIMARC) {
     144       strcpy(p, "300  $a");
     145       strcpy(l, mrec->url);
     146       nline(p, l, buf);
    136147
    137 /* Add format as $q                                                    */
     148
     149     } else {
     150       strcpy(p, "856  $u");
     151       strcpy(l, mrec->url);
     152       nline(p, l, buf);
     153     }
     154   }
     155/* Add format as $q (or 336 $a for unimarc)            */
    138156
    139157     if (*mrec->fmat)
    140158     {
    141        strcpy(p, "     $q");
    142        strcpy(l, mrec->fmat);
    143        nline(p, l, buf);
     159
     160       if (format == UNIMARC) {
     161     strcpy(p, "336  $a");
     162     strcpy(l, mrec->fmat);
     163     nline(p, l, buf);
     164       }
     165       else {
     166     strcpy(p, "     $q");
     167     strcpy(l, mrec->fmat);
     168     nline(p, l, buf);
     169       }
    144170     }
    145    }
     171
    146172
    147173}
Note: See TracChangeset for help on using the changeset viewer.