📄 create_a.c
字号:
/*===========================================================================*//* DMC Interim | create_A | Header_phase *//*===========================================================================*//* Name: create_A.c Purpose: build SEED Abbreviation control header in memory Usage: int create_A (); int count; int error; error = create_A (&count); Input: none Output: count = number of logical records created error = error value; FALSE if no error, nonzero otherwise. It contains values of MESSAGE, WARNING, ERROR, or FATAL (see constants.h) External: Debug - setting of environment variable DEBUG (globals.h) Warnings: Errors: Fatals: Called by: Calls to: get_abbrev_hdr make_lrec error_handler Algorithm: retrieve abbreviation header info from disk file as a concatenation of blockettes; divide into logical records; prepend SEED logical record headers; store pointers to records in linked list. Notes: Problems: References: Language: Author: 03/13/89 Mark Wiederspahn Revisions: mm/dd/yy pgmr name change 05/04/89 Kevin MacKenzie change get_abbrev_hdr return status to error as count available from top-bottom*/#include "output.h"int create_A( count )int *count; /* how many records we make */{int err; /* return error status */char *bottom; /* blockette buffer pointers */char *top;register struct logrec_list *p; /* list traverser */ if( Debug >= D_MIN ) fprintf( D_OUT,"[create_A] start\n" );#ifdef MALLOC_DEBUG if( !malloc_verify() ) fprintf( D_OUT,"[create_A] verify entry failed\n" );#endif err = FALSE; top = bottom = NULL; if( err = get_abbrev_hdr( &bottom, &top ) ) if( err=error_handler( err,"[create_A] get_abbrev_hdr failed.\n")) return( err ); if( err = make_lrec( bottom, 'A', (int)(top-bottom), count ) ) if( err=error_handler( err,"[create_A] make_lrec failed.\n")) return( err ); if( bottom != NULL ) free( bottom ); /* zap the blockette buffer */#ifdef MALLOC_DEBUG if( !malloc_verify() ) fprintf( D_OUT,"[create_A] verify exit failed\n" );#endif if( Debug >= D_MIN ) fprintf( D_OUT,"[create_A] end\n" ); return( err );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -