Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

static void exchange ( CameraList list,
int  x,
int  y 
) [static]

For internal use only.

Definition at line 270 of file gphoto2-list.c.

Referenced by gp_list_sort().

{
      char name  [128];
      char value [128];

      /* here we use memcpy to avoid unterminated strings *
       * stored in the list. 128 is hardcoded. use a constant *
       * for cleaness */
      memcpy (name,  list->entry[x].name, 128);
      memcpy (value, list->entry[x].value, 128);
      memcpy (list->entry[x].name,  list->entry[y].name, 128);
      memcpy (list->entry[x].value, list->entry[y].value, 128);
      memcpy (list->entry[y].name,  name, 128);
      memcpy (list->entry[y].value, value, 128);
}


Generated by  Doxygen 1.6.0   Back to index