gchar *keystr = ++ptr;
key = MK_NONE;
- while(*ptr != ']' && *ptr != '\n' && *ptr != '\0') ptr++;
+ while (*ptr != ']' && *ptr != '\n' && *ptr != '\0') ptr++;
if (*ptr == ']')
{
GList *work;
work = dlist;
- while(work)
+ while (work)
{
gchar *path = work->data;
if (recursive && strlen(path) > base_length &&
ct->selection = NULL;
work = ct->cd->list;
- while(work)
+ while (work)
{
ct->selection = g_list_append(ct->selection, work->data);
collection_table_selection_add(ct, work->data, SELECTION_SELECTED, NULL);
if (new_row < 0) new_row = 0;
if (new_row >= ct->rows) new_row = ct->rows - 1;
- while(col != 0)
+ while (col != 0)
{
if (col < 0)
{
{
GList *work;
work = list;
- while(work)
+ while (work)
{
collection_info_free((CollectInfo *)work->data);
work = work->next;
{
GList *work = list;
- while(work)
+ while (work)
{
CollectInfo *ci = work->data;
if (strcmp(ci->fd->path, path) == 0) return ci;
{
GList *work = list;
- while(work)
+ while (work)
{
CollectInfo *ci = work->data;
if (strcmp(ci->fd->path, path) == 0) return work;
gint c = 0;
GList *work = list;
- while(work)
+ while (work)
{
CollectInfo *ci = work->data;
if (strcmp(ci->fd->path, path) == 0) return c;
gint b, e;
b = 0;
- while(data[b] != '\0' && data[b] != '\n' ) b++;
+ while (data[b] != '\0' && data[b] != '\n' ) b++;
b++;
e = b;
temp = NULL;
temp = g_list_prepend(temp, g_strdup_printf("COLLECTION:%d\n", n));
work = list;
- while(work)
+ while (work)
{
n = g_list_index(cd->list, work->data);
if (n >= 0)
total = 0;
work = temp;
- while(work)
+ while (work)
{
total += strlen((gchar *)work->data);
work = work->next;
ptr = uri_text;
work = g_list_last(temp);
- while(work)
+ while (work)
{
gchar *text = work->data;
}
work = list;
- while(work)
+ while (work)
{
cd->list = collection_list_remove(cd->list, work->data);
work = work->next;
GList *work;
work = collection_list;
- while(work)
+ while (work)
{
CollectionData *cd = work->data;
work = work->next;
- while(collection_remove(cd, fd));
+ while (collection_remove(cd, fd));
}
#if 0
/* Do we really need to do this? removed files are
GList *work;
work = collection_list;
- while(work)
+ while (work)
{
CollectionData *cd = work->data;
work = work->next;
- while(collection_rename(cd, fd));
+ while (collection_rename(cd, fd));
}
collect_manager_moved(fd);
d = filelist_filter(d, TRUE);
work = f;
- while(work)
+ while (work)
{
dupe_files_add(dw, NULL, NULL, (FileData *)work->data, TRUE);
work = work->next;
}
filelist_free(f);
work = d;
- while(work)
+ while (work)
{
dupe_files_add(dw, NULL, NULL, (FileData *)work->data, TRUE);
work = work->next;
CollectInfo *info;
info = collection_get_first(collection);
- while(info)
+ while (info)
{
dupe_files_add(dw, collection, info, NULL, FALSE);
info = collection_next_by_info(collection, info);
GList *work;
work = list;
- while(work)
+ while (work)
{
FileData *fd = work->data;
work = work->next;
case TARGET_URI_LIST:
list = uri_filelist_from_text((gchar *)selection_data->data, TRUE);
work = list;
- while(work)
+ while (work)
{
FileData *fd = work->data;
if (isdir(fd->path))
p = fd->path;
else
{
- while(work)
+ while (work)
{
GList *work2;
gchar *ext = work->data;
}
work2 = fd->sidecar_files;
- while(work2)
+ while (work2)
{
FileData *sfd = work2->data;
work2 = work2->next;
do { \
if (g_str_has_suffix(str,suff)) \
str[strlen(str)-(sizeof(suff)-1)] = 0; \
-} while(0)
+} while (0)
REMOVE_SUFFIX(make," Corporation"); /* Pentax */
REMOVE_SUFFIX(make," OPTICAL CO.,LTD"); /* OLYMPUS */
REMOVE_SUFFIX(make," CORPORATION"); /* Nikon */
if (filter_file_class(fd->extension, FORMAT_CLASS_RAWIMAGE))
{
- while(work)
+ while (work)
{
FileData *sfd = work->data;
work = work->next;
pi->queued = TRUE;
pw->queue = g_list_prepend(pw->queue, pi);
- if (!pw->tl && !pw->il) while(pan_queue_step(pw));
+ if (!pw->tl && !pw->il) while (pan_queue_step(pw));
}
gchar *option_start, *value_start;
gchar *p = s_buf;
- while(g_ascii_isspace(*p)) p++;
+ while (g_ascii_isspace(*p)) p++;
if (!*p || *p == '\n' || *p == '#') continue;
option_start = p;
- while(*p && *p != ':') p++;
+ while (*p && *p != ':') p++;
if (!*p) continue;
*p = '\0';
p++;
strncpy(option, option_start, sizeof(option));
- while(g_ascii_isspace(*p)) p++;
+ while (g_ascii_isspace(*p)) p++;
value_start = p;
strncpy(value_all, value_start, sizeof(value_all));
- while(*p && !g_ascii_isspace(*p) && *p != '\n') p++;
+ while (*p && !g_ascii_isspace(*p) && *p != '\n') p++;
*p = '\0';
strncpy(value, value_start, sizeof(value));
src_list = generate_list(ss);
- while(src_list)
+ while (src_list)
{
gint p = (double)rand() / ((double)RAND_MAX + 1.0) * g_list_length(src_list);
work = g_list_nth(src_list, p);
/* start with specified image by skipping to it */
gint i = 0;
- while(ss->list && i < start_index)
+ while (ss->list && i < start_index)
{
ss->list_done = g_list_prepend(ss->list_done, ss->list->data);
ss->list = g_list_remove(ss->list, ss->list->data);
return NULL;
}
- while(fgets(buffer, XV_BUFFER, file) && buffer[0] == '#') /* do_nothing() */;
+ while (fgets(buffer, XV_BUFFER, file) && buffer[0] == '#') /* do_nothing() */;
if(sscanf(buffer, "%d %d %d", &width, &height, &depth) != 3)
{
ptr = s_buf + 1;
c = 0;
- while(ptr[c] != ']' && ptr[c] != '\n' && ptr[c] != '\0') c++;
+ while (ptr[c] != ']' && ptr[c] != '\n' && ptr[c] != '\0') c++;
g_free(key);
key = g_strndup(ptr, c);
secure_fprintf(ssi, "#History lists\n\n");
list = g_list_last(history_list);
- while(list && secsave_errno == SS_ERR_NONE)
+ while (list && secsave_errno == SS_ERR_NONE)
{
HistoryData *hd;
GList *work;
* so that when reading they are added correctly
*/
work = g_list_last(hd->list);
- while(work && secsave_errno == SS_ERR_NONE)
+ while (work && secsave_errno == SS_ERR_NONE)
{
secure_fprintf(ssi, "\"%s\"\n", (gchar *)work->data);
work = work->prev;
if (!hd) return;
work = hd->list;
- while(work)
+ while (work)
{
g_free(work->data);
work = work->next;
/* if already in the list, simply move it to the top */
work = hd->list;
- while(work)
+ while (work)
{
gchar *buf = work->data;
work = work->next;
if (max == -1) max = HISTORY_DEFAULT_KEY_COUNT;
if (max > 0)
{
- while(hd->list && g_list_length(hd->list) > max)
+ while (hd->list && g_list_length(hd->list) > max)
{
GList *work = g_list_last(hd->list);
gchar *buf = work->data;
if (!hd) return;
work = hd->list;
- while(work)
+ while (work)
{
gchar *buf = work->data;
if (strcmp(buf, oldpath) == 0)
w = r = text;
- while(*r != '\0')
+ while (*r != '\0')
{
if (*r == '%' && *(r + 1) != '\0' && *(r + 2) != '\0')
{
if (!fi || !fo) return FALSE;
- while((b = fread(buf, sizeof(char), sizeof(buf), fi)) && b != 0)
+ while ((b = fread(buf, sizeof(char), sizeof(buf), fi)) && b != 0)
{
if (fwrite(buf, sizeof(char), b, fo) != b)
{
g_free(path8);
if (!f) return -1;
- while((c = fgetc(f)) != EOF)
+ while ((c = fgetc(f)) != EOF)
{
sum += c;
}
p = strlen(path) - 1;
if (p < 0) return NULL;
- while(ptr[p] != '/' && p > 0) p--;
+ while (ptr[p] != '/' && p > 0) p--;
if (p == 0 && ptr[p] == '/') p++;
new_path = g_strndup(path, (guint)p);
return new_path;
if (strlen(path) < 2) return g_strdup(path);
p = strlen(path) - 1;
- while(ptr[p] != '.' && p > 0) p--;
+ while (ptr[p] != '.' && p > 0) p--;
if (p == 0) p = strlen(path) - 1;
new_path = g_strndup(path, (guint)p);
return new_path;
list = td->file_list;
- while(list)
+ while (list)
{
g_free(list->data);
list = list->next;
if (strcmp(entry_dir, "/") == 0) entry_dir[0] = '\0';
list = td->file_list;
- while(list)
+ while (list)
{
gchar *file = list->data;
if (strncmp(entry_file, file, l) == 0)
{
list = poss;
if (!list) done = TRUE;
- while(list && !done)
+ while (list && !done)
{
gchar *file = list->data;
if (strlen(file) < c || strncmp(test_file, file, c) != 0)
if (new_row < 0) new_row = 0;
if (new_row >= vfi->rows) new_row = vfi->rows - 1;
- while(col != 0)
+ while (col != 0)
{
if (col < 0)
{