📄 size_logrec.c
字号:
/*===========================================================================*//* DMC interim out | size_logrec.c | Utility *//*===========================================================================*//* Name: size_logrec.c Purpose: determine size of blockettes when padded to logical records Usage: Input: Output: number of bytes, number of records Externals: Warnings: Errors: Fatals: Called by: Calls to: Algorithm: Notes: Problems: References: Language: Revisions: mm/dd/yy pgmr name change*/#include "output.h"int size_logrec( blockette_size, lrecl, padded_size )int blockette_size; /* current blockette size */int lrecl; /* logical record size */int *padded_size; /* total size of padded blockettes */{/* * blockettes will be copied into this chunk size: the size of the data area */ int user_data = lrecl-sizeof(struct hdr_logrec); /* seed header stuff *//* * if the current total size is within ENDPAD of a logical record boundary, * then we must round up the "currect padded size" to the next record boundary * and in any case, then add the new data size itself. */ if( user_data - (*padded_size % user_data) <= ENDPAD ) { *padded_size = ( (*padded_size+user_data-1) / user_data) * user_data; } *padded_size += blockette_size; return( (*padded_size+user_data-1) / user_data );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -