📄 put_lvol.c
字号:
/*===========================================================================*//* DMC Interim out | put_lvol.c | Scan_phase *//*===========================================================================*//* Name: put_lvol.c Purpose: generate another entry in the linked lvol list with the given time segment info Usage: int put_lvol () struct lvol **head struct lvol **tail struct input_scan *scan char *name int start_o int end_o int ret ret = put_lvol (head, tail, scan, name, start_o, end_o) Input: struct lvol **head ptr to ptr to head of lvol list struct lvol **tail ptr to ptr to tail of lvol list struct input_scan *scan ptr to data header scan subset char *name ptr to absolute data file pathname int start_o fseek offset to start of data int end_o fseek offset to end of data + 1 Output: int put_lvol () = 0, successful = 1, unsuccessful (malloc error) Externals: Debug - setting of environment variable DEBUG (globals.h) Messages: Warnings: Errors: Fatals: Called by: Calls to: make_lvol allocate a new lvol list entry Algorithm: Notes: none Problems: none known Debug: level D_MIN - print out start and finish notices level D_MED - print out lvol node name, start offset, end offset level D_MAX - References: none Language: ANSI standard C, under Sun OS 3.5 Revisions: 03/06/89 Kevin MacKenzie original version*/ /*=====================================*//*=================| |=================*/ /*=====================================*/#include "output.h"int put_lvol (head, tail, scan, name, endtime, start_o, end_o)struct lvol **head; /* ptr to ptr to head of lvol list */struct lvol **tail; /* ptr to ptr to tail of lvol list */struct input_scan *scan; /* ptr to data header scan subset */char *name; /* ptr to absolute pathname to data file */struct input_time *endtime; /* ptr to end time */int start_o; /* fseek offset to start of data */int end_o; /* fseek offset to end of data + 1 */{ struct lvol *lvol; /* lvol linked list entry */ if (Debug >= D_MAX) fprintf (D_OUT, "[put_lvol] Started.\n"); lvol = make_lvol (head, tail); /* allocate space for an lvol entry */ lvol->scan = *scan; /* load the lvol entry */ strcpy (lvol->name, name); lvol->endtime = *endtime; lvol->start_offset = start_o; lvol->end_offset = end_o; lvol->gofast = NULL; /* no accelerators */ lvol->ngofast = 0; /* therefore no count either */ lvol->lrecl = Lrecl; if (Debug >= D_MED) { fprintf (D_OUT,"[put_lvol] Lvol node: name = %s", name); fprintf (D_OUT,", start offset = %d", start_o); fprintf (D_OUT,", end offset = %d\n", end_o); } if (Debug >= D_MAX) fprintf (D_OUT, "[put_lvol] Finished.\n"); return (0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -