Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: mylib.h

Issue 6893111: Enhancements to ktop (Closed) Base URL: ssh://gitrw.chromium.org:9222/ktop.git@master
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « main.c ('k') | plot.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /****************************************************************************
2 | (C) Copyright 2008 Novell, Inc. All Rights Reserved.
3 |
4 | GPLv2: This program is free software; you can redistribute it
5 | and/or modify it under the terms of version 2 of the GNU General
6 | Public License as published by the Free Software Foundation.
7 |
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU General Public License for more details.
12 +-------------------------------------------------------------------------*/
13
14 #ifndef _MYLIB_H_
15 #define _MYLIB_H_ 1
16
17 #ifndef _STDDEF_H
18 #include <stddef.h>
19 #endif
20
21 #ifndef _STYLE_H_
22 #include <style.h>
23 #endif
24
25 void *myalloc (unsigned size);
26 void *myrealloc (void *p, unsigned size);
27 char *strAlloc (char *s);
28 void strFree (char *s);
29 char *cat (char *dst, ...);
30
31 size_t strlcpy(char *dest, const char *src, size_t size);
32 size_t strlcat(char *dest, const char *src, size_t count);
33
34 unsigned int murmurhash (const unsigned char *data, int len, unsigned int h);
35
36 void seed_random (void);
37 long range (long max);
38 int percent (int x);
39 long exp_dist (long range);
40
41 int isPattern (char *string);
42 int isMatch (char *pattern, char *string);
43
44 double current_time (void);
45 void prTimer (void);
46 void startTimer (void);
47 void stopTimer (void);
48 void resetTimer (void);
49
50 void init_sum (void);
51 void q_sum (long long x);
52 void f_sum (double x);
53 void pr_sum (char *msg);
54 void pr_sum_min_max (char *msg);
55
56 char *date (unsigned long time);
57
58 u64 findprime (u64 x);
59
60 void donothing (void);
61
62 void to_base64 (const void *data, int length, char *out);
63 int from_base64 (const char *in, void *data);
64
65 #endif
OLDNEW
« no previous file with comments | « main.c ('k') | plot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698