comparison sidinfo.c @ 161:58fe784a6e48

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 07 Feb 2018 17:02:49 +0200
parents a8c24f1f460f
children 179ffe97599c
comparison
equal deleted inserted replaced
160:27365eae837b 161:58fe784a6e48
964 argHandleOpt, argHandleFile, OPTH_ONLY_OPTS)) 964 argHandleOpt, argHandleFile, OPTH_ONLY_OPTS))
965 return -1; 965 return -1;
966 966
967 if (optOneLine) 967 if (optOneLine)
968 { 968 {
969 // For one-line format, disable parsing and prefixes
969 optParsable = FALSE; 970 optParsable = FALSE;
970 optNoNamePrefix = TRUE; 971 optNoNamePrefix = TRUE;
971 } 972 }
972 973
973 if (optFieldOutput && !optFormat.nitems) 974 if (optFieldOutput && optFormat.nitems == 0)
974 { 975 {
976 // For standard field output, push standard items to format stack
975 PSFStackItem item; 977 PSFStackItem item;
976 int i;
977 978
978 memset(&item, 0, sizeof(item)); 979 memset(&item, 0, sizeof(item));
979 siClearStack(&optFormat); 980 siClearStack(&optFormat);
980 981
981 for (i = 0; i < noptPSOptions; i++) 982 for (int i = 0; i < noptPSOptions; i++)
982 { 983 {
983 item.cmd = i; 984 item.cmd = i;
984 siStackAddItem(&optFormat, &item); 985 siStackAddItem(&optFormat, &item);
985 } 986 }
986 } 987 }