Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
27f3b885
Kaydet (Commit)
27f3b885
authored
Mar 02, 2008
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
* pass unsigned char to hash_string
* load_file returns char
üst
cb476900
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
utility.h
comar/include/utility.h
+1
-1
model.c
comar/src/model.c
+4
-4
utility.c
comar/src/utility.c
+2
-2
No files found.
comar/include/utility.h
Dosyayı görüntüle @
27f3b885
...
...
@@ -13,7 +13,7 @@ char *strsub(const char *str, int start, int end);
char
*
strrep
(
const
char
*
str
,
char
old
,
char
new
);
int
check_file
(
const
char
*
fname
);
unsigned
char
*
load_file
(
const
char
*
fname
,
int
*
sizeptr
);
char
*
load_file
(
const
char
*
fname
,
int
*
sizeptr
);
int
save_file
(
const
char
*
fname
,
const
char
*
buffer
,
size_t
size
);
unsigned
long
time_diff
(
struct
timeval
*
start
,
struct
timeval
*
end
);
comar/src/model.c
Dosyayı görüntüle @
27f3b885
...
...
@@ -134,7 +134,7 @@ model_lookup_interface(const char *iface)
struct
node
*
n
;
int
val
;
val
=
hash_string
(
iface
,
strlen
(
iface
))
%
TABLE_SIZE
;
val
=
hash_string
(
(
unsigned
char
*
)
iface
,
strlen
(
iface
))
%
TABLE_SIZE
;
for
(
n
=
node_table
[
val
];
n
;
n
=
n
->
next
)
{
if
(
N_INTERFACE
==
n
->
type
&&
strcmp
(
n
->
path
,
iface
)
==
0
)
{
return
n
->
no
;
...
...
@@ -163,7 +163,7 @@ model_lookup_method(const char *iface, const char *method)
snprintf
(
path
,
size
,
"%s.%s"
,
iface
,
method
);
path
[
size
-
1
]
=
'\0'
;
val
=
hash_string
(
path
,
strlen
(
path
))
%
TABLE_SIZE
;
val
=
hash_string
(
(
unsigned
char
*
)
path
,
strlen
(
path
))
%
TABLE_SIZE
;
for
(
n
=
node_table
[
val
];
n
;
n
=
n
->
next
)
{
if
(
N_METHOD
==
n
->
type
&&
strcmp
(
n
->
path
,
path
)
==
0
)
{
free
(
path
);
...
...
@@ -204,7 +204,7 @@ model_lookup_signal(const char *iface, const char *signal)
snprintf
(
path
,
size
,
"%s.%s"
,
iface
,
signal
);
path
[
size
-
1
]
=
'\0'
;
val
=
hash_string
(
path
,
strlen
(
path
))
%
TABLE_SIZE
;
val
=
hash_string
(
(
unsigned
char
*
)
path
,
strlen
(
path
))
%
TABLE_SIZE
;
for
(
n
=
node_table
[
val
];
n
;
n
=
n
->
next
)
{
if
(
N_SIGNAL
==
n
->
type
&&
strcmp
(
n
->
path
,
path
)
==
0
)
{
free
(
path
);
...
...
@@ -239,7 +239,7 @@ add_node(int parent_no, const char *path, char *label, int type)
n
->
no
=
model_nr_nodes
++
;
n
->
access_label
=
label
;
val
=
hash_string
(
path
,
len
)
%
TABLE_SIZE
;
val
=
hash_string
(
(
unsigned
char
*
)
path
,
len
)
%
TABLE_SIZE
;
n
->
next
=
node_table
[
val
];
node_table
[
val
]
=
n
;
...
...
comar/src/utility.c
Dosyayı görüntüle @
27f3b885
...
...
@@ -96,7 +96,7 @@ check_file(const char *fname)
}
//! Returns content of a file
unsigned
char
*
char
*
load_file
(
const
char
*
fname
,
int
*
sizeptr
)
{
/*!
...
...
@@ -110,7 +110,7 @@ load_file(const char *fname, int *sizeptr)
FILE
*
f
;
struct
stat
fs
;
size_t
size
;
unsigned
char
*
data
;
char
*
data
;
if
(
stat
(
fname
,
&
fs
)
!=
0
)
return
NULL
;
size
=
fs
.
st_size
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment