Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2016/10/24)20161025 
sebras tor8: top of sebras/wip has a options patch.11:17.42 
  tor8: is this inline with what you expected?11:17.48 
tor8 sebras: yes.11:24.08 
  make sure to handle NULL as the options struct though, and provide defaults11:24.24 
  Robin_Watts: so... looking at bug 697215 we have a problem with the script identification11:25.24 
  CJK punctuation is 'neutral' and inherits the script from the surroundings11:25.40 
sebras tor8: ok, in that case pdf_parse_write_options() seems to be lacking num handling too..?11:25.51 
tor8 I've got a fix, but it feels really hacky11:25.53 
sebras tor8: I think the idea is that the caller allocates the struct on the stack..?11:26.04 
tor8 sebras: I mean to cope with NULL not in parse_options, but in new_device11:27.31 
sebras ah, then I'll make a struct assignment instead.11:28.41 
tor8 so that if a caller doesn't want to provide options, he needn't stack allocate and memset an options struct11:28.45 
  passing a struct by poitner is still good, since we'lll probably extend it with more fields eventually11:29.22 
sebras tor8: I means that fz_stext_device could have a full fz_stext_options inside, instead of a pointer to one.11:29.47 
tor8 oh, yes!11:29.57 
  make a copy of the passed in options11:30.01 
  or extract the fields into the device, which is what fz_new_draw_device_with_options does11:30.25 
sebras how does that function handle null?11:31.27 
tor8 it does not. we have a separate entry point for no options11:31.47 
  and the pdf device has no options11:32.05 
sebras pdf-write.c has write options.11:32.27 
tor8 the options passed by string to a fz_document_writer constructor, which parses and stores the device options in the writer struct11:32.58 
  the pdf11:33.13 
  the pdf-write options are used by the pdf_writer fz_document_writer subclass11:33.28 
  the draw-device options are used by fz_cbz_writer when it creates draw-devices11:33.57 
  the intent is for stext-device options to be used by a fz_text_writer11:34.14 
sebras tor8: ok, updated patch onilne.11:37.34 
  I also renamed options to flag, in anticpation that we'll have some options that are not flags.11:39.53 
tor8 sebras: if (fz_has_option() && fz_option_eq("yes")) flags |= MASK;11:54.27 
sebras right.11:56.11 
  tor8: seems to be what pdf-write does.11:56.53 
  tor8: two patches at sebras/master12:58.05 
tor8 sebras: fz_optnion_eq? :)13:02.45 
Robin_Watts fz_onion.13:03.55 
sebras tor8: apparently my vision is somewhat hazy after playing an android game for 20min.13:04.00 
kens Hmm leisure suit larry ?13:04.58 
sebras tor8: better patch online.13:06.12 
malc_ kens: second game i've ever completed (lsl1) without knowing english at that.. sigh those were the days13:07.52 
kens Wihtout knowing English ? THat must have been a challenge....13:08.15 
malc_ kens: yeah.. german oriented school13:09.55 
kens Playing leisure suit larry at school ? O.O Best not get caught :-)13:10.48 
kens started way back when with Scott Adams adventure games13:11.32 
malc_ erm.. i meant i was studying german in school not english :)13:11.41 
kens :)13:12.16 
malc_ i don't know what was harder getting through the game or constantly passing the age check... i had no idea what i've been asked most of the time13:14.02 
tor8 kens: it was colossal cave for me... the options for mac system 6 weren't that great.13:20.16 
kens Well, I was on a trash 80. Actually thinking about it, the first 'game' was probably lunar lander on an old HP calculator, but I'm not sure that counts13:21.08 
  And Star Trek on a HP mini13:21.29 
tor8 the very first game I played was some snake clone on my dad's VT100 connected to a VAX. I don't remember much of that though...13:22.44 
  but of adventure games, I spent an ungodly amount of time exploring the colossal cave :)13:23.27 
kens Well it was easy to get lost13:23.40 
malc_ sopwitch is what i lost my virginity to13:23.54 
  and come to think of it lsl:1 was 3rd, 2nd was karateka13:24.11 
kens Hmm don't remember either of those13:24.42 
  Could be Sopwith ?13:25.16 
  I remember that one13:25.28 
malc_ kens yeah sopwith... i was spelling it phonetically (from what i remember we called it among ourselves)13:27.25 
kens :)13:27.40 
sebras https://archive.org/details/msdos_RAMSAK_198213:28.02 
  strangely enough I still like the beeps. :)13:28.16 
malc_ kens: lsl:1 = lesisure suit larry in the land of longue lizzards, and you must be really ancient if you do not remember karateka (or waaay too young :)13:28.19 
kens Seems like it was a precursor to Prince of Persia, which I do remember13:28.47 
malc_ kens: yep, Jordan Mechner even has a book detailing its development as a teenager13:29.23 
kens Since I was playing Star Trek on an HP mini back in the early 1970's I don't think I'm too young :(13:29.26 
sebras tor8: fz_convert_pixmap_drop() is a bit problematic if you do pix = fz_convert_pixmap_drop(..., pix)13:30.02 
malc_ yep... disqualified13:30.03 
sebras tor8: if the function does not throw, you know you need to drop pix yourself.13:30.16 
  tor8: but if it throws, then fz_convert_pixmap_drop() will itself drop pix and you do not need to.13:30.43 
  maybe it should only drop pix if it succeeds.13:31.32 
  but then I think the function differs from other drop-functions.13:31.45 
tor8 sebras: think of it like pix2 = fz_convert_pixmap_drop(pix1)13:34.40 
  you must *always* drop pix2, but you need not drop pix113:34.54 
sebras tor8: yeah, but we have a whole bunch of code wanting to convert an existing CMYK pixmap to RGB.13:35.20 
  where pix1 == CMYK and pix2 == RGB13:35.36 
  but if pix1 == RGB from the start, fz_convert_pixmap_drop() isn't even called.13:35.57 
tor8 sebras: right. so we want fz_convert_pixmap_drop to only drop if it succeeds.13:40.26 
  so we basically don't want fz_convert_pixmap_drop at all?13:40.36 
sebras basically, yes.13:40.37 
tor8 just call fz_convert_pixmap and drop the old one afterwards13:40.48 
  pix2 = fz_convert_pixmap(pix1); fz_drop_pixmap(pix1); pix1=pix2;13:41.08 
sebras that code looks like it leaks pix2, but I know it doesn't.13:43.21 
  also it isn't that nice onliner that I was hoping for. :-/13:45.05 
  tor8: though moving the pixmap allocation into fz_convert_pixmap() reduces the amount of code.14:19.54 
tor8 sebras: and makes it impossible to call fz_convert_pixmap with mismatching pixmaps, and forgetting to copy resolution fields, etc14:30.39 
sebras I should be changing the commit message though.14:31.04 
  tor8: four patches at sebras/master16:18.30 
  tor8: it build and valgrinds without any leaks. running in cluster16:19.27 
  tor8: it clusters ok.16:24.37 
  tor8: please review carefully.16:24.42 
 Forward 1 day (to 2016/10/26)>>> 
ghostscript.com
Search: