Deleted Added
full compact
fmt.c (130896) fmt.c (130897)
1/*-
2 * Copyright (c) 1992, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

29
30#if 0
31#ifndef lint
32static char sccsid[] = "@(#)fmt.c 8.4 (Berkeley) 4/15/94";
33#endif
34#endif
35
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1992, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

29
30#if 0
31#ifndef lint
32static char sccsid[] = "@(#)fmt.c 8.4 (Berkeley) 4/15/94";
33#endif
34#endif
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/bin/ps/fmt.c 130896 2004-06-22 02:15:58Z gad $");
37__FBSDID("$FreeBSD: head/bin/ps/fmt.c 130897 2004-06-22 02:18:29Z gad $");
38
39#include <sys/types.h>
40#include <sys/time.h>
41#include <sys/resource.h>
42
43#include <err.h>
44#include <limits.h>
45#include <stdio.h>

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

122 cp = malloc(len);
123 if (cp == NULL)
124 errx(1, "malloc failed");
125 if (ap == NULL)
126 sprintf(cp, "[%.*s]", (int)maxlen, cmd);
127 else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
128 sprintf(cp, "%s (%.*s)", ap, (int)maxlen, cmd);
129 else
38
39#include <sys/types.h>
40#include <sys/time.h>
41#include <sys/resource.h>
42
43#include <err.h>
44#include <limits.h>
45#include <stdio.h>

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

122 cp = malloc(len);
123 if (cp == NULL)
124 errx(1, "malloc failed");
125 if (ap == NULL)
126 sprintf(cp, "[%.*s]", (int)maxlen, cmd);
127 else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
128 sprintf(cp, "%s (%.*s)", ap, (int)maxlen, cmd);
129 else
130 (void) strcpy(cp, ap);
130 strcpy(cp, ap);
131 return (cp);
132}
131 return (cp);
132}