/* * @lock fixer. * C. Smith * (This program is sooo quick and dirty.) */ #include #include int main(void) { char buf[10000], tmpbuf[1000]; char *pos, *pos2; while (gets(buf) != NULL) { if (strncmp(buf, "@lock", 5) != 0) puts(buf); else { pos = strchr(buf, '='); if (*(pos+1) == '#') puts(buf); else { pos2 = strchr(buf, ' '); *pos = '\0'; *pos2 = '\0'; strcpy(tmpbuf, buf); strcat(tmpbuf, " "); strcat(tmpbuf, pos2+1); strcat(tmpbuf, "="); strcat(tmpbuf, pos2+1); puts(tmpbuf); } } } return 0; }