#define STRTOUKL strtoul
#endif
+// since gcc-2.5
+#define NORETURN __attribute__((__noreturn__))
+#define FUNCTION __attribute__((__const__)) // no access to global mem, even via ptr, and no side effect
+
#if !defined(restrict) && __STDC_VERSION__ < 199901
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 92 // maybe 92 or 95 ?
+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 92
#define restrict __restrict__
#else
#warning No restrict keyword?
#endif
#endif
+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 96
+// won't alias anything, and aligned enough for anything
+#define MALLOC __attribute__ ((__malloc__))
+// no side effect, may read globals
+#define PURE __attribute__ ((__pure__))
+// tell gcc what to expect: if(unlikely(err)) die(err);
+#define likely(x) __builtin_expect(!!(x),1)
+#define unlikely(x) __builtin_expect(!!(x),0)
+#define expected(x,y) __builtin_expect((x),(y))
+#else
+#define MALLOC
+#define PURE
+#define likely(x) (x)
+#define unlikely(x) (x)
+#define expected(x,y) (x)
+#endif
+
// marks old junk, to warn non-procps library users
#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
#define OBSOLETE __attribute__((deprecated))
#define OBSOLETE
#endif
+#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 1 ) || __GNUC__ > 3
// Tells gcc that function is library-internal;
// so no need to do dynamic linking at run-time.
// This might work with slightly older compilers too.
-#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 1 ) || __GNUC__ > 3
#define HIDDEN __attribute__((visibility("hidden")))
+// Tell g++ that a function won't throw exceptions.
+#define NOTHROW __attribute__((__nothrow__))
#else
#define HIDDEN
+#define NOTHROW
#endif
// Like HIDDEN, but for an alias that gets created.
#define HIDDEN_ALIAS(x) extern __typeof(x) x##_direct __attribute__((alias(#x)))
#endif
-// since gcc-2.5
-#define NORETURN __attribute__((__noreturn__))
-#define FUNCTION __attribute__((__const__)) // no access to global mem, even via ptr, and no side effect
-
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 96
-// won't alias anything, and aligned enough for anything
-#define MALLOC __attribute__ ((__malloc__))
-// no side effect, may read globals
-#define PURE __attribute__ ((__pure__))
-// tell gcc what to expect: if(unlikely(err)) die(err);
-#define likely(x) __builtin_expect(!!(x),1)
-#define unlikely(x) __builtin_expect(!!(x),0)
-#define expected(x,y) __builtin_expect((x),(y))
-#else
-#define MALLOC
-#define PURE
-#define likely(x) (x)
-#define unlikely(x) (x)
-#define expected(x,y) (x)
-#endif
-
#endif
prochlp(NULL); // prep for a new frame
if (Monpidsidx)
- PT = openproc(PROC_FILLBUG | PROC_PID, Monpids);
+ PT = openproc(flags, Monpids);
else
PT = openproc(flags);
if (!(Frames_libflags & L_stat)) Frames_libflags |= L_status;
}
if (!Frames_libflags) Frames_libflags = L_DEFAULT;
+ if (selection_type=='p') Frames_libflags |= PROC_PID;
}
// whoa first time, gotta' prime the pump...
if (!p_table) {
- p_table = procs_refresh(NULL, L_DEFAULT);
+ p_table = procs_refresh(NULL, Frames_libflags);
putp(Cap_clr_scr);
sleep(1);
} else
proc_t **ppt;
int i, scrlins;
- /* note: except for PROC_PID, all libproc flags are managed by
+ /* note: all libproc flags are managed by
reframewins(), who also builds each window's column headers */
if (!Frames_libflags) {
reframewins();