file.c (d1d015864103b253b3fcb2f72a0da5b0cfeb31b6) | file.c (f79477ebd57d7b0e69654281387ba5db8950ebd8) |
---|---|
1/*- 2 * Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org> 3 * Copyright (C) 2012 Oleg Moskalenko <mom040267@gmail.com> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 1113 unchanged lines hidden (view full) --- 1122file_headers_merge(size_t fnum, struct file_header **fh, FILE *f_out) 1123{ 1124 struct last_printed lp; 1125 size_t i; 1126 1127 memset(&lp, 0, sizeof(lp)); 1128 1129 /* | 1/*- 2 * Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org> 3 * Copyright (C) 2012 Oleg Moskalenko <mom040267@gmail.com> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 1113 unchanged lines hidden (view full) --- 1122file_headers_merge(size_t fnum, struct file_header **fh, FILE *f_out) 1123{ 1124 struct last_printed lp; 1125 size_t i; 1126 1127 memset(&lp, 0, sizeof(lp)); 1128 1129 /* |
1130 * construct the initial sort structure | 1130 * construct the initial sort structure |
1131 */ 1132 for (i = 0; i < fnum; i++) 1133 file_header_list_push(fh[i], fh, i); 1134 1135 while (fh[0]->fr) { /* unfinished files are always in front */ 1136 /* output the smallest line: */ 1137 file_header_print(fh[0], f_out, &lp); 1138 /* read a new line, if possible: */ --- 495 unchanged lines hidden --- | 1131 */ 1132 for (i = 0; i < fnum; i++) 1133 file_header_list_push(fh[i], fh, i); 1134 1135 while (fh[0]->fr) { /* unfinished files are always in front */ 1136 /* output the smallest line: */ 1137 file_header_print(fh[0], f_out, &lp); 1138 /* read a new line, if possible: */ --- 495 unchanged lines hidden --- |