var.c (c6d2d1b4ac1ec127805c5d1d38564ed85fb5770d) var.c (aeb5d065044ee6733a7fee14edb52959a28c1ab4)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 619 unchanged lines hidden (view full) ---

628 for (vp = *vpp; vp; vp = vp->next) {
629 if (!(vp->flags & VUNSET))
630 vars[i++] = vp->text;
631 }
632 }
633
634 qsort(vars, n, sizeof(*vars), var_compare);
635 for (i = 0; i < n; i++) {
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 619 unchanged lines hidden (view full) ---

628 for (vp = *vpp; vp; vp = vp->next) {
629 if (!(vp->flags & VUNSET))
630 vars[i++] = vp->text;
631 }
632 }
633
634 qsort(vars, n, sizeof(*vars), var_compare);
635 for (i = 0; i < n; i++) {
636 for (s = vars[i]; *s != '='; s++)
637 out1c(*s);
638 out1c('=');
639 out1qstr(s + 1);
636 s = strchr(vars[i], '=');
637 s++;
638 outbin(vars[i], s - vars[i], out1);
639 out1qstr(s);
640 out1c('\n');
641 }
642 ckfree(vars);
643 INTOFF;
644
645 return 0;
646}
647

--- 57 unchanged lines hidden (view full) ---

705 } else {
706 for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
707 for (vp = *vpp ; vp ; vp = vp->next) {
708 if (vp->flags & flag) {
709 if (values) {
710 out1str(cmdname);
711 out1c(' ');
712 }
640 out1c('\n');
641 }
642 ckfree(vars);
643 INTOFF;
644
645 return 0;
646}
647

--- 57 unchanged lines hidden (view full) ---

705 } else {
706 for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
707 for (vp = *vpp ; vp ; vp = vp->next) {
708 if (vp->flags & flag) {
709 if (values) {
710 out1str(cmdname);
711 out1c(' ');
712 }
713 for (p = vp->text ; *p != '=' ; p++)
714 out1c(*p);
713 p = strchr(vp->text, '=');
715 if (values && !(vp->flags & VUNSET)) {
714 if (values && !(vp->flags & VUNSET)) {
716 out1c('=');
717 out1qstr(p + 1);
718 }
715 p++;
716 outbin(vp->text, p - vp->text,
717 out1);
718 out1qstr(p);
719 } else
720 outbin(vp->text, p - vp->text,
721 out1);
719 out1c('\n');
720 }
721 }
722 }
723 }
724 return 0;
725}
726

--- 216 unchanged lines hidden ---
722 out1c('\n');
723 }
724 }
725 }
726 }
727 return 0;
728}
729

--- 216 unchanged lines hidden ---