|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T d
Length: 857 (0x359) Types: TextFile Names: »dups.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─⟦this⟧ »EUUGD11/gnu-31mar87/emacs/shortnames/dups.c« └─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦46d41b2d0⟧ »./emacs-18.55.tar.Z« └─⟦fa971747f⟧ └─⟦this⟧ »dist-18.55/shortnames/dups.c«
/* * Quick and dirty program to select adjacent records that are common * in the first <arg> character positions. * */ #include <stdio.h> #define MAXSIZE 512 char ping[MAXSIZE]; char pong[MAXSIZE]; int flipflop = 0; int size = MAXSIZE-1; main (argc, argv) int argc; char *argv[]; { register int index; char *newbuf(); if (argc == 2) { size = atoi (argv[1]); } while (newbuf() != NULL) { for (index=0; index < size; index++) { if (ping[index] != pong[index]) { break; } } if (index == size) { printf ("%s\n", ping); printf ("%s\n", pong); } } return (0); } char * newbuf () { char *bufp; if (flipflop) { bufp = ping; flipflop = 0; } else { bufp = pong; flipflop = 1; } return (gets (bufp)); }