{"id":10,"date":"2004-10-06T11:59:40","date_gmt":"2004-10-06T11:59:40","guid":{"rendered":"https:\/\/www.suramya.com\/blog\/archives\/10-guid.html"},"modified":"2007-11-05T09:59:13","modified_gmt":"2007-11-05T13:59:13","slug":"can-i-take-your-order-please","status":"publish","type":"post","link":"https:\/\/www.suramya.com\/blog\/2004\/10\/can-i-take-your-order-please\/","title":{"rendered":"Can I take your order please?"},"content":{"rendered":"<p>Found this code online and I think it is absolutely hilarious, even to people who don&#8217;t even know C.<\/p>\n<pre>\r\nstatic void happy_meal_tcvr_write(struct happy_meal *hp,\r\nunsigned long tregs, int reg,\r\nunsigned short value)\r\n{\r\nint tries = TCVR_WRITE_TRIES;\r\n\r\nASD((\"happy_meal_tcvr_write: reg=0x%02x value=%04x\\n\", reg,\r\nvalue));\r\n\r\n\/* Welcome to Sun Microsystems, can I take your order please? *\/\r\nif (!hp->happy_flags &amp; HFLAG_FENABLE)\r\nreturn happy_meal_bb_write(hp, tregs, reg, value);\r\n\r\n\/* Would you like fries with that? *\/\r\nhme_write32(hp, tregs + TCVR_FRAME,\r\n(FRAME_WRITE | (hp->paddr < < 23) |\r\n((reg &amp; 0xff) << 18 ) | (value &amp; 0xffff)));\r\nwhile (!(hme_read32(hp, tregs + TCVR_FRAME) &amp; 0x10000) &#038;&amp; --tries)\r\nudelay(20);\r\n\r\n\/* Anything else? *\/\r\nif (!tries)\r\nprintk(KERN_ERR \"happy meal: Aieee, transceiver MIF write\r\nbolixed\\n\");\r\n\r\n\/* Fifty-two cents is your change, have a nice day. *\/\r\n\r\n<\/pre>\n<p>I think that the programmer who wrote this was a little bit bored.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Found this code online and I think it is absolutely hilarious, even to people who don&#8217;t even know C. static void happy_meal_tcvr_write(struct happy_meal *hp, unsigned long tregs, int reg, unsigned short value) { int tries = TCVR_WRITE_TRIES; ASD((&#8220;happy_meal_tcvr_write: reg=0x%02x value=%04x\\n&#8221;, reg, value)); \/* Welcome to Sun Microsystems, can I take your order please? *\/ if [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"","activitypub_status":"","footnotes":""},"categories":[7,26],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-funny-newsarticles","category-humor"],"_links":{"self":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":0,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}