-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.c
63 lines (49 loc) · 1.73 KB
/
test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <stdio.h>
#include <stdlib.h>
#include "File.h"
int main(int argc, char *argv[])
{
char file[] = "camel.usmarc";
File monfichier = File_in( file );
Record *r = monfichier.Next(&monfichier);
while ( r != NULL ) {
r->as_text(r);
r = monfichier.Next(&monfichier);
}
// Record record = new_Record();
// //printf("%d\n", monfichier.cnt);
// Field *f995 = new_Field( "995", 0 );
// f995->add_subfield(f995, 'a', "quelque chose");
// f995->add_subfield(f995, 'b', "quelque chose d'autre");
// int i = 0;
// while ( i < 3 ) {
// Field *f = new_Field( "630", 0 );
// f->add_subfield(f, 'a', "Active server pages.");
// record.add_field(&record, f);
// i++;
// }
// Field *f610 = new_Field( "610", 0 );
// f610->add_subfield(f610, 'a', "Perl (Computer program language)");
// Field *f650 = new_Field( "650", 0 );
// f650->add_subfield(f650, 'a', "as Martinsson.");
// record.set_leader(&record, "01083njm i 200277 450");
// record.add_field(&record, f995);
// record.add_field(&record, f610);
// record.add_field(&record, f650);
// record.as_text(&record);
//char * chose = monfichier.Next(&monfichier);
/*
//printf("%d\n", monfichier.cnt);
char * chose2 = monfichier.Next(&monfichier);
printf("%s\n", chose2);
printf("%s\n", "-----------------------------------------------------------------");
char * chose3 = monfichier.Next(&monfichier);
printf("%s\n", chose3);
printf("%s\n", "-----------------------------------------------------------------");
*/
//Record myNewRecord = decode(chose);
//myNewRecord.as_text(&myNewRecord);
//printf("LDR %s\n", ldr);
//printf("%d\n", monfichier.cnt);
return 0;
}