[EGIT] [efm2] 01/01: more work on mv impl

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit f918c86d251299bb837cd6e0e7d4b053bb62e3e3
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Tue Apr 23 19:44:43 2024 +0100

more work on mv impl
---
 src/backends/default/mv.c | 393 --
 1 file changed, 380 insertions(+), 13 deletions(-)

diff --git a/src/backends/default/mv.c b/src/backends/default/mv.c
index e39bf1c..430576d 100644
--- a/src/backends/default/mv.c
+++ b/src/backends/default/mv.c
@@ -1,3 +1,8 @@
+// for copy_file_range()
+#include 
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+
 #include 
 #include 
 #include 
@@ -11,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "eina_strbuf.h"
 #include "eina_thread.h"
@@ -27,11 +33,12 @@ static const char *config_dir = NULL;
 static Eina_Bool
 fs_scan(const char *src)
 {
+  Eina_Bool  res = EINA_TRUE;
   Eina_Iterator *it;
-  const char *s;
+  const char*s;
+  struct statst;
 
   if (strlen(src) < 1) return EINA_FALSE;
-  struct stat st;
 
   if (lstat(src, ) != 0)
 {
@@ -79,8 +86,13 @@ fs_scan(const char *src)
 {
   EINA_ITERATOR_FOREACH(it, s)
   {
-if (!fs_scan(s)) return EINA_FALSE;
+if (res)
+  {
+if (!fs_scan(s)) res = EINA_FALSE;
+  }
+eina_stringshare_del(s);
   }
+  eina_iterator_free(it);
 }
 }
   else
@@ -92,16 +104,15 @@ fs_scan(const char *src)
   if (st.st_size > 0)
 status_count(st.st_size, ecore_file_file_get(src));
 }
-  return EINA_TRUE;  
+  return res;
 }
 
 static Eina_Bool
 fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
-{
-  Eina_Bool res = EINA_TRUE;
-
-  if (!fs_scan(src)) return EINA_FALSE;
-
+{ // cp_rm /path/to/src/filename /path/to/dst/filename
+  // XXX: ecore_file_mv() ? <- look at it
+  // XXX: utime()/utimes() -> utimensat()
+  //
   // if src is dir
   //   fs_mkdir(dst)
   //   for all files in src
@@ -136,17 +147,370 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
   //   fs_chmod(src_meta, dst_meta)
   //   fs_chown(src_meta, dst_meta)
   //   fs_rm(src_meta)
+  Eina_Bool res = EINA_TRUE;
+  Eina_Iterator *it;
+  const char*s;
+  struct statst;
+  mode_t old_umask;
+  struct timeval times[2];
+
+  if (strlen(src) < 1) return EINA_FALSE;
+
+  // first count how much work needs doing
+  if (!fs_scan(src)) return EINA_FALSE;
+
+  fprintf(stderr, "cp_rm [%s] -> [%s]\n", src, dst);
+  fflush(stderr);
+  if (lstat(src, ) != 0)
+{
+  switch (errno)
+{
+case ENOENT: // ignore this error - file removed during scan ?
+  status_pos(1, "Move - File vanished");
+  break;
+case EACCES:
+  status_error(src, dst, "Move - Permission denied for source");
+  return EINA_FALSE;
+case EFAULT:
+  status_error(src, dst, "Move - Memory Fault");
+  return EINA_FALSE;
+case ELOOP:
+  status_error(src, dst, "Move - Too many symlinks");
+  return EINA_FALSE;
+case ENAMETOOLONG:
+  status_error(src, dst, "Move - Name too long");
+  return EINA_FALSE;
+case ENOMEM:
+  status_error(src, dst, "Move - Out of memory");
+  return EINA_FALSE;
+case ENOTDIR:
+  status_error(src, dst, "Move - Source path component is not a directory");
+  return EINA_FALSE;
+case EOVERFLOW:
+  status_error(src, dst, "Move - Overflow");
+  return EINA_FALSE;
+default: // WAT?
+  return EINA_FALSE;
+}
+}
+  old_umask = umask(0);
+  if (S_ISDIR(st.st_mode))
+{ // it's a dir - scan this recursively
+  if (mkdir(dst, st.st_mode) != 0)
+{
+  switch (errno)
+{
+case EEXIST: // ignore - mv would mv over this anyway
+  break;
+case EACCES:
+  res = EINA_FALSE;
+  goto err;
+case EDQUOT:
+  res = EINA_FALSE;
+  goto err;
+case EFAULT:
+  res = EINA_FALSE;
+  goto err;
+case EINVAL:
+  res = EINA_FALSE;
+  goto err;
+case ELOOP:
+  res = EINA_FALSE;
+  goto err;
+case EMLINK:
+  res = EINA_FALSE;
+  goto err;
+case ENAMETOOLONG:
+  res = EINA_FALSE;
+  goto err;
+case ENOENT:
+  res = EINA_FALSE;
+  goto err;
+case ENOMEM:
+  res = EINA_FALSE;
+  goto err;
+case ENOSPC:
+  res = EINA_FALSE;
+  goto err;
+case ENOTDIR:
+  res = EINA_FALSE;
+  goto err;
+

[EGIT] [legacy-imlib2] 02/07: imlib2_view: Minor cleanup

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit f0a81d9d59b9fbd646d3ea81972ec95a5f817266
Author: Kim Woelders 
AuthorDate: Sun Jan 21 13:09:19 2024 +0100

imlib2_view: Minor cleanup
---
 src/bin/imlib2_view.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 35fd677..902a2b2 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -95,6 +95,8 @@ bg_im_init(int w, int h)
 bg_im = imlib_create_image(w, h);
 
 imlib_context_set_image(bg_im);
+imlib_context_set_blend(0);
+
 for (y = 0; y < h; y += opt_cbfs)
 {
 _onoff_ = (y / opt_cbfs) & 0x1;
@@ -104,11 +106,8 @@ bg_im_init(int w, int h)
 imlib_context_set_color(144, 144, 144, 255);
 else
 imlib_context_set_color(100, 100, 100, 255);
-imlib_context_set_blend(0);
 imlib_image_fill_rectangle(x, y, opt_cbfs, opt_cbfs);
-onoff++;
-if (_onoff_ == 2)
-_onoff_ = 0;
+onoff ^= 0x1;
 }
 }
 }


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 05/07: imlib2_view: Rename scaling variables

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit cd4ba13545b4574f0092deb89a9f72c92dcb9adf
Author: Kim Woelders 
AuthorDate: Mon Jan 22 14:05:40 2024 +0100

imlib2_view: Rename scaling variables

Should make naming a bit more logical.
---
 src/bin/imlib2_view.c | 62 ++-
 1 file changed, 32 insertions(+), 30 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 82f66ef..c4a1916 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -37,10 +37,10 @@ static bool opt_progr = true;   /* Render through progress callback */
 static bool opt_scale = false;
 static bool opt_cbalt = false;  /* Alternate checkerboard colors (red/green) */
 static bool opt_aa_final = true;/* Do final anti-aliased rendering */
-static double   opt_scale_x = 1.;
-static double   opt_scale_y = 1.;
-static double   opt_sgrab_x = 1.;
-static double   opt_sgrab_y = 1.;
+static double   opt_sc_inp_x = 1.;
+static double   opt_sc_inp_y = 1.;
+static double   opt_sc_out_x = 1.;
+static double   opt_sc_out_y = 1.;
 static int  opt_cbfs = 8;   /* Background checkerboard field size */
 static char opt_progress_granularity = 10;
 static char opt_progress_print = 0;
@@ -59,8 +59,10 @@ static int  animloop = 0;   /* Animation loop count  */
 
 #define MAX_DIM 32767
 
-#define SCALE_X(x) (int)(scale_x * (x) + .5)
-#define SCALE_Y(x) (int)(scale_y * (x) + .5)
+#define SC_INP_X(x) (int)(opt_sc_inp_x * (x) + .5)
+#define SC_INP_Y(x) (int)(opt_sc_inp_y * (x) + .5)
+#define SC_OUT_X(x) (int)(scale_x * (x) + .5)
+#define SC_OUT_Y(x) (int)(scale_y * (x) + .5)
 
 #define HELP \
"Usage:\n" \
@@ -73,8 +75,8 @@ static int  animloop = 0;   /* Animation loop count  */
"  -g N   : Set progress granularity to N%% (default 10(%%))\n" \
"  -l N   : Introduce N ms delay in progress callback (default 0)\n" \
"  -p : Print info in progress callback (default no)\n" \
-   "  -s Sx[,Sy] : Set render x/y scaling factors to Sx,Sy (default 1.0)\n" \
-   "  -S Sx[,Sy] : Set grab x/y scaling factors to Sx,Sy (default 1.0)\n" \
+   "  -s Sx[,Sy] : Set output x/y scaling factors to Sx,Sy (default 1.0)\n" \
+   "  -S Sx[,Sy] : Set input x/y scaling factors to Sx,Sy (default 1.0)\n" \
"  -t N   : Set background checkerboard field size (default 8)\n" \
"  -v : Increase verbosity\n"
 
@@ -361,8 +363,8 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 /* first time it's called */
 if (image_width == 0)
 {
-scale_x = opt_scale_x;
-scale_y = opt_scale_y;
+scale_x = opt_sc_out_x;
+scale_y = opt_sc_out_y;
 
 window_width = DisplayWidth(disp, DefaultScreen(disp));
 window_height = DisplayHeight(disp, DefaultScreen(disp));
@@ -377,8 +379,8 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 (image_width > window_width || image_height > window_height))
 {
 scale_x = scale_y = 1.;
-while (window_width < SCALE_X(image_width) ||
-   window_height < SCALE_Y(image_height))
+while (window_width < SC_OUT_X(image_width) ||
+   window_height < SC_OUT_Y(image_height))
 {
 scale_x *= .5;
 scale_y = scale_x;
@@ -386,8 +388,8 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 }
 }
 
-window_width = SCALE_X(image_width);
-window_height = SCALE_Y(image_height);
+window_width = SC_OUT_X(image_width);
+window_height = SC_OUT_Y(image_height);
 if (window_width > MAX_DIM)
 {
 window_width = MAX_DIM;
@@ -457,10 +459,10 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
  r_out.x, r_out.y, r_out.w, r_out.h);
 
 /* Render image (part) (or updated canvas) on window background pixmap */
-up_wx = SCALE_X(r_out.x);
-up_wy = SCALE_Y(r_out.y);
-up_ww = SCALE_X(r_out.w);
-up_wh = SCALE_Y(r_out.h);
+up_wx = SC_OUT_X(r_out.x);
+up_wy = SC_OUT_Y(r_out.y);
+up_ww = SC_OUT_X(r_out.w);
+up_wh = SC_OUT_Y(r_out.h);
 Dprintf(" Paint  %d,%d %dx%d\n", up_wx, up_wy, up_ww, up_wh);
 imlib_context_set_blend(0);
 imlib_context_set_drawable(bg_pm);
@@ -552,8 +554,8 @@ load_image(int no, const char *name)
 Vprintf("Drawable: %#lx: x,y: %d,%d  wxh=%ux%u  bw=%u  depth=%u\n",
 draw, x, y, w, h, bw, depth);
 
-wo = w * opt_sgrab_x;
-ho = h * opt_sgrab_y;
+wo = SC_INP_X(w);
+ho = SC_INP_Y(h);
 im = imlib_create_scaled_image_from_drawable(None, 0, 0, w, h, wo, ho,
  1, (get_alpha) 

[EGIT] [legacy-imlib2] 03/07: imlib2_view: Enable an alternate background color set (red/green)

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit f922904687567c6d58daa9299a7f5267623972c4
Author: Kim Woelders 
AuthorDate: Sun Jan 21 16:02:32 2024 +0100

imlib2_view: Enable an alternate background color set (red/green)
---
 src/bin/imlib2_view.c | 22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 902a2b2..2899242 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -35,6 +35,7 @@ static Imlib_Image im_curr = NULL;  /* The current image */
 static bool opt_cache = false;
 static bool opt_progr = true;   /* Render through progress callback */
 static bool opt_scale = false;
+static bool opt_cbalt = false;  /* Alternate checkerboard colors (red/green) */
 static double   opt_scale_x = 1.;
 static double   opt_scale_y = 1.;
 static double   opt_sgrab_x = 1.;
@@ -102,10 +103,20 @@ bg_im_init(int w, int h)
 _onoff_ = (y / opt_cbfs) & 0x1;
 for (x = 0; x < w; x += opt_cbfs)
 {
-if (onoff)
-imlib_context_set_color(144, 144, 144, 255);
+if (opt_cbalt)
+{
+if (onoff)
+imlib_context_set_color(255, 0, 0, 255);
+else
+imlib_context_set_color(0, 255, 0, 255);
+}
 else
-imlib_context_set_color(100, 100, 100, 255);
+{
+if (onoff)
+imlib_context_set_color(144, 144, 144, 255);
+else
+imlib_context_set_color(100, 100, 100, 255);
+}
 imlib_image_fill_rectangle(x, y, opt_cbfs, opt_cbfs);
 onoff ^= 0x1;
 }
@@ -637,6 +648,11 @@ main(int argc, char **argv)
 opt_sgrab_y = opt_sgrab_x;
 break;
 case 't':
+if (*optarg == 'a')
+{
+optarg++;
+opt_cbalt = true;
+}
 no = atoi(optarg);
 if (no > 0)
 opt_cbfs = no;


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 06/07: imlib2_view: Optionally scale on input

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit 6cef7ca822e1da0416c84c0a19a90be7281c108c
Author: Kim Woelders 
AuthorDate: Mon Jan 22 16:09:20 2024 +0100

imlib2_view: Optionally scale on input

For testing.
---
 src/bin/imlib2_view.c | 35 +--
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index c4a1916..1e9b0ec 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -321,6 +321,7 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 {
 static double   scale_x = 0., scale_y = 0.;
 int up_wx, up_wy, up_ww, up_wh;
+int up2_wx, up2_wy, up2_ww, up2_wh;
 rect_t  r_up, r_out;
 
 if (opt_progress_print)
@@ -372,8 +373,10 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 window_height -= 32;
 Dprintf(" Screen WxH=%dx%d\n", window_width, window_height);
 
-image_width = fixedframe ? finfo.frame_w : finfo.canvas_w;
-image_height = fixedframe ? finfo.frame_h : finfo.canvas_h;
+up_ww = fixedframe ? finfo.frame_w : finfo.canvas_w;
+up_wh = fixedframe ? finfo.frame_h : finfo.canvas_h;
+image_width = SC_INP_X(up_ww);
+image_height = SC_INP_X(up_wh);
 
 if (!opt_scale &&
 (image_width > window_width || image_height > window_height))
@@ -403,7 +406,7 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 Dprintf(" Window WxH=%dx%d\n", window_width, window_height);
 
 V2printf(" Image  WxH=%dx%d fmt='%s'\n",
- image_width, image_height, imlib_image_format());
+ up_ww, up_wh, imlib_image_format());
 
 /* Initialize checkered background image */
 bg_im_init(image_width, image_height);
@@ -451,27 +454,31 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 }
 
 /* Render image on background image */
-Dprintf(" Update %d,%d %dx%d\n", r_out.x, r_out.y, r_out.w, r_out.h);
 imlib_context_set_image(bg_im);
 imlib_context_set_blend(1);
+up_wx = SC_INP_X(r_out.x);
+up_wy = SC_INP_Y(r_out.y);
+up_ww = SC_INP_X(r_out.w);
+up_wh = SC_INP_Y(r_out.h);
+Dprintf(" Update  %d,%d %dx%d -> %d,%d %dx%d \n",
+r_out.x, r_out.y, r_out.w, r_out.h, up_wx, up_wy, up_ww, up_wh);
 imlib_blend_image_onto_image(im, 1,
  r_out.x, r_out.y, r_out.w, r_out.h,
- r_out.x, r_out.y, r_out.w, r_out.h);
+ up_wx, up_wy, up_ww, up_wh);
 
 /* Render image (part) (or updated canvas) on window background pixmap */
-up_wx = SC_OUT_X(r_out.x);
-up_wy = SC_OUT_Y(r_out.y);
-up_ww = SC_OUT_X(r_out.w);
-up_wh = SC_OUT_Y(r_out.h);
-Dprintf(" Paint  %d,%d %dx%d\n", up_wx, up_wy, up_ww, up_wh);
+up2_wx = SC_OUT_X(up_wx);
+up2_wy = SC_OUT_Y(up_wy);
+up2_ww = SC_OUT_X(up_ww);
+up2_wh = SC_OUT_Y(up_wh);
+Dprintf(" Paint  %d,%d %dx%d\n", up2_wx, up2_wy, up2_ww, up2_wh);
 imlib_context_set_blend(0);
 imlib_context_set_drawable(bg_pm);
-imlib_render_image_part_on_drawable_at_size(r_out.x, r_out.y, r_out.w,
-r_out.h, up_wx, up_wy, up_ww,
-up_wh);
+imlib_render_image_part_on_drawable_at_size(up_wx, up_wy, up_ww, up_wh,
+up2_wx, up2_wy, up2_ww, up2_wh);
 
 /* Update window */
-XClearArea(disp, win, up_wx, up_wy, up_ww, up_wh, False);
+XClearArea(disp, win, up2_wx, up2_wy, up2_ww, up2_wh, False);
 XFlush(disp);
 
 if (opt_progress_delay > 0)


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 07/07: imlib2_view: Enable specifying border

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit cf926c746cd3dfe4bfa5ad8fd5bff075d2efce84
Author: Kim Woelders 
AuthorDate: Tue Aug 8 20:08:09 2023 +0200

imlib2_view: Enable specifying border

The border is applied during input scaling.
The output scaling scales the whole image as rendered by the input
scaling.
---
 src/bin/imlib2_view.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 1e9b0ec..17ca47d 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -31,6 +31,7 @@ static Imlib_Image bg_im = NULL;
 static Imlib_Image bg_im_clean = NULL;
 static Imlib_Image fg_im = NULL;/* The animated image */
 static Imlib_Image im_curr = NULL;  /* The current image */
+static Imlib_Border border;
 
 static bool opt_cache = false;
 static bool opt_progr = true;   /* Render through progress callback */
@@ -69,6 +70,7 @@ static int  animloop = 0;   /* Animation loop count  */
"  imlib2_view [OPTIONS] {FILE | XID}...\n" \
"OPTIONS:\n" \
"  -a : Disable final anti-aliased rendering\n" \
+   "  -b L,R,T,B : Set border\n" \
"  -c : Enable image caching (implies -e)\n" \
"  -d : Enable debug\n" \
"  -e : Do rendering explicitly (not via progress callback)\n" \
@@ -364,6 +366,8 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 /* first time it's called */
 if (image_width == 0)
 {
+imlib_image_set_border();
+
 scale_x = opt_sc_out_x;
 scale_y = opt_sc_out_y;
 
@@ -622,13 +626,18 @@ main(int argc, char **argv)
 
 verbose = 0;
 
-while ((opt = getopt(argc, argv, "acdeg:l:ps:S:t:v")) != -1)
+while ((opt = getopt(argc, argv, "ab:cdeg:l:ps:S:t:v")) != -1)
 {
 switch (opt)
 {
 case 'a':
 opt_aa_final = false;
 break;
+case 'b':
+border.left = border.right = border.top = border.bottom = 0;
+sscanf(optarg, "%d,%d,%d,%d",
+   , , , );
+break;
 case 'c':
 opt_cache = true;
 opt_progr = false;  /* Cached images won't give progress callbacks */


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 01/07: imlib2_view: Use poll(), not select()

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit 73513f89d57f5ba4e3094958c8427c3434aed86b
Author: Kim Woelders 
AuthorDate: Sun Apr 14 19:35:47 2024 +0200

imlib2_view: Use poll(), not select()
---
 src/bin/imlib2_view.c | 26 --
 1 file changed, 8 insertions(+), 18 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index e221089..35fd677 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -3,6 +3,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -595,6 +596,8 @@ main(int argc, char **argv)
 {
 int opt, err;
 int no, inc;
+static int  nfds;
+static struct pollfd afds[1];
 
 verbose = 0;
 
@@ -684,14 +687,15 @@ main(int argc, char **argv)
 exit(0);
 }
 
+nfds = 0;
+afds[nfds++].fd = ConnectionNumber(disp);
+
 for (;;)
 {
-int x, y, b, count, fdsize, xfd, timeout;
+int x, y, b, count, timeout;
 XEvent  ev;
 static int  zoom_mode = 0, zx, zy;
 static double   zoom = 1.0;
-struct timeval  tval;
-fd_set  fdset;
 KeySym  key;
 int no2;
 
@@ -848,21 +852,7 @@ main(int argc, char **argv)
 if (multiframe)
 continue;
 
-xfd = ConnectionNumber(disp);
-fdsize = xfd + 1;
-FD_ZERO();
-FD_SET(xfd, );
-
-if (timeout > 0)
-{
-tval.tv_sec = timeout / 100;
-tval.tv_usec = timeout - tval.tv_sec * 100;
-count = select(fdsize, , NULL, NULL, );
-}
-else
-{
-count = select(fdsize, , NULL, NULL, NULL);
-}
+count = poll(afds, nfds, timeout);
 
 if (count < 0)
 {


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 04/07: imlib2_view: Optionally disable final anti-aliased rendering

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit faf0f175a51dcb0007cd14ec5bde27ba0ab25e9d
Author: Kim Woelders 
AuthorDate: Fri Apr 19 16:54:27 2024 +0200

imlib2_view: Optionally disable final anti-aliased rendering
---
 src/bin/imlib2_view.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 2899242..82f66ef 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -36,6 +36,7 @@ static bool opt_cache = false;
 static bool opt_progr = true;   /* Render through progress callback */
 static bool opt_scale = false;
 static bool opt_cbalt = false;  /* Alternate checkerboard colors (red/green) */
+static bool opt_aa_final = true;/* Do final anti-aliased rendering */
 static double   opt_scale_x = 1.;
 static double   opt_scale_y = 1.;
 static double   opt_sgrab_x = 1.;
@@ -65,6 +66,7 @@ static int  animloop = 0;   /* Animation loop count  */
"Usage:\n" \
"  imlib2_view [OPTIONS] {FILE | XID}...\n" \
"OPTIONS:\n" \
+   "  -a : Disable final anti-aliased rendering\n" \
"  -c : Enable image caching (implies -e)\n" \
"  -d : Enable debug\n" \
"  -e : Do rendering explicitly (not via progress callback)\n" \
@@ -611,10 +613,13 @@ main(int argc, char **argv)
 
 verbose = 0;
 
-while ((opt = getopt(argc, argv, "cdeg:l:ps:S:t:v")) != -1)
+while ((opt = getopt(argc, argv, "acdeg:l:ps:S:t:v")) != -1)
 {
 switch (opt)
 {
+case 'a':
+opt_aa_final = false;
+break;
 case 'c':
 opt_cache = true;
 opt_progr = false;  /* Cached images won't give progress callbacks */
@@ -876,8 +881,11 @@ main(int argc, char **argv)
 }
 else if (count == 0)
 {
-/* "Final" (delayed) re-rendering with AA */
-bg_pm_redraw(zx, zy, zoom, 1);
+if (opt_aa_final)
+{
+/* "Final" (delayed) re-rendering with AA */
+bg_pm_redraw(zx, zy, zoom, 1);
+}
 }
 }
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 01/01: e sys main - fix minor leaking iterator - unused code now

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository enlightenment.


View the commit online.
commit 8b06ca97a6df8cdef7a67c82429b15b71791f3e3
Author: Carsten Haitzler 
AuthorDate: Tue Apr 23 09:39:01 2024 +0100

e sys main - fix minor leaking iterator - unused code now
---
 src/bin/e_sys_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/e_sys_main.c b/src/bin/e_sys_main.c
index 3758af1c7..02c78aee1 100644
--- a/src/bin/e_sys_main.c
+++ b/src/bin/e_sys_main.c
@@ -342,6 +342,7 @@ main(int argc,
   rm = EINA_FALSE;
   eina_stringshare_del(s);
}
+ eina_iterator_free(it);
  if (rm)
{
   if (rmdir(path))


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.