4921 |
return 0; |
return 0; |
4922 |
} |
} |
4923 |
|
|
|
/* For now let's assume just 0xffff files */ |
|
4924 |
static void set_fileid(gn_file *fi, char *arg) |
static void set_fileid(gn_file *fi, char *arg) |
4925 |
{ |
{ |
4926 |
int j, index, len = 1; |
unsigned long j, index, len = 1; |
4927 |
index = j = atoi(arg); |
index = j = atol(arg); |
4928 |
while (j > 255) { |
while (j > 255) { |
4929 |
len++; |
len++; |
4930 |
j /= 256; |
j /= 256; |
4935 |
fi->id[0] = len; |
fi->id[0] = len; |
4936 |
for (j = len; j > 0; j--) { |
for (j = len; j > 0; j--) { |
4937 |
fi->id[j] = index % 256; |
fi->id[j] = index % 256; |
4938 |
index = (index & 0xff00) >> 8; |
index = (index >> 8); |
4939 |
} |
} |
4940 |
} |
} |
4941 |
|
|
4987 |
set_fileid(&fi, nargv[0]); |
set_fileid(&fi, nargv[0]); |
4988 |
} |
} |
4989 |
|
|
4990 |
|
return 0; |
4991 |
if ((error = gn_sm_functions(GN_OP_GetFileDetailsById, &data, &state)) != GN_ERR_NONE) |
if ((error = gn_sm_functions(GN_OP_GetFileDetailsById, &data, &state)) != GN_ERR_NONE) |
4992 |
fprintf(stderr, _("Failed to get filename: %s\n"), gn_error_print(error)); |
fprintf(stderr, _("Failed to get filename: %s\n"), gn_error_print(error)); |
4993 |
else { |
else { |