/*
- * Copyright (C) 1994, Index Data I/S
- * All rights reserved.
+ * Copyright (c) 1995, Index Data
+ * See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: marcdisp.c,v $
- * Revision 1.1 1995-04-10 10:28:46 quinn
+ * Revision 1.6 1997-09-04 07:52:27 adam
+ * Moved atoi_n function to separate source file.
+ *
+ * Revision 1.5 1997/05/01 15:08:15 adam
+ * Added log_mask_str_x routine.
+ *
+ * Revision 1.4 1995/09/29 17:12:34 quinn
+ * Smallish
+ *
+ * Revision 1.3 1995/09/27 15:03:03 quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.2 1995/05/16 08:51:12 quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.1 1995/04/10 10:28:46 quinn
* Added copy of CCL and MARC display
*
*/
#include <string.h>
#include <ctype.h>
#include <marcdisp.h>
-
-#define ISO2709_RS 035
-#define ISO2709_FS 036
-#define ISO2709_IDFS 037
-
-int atoi_n (const char *buf, int len)
-{
- int val = 0;
-
- while (--len >= 0)
- {
- if (isdigit (*buf))
- val = val*10 + (*buf - '0');
- buf++;
- }
- return val;
-}
+#include <yaz-util.h>
int marc_display (const char *buf, FILE *outf)
{
int length_starting;
int length_implementation;
+ if (!outf)
+ outf = stdout;
record_length = atoi_n (buf, 5);
if (record_length < 25)
return -1;