regular.c (21429) | regular.c (21786) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 66 unchanged lines hidden (view full) --- 75 off1 = ROUNDPAGE(skip1); 76 off2 = ROUNDPAGE(skip2); 77 78 length = MIN(len1, len2); 79 if (length > SIZE_T_MAX) 80 return (c_special(fd1, file1, skip1, fd2, file2, skip2)); 81 82 if ((p1 = (u_char *)mmap(NULL, | 1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 66 unchanged lines hidden (view full) --- 75 off1 = ROUNDPAGE(skip1); 76 off2 = ROUNDPAGE(skip2); 77 78 length = MIN(len1, len2); 79 if (length > SIZE_T_MAX) 80 return (c_special(fd1, file1, skip1, fd2, file2, skip2)); 81 82 if ((p1 = (u_char *)mmap(NULL, |
83 (size_t)length, PROT_READ, 0, fd1, off1)) == (u_char *)-1) | 83 (size_t)length, PROT_READ, MAP_SHARED, fd1, off1)) == (u_char *)MAP_FAILED) |
84 err(ERR_EXIT, "%s", file1); 85 86 madvise(p1, length, MADV_SEQUENTIAL); 87 if ((p2 = (u_char *)mmap(NULL, | 84 err(ERR_EXIT, "%s", file1); 85 86 madvise(p1, length, MADV_SEQUENTIAL); 87 if ((p2 = (u_char *)mmap(NULL, |
88 (size_t)length, PROT_READ, 0, fd2, off2)) == (u_char *)-1) | 88 (size_t)length, PROT_READ, MAP_SHARED, fd2, off2)) == (u_char *)MAP_FAILED) |
89 err(ERR_EXIT, "%s", file2); 90 madvise(p2, length, MADV_SEQUENTIAL); 91 92 dfound = 0; 93 p1 += skip1 - off1; 94 p2 += skip2 - off2; 95 for (byte = line = 1; length--; ++p1, ++p2, ++byte) { 96 if ((ch = *p1) != *p2) --- 15 unchanged lines hidden --- | 89 err(ERR_EXIT, "%s", file2); 90 madvise(p2, length, MADV_SEQUENTIAL); 91 92 dfound = 0; 93 p1 += skip1 - off1; 94 p2 += skip2 - off2; 95 for (byte = line = 1; length--; ++p1, ++p2, ++byte) { 96 if ((ch = *p1) != *p2) --- 15 unchanged lines hidden --- |