code stringlengths 5 1.01M | repo_name stringlengths 5 84 | path stringlengths 4 311 | language stringclasses 30 values | license stringclasses 15 values | size int64 5 1.01M | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|
//
// MessageViewController.h
// HanbitBibleMemory
//
// Created by Jaehong Chon on 2/23/14.
// Copyright (c) 2014 Hanbit Church. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MessageViewController : UIViewController
@end
| SanDiegoHanbitChurch/BibleAmSongApp-iOS | HanbitBibleMemory/MessageViewController.h | C | mit | 242 | [
30522,
1013,
1013,
1013,
1013,
4471,
8584,
8663,
13181,
10820,
1012,
1044,
1013,
1013,
7658,
16313,
28065,
16930,
6633,
10253,
1013,
1013,
1013,
1013,
2580,
2011,
22770,
30524,
1013,
1001,
12324,
1026,
21318,
23615,
1013,
21318,
23615,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
## About threex.tweencontrols.js
* NOTES: is it position only ?
* it gives the currentPosition
* it gives the targetPosition
* it gives a transitionDelay
* targetPosition is dynamic
- everytime it changes, test if a tweening is in progress
- if current tweening, don't change the delay
- else put default delay
* which function for the tweening ?
## About size variations
* if focus generation changes, the display size will change too
* could that be handled at the css level
## About dynamic generation based on wikipedia content
* how to query it from wikipedia
* query some info from a page
* query related pages from a page - build from it
* cache all that
* how to build it dynamically
## About threex.peppernodestaticcontrols.js
### About controls strategy
* i went for a dynamic physics
- it seems hard to controls
- it is hard to predict too
* what about a hardcoded topology
- like a given tree portion will be visualized this way
- with very little freedom, thus very predictive
- a given tree portion got a single visualisation
- switch from a portion to another is just a tweening on top
- it seems possible and seems to be simpler, what about the details
### Deterministic visualisation
* without animation for now, as a simplification assumption.
- go for the simplest
* focused node at the center
* children of a node spread around the parent node
- equal angle between each link
- so the parent is included in the computation
* the length of a link is relative to the child node generation
#### Nice... how to code it now
* if generation === 1, then position.set(0,0,0)
* the world position of children is set by the parent
* so setting position of each node is only done on a node if it got children
- what is the algo to apply to each node ?
- reccursive function: handle current node and forward to all child
- to handle a node is finding its position in world space
#### Pseudo code for computePosition(node)
```
function computePosition(node){
// special case of focus node position
var isFocusedNode = node.parent !== null ? true : false
if( isFocusedNode ){
node.position.set(0,0,0)
}
// if no children, do nothing more
if( node.children.length === 0 ) continue;
// ... here compute the position of each node
// forward to each child
node.children.forEach(function(child){
computePosition(child)
})
}
```
**how to compute the position of each child ?**
* is there a node.parent ?
* how many children are there.
```
var linksCount = node.children.length + (node.parent !== null? 1 : 0)
var deltaAngle = Math.PI*2 / linksCount
var startAngle = 0
if( node.parent !== null ){
var deltaY = node.parent.position.y - node.position.y
var deltaX = node.parent.position.x - node.position.x
startAngle = Math.atan2(deltaY, deltaX)
startAngle += deltaAngle
}
// compute the radius
var radiuses= [0,100, 40]
console.assert(node.generation >= 1 && node.generation < radiuses.length )
var radius = radiuses[node.generation]
var angle = startAngle
node.children.forEach(function(nodeChild){
nodeChild.position.x = Math.cos(angle)*radius
nodeChild.position.y = Math.sin(angle)*radius
angle += deltaAngle
})
``` | atj1979/threex | src/threex.peppernodes/examples/TODO_static.md | Markdown | mit | 3,307 | [
30522,
1001,
1001,
2055,
2093,
2595,
1012,
1056,
28394,
15305,
3372,
13153,
2015,
1012,
1046,
2015,
1008,
3964,
1024,
2003,
2009,
2597,
2069,
1029,
1008,
2009,
3957,
1996,
2783,
26994,
1008,
2009,
3957,
1996,
4539,
26994,
1008,
2009,
3957,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
using System;
namespace Utilities.Extensions
{
public static class ExceptionExtensions
{
public static Exception GetOriginalException(this Exception ex)
{
if (ex.InnerException == null) return ex;
return ex.InnerException.GetOriginalException();
}
public static string GetLogMessage(this Exception ex)
{
if (ex.InnerException == null) return "";
return string.Format("{0} > {1} ", ex.InnerException.Message, GetLogMessage(ex.InnerException));
}
}
} | nbouilhol/bouilhol-lib | Utilities/Utilities/Extensions/ExceptionExtensions.cs | C# | mit | 562 | [
30522,
2478,
2291,
1025,
3415,
15327,
16548,
1012,
14305,
1063,
2270,
10763,
2465,
6453,
10288,
29048,
2015,
1063,
2270,
10763,
6453,
2131,
10050,
24965,
10288,
24422,
1006,
2023,
6453,
4654,
1007,
1063,
2065,
1006,
4654,
1012,
5110,
10288,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.ResourceManager.Models
{
using System.Linq;
/// <summary>
/// Deployment operation information.
/// </summary>
public partial class DeploymentOperation
{
/// <summary>
/// Initializes a new instance of the DeploymentOperation class.
/// </summary>
public DeploymentOperation() { }
/// <summary>
/// Initializes a new instance of the DeploymentOperation class.
/// </summary>
/// <param name="id">Full deployment operation ID.</param>
/// <param name="operationId">Deployment operation ID.</param>
/// <param name="properties">Deployment properties.</param>
public DeploymentOperation(string id = default(string), string operationId = default(string), DeploymentOperationProperties properties = default(DeploymentOperationProperties))
{
Id = id;
OperationId = operationId;
Properties = properties;
}
/// <summary>
/// Gets full deployment operation ID.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "id")]
public string Id { get; private set; }
/// <summary>
/// Gets deployment operation ID.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "operationId")]
public string OperationId { get; private set; }
/// <summary>
/// Gets or sets deployment properties.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties")]
public DeploymentOperationProperties Properties { get; set; }
}
}
| ScottHolden/azure-sdk-for-net | src/SDKs/Resource/Management.ResourceManager/Generated/Models/DeploymentOperation.cs | C# | mit | 1,977 | [
30522,
1013,
1013,
9385,
1006,
1039,
1007,
7513,
3840,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
7000,
2104,
1996,
10210,
6105,
1012,
2156,
6105,
1012,
19067,
2102,
1999,
1996,
2622,
7117,
2005,
1013,
1013,
6105,
2592,
1012,
1013,
1013,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
## VERSION 1.1.5
#### GENERAL:
- Created changelog
#### CSS:
- Added emoji-picker CSS
- Fixed highlight CSS
## VERSION 1.1.6
#### CSS:
- Added scrollbar CSS for public server list
## VERSION 1.1.7
#### GENERAL:
- Added link to changelog
- Added link to a preview image
#### CSS:
- Added notification badge CSS for friends list
- Fixed friends list avatars on user profiles
## VERSION 1.1.8
#### CSS:
- Reworked checkbox CSS
- Changed slider CSS
- Changed radio button CSS
- Added twitch streaming CSS
## VERSION 1.1.9
#### GENERAL:
- Updated theme description
- Updated commented info in code
- Added link to DRB RemoveShadows theme
- Reworked changelog
#### CSS:
- Reworked settings tab bar CSS
- Adjusted alt checkbox CSS
- Fixed text CSS next to checkboxes
- Fixed searchbar CSS
## VERSION 1.2.0
(Release: 21/06/2016)
#### GENERAL:
- Moved to GitHub
- Updated links
#### CSS:
- Added button onclick animations
- Added shadow to checkbox switch
- Adjusted user profile background image brightness
- Fixed activity text on user profiles
- Fixed alt checkbox CSS
## VERSION 1.2.1
(Release: 22/06/2016)
#### CSS:
- Reworked account buttons
- Reworked voice connection buttons
- Reworked icons
- Reworked add server button
- Added emote picker onklick animations
- Adjusted user settings background CSS
## VERSION 1.2.2
(Release: 24/06/2016)
#### GENERAL:
- Replaced screenshots
- Added new screenshots
- Added info to use dark theme & dark mode
#### CSS:
- Added symbols to settings tab bars
- Added pinned messages CSS
- Added background to active header buttons
- Added BetterDiscord loading bar CSS
- Adjusted Download Apps window CSS
- Adjusted theme picker CSS
- Fixed channel icon button position issues
- Fixed voice connection buttons opacity
- Fixed account buttons opacity
- Fixed public serverlist backgrounds
- Fixed mutual server icons on friends list issues
- Fixed emote sorting issues
- Fixed background colors in public server list
## VERSION 1.2.3
(Release: 27/06/2016)
#### CSS:
- Added jump to present bar CSS
- Added guild placeholder CSS
- Added symbols to settings tab bars for browser and mac
- Added voice connection sparkline CSS
- Adjusted BetterDiscord loading bar CSS
- Adjusted changelog window CSS
- Adjusted Download Apps window CSS
- Adjusted guilds add window CSS
- Fixed wrong symbols showing up for browser and mac
- Fixed highlight CSS issues
- Fixed icon/button sizing issues
## VERSION 1.2.4
(Release: 29/06/2016)
#### GENERAL:
- Added new red "Ruby" theme
- Renamed "Ruby" theme to "Amber"
- Updated backgrounds to higher resolutions
- Beautified CSS
- Shortened URLs
#### CSS:
- Added clock plugin CSS
- Fixed slider handle positions
## VERSION 1.2.5
(Release: 02/07/2016)
#### GENERAL:
- Changed versioning system
- Added release dates to changelog
- Added former version numbers to changelog
#### CSS:
- Added icons for titlebar buttons
- Added icons for header toolbar buttons
- Added hover animations for account buttons
- Added hover & popout animations for voice connection buttons
- Adjusted & blurred user profile & user popout backgrounds
- Adjusted hamburger button color
- Changed titlebar button hover colors
- Removed channel name capitalizing
## VERSION 1.2.6
(Release: 04/07/2016)
#### GENERAL:
- Updated screenshots
#### CSS:
- Added mute button hover animation
- Added user name hover CSS
- Added user popout roles hover CSS
- Added jump to pinned message animation
- Added emoji fav button CSS
- Added emoji remove popout CSS
- Changed user popout icons
- Changed search bar icon CSS
- Adjusted & blurred detached custom css container background
- Adjusted user settings borders
- Adjusted user profile borders
- Adjusted bot & aka tag background
- Adjusted several colors
- Fixed wrong button icons showing in private chat
- Fixed account & voice connection position issues
- Fixed confirm button onclick animation
- Fixed settings tab bar scroll issues
- Fixed avatars not sizing correctly
- Removed several unnecessary, no longer working lines
## VERSION 1.2.7
(Release: 07/07/2016)
#### GENERAL:
- Added support for more browsers (webkit)
#### CSS:
- Added new icons in channels
- Added image download button CSS
- Added mention highlight CSS
- Added link hover CSS
- Added toolbar badge CSS
- Changed friends guild & friend channel icons
- Adjusted & blurred public server list background
- Adjusted avatar uploader CSS
- Adjusted highlight hover CSS
- Adjusted server settings connection link CSS
- Adjusted user settings keybinds CSS
- Adjusted cancel button CSS
- Adjusted tab bar button sizing & positions
- Adjusted & fixed disabled checkbox CSS
- Fixed emoji picker onclick issues
- Fixed link hover CSS
- Minor changes & fixes
## VERSION 1.2.8
(Release: 10/07/2016)
#### GENERAL:
- Better support for light theme
- Removed unnecessary CSS
- Shortened & optimized CSS
#### CSS:
- Changed pin icon
- Changed new messages CSS
- Added & adjusted user settings connections CSS
- Adjusted titlebar & header toolbar icons sizes
- Adjusted background image gradients
- Adjusted custom css container
- Adjusted code cursor color
- Minor changes & fixes
## VERSION 1.3.0
(Release: 16/07/2016)
#### GENERAL:
- Renamed themes to "Discord ReBorn"
- Optimized colors
- Updated screenshots
- Changed release dates
#### CSS:
- Added load animation
- Added recent mentions popout CSS
- Updated pinned messages popout CSS
- Added new recent mentions button icon
- Added several new icons
- Added user settings changelog link CSS
- Added & adjusted user settings CSS
- Added animations to user settings
- Changed & fixed search bar icon CSS
- Adjusted & fixed changelog CSS
- Adjusted highlight CSS
- Adjusted search bar CSS
- Adjusted discriminator CSS
- Fixed button icons
## VERSION 1.3.1
(Release: 21/07/2016)
#### GENERAL:
- New background image for Sapphire
- Toned Sapphire colors to fit new background
- Updated Sapphire screenshots
- Updated theme descriptions
- Added credit to Hammock (Omniscient used parts of his theme)
- Updated RemoveShadows theme link
#### CSS:
- Reworked background image CSS
- Removed old load animation
- Added new load animation
- Added fade in animation
- Added Dev mark CSS
- Added copy button CSS
- Added message delete code CSS
- Added new delete channel icon
- Added new color picker icon
- Added new notification settings modal icons
- Added scroller feathers
- Added channel sorting CSS
- Added unblock button CSS
- Added nickname change warning CSS
- Added transitions to chat buttons
- Changed guild header drop down CSS
- Changed BetterDiscord plugin/theme list CSS
- Fixed user settings changelog link
- Fixed animations causing text rendering issues
- Fixed custom css editor CSS
- Minor adjustements & fixes
## VERSION 1.3.1b
(Release: 23/07/2016)
#### CSS:
- Fixed backgrounds not showing for browsers and custom CSS
## VERSION 1.3.2
(Release: 09/08/2016)
#### GENERAL:
- Created Discord ReBorn Discord server
- Moved icons to github
- Updated screenshots
#### CSS:
- Added Call CSS
- Added EBR CSS
- Added new create group modal CSS
- Added new create group icon
- Added new start call icon
- Added new add to group icon
- Adjusted quicksave button CSS
- Fixed wrong icons showing
- Fixed button sizing issues
- Fixed voice debug issues
- Minor adjustements & fixes
## VERSION 2.0.0
(Release: 11/08(2016)
#### GENERAL:
- Renamed theme series to "ClearVision"
- Added CSS variables for colors and background
- Better support for non-BD Dark
- Moved images to github
- Moved screenshots to github
- Updated screenshots
#### CSS:
- Added upload modal CSS
- Added drag & drop modal CSS
- Removed "channel members loading" image
- Adjusted copy button CSS
- Fixed BetterDiscord buttons
- Fixed user popout discriminator height
- Fixed server settings member list ClearVision Dev mark
- Minor adjustements & fixes
## VERSION 2.0.1
(Release: 17/08/2016)
#### GENERAL:
- Beautified changelog
- Removed former version numbers from changelog
- Updated changelog link
#### CSS:
- Renamed "basic-color" variable to "main-color"
- Added channel textarea focus CSS
- Added web invite modal icons
- Added download apps button CSS
- Added authenticate modal CSS
- Added invite accept CSS
- Fixed user profile scrollbar CSS
- Fixed bot tag
- Minor adjustements & fixes
## VERSION 2.1.0
(Release: 20/08/2016)
#### GENERAL:
- Added light version of the theme for light appearance
- Better support for light theme
- Moved themes into own folder
- Updated screenshots
- Updated links
- Removed "Fixes & adjustements by Zerthox" note
#### CSS:
- Added info to appereance tab in settings
- Added CSS from dark theme to light theme
- Fixed text channel hover CSS
- Minor adjustemens & fixes
## VERSION 2.1.1
(Release: 20/08/2016)
#### CSS:
- Fixed group channel toolbar icons
## VERSION 2.2.0
(Release: 30/08/2016)
#### GENERAL:
- Added info for customization to the readme
- Darkened light version of the theme for better readability
- Nearly full support for light theme
- Added light version screenshots
#### CSS:
- Made pinned messages clickable
- Added flashing unread guild marker animation
- Added flashing badge animation
- Added selected call guild CSS
- Added selected call guild animation
- Added invite modal CSS
- Added CSS syntax highlighting
- Added notice close icon
- Added system message pin icon
- Added system message link CSS
- Added icon friends transition
- Adjusted EBR CSS
- Adjusted header toolbar button transitions
- Fixed user popout username CSS
- Fixed user popout bot tag CSS
- Fixed EBR CSS issues
- Minor adjustements & fixes
## VERSION 2.3.0
(Release: 02/09/2016)
#### GENERAL:
- Sorted little parts of CSS
- Fixed issues with new Discord version
#### CSS:
- Added user popout CSS to light version
- Added detected accounts modal CSS
- Added friend add page CSS
- Added friend synchronization button CSS
- Added friend synchronization button icons
- Lightened user popout for better readability
- Adjusted connection page CSS
- Fixed text rendering issues
- Fixed user profile modal
- Fixed user popout
- Fixed chat dividers
- Fixed user popout quick message
- Fixed friends guild issues
- Several little fixes
- Minor adjustements
## VERSION 2.3.1
(Release: 05/09/2016)
#### CSS:
- Reworked Dev mark
- Added user profile modal icons
- Added pseudo element syntax highlighting
- Adjusted inline code block CSS
- Adjusted multi-line code block CSS
- Adjusted BetterDiscord theme/plugin list CSS
- Fixed emote picker custom emotes
## VERSION 3.0.0
(Release: 07/09/2016)
#### GENERAL:
- Theme now automatically loads the newest version from github
- Updated theme description
- Added links to theme description
#### CSS:
- Added friend list button icons
- Added friend list discriminator transition
- Changed BetterDiscord settings tab icon
- Adjusted friend list name column width
- Fixed discriminator position
- Fixed bot tag position
- Minor adjustements & fixes
## VERSION 3.0.1
(Release: 07/09/2016)
#### CSS:
- Added user popout Dev mark hover CSS
- Adjusted member roles overflow
- Adjusted emoji picker category CSS
- Fixed settings input CSS
- Fixed voice debug modal CSS
- Fixed bot tag & discriminator issues
- Minor adjustements & fixes
## VERSION 3.0.2
(Release: 11/09/2016)
#### CSS:
- Added keyboard shorcut modal CSS
- Added broken image CSS
- Added role add button icon
- Added update checking icon
- Adjusted friend list border colors
- Fixed emoji picker diversity selector CSS
- Fixed emoji picker dimmer CSS
- Fixed custom css editor selection
- Fixed issues with BetterDiscord Minimal Mode
- Fixed issues with friend page buttons
- Minor adjustements & fixes
## VERSION 3.0.3
(Release: 16/09/16)
#### CSS:
- Added context menu animation
- Added user popout animation
- Added file upload button icon
- Added file icons (chat & modal)
- Added progress bar CSS
- Adjusted titlebar topic link CSS
- Adjusted titlebar topic highlight CSS
- Fixed voice debug selected list CSS
- Fixed broken image CSS
- Fixed pin & mention popout issues
- Minor adjustements & fixes
## VERSION 3.0.4
(Release: 24/09/16)
### CSS:
- Added context menu item sub menu animation
- Added account avatar hover animation
- Adjusted Dev mark CSS
- Adjusted seperator colors
- Adjusted popout backgrounds for better readability
- Fixes for light version
- Fixes for message popouts
- Fixed voice debug modal CSS
- Fixed search bar clear button CSS
- Fixed chat bot tag color
- Minor adjustements & fixes
## VERSION 3.1.0
(Release: 17/09/16)
### GENERAL:
- Better support for webkit browsers
- Removed unnecessary CSS
### CSS:
- Added guild settings tab bar icons
- Added popout menu CSS
- Added status picker menu CSS
- Added channel notice CSS
- Added instant invite modal CSS
- Added new messages indicator CSS
- Updated CSS syntax highlighting
- Made channel textarea & message edit boxes scrollable
- Adjusted more seperator colors
- Adjusted status dot shadows
- Fixed account avatar hover animation
- Fixed issues with account avatar hover animation & account discriminator hover animation
- Fixed an issue with user names in chat
- Minor adjustements & fixes
## VERSION 3.1.1
(Release: 03/10/16)
### CSS:
- Added popout menu icons
- Added leave button hover & active animation
- Added custom css editor syntax highlighting
- Adjusted invite button CSS
- Adjusted context menu item CSS
- Adjusted role settings tab bar item CSS
- Fixed CSS syntax highlighting
- Minor adjustements & fixes
## VERSION 3.2.0
(Release: 15/10/16)
### CSS:
- Added webhook settings page CSS
- Added color picker CSS
- Added BetterDiscord Dev mark
- Changed status dot CSS
- Changed Connections icon
- Changed Locale icon
- Adjusted ClearVision Dev mark
- Adjusted user popout & user profile CSS to allow easier rendering
- Adjusted & fixed image file icon
- Fixed issues with new Discord update
- Fixed loading image modal button positions
- Fixed issues with context menu
- Fixed light version context menu
- Minor adjustements & fixes
## VERSION 4.0.0
(Release: 25/10/16)
### GENERAL:
- Now loads CSS via GitCDN
- Added info for mods
- Darkened light version *(Old version available as mod)*
- Fixed issues with links
- Fixed issues with background image
- Fixed mistakes in CSS
- Removed unnecessary CSS
### CSS:
- Added channel textarea guard countdown CSS
- Added plugin settings popout CSS
- Added Linenumber plugin CSS
- Added info notice CSS
- Reworked dropdown CSS
- Reworked select input CSS
- Reworked shorcut recorder CSS
- Adjusted minimal mode CSS
- Adjusted add friend input CSS
- Fixed several issues with minimal mode
- Fixed custom CSS syntax highlighting
- Fixed issues with account
- Fixed issues with cancel button
- Fixed webhook message CSS
- Fixes for light version
- Minor adjustements & fixes
## VERSION 4.1.0
(Release: 06/11/16)
### CSS:
- Added reactions buttons CSS
- Added pinned messages & recent mentions animation
- Added emote menu animation
- Added embed video actions icons
- Added Spectrum Colorpicker CSS
- Adjusted menu & popout animations
- Adjusted link hover CSS
- Adjusted Dev mark CSS
- Fixed issues with invite button
- Fixed issues with compact appearance
- Fixed issues with codeblocks in popouts
- Fixed issues with Owner Tags plugin
- Minor adjustements & fixes
## VERSION 4.1.1
(Release: 18/11/2016)
### CSS:
- Updated & adjsuted user profile modal CSS
- Updated embed links CSS
- Added verified icon
- Added update button icon
- Increased user profile max name length
- Fixed issues with new Discord update
- Fixed issues with emotes
- Minor adjustements & fixes
## VERSION 4.2.0
(Release: 02/12/2016)
### GENERAL:
- Added min CSS
- Themes now load min CSS
### CSS:
- Reworked role CSS
- Reworked add role button CSS
- Added quoter plugin CSS
- Adjusted broken emote & emoji CSS
- Adjusted link & highlight hover CSS
- Adjusted embed CSS
- Fixed issues with popout menus
- Fixed missing system message icon
- Fixed issues with Group DM
- Minor adjustements & fixes
## VERSION 4.2.1
(Release: 25/12/16)
### CSS:
- Adjusted guild error CSS
- Adjusted tooltip error CSS
- Adjusted cancel button CSS
- Adjusted & fixed linenumbers CSS
- Adjusted codeblock width
- Adjusted embed CSS
- Fixed issues with new Discord update
- Fixed issues with guild transitions
- Fixed issues with private channels
- Fixed verified icon
- Removed unread animation
- Removed unnecessary CSS
- Minor adjustements & fixes
## VERSION 5.0.0
(Release: 15/01/2017)
### GENERAL:
- Added background image brightness CSS variable
- Added background image blur CSS variable
- Adjusted comment info in code
### CSS:
- Added Discord search CSS
- Added reactions modal CSS
- Added Discord Nitro mark
- Added custom GIF badge
- Adjusted background image position
- Fixed input CSS
- Fixed channel scroller flickering issues
## VERSION 5.0.1
(Release: 16/01/2017)
### CSS:
- Fixed backdrop position
- Fixed GIF border radius
## VERSION 5.0.2
(Release: 25/01/2017)
### CSS:
- Adjusted search CSS
- Fixed issues with new Discord update
- Fixed user settings icons
- Minor adjustements & fixes
## VERSION 5.0.3
(Release: 06/02/2017)
### CSS:
- Added search highlight CSS
- Added plugin settings textarea CSS
- Adjusted & fixed search CSS
- Fixed issues with background
- Fixed issues with textarea colors
- Minor adjustements & fixes
## VERSION 5.1.0
(Release: 17/03/2017)
### CSS:
- Added security settings CSS
- Added Nitro settings CSS
- Added SendEmbeds CSS
- Added Quoter CSS
- Added status dot transitions
- Improved support for light theme
- Adjusted & fixed search CSS
- Adjusted button CSS
- Adjusted invite button CSS
- Adjusted system message icons
- Fixed textarea focus CSS
- Fixed pulse animations
- Fixed keyboard shorcut modal CSS
- Fixed issues with light theme
- Minor adjustements & fixes
## VERSION 5.1.1
(Release: 09/04/2017)
### CSS:
- Adjusted highlight CSS
- Fixed backdrop filter performance issues
- Fixed server settings tab bar icons
- Fixed private call region select modal
- Fixed private call icons
- Fixed pulsate animations
- Fixed selected guild marker issues
- Minor adjustements & fixes
## VERSION 5.1.2
(Release: 26/04/2017)
### CSS:
- Added private group icon
- Fixed issues with latest Discord update
- Fixed toolbar buttons
- Fixed quickswitcher CSS
- Fixed issues with light theme
## VERSION 5.2.0
(Release: 09/05/2017)
### CSS:
- Added new settings CSS
- Added new notification modal CSS
- Added new webhook modal CSS
- Added NSFW warning CSS
- Fixed custom CSS editor CSS
- Fixed issues with Discord update
- Fixed issues with BetterDiscord update
- Fixed issues with quoter CSS
## VERSION 5.2.1
(Release: 09/05/2017)
### CSS:
- Made light version lighter
- Fixed search CSS
- Fixed button colors
## VERSION 5.2.2
(Release: 13/05/2017)
### CSS:
- Add social links CSS
- Fix user settings image filters
- Fix button colors
- Fix issues with latest Discord Canary update
## Version 5.2.3
(Release: Upcoming)
### CSS:
- Add emoji premium promo CSS
- Fixed quickswitcher CSS
- Fixed connection popout CSS
- Fixed connection debug modal CSS
- Fixed custom CSS editor scroller color
- Fixed settings scroller colors | just4you51/Emerald-J4Y | Changelog.md | Markdown | mit | 19,122 | [
30522,
1001,
1001,
2544,
1015,
1012,
1015,
1012,
1019,
1001,
1001,
1001,
1001,
2236,
1024,
1011,
2580,
2689,
21197,
1001,
1001,
1001,
1001,
20116,
2015,
1024,
1011,
2794,
7861,
29147,
2072,
1011,
4060,
2121,
20116,
2015,
1011,
4964,
12944,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
* Contains the main classes. Abstractions are placed in a sub-package.<p>
*
* The following image illustrates how the most important main classes and their abstractions are related:
*
* <div style="clear: both; text-align: center;" class="separator">
<img border="0" src="../../../resources/classDiagram.png">
</div>
*/
package ch.codebulb.lambdaomega;
| codebulb/LambdaOmega | src/main/java/ch/codebulb/lambdaomega/package-info.java | Java | bsd-3-clause | 370 | [
30522,
1013,
1008,
1008,
1008,
3397,
1996,
2364,
4280,
1012,
24504,
2015,
2024,
2872,
1999,
1037,
4942,
30524,
1008,
1996,
2206,
3746,
24899,
2129,
1996,
2087,
2590,
2364,
4280,
1998,
2037,
24504,
2015,
2024,
3141,
1024,
1008,
1008,
1026,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
module Runcible
VERSION = '2.13.1'.freeze
end
| Katello/runcible | lib/runcible/version.rb | Ruby | mit | 48 | [
30522,
11336,
2448,
6895,
3468,
2544,
1027,
1005,
1016,
1012,
2410,
1012,
1015,
1005,
1012,
13184,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cassandra.config;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.*;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Sets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.cassandra.cql3.functions.Functions;
import org.apache.cassandra.cql3.functions.UDAggregate;
import org.apache.cassandra.cql3.functions.UDFunction;
import org.apache.cassandra.db.*;
import org.apache.cassandra.db.Keyspace;
import org.apache.cassandra.db.commitlog.CommitLog;
import org.apache.cassandra.db.compaction.CompactionManager;
import org.apache.cassandra.db.marshal.UserType;
import org.apache.cassandra.io.sstable.Descriptor;
import org.apache.cassandra.schema.LegacySchemaTables;
import org.apache.cassandra.service.MigrationManager;
import org.apache.cassandra.utils.ConcurrentBiMap;
import org.apache.cassandra.utils.Pair;
import org.cliffc.high_scale_lib.NonBlockingHashMap;
public class Schema
{
private static final Logger logger = LoggerFactory.getLogger(Schema.class);
public static final Schema instance = new Schema();
/**
* longest permissible KS or CF name. Our main concern is that filename not be more than 255 characters;
* the filename will contain both the KS and CF names. Since non-schema-name components only take up
* ~64 characters, we could allow longer names than this, but on Windows, the entire path should be not greater than
* 255 characters, so a lower limit here helps avoid problems. See CASSANDRA-4110.
*/
public static final int NAME_LENGTH = 48;
/* metadata map for faster keyspace lookup */
private final Map<String, KSMetaData> keyspaces = new NonBlockingHashMap<>();
/* Keyspace objects, one per keyspace. Only one instance should ever exist for any given keyspace. */
private final Map<String, Keyspace> keyspaceInstances = new NonBlockingHashMap<>();
/* metadata map for faster ColumnFamily lookup */
private final ConcurrentBiMap<Pair<String, String>, UUID> cfIdMap = new ConcurrentBiMap<>();
private volatile UUID version;
// 59adb24e-f3cd-3e02-97f0-5b395827453f
public static final UUID emptyVersion;
static
{
try
{
emptyVersion = UUID.nameUUIDFromBytes(MessageDigest.getInstance("MD5").digest());
}
catch (NoSuchAlgorithmException e)
{
throw new AssertionError();
}
}
/**
* Initialize empty schema object and load the hardcoded system tables
*/
public Schema()
{
load(SystemKeyspace.definition());
}
/** load keyspace (keyspace) definitions, but do not initialize the keyspace instances. */
public Schema loadFromDisk()
{
load(LegacySchemaTables.readSchemaFromSystemTables());
updateVersion();
return this;
}
/**
* Load up non-system keyspaces
*
* @param keyspaceDefs The non-system keyspace definitions
*
* @return self to support chaining calls
*/
public Schema load(Collection<KSMetaData> keyspaceDefs)
{
for (KSMetaData def : keyspaceDefs)
load(def);
return this;
}
/**
* Load specific keyspace into Schema
*
* @param keyspaceDef The keyspace to load up
*
* @return self to support chaining calls
*/
public Schema load(KSMetaData keyspaceDef)
{
for (CFMetaData cfm : keyspaceDef.cfMetaData().values())
load(cfm);
setKeyspaceDefinition(keyspaceDef);
return this;
}
/**
* Get keyspace instance by name
*
* @param keyspaceName The name of the keyspace
*
* @return Keyspace object or null if keyspace was not found
*/
public Keyspace getKeyspaceInstance(String keyspaceName)
{
return keyspaceInstances.get(keyspaceName);
}
public ColumnFamilyStore getColumnFamilyStoreInstance(UUID cfId)
{
Pair<String, String> pair = cfIdMap.inverse().get(cfId);
if (pair == null)
return null;
Keyspace instance = getKeyspaceInstance(pair.left);
if (instance == null)
return null;
return instance.getColumnFamilyStore(cfId);
}
/**
* Store given Keyspace instance to the schema
*
* @param keyspace The Keyspace instance to store
*
* @throws IllegalArgumentException if Keyspace is already stored
*/
public void storeKeyspaceInstance(Keyspace keyspace)
{
if (keyspaceInstances.containsKey(keyspace.getName()))
throw new IllegalArgumentException(String.format("Keyspace %s was already initialized.", keyspace.getName()));
keyspaceInstances.put(keyspace.getName(), keyspace);
}
/**
* Remove keyspace from schema
*
* @param keyspaceName The name of the keyspace to remove
*
* @return removed keyspace instance or null if it wasn't found
*/
public Keyspace removeKeyspaceInstance(String keyspaceName)
{
return keyspaceInstances.remove(keyspaceName);
}
/**
* Remove keyspace definition from system
*
* @param ksm The keyspace definition to remove
*/
public void clearKeyspaceDefinition(KSMetaData ksm)
{
keyspaces.remove(ksm.name);
}
/**
* Given a keyspace name & column family name, get the column family
* meta data. If the keyspace name or column family name is not valid
* this function returns null.
*
* @param keyspaceName The keyspace name
* @param cfName The ColumnFamily name
*
* @return ColumnFamily Metadata object or null if it wasn't found
*/
public CFMetaData getCFMetaData(String keyspaceName, String cfName)
{
assert keyspaceName != null;
KSMetaData ksm = keyspaces.get(keyspaceName);
return (ksm == null) ? null : ksm.cfMetaData().get(cfName);
}
/**
* Get ColumnFamily metadata by its identifier
*
* @param cfId The ColumnFamily identifier
*
* @return metadata about ColumnFamily
*/
public CFMetaData getCFMetaData(UUID cfId)
{
Pair<String,String> cf = getCF(cfId);
return (cf == null) ? null : getCFMetaData(cf.left, cf.right);
}
public CFMetaData getCFMetaData(Descriptor descriptor)
{
return getCFMetaData(descriptor.ksname, descriptor.cfname);
}
/**
* Get metadata about keyspace by its name
*
* @param keyspaceName The name of the keyspace
*
* @return The keyspace metadata or null if it wasn't found
*/
public KSMetaData getKSMetaData(String keyspaceName)
{
assert keyspaceName != null;
return keyspaces.get(keyspaceName);
}
/**
* @return collection of the non-system keyspaces
*/
public List<String> getNonSystemKeyspaces()
{
return ImmutableList.copyOf(Sets.difference(keyspaces.keySet(), Collections.singleton(SystemKeyspace.NAME)));
}
/**
* Get metadata about keyspace inner ColumnFamilies
*
* @param keyspaceName The name of the keyspace
*
* @return metadata about ColumnFamilies the belong to the given keyspace
*/
public Map<String, CFMetaData> getKeyspaceMetaData(String keyspaceName)
{
assert keyspaceName != null;
KSMetaData ksm = keyspaces.get(keyspaceName);
assert ksm != null;
return ksm.cfMetaData();
}
/**
* @return collection of the all keyspace names registered in the system (system and non-system)
*/
public Set<String> getKeyspaces()
{
return keyspaces.keySet();
}
/**
* @return collection of the metadata about all keyspaces registered in the system (system and non-system)
*/
public Collection<KSMetaData> getKeyspaceDefinitions()
{
return keyspaces.values();
}
/**
* Update (or insert) new keyspace definition
*
* @param ksm The metadata about keyspace
*/
public void setKeyspaceDefinition(KSMetaData ksm)
{
assert ksm != null;
keyspaces.put(ksm.name, ksm);
}
/* ColumnFamily query/control methods */
/**
* @param cfId The identifier of the ColumnFamily to lookup
* @return The (ksname,cfname) pair for the given id, or null if it has been dropped.
*/
public Pair<String,String> getCF(UUID cfId)
{
return cfIdMap.inverse().get(cfId);
}
/**
* @param cfId The identifier of the ColumnFamily to lookup
* @return true if the CF id is a known one, false otherwise.
*/
public boolean hasCF(UUID cfId)
{
return cfIdMap.containsValue(cfId);
}
/**
* Lookup keyspace/ColumnFamily identifier
*
* @param ksName The keyspace name
* @param cfName The ColumnFamily name
*
* @return The id for the given (ksname,cfname) pair, or null if it has been dropped.
*/
public UUID getId(String ksName, String cfName)
{
return cfIdMap.get(Pair.create(ksName, cfName));
}
/**
* Load individual ColumnFamily Definition to the schema
* (to make ColumnFamily lookup faster)
*
* @param cfm The ColumnFamily definition to load
*/
public void load(CFMetaData cfm)
{
Pair<String, String> key = Pair.create(cfm.ksName, cfm.cfName);
if (cfIdMap.containsKey(key))
throw new RuntimeException(String.format("Attempting to load already loaded table %s.%s", cfm.ksName, cfm.cfName));
logger.debug("Adding {} to cfIdMap", cfm);
cfIdMap.put(key, cfm.cfId);
}
/**
* Used for ColumnFamily data eviction out from the schema
*
* @param cfm The ColumnFamily Definition to evict
*/
public void purge(CFMetaData cfm)
{
cfIdMap.remove(Pair.create(cfm.ksName, cfm.cfName));
cfm.markPurged();
}
/* Version control */
/**
* @return current schema version
*/
public UUID getVersion()
{
return version;
}
/**
* Read schema from system keyspace and calculate MD5 digest of every row, resulting digest
* will be converted into UUID which would act as content-based version of the schema.
*/
public void updateVersion()
{
version = LegacySchemaTables.calculateSchemaDigest();
SystemKeyspace.updateSchemaVersion(version);
}
/*
* Like updateVersion, but also announces via gossip
*/
public void updateVersionAndAnnounce()
{
updateVersion();
MigrationManager.passiveAnnounce(version);
}
/**
* Clear all KS/CF metadata and reset version.
*/
public synchronized void clear()
{
for (String keyspaceName : getNonSystemKeyspaces())
{
KSMetaData ksm = getKSMetaData(keyspaceName);
for (CFMetaData cfm : ksm.cfMetaData().values())
purge(cfm);
clearKeyspaceDefinition(ksm);
}
updateVersionAndAnnounce();
}
public void addKeyspace(KSMetaData ksm)
{
assert getKSMetaData(ksm.name) == null;
load(ksm);
Keyspace.open(ksm.name);
MigrationManager.instance.notifyCreateKeyspace(ksm);
}
public void updateKeyspace(String ksName)
{
KSMetaData oldKsm = getKSMetaData(ksName);
assert oldKsm != null;
KSMetaData newKsm = LegacySchemaTables.createKeyspaceFromName(ksName).cloneWith(oldKsm.cfMetaData().values(), oldKsm.userTypes);
setKeyspaceDefinition(newKsm);
Keyspace.open(ksName).createReplicationStrategy(newKsm);
MigrationManager.instance.notifyUpdateKeyspace(newKsm);
}
public void dropKeyspace(String ksName)
{
KSMetaData ksm = Schema.instance.getKSMetaData(ksName);
String snapshotName = Keyspace.getTimestampedSnapshotName(ksName);
CompactionManager.instance.interruptCompactionFor(ksm.cfMetaData().values(), true);
Keyspace keyspace = Keyspace.open(ksm.name);
// remove all cfs from the keyspace instance.
List<UUID> droppedCfs = new ArrayList<>();
for (CFMetaData cfm : ksm.cfMetaData().values())
{
ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(cfm.cfName);
purge(cfm);
if (DatabaseDescriptor.isAutoSnapshot())
cfs.snapshot(snapshotName);
Keyspace.open(ksm.name).dropCf(cfm.cfId);
droppedCfs.add(cfm.cfId);
}
// remove the keyspace from the static instances.
Keyspace.clear(ksm.name);
clearKeyspaceDefinition(ksm);
keyspace.writeOrder.awaitNewBarrier();
// force a new segment in the CL
CommitLog.instance.forceRecycleAllSegments(droppedCfs);
MigrationManager.instance.notifyDropKeyspace(ksm);
}
public void addTable(CFMetaData cfm)
{
assert getCFMetaData(cfm.ksName, cfm.cfName) == null;
KSMetaData ksm = getKSMetaData(cfm.ksName).cloneWithTableAdded(cfm);
logger.info("Loading {}", cfm);
load(cfm);
// make sure it's init-ed w/ the old definitions first,
// since we're going to call initCf on the new one manually
Keyspace.open(cfm.ksName);
setKeyspaceDefinition(ksm);
Keyspace.open(ksm.name).initCf(cfm.cfId, cfm.cfName, true);
MigrationManager.instance.notifyCreateColumnFamily(cfm);
}
public void updateTable(String ksName, String tableName)
{
CFMetaData cfm = getCFMetaData(ksName, tableName);
assert cfm != null;
boolean columnsDidChange = cfm.reload();
Keyspace keyspace = Keyspace.open(cfm.ksName);
keyspace.getColumnFamilyStore(cfm.cfName).reload();
MigrationManager.instance.notifyUpdateColumnFamily(cfm, columnsDidChange);
}
public void dropTable(String ksName, String tableName)
{
KSMetaData ksm = getKSMetaData(ksName);
assert ksm != null;
ColumnFamilyStore cfs = Keyspace.open(ksName).getColumnFamilyStore(tableName);
assert cfs != null;
// reinitialize the keyspace.
CFMetaData cfm = ksm.cfMetaData().get(tableName);
purge(cfm);
setKeyspaceDefinition(ksm.cloneWithTableRemoved(cfm));
CompactionManager.instance.interruptCompactionFor(Arrays.asList(cfm), true);
if (DatabaseDescriptor.isAutoSnapshot())
cfs.snapshot(Keyspace.getTimestampedSnapshotName(cfs.name));
Keyspace.open(ksm.name).dropCf(cfm.cfId);
MigrationManager.instance.notifyDropColumnFamily(cfm);
CommitLog.instance.forceRecycleAllSegments(Collections.singleton(cfm.cfId));
}
public void addType(UserType ut)
{
KSMetaData ksm = getKSMetaData(ut.keyspace);
assert ksm != null;
logger.info("Loading {}", ut);
ksm.userTypes.addType(ut);
MigrationManager.instance.notifyCreateUserType(ut);
}
public void updateType(UserType ut)
{
KSMetaData ksm = getKSMetaData(ut.keyspace);
assert ksm != null;
logger.info("Updating {}", ut);
ksm.userTypes.addType(ut);
MigrationManager.instance.notifyUpdateUserType(ut);
}
public void dropType(UserType ut)
{
KSMetaData ksm = getKSMetaData(ut.keyspace);
assert ksm != null;
ksm.userTypes.removeType(ut);
MigrationManager.instance.notifyDropUserType(ut);
}
public void addFunction(UDFunction udf)
{
logger.info("Loading {}", udf);
Functions.addFunction(udf);
MigrationManager.instance.notifyCreateFunction(udf);
}
public void updateFunction(UDFunction udf)
{
logger.info("Updating {}", udf);
Functions.replaceFunction(udf);
MigrationManager.instance.notifyUpdateFunction(udf);
}
public void dropFunction(UDFunction udf)
{
logger.info("Drop {}", udf);
// TODO: this is kind of broken as this remove all overloads of the function name
Functions.removeFunction(udf.name(), udf.argTypes());
MigrationManager.instance.notifyDropFunction(udf);
}
public void addAggregate(UDAggregate udf)
{
logger.info("Loading {}", udf);
Functions.addFunction(udf);
MigrationManager.instance.notifyCreateAggregate(udf);
}
public void updateAggregate(UDAggregate udf)
{
logger.info("Updating {}", udf);
Functions.replaceFunction(udf);
MigrationManager.instance.notifyUpdateAggregate(udf);
}
public void dropAggregate(UDAggregate udf)
{
logger.info("Drop {}", udf);
// TODO: this is kind of broken as this remove all overloads of the function name
Functions.removeFunction(udf.name(), udf.argTypes());
MigrationManager.instance.notifyDropAggregate(udf);
}
}
| LatencyUtils/cassandra-stress2 | src/java/org/apache/cassandra/config/Schema.java | Java | apache-2.0 | 17,822 | [
30522,
1013,
1008,
1008,
7000,
2000,
1996,
15895,
4007,
3192,
1006,
2004,
2546,
1007,
2104,
2028,
1008,
2030,
2062,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
1008,
5500,
2007,
2023,
2147,
2005,
3176,
2592,
1008,
4953,
9385,
6095,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
local PANEL = {}
local strAllowedNumericCharacters = "1234567890.-"
AccessorFunc( PANEL, "m_bAllowEnter", "EnterAllowed", FORCE_BOOL )
AccessorFunc( PANEL, "m_bUpdateOnType", "UpdateOnType", FORCE_BOOL ) -- Update the convar as we type
AccessorFunc( PANEL, "m_bNumeric", "Numeric", FORCE_BOOL )
AccessorFunc( PANEL, "m_bHistory", "HistoryEnabled", FORCE_BOOL )
AccessorFunc( PANEL, "m_bDisableTabbing", "TabbingDisabled", FORCE_BOOL )
AccessorFunc( PANEL, "m_FontName", "Font" )
AccessorFunc( PANEL, "m_bBorder", "DrawBorder" )
AccessorFunc( PANEL, "m_bBackground", "PaintBackground" )
AccessorFunc( PANEL, "m_bBackground", "DrawBackground" ) -- Deprecated
AccessorFunc( PANEL, "m_colText", "TextColor" )
AccessorFunc( PANEL, "m_colHighlight", "HighlightColor" )
AccessorFunc( PANEL, "m_colCursor", "CursorColor" )
Derma_Install_Convar_Functions( PANEL )
function PANEL:Init()
self:SetHistoryEnabled( false )
self.History = {}
self.HistoryPos = 0
--
-- We're going to draw these ourselves in
-- the skin system - so disable them here.
-- This will leave it only drawing text.
--
self:SetPaintBorderEnabled( false )
self:SetPaintBackgroundEnabled( false )
--
-- These are Lua side commands
-- Defined above using AccessorFunc
--
self:SetDrawBorder( true )
self:SetPaintBackground( true )
self:SetEnterAllowed( true )
self:SetUpdateOnType( false )
self:SetNumeric( false )
self:SetAllowNonAsciiCharacters( true )
-- Nicer default height
self:SetTall( 20 )
-- Clear keyboard focus when we click away
self.m_bLoseFocusOnClickAway = true
-- Beam Me Up Scotty
self:SetCursor( "beam" )
self:SetFont( "DermaDefault" )
end
function PANEL:IsEditing()
return self == vgui.GetKeyboardFocus()
end
function PANEL:OnKeyCodeTyped( code )
self:OnKeyCode( code )
if ( code == KEY_ENTER && !self:IsMultiline() && self:GetEnterAllowed() ) then
if ( IsValid( self.Menu ) ) then
self.Menu:Remove()
end
self:FocusNext()
self:OnEnter()
self.HistoryPos = 0
end
if ( self.m_bHistory || IsValid( self.Menu ) ) then
if ( code == KEY_UP ) then
self.HistoryPos = self.HistoryPos - 1
self:UpdateFromHistory()
end
if ( code == KEY_DOWN || code == KEY_TAB ) then
self.HistoryPos = self.HistoryPos + 1
self:UpdateFromHistory()
end
end
end
function PANEL:OnKeyCode( code )
end
function PANEL:ApplySchemeSettings()
self:SetFontInternal( self.m_FontName )
derma.SkinHook( "Scheme", "TextEntry", self )
end
function PANEL:GetTextColor()
return self.m_colText || self:GetSkin().colTextEntryText
end
function PANEL:GetHighlightColor()
return self.m_colHighlight || self:GetSkin().colTextEntryTextHighlight
end
function PANEL:GetCursorColor()
return self.m_colCursor || self:GetSkin().colTextEntryTextCursor
end
function PANEL:UpdateFromHistory()
if ( IsValid( self.Menu ) ) then
return self:UpdateFromMenu()
end
local pos = self.HistoryPos
-- Is the Pos within bounds?
if ( pos < 0 ) then pos = #self.History end
if ( pos > #self.History ) then pos = 0 end
local text = self.History[ pos ]
if ( !text ) then text = "" end
self:SetText( text )
self:SetCaretPos( text:len() )
self:OnTextChanged()
self.HistoryPos = pos
end
function PANEL:UpdateFromMenu()
local pos = self.HistoryPos
local num = self.Menu:ChildCount()
self.Menu:ClearHighlights()
if ( pos < 0 ) then pos = num end
if ( pos > num ) then pos = 0 end
local item = self.Menu:GetChild( pos )
if ( !item ) then
self:SetText( "" )
self.HistoryPos = pos
return
end
self.Menu:HighlightItem( item )
local txt = item:GetText()
self:SetText( txt )
self:SetCaretPos( txt:len() )
self:OnTextChanged( true )
self.HistoryPos = pos
end
function PANEL:OnTextChanged( noMenuRemoval )
self.HistoryPos = 0
if ( self:GetUpdateOnType() ) then
self:UpdateConvarValue()
self:OnValueChange( self:GetText() )
end
if ( IsValid( self.Menu ) && !noMenuRemoval ) then
self.Menu:Remove()
end
local tab = self:GetAutoComplete( self:GetText() )
if ( tab ) then
self:OpenAutoComplete( tab )
end
self:OnChange()
end
function PANEL:OnChange()
end
function PANEL:OpenAutoComplete( tab )
if ( !tab ) then return end
if ( #tab == 0 ) then return end
self.Menu = DermaMenu()
for k, v in pairs( tab ) do
self.Menu:AddOption( v, function() self:SetText( v ) self:SetCaretPos( v:len() ) self:RequestFocus() end )
end
local x, y = self:LocalToScreen( 0, self:GetTall() )
self.Menu:SetMinimumWidth( self:GetWide() )
self.Menu:Open( x, y, true, self )
self.Menu:SetPos( x, y )
self.Menu:SetMaxHeight( ( ScrH() - y ) - 10 )
end
function PANEL:Think()
self:ConVarStringThink()
end
function PANEL:OnEnter()
-- For override
self:UpdateConvarValue()
self:OnValueChange( self:GetText() )
end
function PANEL:UpdateConvarValue()
-- This only kicks into action if this variable has
-- a ConVar associated with it.
self:ConVarChanged( self:GetValue() )
end
function PANEL:Paint( w, h )
derma.SkinHook( "Paint", "TextEntry", self, w, h )
return false
end
function PANEL:PerformLayout()
derma.SkinHook( "Layout", "TextEntry", self )
end
function PANEL:SetValue( strValue )
-- Don't update if we're typing into it!
-- I'm sure a lot of people will want to reverse this behaviour :(
if ( vgui.GetKeyboardFocus() == self ) then return end
local CaretPos = self:GetCaretPos()
self:SetText( strValue )
self:OnValueChange( strValue )
self:SetCaretPos( CaretPos )
end
function PANEL:OnValueChange( strValue )
-- For Override
end
function PANEL:CheckNumeric( strValue )
-- Not purely numeric, don't run the check
if ( !self:GetNumeric() ) then return false end
-- God I hope numbers look the same in every language
if ( !string.find( strAllowedNumericCharacters, strValue, 1, true ) ) then
-- Noisy Error?
return true
end
return false
end
function PANEL:SetDisabled( bDisabled )
self:SetEnabled( !bDisabled )
end
function PANEL:GetDisabled( bDisabled )
return !self:IsEnabled()
end
function PANEL:AllowInput( strValue )
-- This is layed out like this so you can easily override and
-- either keep or remove this numeric check.
if ( self:CheckNumeric( strValue ) ) then return true end
end
function PANEL:SetEditable( b )
self:SetKeyboardInputEnabled( b )
self:SetMouseInputEnabled( b )
end
function PANEL:OnGetFocus()
--
-- These hooks are here for the sake of things like the spawn menu
-- which don't have key focus until you click on one of the text areas.
--
-- If you make a control for the spawnmenu that requires keyboard input
-- You should have these 3 functions in your panel, so it can handle it.
--
hook.Run( "OnTextEntryGetFocus", self )
end
function PANEL:OnLoseFocus()
self:UpdateConvarValue()
hook.Call( "OnTextEntryLoseFocus", nil, self )
end
function PANEL:OnMousePressed( mcode )
self:OnGetFocus()
end
function PANEL:AddHistory( txt )
if ( !txt || txt == "" ) then return end
table.RemoveByValue( self.History, txt )
table.insert( self.History, txt )
end
function PANEL:GetAutoComplete( txt )
-- for override. Return a table of strings.
end
function PANEL:GetInt()
return math.floor( tonumber( self:GetText() ) + 0.5 )
end
function PANEL:GetFloat()
return tonumber( self:GetText() )
end
function PANEL:GenerateExample( ClassName, PropertySheet, Width, Height )
local ctrl = vgui.Create( ClassName )
ctrl:SetText( "Edit Me!" )
ctrl:SetWide( 150 )
ctrl.OnEnter = function( self ) Derma_Message( "You Typed: " .. self:GetValue() ) end
PropertySheet:AddSheet( ClassName, ctrl, nil, true, true )
end
derma.DefineControl( "DTextEntry", "A simple TextEntry control", PANEL, "TextEntry" )
--[[---------------------------------------------------------
Clear the focus when we click away from us..
-----------------------------------------------------------]]
function TextEntryLoseFocus( panel, mcode )
local pnl = vgui.GetKeyboardFocus()
if ( !pnl ) then return end
if ( pnl == panel ) then return end
if ( !pnl.m_bLoseFocusOnClickAway ) then return end
pnl:FocusNext()
end
hook.Add( "VGUIMousePressed", "TextEntryLoseFocus", TextEntryLoseFocus )
| OctoEnigma/shiny-octo-system | lua/vgui/dtextentry.lua | Lua | mit | 8,156 | [
30522,
2334,
5997,
1027,
1063,
1065,
2334,
2358,
7941,
27663,
2094,
19172,
22420,
7507,
22648,
7747,
1027,
1000,
13138,
19961,
2575,
2581,
2620,
21057,
1012,
1011,
1000,
3229,
16347,
4609,
2278,
1006,
5997,
1010,
1000,
1049,
1035,
3608,
293... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.lki');
goog.require('Blockly.Msg');
Blockly.Msg.ADD_COMMENT = "گةپ دائن";
Blockly.Msg.AUTH = "لطفا ئئ اپلیکیشن را ثبت کةن و آثارتان فعال کةن تا ذخیره بو و اجازهٔ اشتراک نیائن توسط هؤمة بو";
Blockly.Msg.CHANGE_VALUE_TITLE = "تةغییر مقدار:";
Blockly.Msg.CHAT = "!وةگةرد هؤمکارةتان وة نام ئئ کادرة گةپ بةن";
Blockly.Msg.CLEAN_UP = "تمیزکردن بلاکةل";
Blockly.Msg.COLLAPSE_ALL = "چؤیچانن/پشکانن بلاکةل";
Blockly.Msg.COLLAPSE_BLOCK = "چؤیچانن/پشکانن بلاک";
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "رةنگ 1";
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "رةنگ 2";
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated
Blockly.Msg.COLOUR_BLEND_RATIO = "نسبت";
Blockly.Msg.COLOUR_BLEND_TITLE = "قاتی پاتی";
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "دو رنگ را با نسبت مشخصشده مخلوط میکند (۰٫۰ - ۱٫۰)";
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/رةنگ";
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "رةنگێ إژ تةختة رةنگ انتخاب کةن";
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
Blockly.Msg.COLOUR_RANDOM_TITLE = "رةنگ بةختةکی";
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = ".رةنگئ بةختةکی انتخاب کةن";
Blockly.Msg.COLOUR_RGB_BLUE = "کاوو";
Blockly.Msg.COLOUR_RGB_GREEN = "سؤز";
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated
Blockly.Msg.COLOUR_RGB_RED = "سۆر";
Blockly.Msg.COLOUR_RGB_TITLE = "رةنگ وة";
Blockly.Msg.COLOUR_RGB_TOOLTIP = "ساخت یک رنگ با مقدار مشخصشدهای از سۆر، سؤز و کاوو. همهٔ مقادیر باید بین ۰ تا ۱۰۰ باشند.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "شکانِن حلقه";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "ادامه با تکرار بعدی حلقه";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "شکستن حلقهٔ شامل.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "پریدن از بقیهٔ حلقه و ادامه با تکرار بعدی.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "اخطار: این بلوک ممکن است فقط داخل یک حلقه استفاده شود.";
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
Blockly.Msg.CONTROLS_FOREACH_TITLE = "ئةرا هر مورد %1 وۀ نام لیست%2";
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "برای هر مورد در این فهرست، تنظیم متغیر «%1» به مورد و انجام تعدادی عبارت.";
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
Blockly.Msg.CONTROLS_FOR_TITLE = "با تعداد %1 از %2 به %3 با گامهای %4";
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "متغیر %1 را در مقادیر شروعشده از عدد انتهای به عدد انتهایی را دارد، با فواصل مشخصشده میشمارد و این بلوک مشخصشده را انجام میدهد.";
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "افزودن یک شرط به بلوک اگر.";
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "اضافهکردن نهایی، گرفتن همهٔ شرایط به بلوک اگر.";
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "افزودن، حذف یا بازمرتبسازی قسمتها برای پیکربندی دوبارهٔ این بلوک اگر.";
Blockly.Msg.CONTROLS_IF_MSG_ELSE = "آنگاه";
Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "اگر آنگاه";
Blockly.Msg.CONTROLS_IF_MSG_IF = "اگر";
Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "اگر یک مقدار صحیح است، سپس چند عبارت را انجام بده.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "اگر یک مقدار صحیح است، اول بلوک اول عبارات را انجام بده. در غیر این صورت بلوک دوم عبارات انجام بده.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "اگر مقدار اول صحیح بود، از آن بلوک اول عبارات را انجام بده. در غیر این صورت، اگر مقدار دوم صحیح است، بلوک دوم عبارات را انجام بده.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "اگر مقدار اول درست است، بلوک اول عبارات را انجام بده. در غیر این صورت، اگر مقدار دوم درست باشد بلوک دوم عبارات را انجام بده. اگر هیچ از مقادیر درست نبود، آخرین بلوک عبارات را انجام بده.";
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://lki.wikipedia.org/wiki/حلقه_فور";
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "انجوم بی";
Blockly.Msg.CONTROLS_REPEAT_TITLE = "%بار تکرار 1";
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "انجام چةن عبارت چندین گِل.";
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "تکرار تا وةختێ گإ";
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "تکرار در حالی که";
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "تا زمانی که یک مقدار ناصحیح است، چند عبارت را انجام بده.";
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "تا زمانی که یک مقدار صحیح است، چند عبارت را انجام بده.";
Blockly.Msg.DELETE_ALL_BLOCKS = "حةذف کؤل %1 بلاکةل?";
Blockly.Msg.DELETE_BLOCK = "پاک کردن بلاک";
Blockly.Msg.DELETE_X_BLOCKS = "حةذف %1 بلاکةل";
Blockly.Msg.DISABLE_BLOCK = "إ کار کةتن(غیرفعالسازی) بلاک";
Blockly.Msg.DUPLICATE_BLOCK = "کؤپی کردن";
Blockly.Msg.ENABLE_BLOCK = "إ کارآشتن(فعال)بلاک";
Blockly.Msg.EXPAND_ALL = "کةلنگآ کردِن بلاکةل";
Blockly.Msg.EXPAND_BLOCK = "کةلنگآ کردِن بلاک";
Blockly.Msg.EXTERNAL_INPUTS = "ورودیةل خروجی";
Blockly.Msg.HELP = "کؤمةک";
Blockly.Msg.INLINE_INPUTS = "ورودیةل نوم جا";
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "ایجاد فهرست خالی";
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "فهرستی با طول صفر شامل هیچ رکورد دادهای بر میگرداند.";
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "لیست";
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "اضافهکردن، حذفکردن یا ترتیبسازی مجدد بخشها این بلوک فهرستی.";
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "ایجاد فهرست با";
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "اضافهکردن یک مورد به فهرست.";
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "فهرستی از هر عددی از موارد میسازد.";
Blockly.Msg.LISTS_GET_INDEX_FIRST = "إژ أؤةل";
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# إژ دؤما آخر";
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#"; // untranslated
Blockly.Msg.LISTS_GET_INDEX_GET = "گِرتِن";
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "گِرتِن و حةذف کردن";
Blockly.Msg.LISTS_GET_INDEX_LAST = "دؤمائن/آخرین";
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "بةختةکی";
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "حةذف کردن";
Blockly.Msg.LISTS_GET_INDEX_TAIL = ""; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "اولین مورد یک فهرست را بر میگرداند.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "موردی در محل مشخص در فهرست بر میگرداند. #1 آخرین مورد است.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "موردی در محل مشخصشده بر میگرداند. #1 اولین مورد است.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "آخرین مورد در یک فهرست را بر میگرداند.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "یک مورد تصادفی در یک فهرست بر میگرداند.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "اولین مورد مشخصشده در فهرست را حذف و بر میگرداند.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "مورد در محل مشخصشده در فهرست را حذف و بر میگرداند. #1 آخرین مورد است.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "مورد در محل مشخصشده در فهرست را حذف و بر میگرداند. #1 اولین مورد است.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "آخرین مورد مشخصشده در فهرست را حذف و بر میگرداند.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "مورد تصادفیای را در فهرست حذف و بر میگرداند.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "اولین مورد را در یک فهرست حذف میکند.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "مورد مشخصشده در موقعیت مشخص در یک فهرست را حذف و بر میگرداند. #1 آخرین مورد است.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "مورد مشخصشده در موقعیت مشخص در یک فهرست را حذف و بر میگرداند. #1 اولین مورد است.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "آخرین مورد را در یک فهرست حذف میکند.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "یک مورد تصادفی را یک فهرست حذف میکند.";
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "به # از انتها";
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "به #";
Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "به آخرین";
Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated
Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "گرفتن زیرمجموعهای از ابتدا";
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "گرفتن زیرمجموعهای از # از انتها";
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "گرفتن زیرمجموعهای از #";
Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ""; // untranslated
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "کپی از قسمت مشخصشدهٔ لیست درست میکند.";
Blockly.Msg.LISTS_INDEX_OF_FIRST = "یافتن اولین رخداد مورد";
Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
Blockly.Msg.LISTS_INDEX_OF_LAST = "یافتن آخرین رخداد مورد";
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "شاخصی از اولین/آخرین رخداد مورد در فهرست را بر میگرداند. ۰ بر میگرداند اگر آیتم موجود نبود.";
Blockly.Msg.LISTS_INLIST = "در فهرست";
Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 خالی است";
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "اگر فهرست خالی است مقدار صجیج بر میگرداند.";
Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
Blockly.Msg.LISTS_LENGTH_TITLE = "طول %1";
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "طول یک فهرست را برمیگرداند.";
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg.LISTS_REPEAT_TITLE = "فهرستی با %1 تکرارشده به اندازهٔ %2 میسازد";
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "فهرستی شامل مقادیر دادهشدهٔ تکرار شده عدد مشخصشده میسازد.";
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "به عنوان";
Blockly.Msg.LISTS_SET_INDEX_INSERT = "درج در";
Blockly.Msg.LISTS_SET_INDEX_SET = "مجموعه";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "موردی به ته فهرست اضافه میکند.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "موردی در موقعیت مشخصشده در یک فهرست اضافه میکند. #1 آخرین مورد است.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "موردی در موقعیت مشخصشده در یک فهرست اضافه میکند. #1 اولین مورد است.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "موردی به ته فهرست الحاق میکند.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "مورد را به صورت تصادفی در یک فهرست میافزاید.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "اولین مورد در یک فهرست را تعیین میکند.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "مورد مشخصشده در یک فهرست را قرار میدهد. #1 آخرین مورد است.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "مورد مشخصشده در یک فهرست را قرار میدهد. #1 اولین مورد است.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "آخرین مورد در یک فهرست را تعیین میکند.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "یک مورد تصادفی در یک فهرست را تعیین میکند.";
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "ساخت لیست إژ متن";
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "ساخت متن إژ لیست";
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter.";
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter.";
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "همراه جداساز";
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "نادرست";
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "بازگرداندن یکی از صحیح یا ناصحیح.";
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "درست";
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "بازگشت صحیح اگر هر دو ورودی با یکدیگر برابر باشد.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "بازگرداندن صحیح اگر ورودی اول بزرگتر از ورودی دوم باشد.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "بازگرداندن صحیح اگر ورودی اول بزرگتر یا مساوی یا ورودی دوم باشد.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "بازگرداندن صحیح اگر ورودی اول کوچکتر از ورودی دوم باشد.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "بازگرداندن صحیح اگر ورودی اول کوچکتر یا مساوی با ورودی دوم باشد.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "برگرداندن صحیح اگر هر دو ورودی با یکدیگر برابر نباشند.";
Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated
Blockly.Msg.LOGIC_NEGATE_TITLE = "نه %1";
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "صجیج باز میگرداند اگر ورودی نا صحیح باشند. ناصحیح بازمیگرداند اگر ورودی صحیح باشد.";
Blockly.Msg.LOGIC_NULL = "پةتی/خالی";
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
Blockly.Msg.LOGIC_NULL_TOOLTIP = "تهی باز می گرداند";
Blockly.Msg.LOGIC_OPERATION_AND = "و";
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
Blockly.Msg.LOGIC_OPERATION_OR = "یا";
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "بازگرداندن صحیح اگر هر دو ورودی صحیح باشد.";
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "بازگرداندن صحیح اگر یکی از دو ورودی صحیح باشد.";
Blockly.Msg.LOGIC_TERNARY_CONDITION = "آزمائشت";
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "اگر نادرست";
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "اگر درست";
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "بررسی وضعیت در «آزمایش». اگر وضعیت صحیح باشد، مقدار «اگر صحیح» را بر میگرداند در غیر اینصورت مقدار «اگر ناصحیح» را.";
Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "بازگرداندن مقدار جمع دو عدد.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "بازگرداندن باقیماندهٔ دو عدد.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "بازگرداندن تفاوت دو عدد.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "بازگرداندن حاصلضرب دو عدد.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "بازگرداندن اولین عددی که از توان عدد دوم حاصل شده باشد.";
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
Blockly.Msg.MATH_CHANGE_TITLE = "تغییر %1 با %2";
Blockly.Msg.MATH_CHANGE_TOOLTIP = "افزودن یک عدد به متغیر '%1'.";
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant";
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "یکی از مقادیر مشترک را برمیگرداند: π (۳٫۱۴۱…)، e (۲٫۷۱۸...)، φ (۱٫۶۱۸)، sqrt(۲) (۱٫۴۱۴)، sqrt(۱/۲) (۰٫۷۰۷...) و یا ∞ (بینهایت).";
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated
Blockly.Msg.MATH_CONSTRAIN_TITLE = "محدودکردن %1 پایین %2 بالا %3";
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "محدودکردن یک عدد بین محدودیتهای مشخصشده (بسته).";
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "تقسیم شده بر";
Blockly.Msg.MATH_IS_EVEN = "زوج است";
Blockly.Msg.MATH_IS_NEGATIVE = "منفی است";
Blockly.Msg.MATH_IS_ODD = "فرد است";
Blockly.Msg.MATH_IS_POSITIVE = "مثبت است";
Blockly.Msg.MATH_IS_PRIME = "عدد اول است";
Blockly.Msg.MATH_IS_TOOLTIP = "بررسی میکند که آیا یک عدد زوج، فرد، اول، کامل، مثبت، منفی یا بخشپذیر عدد خاصی باشد را بررسی میکند. درست یا نادرست باز میگرداند.";
Blockly.Msg.MATH_IS_WHOLE = "کامل است";
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation";
Blockly.Msg.MATH_MODULO_TITLE = "باقیماندهٔ %1 + %2";
Blockly.Msg.MATH_MODULO_TOOLTIP = "باقیماندهٔ تقسیم دو عدد را بر میگرداند.";
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated
Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number";
Blockly.Msg.MATH_NUMBER_TOOLTIP = "شؤمارە یەک";
Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "میانگین فهرست";
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "بزرگترین فهرست";
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "میانهٔ فهرست";
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "گوجةرتةرین لیست";
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "مد فهرست";
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "مورد تصادفی از فهرست";
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "انحراف معیار فهرست";
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "جمع لیست";
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "میانگین (میانگین ریاضی) مقادیر عددی فهرست را بر میگرداند.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "بزرگترین عدد در فهرست را باز میگرداند.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "میانهٔ عدد در فهرست را بر میگرداند.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "کوچکترین عدد در فهرست را باز میگرداند.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "شایعترین قلم(های) در فهرست را بر میگرداند.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "موردی تصادفی از فهرست را بر میگرداند.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "انحراف معیار فهرست را بر میگرداند.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "جمع همهٔ عددهای فهرست را باز میگرداند.";
Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "کسر تصادفی";
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "بازگرداندن کسری تصادفی بین ۰٫۰ (بسته) تا ۱٫۰ (باز).";
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
Blockly.Msg.MATH_RANDOM_INT_TITLE = "عدد صحیح تصادفی بین %1 تا %2";
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "یک عدد تصادفی بین دو مقدار مشخصشده به صورت بسته باز میگرداند.";
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "گردکردن";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "گرد به پایین";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "گرد به بالا";
Blockly.Msg.MATH_ROUND_TOOLTIP = "گردکردن یک عدد به بالا یا پایین.";
Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root";
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "مطلق";
Blockly.Msg.MATH_SINGLE_OP_ROOT = "ریشهٔ دوم";
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "قدر مطلق یک عدد را بازمیگرداند.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "بازگرداندن توان e یک عدد.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "لوگاریتم طبیعی یک عدد را باز میگرداند.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "بازگرداندن لگاریتم بر پایهٔ ۱۰ یک عدد.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "منفیشدهٔ یک عدد را باز میگرداند.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "بازگرداندن توان ۱۰ یک عدد.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "ریشهٔ دوم یک عدد را باز میگرداند.";
Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated
Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated
Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated
Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated
Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated
Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions";
Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated
Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated
Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "بازگرداندن آرککسینوس درجه (نه رادیان).";
Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = ".(بازگرداندن آرکسینوس درجه (نه رادیان";
Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "بازگرداندن آرکتانژانت درجه (نه رادیان).";
Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "بازگرداندن کسینوس درجه (نه رادیان).";
Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "بازگرداندن سینوس درجه (نه رادیان).";
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "بازگرداندن تانژانت یک درجه (نه رادیان).";
Blockly.Msg.ME = "مإ";
Blockly.Msg.NEW_VARIABLE = "متغیر تازه...";
Blockly.Msg.NEW_VARIABLE_TITLE = "نام متغیر تازه:";
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "اجازه اظهارات";
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "با:";
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "اجرای تابع تعریفشده توسط کاربر «%1».";
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "اجرای تابع تعریفشده توسط کاربر «%1» و استفاده از خروجی آن.";
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "با:";
Blockly.Msg.PROCEDURES_CREATE_DO = "ساختن «%1»";
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Describe this function..."; // untranslated
Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated
Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "انجام چیزی";
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "به";
Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "تابعی میسازد بدون هیچ خروجی.";
Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "بازگشت";
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "تابعی با یک خروجی میسازد.";
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "اخطار: این تابعی پارامتر تکراری دارد.";
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "برجستهسازی تعریف تابع";
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "اگر یک مقدار صحیح است، مقدار دوم را برگردان.";
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "اخطار: این بلوک احتمالاً فقط داخل یک تابع استفاده میشود.";
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "نام ورودی:";
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "اضافه کردن ورودی به تابع.";
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "ورودیها";
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "افزودن، حذف یا دوباره مرتبکردن ورودی این تابع.";
Blockly.Msg.REDO = "Redo"; // untranslated
Blockly.Msg.REMOVE_COMMENT = "پاک کردن گةپةل/قِسةل";
Blockly.Msg.RENAME_VARIABLE = "تغییر نام متغیر...";
Blockly.Msg.RENAME_VARIABLE_TITLE = "تغییر نام همهٔ متغیرهای «%1» به:";
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "چسباندن متن";
Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg.TEXT_APPEND_TO = "به";
Blockly.Msg.TEXT_APPEND_TOOLTIP = "الحاق متنی به متغیر «%1».";
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "به حروف کوچک";
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "به حروف بزرگ عنوان";
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "به حروف بزرگ";
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "بازگرداندن کپی متن در حالتی متفاوت.";
Blockly.Msg.TEXT_CHARAT_FIRST = "گرفتن اولین حرف";
Blockly.Msg.TEXT_CHARAT_FROM_END = "گرفتن حرف # از آخر";
Blockly.Msg.TEXT_CHARAT_FROM_START = "گرفتن حرف #";
Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated
Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "در متن";
Blockly.Msg.TEXT_CHARAT_LAST = "گرفتن آخرین حرف";
Blockly.Msg.TEXT_CHARAT_RANDOM = "گرفتن حرف تصادفی";
Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "حرفی در موقعیت مشخصشده بر میگرداند.";
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "افزودن یک مورد به متن.";
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "نام نؤیسی";
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "اضافهکردن، حذف یا مرتبسازی بحشها برای تنظیم مجدد این بلوک متنی.";
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "به حرف # از انتها";
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "به حرف #";
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "به آخرین حرف";
Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "در متن";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "گرفتن زیرمتن از اولین حرف";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "گرفتن زیرمتن از حرف # به انتها";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "گرفتن زیرمتن از حرف #";
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "قسمت مشخصیشدهای از متن را بر میگرداند.";
Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated
Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "در متن";
Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "اولین رخداد متن را بیاب";
Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "آخرین رخداد متن را بیاب";
Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "شاخصی از اولین آخرین رخداد متن اول در متن دوم بر میگرداند. اگر متن یافت نشد ۰ باز میگرداند.";
Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 خالی است";
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "اضافهکردن صحیح اگر متن فراهمشده خالی است.";
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ایجاد متن با";
Blockly.Msg.TEXT_JOIN_TOOLTIP = "یک تکهای از متن را با چسپاندن همهٔ تعداد از موارد ایجاد میکند.";
Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg.TEXT_LENGTH_TITLE = "طول %1";
Blockly.Msg.TEXT_LENGTH_TOOLTIP = "بازگرداندن عددی از حروف (شامل فاصلهها) در متن فراهمشده.";
Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated
Blockly.Msg.TEXT_PRINT_TITLE = "چاپ %1";
Blockly.Msg.TEXT_PRINT_TOOLTIP = "چاپ متن، عدد یا هر مقدار دیگر مشخصشده.";
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "اعلان برای کاربر با یک عدد.";
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "اعلان برای کاربر برای یک متن.";
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "اعلان برای عدد با پیام";
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "اعلان برای متن با پیام";
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
Blockly.Msg.TEXT_TEXT_TOOLTIP = "یک حرف، کلمه یا خطی از متن.";
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "تراشیدن فاصلهها از هر دو طرف";
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "تراشیدن فاصلهها از طرف چپ";
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "تراشیدن فاصلهها از طرف چپ";
Blockly.Msg.TEXT_TRIM_TOOLTIP = "کپی از متن با فاصلههای حذفشده از یک یا هر دو پایان باز میگرداند.";
Blockly.Msg.TODAY = "ایمڕۆ";
Blockly.Msg.TYPE_WARN01 = "The variable '"; // untranslated
Blockly.Msg.TYPE_WARN02 = "' has been first assigned to the '"; // untranslated
Blockly.Msg.TYPE_WARN03 = "' type and this block tries to assign the type '"; // untranslated
Blockly.Msg.TYPE_WARN04 = "'!"; // untranslated
Blockly.Msg.UNDO = "Undo"; // untranslated
Blockly.Msg.VARIABLES_DEFAULT_NAME = "آیتم";
Blockly.Msg.VARIABLES_GET_CREATE_SET = "درستکردن «تنظیم %1»";
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
Blockly.Msg.VARIABLES_GET_TOOLTIP = "مقدار این متغیر را بر میگرداند.";
Blockly.Msg.VARIABLES_SET = "مجموعه %1 به %2";
Blockly.Msg.VARIABLES_SET_CREATE_GET = "درستکردن «گرفتن %1»";
Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
Blockly.Msg.VARIABLES_SET_TOOLTIP = "متغیر برابر با خروجی را مشخص میکند.";
Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE;
Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF;
Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE;
Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO;
Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF;
Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL;
Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT = Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT;
// Ardublockly strings
Blockly.Msg.ARD_180SERVO = "0~180 degree Servo (angle)"; // untranslated
Blockly.Msg.ARD_360SERVO = "0~360 degree Servo (rotation)"; // untranslated
Blockly.Msg.ARD_7SEGMENT_COMPONENT = "7-Segment Display"; // untranslated
Blockly.Msg.ARD_7SEGMENT_COMPONENT_TIP = "7-Segment LED Display can be used to show numbers and some characters. It has 7 segments and 1 dot, requiring 8 digital pins on the Arduino to use."; // untranslated
Blockly.Msg.ARD_7SEGMENT_COMPONENT_WARN = "Pin used in segment %1 is also present in one of the other segments! Change the pin number."; // untranslated
Blockly.Msg.ARD_7SEGMENT_WRITE = "show number"; // untranslated
Blockly.Msg.ARD_7SEGMENT_WRITESEG = "Set segment"; // untranslated
Blockly.Msg.ARD_7SEGMENT_WRITESEG_TIP = "Set a specific segment of the 7-Segment display high"; // untranslated
Blockly.Msg.ARD_7SEGMENT_WRITE_TIP = "Write a specific number to the 7-segment display. Number must be between 0 and 9, otherwise nothing is shown."; // untranslated
Blockly.Msg.ARD_ALLBOTSERVO_ANIMATE = "Move AllBot Servo "; // untranslated
Blockly.Msg.ARD_ALLBOTSERVO_ANIMATE_TIP = "Move Servo to a specified angle gradually over the animation duration. You can combine this with other servo movements"; // untranslated
Blockly.Msg.ARD_ALLBOTSERVO_WRITE = "Set AllBot Servo "; // untranslated
Blockly.Msg.ARD_ALLBOT_ANIMATE = "Animate AllBot"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANIMATESERVOS = "Servos"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANIMATESPEED = "Animation duration (ms):"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANIMATE_TIP = "Animate the allbot by moving different servos at the same time. Total duration of this animation can be set. A servo may have only one movement block present."; // untranslated
Blockly.Msg.ARD_ALLBOT_ANKLEFRONTLEFT = "ankleFrontLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANKLEFRONTRIGHT = "ankleFrontRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANKLELEFT = "ankleLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANKLEMIDDLELEFT = "ankleMiddleLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANKLEMIDDLERIGHT = "ankleMiddleRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANKLEREARLEFT = "ankleRearLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANKLEREARRIGHT = "ankleRearRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_ANKLERIGHT = "ankleRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_BACKWARD = "AllBot Backward:"; // untranslated
Blockly.Msg.ARD_ALLBOT_CHIRP = "AllBot Chirp:"; // untranslated
Blockly.Msg.ARD_ALLBOT_CHIRPSPEED = "beeps, beepspeed"; // untranslated
Blockly.Msg.ARD_ALLBOT_CHIRP_TIP = "Make the allbot chirp a number of beeps at the given speed (delay in microseconds, use 1 to 255)"; // untranslated
Blockly.Msg.ARD_ALLBOT_FORWARD = "AllBot Forward:"; // untranslated
Blockly.Msg.ARD_ALLBOT_HIPFRONTLEFT = "hipFrontLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_HIPFRONTRIGHT = "hipFrontRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_HIPLEFT = "hipLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_HIPMIDDLELEFT = "hipMiddleLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_HIPMIDDLERIGHT = "hipMiddleRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_HIPREARLEFT = "hipRearLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_HIPREARRIGHT = "hipRearRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_HIPRIGHT = "hipRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_KNEEFRONTLEFT = "kneeFrontLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_KNEEFRONTRIGHT = "kneeFrontRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_KNEEMIDDLELEFT = "kneeMiddleLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_KNEEMIDDLERIGHT = "kneeMiddleRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_KNEEREARLEFT = "kneeRearLeft"; // untranslated
Blockly.Msg.ARD_ALLBOT_KNEEREARRIGHT = "kneeRearRight"; // untranslated
Blockly.Msg.ARD_ALLBOT_LEFT = "AllBot Left:"; // untranslated
Blockly.Msg.ARD_ALLBOT_LOOKLEFT = "AllBot Look Left, speed (ms):"; // untranslated
Blockly.Msg.ARD_ALLBOT_LOOKRIGHT = "AllBot Look Right, speed (ms):"; // untranslated
Blockly.Msg.ARD_ALLBOT_LOOK_TIP = "Make the allbot look towards a specific direction with the given speed (ms)"; // untranslated
Blockly.Msg.ARD_ALLBOT_RC = "AllBot Remote Control Handling"; // untranslated
Blockly.Msg.ARD_ALLBOT_RCCOMMAND = "On receiving command "; // untranslated
Blockly.Msg.ARD_ALLBOT_RCCOMMANDS = "Commands "; // untranslated
Blockly.Msg.ARD_ALLBOT_RCCOMMAND_SINGLE = "This block must be inside an AllBot Remote Control block "; // untranslated
Blockly.Msg.ARD_ALLBOT_RCCOMMAND_TIP = "Set the actions the AllBot must do on receiving a command."; // untranslated
Blockly.Msg.ARD_ALLBOT_RCDO = "Do "; // untranslated
Blockly.Msg.ARD_ALLBOT_RCSERIAL = "Use Serial to view Commands"; // untranslated
Blockly.Msg.ARD_ALLBOT_RC_SPEED = "RC Speed"; // untranslated
Blockly.Msg.ARD_ALLBOT_RC_SPEED_TIP = "The speed as set in the Remote Control App"; // untranslated
Blockly.Msg.ARD_ALLBOT_RC_TIMES = "RC Times"; // untranslated
Blockly.Msg.ARD_ALLBOT_RC_TIMES_TIP = "The times (number of steps) as set in the Remote Control App"; // untranslated
Blockly.Msg.ARD_ALLBOT_RC_TIP = "A block to react to the AllBot Remote Control App on your smarthphone. Check Serial to see in the serial monitor what commands are received. Note: Your AllBot shield must be switched to RECEIVE after programming it."; // untranslated
Blockly.Msg.ARD_ALLBOT_RIGHT = "AllBot Right:"; // untranslated
Blockly.Msg.ARD_ALLBOT_SCARED = "AllBot Look Scared:"; // untranslated
Blockly.Msg.ARD_ALLBOT_SCAREDBEEPS = "shakes, beeps:"; // untranslated
Blockly.Msg.ARD_ALLBOT_SCARED_TIP = "Make the allbot shake the given number of shakes, and beep the given number of beeps "; // untranslated
Blockly.Msg.ARD_ALLBOT_SERVOHUB = "AllBot Servo motor"; // untranslated
Blockly.Msg.ARD_ALLBOT_STEPS = "steps, stepspeed"; // untranslated
Blockly.Msg.ARD_ALLBOT_WALK_TIP = "Make the allbot move a number of steps with the given speed (ms) for one step"; // untranslated
Blockly.Msg.ARD_ANALOGREAD = "read analog pin#"; // untranslated
Blockly.Msg.ARD_ANALOGREAD_TIP = "Return value between 0 and 1024"; // untranslated
Blockly.Msg.ARD_ANALOGWRITE = "set analog pin#"; // untranslated
Blockly.Msg.ARD_ANALOGWRITE_ERROR = "The analogue value set must be between 0 and 255"; // untranslated
Blockly.Msg.ARD_ANALOGWRITE_TIP = "Write analog value between 0 and 255 to a specific PWM Port"; // untranslated
Blockly.Msg.ARD_ANASENSOR = "Analog Sensor"; // untranslated
Blockly.Msg.ARD_ANASENSOR_COMPONENT = "Analog Sensor"; // untranslated
Blockly.Msg.ARD_ANASENSOR_DEFAULT_NAME = "AnaSensor1"; // untranslated
Blockly.Msg.ARD_ANASENSOR_READ = "Read analog sensor"; // untranslated
Blockly.Msg.ARD_ANASENSOR_TIP = "Connect an analog sensor to an analog pin, so as to read its value. On an Arduino UNO a value between 0 and 1024 is returned, corresponding to a measured value between 0 and 5V. Eg.: an LDR sensor, a potmeter, ..."; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_LENGTH = "of length"; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_LENGTH_TOOLTIP = "Create an array containing the given number of elements"; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_TITLE = "array"; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_TITLE0 = "Create"; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_TITLE2 = "with values"; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_WITH_CONTAINER_TITLE_ADD = "array"; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this array block."; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_WITH_INPUT_WITH = "Create array with"; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_WITH_ITEM_TITLE = "item"; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the array."; // untranslated
Blockly.Msg.ARD_ARRAY_CREATE_WITH_TOOLTIP = "Create an array with any number of items"; // untranslated
Blockly.Msg.ARD_ARRAY_DEFAULT_NAME = "Array1"; // untranslated
Blockly.Msg.ARD_ARRAY_GETINDEX_AT = "get element with index"; // untranslated
Blockly.Msg.ARD_ARRAY_GETINDEX_ITEM = "in array"; // untranslated
Blockly.Msg.ARD_ARRAY_GETINDEX_TOOLTIP = "Obtain element in the array at given index. Index must be a number from 0 to the length minus 1!"; // untranslated
Blockly.Msg.ARD_ARRAY_GETLENGTH = "Length of array"; // untranslated
Blockly.Msg.ARD_ARRAY_GETLENGTH_TOOLTIP = "Return the length (=number of elements) of the selected array"; // untranslated
Blockly.Msg.ARD_ARRAY_IND_ERR1 = "Index must be number >= 0"; // untranslated
Blockly.Msg.ARD_ARRAY_IND_ERR2 = "Index must be number < length array"; // untranslated
Blockly.Msg.ARD_ARRAY_LEN_ERR1 = "Length of array must be 1 or more"; // untranslated
Blockly.Msg.ARD_ARRAY_LEN_ERR2 = "Length of array must be an integer number"; // untranslated
Blockly.Msg.ARD_ARRAY_LEN_ERR3 = "Length of array must be a number, not a variable"; // untranslated
Blockly.Msg.ARD_ARRAY_NOT_FLOAT = "One of the values is not a numeric value"; // untranslated
Blockly.Msg.ARD_ARRAY_NOT_INT = "One of the values is not an integer"; // untranslated
Blockly.Msg.ARD_ARRAY_NOT_KNOWN = "Unknown type of array given"; // untranslated
Blockly.Msg.ARD_ARRAY_NOT_NUMBER = "Only assign numbers, not variables when defining an array!"; // untranslated
Blockly.Msg.ARD_ARRAY_SETINDEX_AT = "the element with index"; // untranslated
Blockly.Msg.ARD_ARRAY_SETINDEX_ITEM = "Set in array"; // untranslated
Blockly.Msg.ARD_ARRAY_SETINDEX_TOOLTIP = "Set an element in the array at given index equal to the given value. Index must be a number from 0 to the length minus 1!"; // untranslated
Blockly.Msg.ARD_ARRAY_SETINDEX_VALUE = "to the value"; // untranslated
Blockly.Msg.ARD_AS_ANAINPUT_PIN = "as analog input"; // untranslated
Blockly.Msg.ARD_AS_ANAINPUT_PIN_TIP = "Declare a variable as a analog input pin"; // untranslated
Blockly.Msg.ARD_AS_ANAOUTPUT_PIN = "as analg output"; // untranslated
Blockly.Msg.ARD_AS_ANAOUTPUT_PIN_TIP = "Declare a variable as a analog PWM output pin"; // untranslated
Blockly.Msg.ARD_AS_BOOL_NUMBER = "as boolean"; // untranslated
Blockly.Msg.ARD_AS_BOOL_NUMBER_TIP = "Declare a variable as boolean with value true or false"; // untranslated
Blockly.Msg.ARD_AS_DIGINPUT_PIN = "as digital input"; // untranslated
Blockly.Msg.ARD_AS_DIGINPUT_PIN_TIP = "Declare a variable as a digital input pin"; // untranslated
Blockly.Msg.ARD_AS_DIGOUTPUT_PIN = "as digital output"; // untranslated
Blockly.Msg.ARD_AS_DIGOUTPUT_PIN_TIP = "Declare a variable as a digital output pin"; // untranslated
Blockly.Msg.ARD_AS_FLOAT_NUMBER = "as decimal number"; // untranslated
Blockly.Msg.ARD_AS_FLOAT_NUMBER_TIP = "Declare a variable as a decimal number, eg 3.6 or 5e4 or -3.14"; // untranslated
Blockly.Msg.ARD_AS_INTEGER_NUMBER = "as integer number"; // untranslated
Blockly.Msg.ARD_AS_INTEGER_NUMBER_TIP = "Declare a variable as integer, -32768 to 32767"; // untranslated
Blockly.Msg.ARD_AS_LONG_NUMBER = "as long integer number"; // untranslated
Blockly.Msg.ARD_AS_LONG_NUMBER_TIP = "Declare a variable as a long integer, -2,147,483,648 to 2,147,483,647"; // untranslated
Blockly.Msg.ARD_AS_UINT_NUMBER = "as positive integer number"; // untranslated
Blockly.Msg.ARD_AS_UINT_NUMBER_TIP = "Declare a variable as a positive integer, 0 to 65535"; // untranslated
Blockly.Msg.ARD_AS_ULONG_NUMBER = "as long positive integer number"; // untranslated
Blockly.Msg.ARD_AS_ULONG_NUMBER_TIP = "Declare a variable as a long positive integer, 0 to 4,294,967,295"; // untranslated
Blockly.Msg.ARD_BLOCKS = "You have this block twice on the canvas. That is once too many!"; // untranslated
Blockly.Msg.ARD_BOARD = "Board"; // untranslated
Blockly.Msg.ARD_BOARD_WARN = "This block requires as board %1, but or a duplicate block is present or another block is present that requires another Arduino board!"; // untranslated
Blockly.Msg.ARD_BUILTIN_LED = "set built-in LED"; // untranslated
Blockly.Msg.ARD_BUILTIN_LED_TIP = "Light on or off for the built-in LED of the Arduino"; // untranslated
Blockly.Msg.ARD_BUTTON_COMPONENT = "Push Button"; // untranslated
Blockly.Msg.ARD_BUTTON_DEFAULT_NAME = "PushButton1"; // untranslated
Blockly.Msg.ARD_BUTTON_IFPUSHED = "If pushed we measure value"; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_CLICK = " is clicked"; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_IF = "If button"; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_LONGCLICK = "is undergoing a long click"; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_PRESSED = "is being pressed"; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_PULLUP_COMPONENT = "Pushbutton 2-wire no resistor"; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_PULLUP_TIP = "A push button which can be ON or OFF, connected to the Arduino with 2 wires: GND, and a digital pin"; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_THEN = "do"; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_TIP = "Check the input received on a button, and react to it. This function does not block your program if you do not check the checkbox to wait for a click. A click is a press and a release of the button, a long press a click and holding long time before you release, press is active as soon as the button is pressed down."; // untranslated
Blockly.Msg.ARD_BUTTON_INPUT_WAIT = "wait for a click to happen"; // untranslated
Blockly.Msg.ARD_BUTTON_READ = "Read value button"; // untranslated
Blockly.Msg.ARD_BUTTON_TIP = "A push button which can be ON or OFF, connected to the Arduino with 3 wires: GND, 5V over resisotor, and a digital pin"; // untranslated
Blockly.Msg.ARD_BUZNOTONE = "No tone on buzzer"; // untranslated
Blockly.Msg.ARD_BUZNOTONE_TIP = "Stop generating a tone on the buzzer"; // untranslated
Blockly.Msg.ARD_BUZOUTPUT_COMPONENT = "Buzzer/Speaker"; // untranslated
Blockly.Msg.ARD_BUZOUTPUT_DEFAULT_NAME = "MyBuzzer1"; // untranslated
Blockly.Msg.ARD_BUZOUTPUT_TIP = "This component is a Buzzer or a Loudspeaker. You can connect it to a digital pin of the Arduino."; // untranslated
Blockly.Msg.ARD_BUZSELECTPITCH = "Pitch"; // untranslated
Blockly.Msg.ARD_BUZSELECTPITCH_TIP = "Select the pitch you want. This block returns a number which is the frequency of the selected pitch."; // untranslated
Blockly.Msg.ARD_BUZSETPITCH = "with pitch"; // untranslated
Blockly.Msg.ARD_BUZSETTONE = "Set tone on buzzer"; // untranslated
Blockly.Msg.ARD_BUZZEROUTPUT = "Buzzer/Speaker"; // untranslated
Blockly.Msg.ARD_COMMENT = "Comment"; // untranslated
Blockly.Msg.ARD_COMMENT_TIP = "Add the given text as comment to the Arduino code"; // untranslated
Blockly.Msg.ARD_COMPONENT_BOARD = "a specific Arduino Board"; // untranslated
Blockly.Msg.ARD_COMPONENT_BOARD_HUB_TIP = "Set the Arduino board you work with, and to what it connects"; // untranslated
Blockly.Msg.ARD_COMPONENT_BOARD_TIP = "Set which Arduino board you work with, and connect components to the pins."; // untranslated
Blockly.Msg.ARD_COMPONENT_WARN1 = "A %1 configuration block with the same %2 name must be added to use this block!"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_ELSEIF_TOOLTIP = "Add an extra effect time at which statements must be done"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_ELSE_TOOLTIP = "Add a block for statements when the effect is finished."; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_ELSE = "at the end do"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_ELSEIF = "if effect time becomes greater than"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_FIRST1 = "Effect"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_FIRST2 = "with total duration (ms) ="; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_IF = "at the start do"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_TOOLTIP_1 = "At the start of an effect, do some statements"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_TOOLTIP_2 = "At the start of an effect, do some statements, and at the end of the effect too"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_TOOLTIP_3 = "At the start of an effect, do some statements, if the effect time becomes larger than the given time, do the next statements."; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_TOOLTIP_4 = "At the start of an effect, do some statements, if the effect time becomes larger than the given time, do the next statements. Ath end of the effect the final statements are done."; // untranslated
Blockly.Msg.ARD_DEFINE = "Define"; // untranslated
Blockly.Msg.ARD_DHTHUB = "Temperature and humidity sensor"; // untranslated
Blockly.Msg.ARD_DHTHUB_READHEATINDEX = "Heat Index at"; // untranslated
Blockly.Msg.ARD_DHTHUB_READRH = "Relative Humidity at"; // untranslated
Blockly.Msg.ARD_DHTHUB_READTEMP = "°C temperature at"; // untranslated
Blockly.Msg.ARD_DHTHUB_TIP = "Block to assign to an Arduino pin a DHT type sensor"; // untranslated
Blockly.Msg.ARD_DHT_COMPONENT = "DHT sensor"; // untranslated
Blockly.Msg.ARD_DHT_DEFAULT_NAME = "TempRH_Sensor"; // untranslated
Blockly.Msg.ARD_DHT_READHEATINDEX_TIP = "Obtain the Heat Index ( human-perceived equivalent temperature in °C) of a DHT sensor"; // untranslated
Blockly.Msg.ARD_DHT_READRH_TIP = "Obtain the RH (Relative Humidity in %) as a value from 0 to 100 a DHT sensor"; // untranslated
Blockly.Msg.ARD_DHT_READTEMP_TIP = "Obtain the temperature in degree Celcius of a DHT sensor"; // untranslated
Blockly.Msg.ARD_DIGINPUT = "Digital input"; // untranslated
Blockly.Msg.ARD_DIGINPUT_COMPONENT = "Digital Input"; // untranslated
Blockly.Msg.ARD_DIGINPUT_DEFAULT_NAME = "DigInput1"; // untranslated
Blockly.Msg.ARD_DIGINPUT_READ = "Read digital input"; // untranslated
Blockly.Msg.ARD_DIGINPUT_TIP = "Connect a digital input to a digital pin, so as to read its value. The digital state can then be read, corresponding to 0V or 5V on the pin for an Arduino UNO."; // untranslated
Blockly.Msg.ARD_DIGITALREAD = "read digital pin#"; // untranslated
Blockly.Msg.ARD_DIGITALREAD_TIP = "Read digital value on a pin: HIGH or LOW"; // untranslated
Blockly.Msg.ARD_DIGITALWRITE = "set digitial pin#"; // untranslated
Blockly.Msg.ARD_DIGITALWRITEVAR_TIP = "Write digital value to a Port, the value and port can be computed variables"; // untranslated
Blockly.Msg.ARD_DIGITALWRITE_TIP = "Write digital value HIGH or LOW to a specific Port"; // untranslated
Blockly.Msg.ARD_DIGOUTPUT = "Digital output"; // untranslated
Blockly.Msg.ARD_DIGOUTPUT_COMPONENT = "Digital Output"; // untranslated
Blockly.Msg.ARD_DIGOUTPUT_DEFAULT_NAME = "DigOutput1"; // untranslated
Blockly.Msg.ARD_DIGOUTPUT_TIP = "Connect a generic digital ouput to a digital pin, so as to write to that pin. The digital state can be set to LOW or HIGH, corresponding to 0V and 5V on the pin for an Arduino UNO."; // untranslated
Blockly.Msg.ARD_DIGOUTPUT_WRITE = "Write to digital output"; // untranslated
Blockly.Msg.ARD_DIORAMA_BOARD_TIP = "The Ingegno Diorama board - See manual for info"; // untranslated
Blockly.Msg.ARD_DIORAMA_BTN_TIP = "Diorama button code, executed in a loop once the button has been pressed"; // untranslated
Blockly.Msg.ARD_DIO_BOARD_MISSING = "No Diorama board present. Add it to the canvas!"; // untranslated
Blockly.Msg.ARD_DIO_DISPLAYTEXT = "Show on display: "; // untranslated
Blockly.Msg.ARD_DIO_DISPLAYTEXT_TIP = "Give a text of 8 characters to show on the diorama display"; // untranslated
Blockly.Msg.ARD_DIO_DISPLAYTEXT_WARNING = "Text can only be 8 long, not longer!"; // untranslated
Blockly.Msg.ARD_DIO_LESSLOUD = "Diorama: less loud output"; // untranslated
Blockly.Msg.ARD_DIO_LOUDER = "Diorama: louder output"; // untranslated
Blockly.Msg.ARD_DIO_PLAYTRACK = "Play track number "; // untranslated
Blockly.Msg.ARD_DIO_RESETBTN = "stop buttons"; // untranslated
Blockly.Msg.ARD_DIO_RESETBTNNR_TIP = "Stop action of the given button."; // untranslated
Blockly.Msg.ARD_DIO_RESETBTN_TIP = "Reset the buttons, so no button is considered pressed."; // untranslated
Blockly.Msg.ARD_DIO_SETLOUDNESS = "Diorama: set volume to (0-10):"; // untranslated
Blockly.Msg.ARD_DIO_SOUND_TIP = "Change sound output of the Diorama board. If louder or quieter, we stop processing the button after the call."; // untranslated
Blockly.Msg.ARD_DIO_SOUND_WARNING = "Volume must be between 0 and 10!"; // untranslated
Blockly.Msg.ARD_DIO_STOPBTN = "Pushbutton 8: stop"; // untranslated
Blockly.Msg.ARD_DIO_STOPTRACK = "Stop playing"; // untranslated
Blockly.Msg.ARD_DIO_STOPTRACK_TIP = "Immediately stop playing the track that is playing"; // untranslated
Blockly.Msg.ARD_DIO_TRACKPLAYING = "track is playing"; // untranslated
Blockly.Msg.ARD_DIO_TRACKPLAYING_TIP = "Return true if a track is still playing, false otherwise"; // untranslated
Blockly.Msg.ARD_DIO_TRACK_TIP = "If number 1, then play a track stored on SD card as 'track001.mp3'"; // untranslated
Blockly.Msg.ARD_DIO_TRACK_WARNING = "Track must be a number between 1 and 100!"; // untranslated
Blockly.Msg.ARD_FUN_RUN_DECL = "Arduino define up front:"; // untranslated
Blockly.Msg.ARD_FUN_RUN_DECL_TIP = "Code you want to declare up front (use this e.g. for variables you need in setup)"; // untranslated
Blockly.Msg.ARD_FUN_RUN_LOOP = "Arduino loop forever:"; // untranslated
Blockly.Msg.ARD_FUN_RUN_SETUP = "Arduino run first:"; // untranslated
Blockly.Msg.ARD_FUN_RUN_TIP = "Defines the Arduino setup() and loop() functions."; // untranslated
Blockly.Msg.ARD_HIGH = "HIGH"; // untranslated
Blockly.Msg.ARD_HIGHLOW_TIP = "Set a pin state logic High or Low."; // untranslated
Blockly.Msg.ARD_LEDLEG = "LED"; // untranslated
Blockly.Msg.ARD_LEDLEGNEG = "minus"; // untranslated
Blockly.Msg.ARD_LEDLEGPOL = "leg polarity"; // untranslated
Blockly.Msg.ARD_LEDLEGPOS = "plus"; // untranslated
Blockly.Msg.ARD_LEDLEG_COMPONENT = "LED"; // untranslated
Blockly.Msg.ARD_LEDLEG_DEFAULT_NAME = "Led1"; // untranslated
Blockly.Msg.ARD_LEDLEG_OFF = "OFF"; // untranslated
Blockly.Msg.ARD_LEDLEG_ON = "ON"; // untranslated
Blockly.Msg.ARD_LEDLEG_SET = "Set LED"; // untranslated
Blockly.Msg.ARD_LEDLEG_TIP = "A LED light, on of the legs (the positive or negative) is connected to the Arduino. Can be ON or OFF."; // untranslated
Blockly.Msg.ARD_LEDUP_GADGET = "Gadget LedUpKidz"; // untranslated
Blockly.Msg.ARD_LEDUP_HUB = "LedUpKidz, destination: "; // untranslated
Blockly.Msg.ARD_LEDUP_HUB_TIP = "LedUpKidz is a gadget with 6 LED that you can program. There is a big prototype connected to an Arduino UNO, choose 'prototype' for code destined for this. The gadget itself works on a small attiny85 microchip, for code with that destination, select destination 'gadget'"; // untranslated
Blockly.Msg.ARD_LEDUP_LED0 = "LED 0"; // untranslated
Blockly.Msg.ARD_LEDUP_LED1 = "LED 1"; // untranslated
Blockly.Msg.ARD_LEDUP_LED2 = "LED 2"; // untranslated
Blockly.Msg.ARD_LEDUP_LED3 = "LED 3"; // untranslated
Blockly.Msg.ARD_LEDUP_LED4 = "LED 4"; // untranslated
Blockly.Msg.ARD_LEDUP_LED5 = "LED 5"; // untranslated
Blockly.Msg.ARD_LEDUP_LED_ONOFF1 = "Put LedUp LED"; // untranslated
Blockly.Msg.ARD_LEDUP_LED_ONOFF2 = "on? True/False:"; // untranslated
Blockly.Msg.ARD_LEDUP_LED_ONOFF_TIP = "Set a given LedUpKidz light to on or off using variable blocks"; // untranslated
Blockly.Msg.ARD_LEDUP_PROTO = "Prototype Arduino UNO"; // untranslated
Blockly.Msg.ARD_LOW = "LOW"; // untranslated
Blockly.Msg.ARD_MAP = "Map"; // untranslated
Blockly.Msg.ARD_MAP_TIP = "Re-maps a number from [0-1024] to another."; // untranslated
Blockly.Msg.ARD_MAP_VAL = "value to [0-"; // untranslated
Blockly.Msg.ARD_MD_180SERVO = "0~180 degree Servo"; // untranslated
Blockly.Msg.ARD_MD_360SERVO = "0~360 degree Servo"; // untranslated
Blockly.Msg.ARD_MD_AAABLOCK = "AAA 3V Battery module"; // untranslated
Blockly.Msg.ARD_MD_AAABLOCK_TIP = "The battery block for Microduino"; // untranslated
Blockly.Msg.ARD_MD_AAASOUNDWARN = "A AAA Battery module must be added to your blocks if you work with sound"; // untranslated
Blockly.Msg.ARD_MD_AMPBLOCK = "Loudspeaker (Amplifier) Module"; // untranslated
Blockly.Msg.ARD_MD_AMPBLOCK_TIP = "Amplifier module, connect the loudspeaker to it to hear sound."; // untranslated
Blockly.Msg.ARD_MD_AMPWARN = "An Amplifier module must be added to your blocks"; // untranslated
Blockly.Msg.ARD_MD_AUDIOAMPWARN = "An Audio module must be added to your blocks if you work with an amplifier"; // untranslated
Blockly.Msg.ARD_MD_AUDIOBLOCK = "Sound modules (Audio). Mode:"; // untranslated
Blockly.Msg.ARD_MD_AUDIOBLOCK_TIP = "Audio Function Module, Choose a mode and a volume"; // untranslated
Blockly.Msg.ARD_MD_AUDIOSOUNDWARN = "An Audio module must be added to your blocks to be able to work with music."; // untranslated
Blockly.Msg.ARD_MD_AUDIO_PAUSE = "Pause sound fragment"; // untranslated
Blockly.Msg.ARD_MD_AUDIO_PAUSE_TIP = "Pause the sound fragment that is playing"; // untranslated
Blockly.Msg.ARD_MD_AUDIO_PLAY = ""; // untranslated
Blockly.Msg.ARD_MD_AUDIO_PLAYNR = "Play sound fragment"; // untranslated
Blockly.Msg.ARD_MD_AUDIO_PLAY_TIP = "Write the number of the sound fragment you want to play. On the this number corresponds to the order in which files have been copied to the SD Card. Best: 1/Empty the SD card 2/copy files to SD card in the order you want to play them 3/it is easier if you name the files 001.mp3, 002.mp3, ... and copy them one after the other to the card!"; // untranslated
Blockly.Msg.ARD_MD_AUDIO_REP1 = "Repeat everything"; // untranslated
Blockly.Msg.ARD_MD_AUDIO_REP2 = "Play everything 1 time"; // untranslated
Blockly.Msg.ARD_MD_AUDIO_REP3 = "Repeat 1 track"; // untranslated
Blockly.Msg.ARD_MD_AUDIO_REP4 = "Play 1 track"; // untranslated
Blockly.Msg.ARD_MD_BLOCKS = "Microduino blocks: "; // untranslated
Blockly.Msg.ARD_MD_COOKIEBUTTON_COMPONENT = "Microduino MCookie CoreUSB"; // untranslated
Blockly.Msg.ARD_MD_COREBLOCK = "Brain (CoreUSB)"; // untranslated
Blockly.Msg.ARD_MD_COREBLOCK_TIP = "The Brain of your construction, the MCookie-CoreUSB"; // untranslated
Blockly.Msg.ARD_MD_COREWARN = "A Brain (CoreUSB) module must be added to your blocks"; // untranslated
Blockly.Msg.ARD_MD_CRASHBUTTON_COMPONENT = "Microduino Crash Button"; // untranslated
Blockly.Msg.ARD_MD_CRASHBUTTON_DEFAULT_NAME = "Crashbutton1"; // untranslated
Blockly.Msg.ARD_MD_CRASHBUTTON_TIP = "The microduino crash-button with which you can detect if you hit something, or that you can use as a push button."; // untranslated
Blockly.Msg.ARD_MD_HUBBLOCK = "The Cable holder (Sensor Hub)"; // untranslated
Blockly.Msg.ARD_MD_HUBBLOCK01 = "connected to pins: IIC"; // untranslated
Blockly.Msg.ARD_MD_HUBBLOCK_TIP = "The Hub allows to connect up to 12 sensors to your Microduino"; // untranslated
Blockly.Msg.ARD_MD_NOSERVO = "Geen Servo gekoppeld"; // untranslated
Blockly.Msg.ARD_MD_SERVOBOT_DEFAULT_NAME = "BottomServo1"; // untranslated
Blockly.Msg.ARD_MD_SERVOCON = "Servo Motor Connector."; // untranslated
Blockly.Msg.ARD_MD_SERVOCON_BOTTOM = "Define bottom Servo"; // untranslated
Blockly.Msg.ARD_MD_SERVOCON_TIP = "Servo Motor Connector, can control two Servo (top and bottom). You have to give the servo a name, and what type it is (no servo attached, a 180 degree servo or a 360 degree servo."; // untranslated
Blockly.Msg.ARD_MD_SERVOCON_TOP = "Define top Servo"; // untranslated
Blockly.Msg.ARD_MD_SERVOCON_TYPE = "Type:"; // untranslated
Blockly.Msg.ARD_MD_SERVOTOP_DEFAULT_NAME = "TopServo1"; // untranslated
Blockly.Msg.ARD_MD_SERVOTYPE_TIP = "Select the type of Servo you attach to the Servo connnector"; // untranslated
Blockly.Msg.ARD_MD_SERVO_READ = "read Servo "; // untranslated
Blockly.Msg.ARD_MD_SERVO_STEP_WARN1 = "A Servo configuration block must be added to the hub to use this block!"; // untranslated
Blockly.Msg.ARD_MD_SERVO_STEP_WARN2 = "A Name input must be added to the Servo configuration block!"; // untranslated
Blockly.Msg.ARD_MD_SERVO_STEP_WARN3 = "Selected servo does not exist any more, please select a new one."; // untranslated
Blockly.Msg.ARD_MD_SERVO_WRITE = "set 180 degree Servo "; // untranslated
Blockly.Msg.ARD_NEOPIXEL = "NeoPixel LED light"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_BRIGHTNESS = " brightness (%)"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_COMPONENT = "Neopixel strip"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_DEFAULT_NAME = "NeoPixel1"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_HZ = "Frequency:"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_ONCOLOUR = "on colour"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_ONCOLOURVALBLUE = "blue:"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_ONCOLOURVALGREEN = "green:"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_ONCOLOURVALRED = "on colour (0-255) red:"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_PIXEL = "pixel"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_PIXELS = "Pixels."; // untranslated
Blockly.Msg.ARD_NEOPIXEL_SET = "Set Neopixel"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_STRIP = "Strip with"; // untranslated
Blockly.Msg.ARD_NEOPIXEL_TIP = "A NEOPIXEL LED light or a strip with multiple neopixels."; // untranslated
Blockly.Msg.ARD_NEOPIXEL_TYPE = "Type:"; // untranslated
Blockly.Msg.ARD_NOTONE = "Turn off tone on pin #"; // untranslated
Blockly.Msg.ARD_NOTONE_PIN = "No tone PIN#"; // untranslated
Blockly.Msg.ARD_NOTONE_PIN_TIP = "Stop generating a tone on a pin"; // untranslated
Blockly.Msg.ARD_NOTONE_TIP = "Turns the tone off on the selected pin"; // untranslated
Blockly.Msg.ARD_NO_ALLBOT = "No AllBot present"; // untranslated
Blockly.Msg.ARD_OLED = "OLED"; // untranslated
Blockly.Msg.ARD_OLED_CLEAR = "clear display"; // untranslated
Blockly.Msg.ARD_OLED_CLEAR_TIP = "Before writing new text to the display, use this block to clear it first."; // untranslated
Blockly.Msg.ARD_OLED_CONFIG_TIP = "Define a display of the given resolution to use to write text to"; // untranslated
Blockly.Msg.ARD_OLED_CURSORX = "set cursor position X"; // untranslated
Blockly.Msg.ARD_OLED_CURSORY = "Y"; // untranslated
Blockly.Msg.ARD_OLED_DEFAULT_NAME = "OLED1"; // untranslated
Blockly.Msg.ARD_OLED_FONT_SIZE = "choose font size"; // untranslated
Blockly.Msg.ARD_OLED_FONT_TIP = "Select the font size to use to write text from now on"; // untranslated
Blockly.Msg.ARD_OLED_INIT = "OLED Initialise"; // untranslated
Blockly.Msg.ARD_OLED_PRINT = "print"; // untranslated
Blockly.Msg.ARD_OLED_PRINT_NUMBER = "print number"; // untranslated
Blockly.Msg.ARD_OLED_PRINT_NUMBER_DIGITS = "with #digits:"; // untranslated
Blockly.Msg.ARD_OLED_PRINT_TIP = "Prepare to show the given text on the display in the given size. You need to use the write block to actually see it!"; // untranslated
Blockly.Msg.ARD_OLED_RESOLUTIE = "with resolution"; // untranslated
Blockly.Msg.ARD_OLED_WRITE = "write to display"; // untranslated
Blockly.Msg.ARD_OLED_WRITE_TIP = "After you have printed text on the display, use this block to actually show the text."; // untranslated
Blockly.Msg.ARD_OUTPUT_WRITE_TO = "value"; // untranslated
Blockly.Msg.ARD_PIN_AN = "analog pin"; // untranslated
Blockly.Msg.ARD_PIN_AN_TIP = "One of the analog pins of the Arduino Board"; // untranslated
Blockly.Msg.ARD_PIN_DIG = "digital pin"; // untranslated
Blockly.Msg.ARD_PIN_DIGDIG = "digital pin1 and pin2"; // untranslated
Blockly.Msg.ARD_PIN_DIGDIG1 = "digital pin1#"; // untranslated
Blockly.Msg.ARD_PIN_DIGDIG2 = "pin2#"; // untranslated
Blockly.Msg.ARD_PIN_DIGDIG_TIP = "Component requiring two digital pins, pin1 and pin2"; // untranslated
Blockly.Msg.ARD_PIN_DIG_TIP = "One of the digital pins of the Arduino Board"; // untranslated
Blockly.Msg.ARD_PIN_PWM = "PWM pin"; // untranslated
Blockly.Msg.ARD_PIN_PWM_TIP = "One of the Pulse Width Modeling (PWM) pins of the Arduino Board"; // untranslated
Blockly.Msg.ARD_PIN_WARN1 = "Pin %1 is needed for %2 as pin %3. Already used as %4."; // untranslated
Blockly.Msg.ARD_PULSEON = "pulse on pin #"; // untranslated
Blockly.Msg.ARD_PULSEREAD = "Read"; // untranslated
Blockly.Msg.ARD_PULSETIMEOUT = "timeout after"; // untranslated
Blockly.Msg.ARD_PULSETIMEOUT_MS = ""; // untranslated
Blockly.Msg.ARD_PULSETIMEOUT_TIP = "Measures the duration of a pulse on the selected pin, if it is within the timeout."; // untranslated
Blockly.Msg.ARD_PULSE_READ = "measure %1 pulse on pin #%2"; // untranslated
Blockly.Msg.ARD_PULSE_READ_TIMEOUT = "measure %1 pulse on pin #%2 (timeout after %3 μs)"; // untranslated
Blockly.Msg.ARD_PULSE_TIP = "Measures the duration of a pulse on the selected pin."; // untranslated
Blockly.Msg.ARD_PWMOUTPUT = "PWM output"; // untranslated
Blockly.Msg.ARD_PWMOUTPUT_COMPONENT = "PWM Output"; // untranslated
Blockly.Msg.ARD_PWMOUTPUT_DEFAULT_NAME = "PWMOutput1"; // untranslated
Blockly.Msg.ARD_PWMOUTPUT_TIP = "Connect a generic PWM (Pulse Width Modulation) ouput to a pwm pin, so as to write an analog value to that pin. The value written should be a number between 0 and 255, and will generate a block pulse over this pin."; // untranslated
Blockly.Msg.ARD_PWMOUTPUT_WRITE = "Write to PWM output"; // untranslated
Blockly.Msg.ARD_SERIAL_BPS = "bps"; // untranslated
Blockly.Msg.ARD_SERIAL_PRINT = "print"; // untranslated
Blockly.Msg.ARD_SERIAL_PRINT_NEWLINE = "add new line"; // untranslated
Blockly.Msg.ARD_SERIAL_PRINT_TIP = "Prints data to the console/serial port as human-readable ASCII text."; // untranslated
Blockly.Msg.ARD_SERIAL_PRINT_WARN = "A setup block for %1 must be added to the workspace to use this block!"; // untranslated
Blockly.Msg.ARD_SERIAL_SETUP = "Setup"; // untranslated
Blockly.Msg.ARD_SERIAL_SETUP_TIP = "Selects the speed for a specific Serial peripheral"; // untranslated
Blockly.Msg.ARD_SERIAL_SPEED = ": speed to"; // untranslated
Blockly.Msg.ARD_SERVOHUB = "Servo motor"; // untranslated
Blockly.Msg.ARD_SERVOHUB_READ = "read Servo "; // untranslated
Blockly.Msg.ARD_SERVOHUB_TIP = "Servo Motor Connection, which can attach to a PWM pin. You have to give the servo a name, and what type it is (a 180 degree servo or a 360 degree servo.)"; // untranslated
Blockly.Msg.ARD_SERVOHUB_WRITE = "set 180 degree Servo "; // untranslated
Blockly.Msg.ARD_SERVO_COMPONENT = "servo"; // untranslated
Blockly.Msg.ARD_SERVO_DEFAULT_NAME = "Servo1"; // untranslated
Blockly.Msg.ARD_SERVO_READ = "read SERVO from PIN#"; // untranslated
Blockly.Msg.ARD_SERVO_READ_TIP = "Read a Servo angle"; // untranslated
Blockly.Msg.ARD_SERVO_ROTATE360 = "Rotate 360 degree Servo"; // untranslated
Blockly.Msg.ARD_SERVO_ROTATEPERC = "% (-100 to 100)"; // untranslated
Blockly.Msg.ARD_SERVO_ROTATESPEED = "with speed"; // untranslated
Blockly.Msg.ARD_SERVO_ROTATE_TIP = "Turn a Servo with a specific speed"; // untranslated
Blockly.Msg.ARD_SERVO_TYPE = "Type:"; // untranslated
Blockly.Msg.ARD_SERVO_WRITE = "set SERVO from Pin"; // untranslated
Blockly.Msg.ARD_SERVO_WRITE_DEG_180 = "Degrees (0~180)"; // untranslated
Blockly.Msg.ARD_SERVO_WRITE_TIP = "Set a Servo to an specified angle"; // untranslated
Blockly.Msg.ARD_SERVO_WRITE_TO = "to"; // untranslated
Blockly.Msg.ARD_SETTONE = "Set tone on pin #"; // untranslated
Blockly.Msg.ARD_SPI_SETUP = "Setup"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_CONF = "configuration:"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_DIVIDE = "clock divide"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_LSBFIRST = "LSBFIRST"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE = "SPI mode (idle - edge)"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE0 = "0 (Low - Falling)"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE1 = "1 (Low - Rising)"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE2 = "2 (High - Falling)"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE3 = "3 (High - Rising)"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_MSBFIRST = "MSBFIRST"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_SHIFT = "data shift"; // untranslated
Blockly.Msg.ARD_SPI_SETUP_TIP = "Configures the SPI peripheral."; // untranslated
Blockly.Msg.ARD_SPI_TRANSRETURN_TIP = "Send a SPI message to an specified slave device and get data back."; // untranslated
Blockly.Msg.ARD_SPI_TRANS_NONE = "none"; // untranslated
Blockly.Msg.ARD_SPI_TRANS_SLAVE = "to slave pin"; // untranslated
Blockly.Msg.ARD_SPI_TRANS_TIP = "Send a SPI message to an specified slave device."; // untranslated
Blockly.Msg.ARD_SPI_TRANS_VAL = "transfer"; // untranslated
Blockly.Msg.ARD_SPI_TRANS_WARN1 = "A setup block for %1 must be added to the workspace to use this block!"; // untranslated
Blockly.Msg.ARD_SPI_TRANS_WARN2 = "Old pin value %1 is no longer available."; // untranslated
Blockly.Msg.ARD_STEPPER_COMPONENT = "stepper"; // untranslated
Blockly.Msg.ARD_STEPPER_DEFAULT_NAME = "MyStepper"; // untranslated
Blockly.Msg.ARD_STEPPER_DEGREES = "degrees"; // untranslated
Blockly.Msg.ARD_STEPPER_FOUR_PINS = "4"; // untranslated
Blockly.Msg.ARD_STEPPER_ISROTATING = "in movement"; // untranslated
Blockly.Msg.ARD_STEPPER_ISROTATING_TIP = "Returns true if the stepper is moving."; // untranslated
Blockly.Msg.ARD_STEPPER_MOTOR = "stepper motor:"; // untranslated
Blockly.Msg.ARD_STEPPER_NUMBER_OF_PINS = "Number of pins"; // untranslated
Blockly.Msg.ARD_STEPPER_PIN1 = "pin1#"; // untranslated
Blockly.Msg.ARD_STEPPER_PIN2 = "pin2#"; // untranslated
Blockly.Msg.ARD_STEPPER_PIN3 = "pin3#"; // untranslated
Blockly.Msg.ARD_STEPPER_PIN4 = "pin4#"; // untranslated
Blockly.Msg.ARD_STEPPER_RESTART = "Get"; // untranslated
Blockly.Msg.ARD_STEPPER_RESTART_AFTER = "ready"; // untranslated
Blockly.Msg.ARD_STEPPER_RESTART_TIP = "Reset the motor ready after a rotation block has finished, so as to be able to rotate again"; // untranslated
Blockly.Msg.ARD_STEPPER_REVOLVS = "how many steps per revolution"; // untranslated
Blockly.Msg.ARD_STEPPER_ROTATE = "Rotate"; // untranslated
Blockly.Msg.ARD_STEPPER_ROTATE_TIP = "Rotate the stepper motor over a number of degrees in a non-blocking way. This block must be called in the loop. When finished the stepper is blocked, and a call to restart movement is needed for the block to cause a next movement."; // untranslated
Blockly.Msg.ARD_STEPPER_SETUP = "Setup stepper motor"; // untranslated
Blockly.Msg.ARD_STEPPER_SETUP_TIP = "Configures a stepper motor pinout and other settings."; // untranslated
Blockly.Msg.ARD_STEPPER_SPEED = "set speed (rpm) to"; // untranslated
Blockly.Msg.ARD_STEPPER_SPEED_TIP = "Sets speed of the stepper motor. The steps are set at the speed needed to have the set RPM speed based on the given steps per revolution in the constructor."; // untranslated
Blockly.Msg.ARD_STEPPER_STEP = "move stepper"; // untranslated
Blockly.Msg.ARD_STEPPER_STEPS = "steps"; // untranslated
Blockly.Msg.ARD_STEPPER_STEP_TIP = "Turns the stepper motor a specific number of steps."; // untranslated
Blockly.Msg.ARD_STEPPER_TWO_PINS = "2"; // untranslated
Blockly.Msg.ARD_TFT_BG_COLOUR = "Color of the background"; // untranslated
Blockly.Msg.ARD_TFT_BG_TIP = "Fill the entire screen with the given colour"; // untranslated
Blockly.Msg.ARD_TFT_CIRC_HEIGHT = "Height"; // untranslated
Blockly.Msg.ARD_TFT_CIRC_RADIUS = "Radius"; // untranslated
Blockly.Msg.ARD_TFT_CIRC_TIP = "Draw a circle on the screen with the given coordinates in the given colour. If Filled is checked the circle is filled, otherwise only an outline"; // untranslated
Blockly.Msg.ARD_TFT_CIRC_XPOS = "X Position Center"; // untranslated
Blockly.Msg.ARD_TFT_CIRC_YPOS = "Y Position Center"; // untranslated
Blockly.Msg.ARD_TFT_COMPONENT = "TFT-Scherm"; // untranslated
Blockly.Msg.ARD_TFT_COMPONENT_TIP = "The ST7735 1.8” Color TFT scherm. Scherm is 128x160 pixels."; // untranslated
Blockly.Msg.ARD_TFT_FILLED = "Fill the drawing"; // untranslated
Blockly.Msg.ARD_TFT_LINE_COLOUR = "Colour"; // untranslated
Blockly.Msg.ARD_TFT_LINE_TIP = "Draw a line on the screen with the given coordinates in the given colour."; // untranslated
Blockly.Msg.ARD_TFT_LINE_XPOSBEGIN = "X Position Start"; // untranslated
Blockly.Msg.ARD_TFT_LINE_XPOSEND = "X Position End"; // untranslated
Blockly.Msg.ARD_TFT_LINE_YPOSBEGIN = "Y Position Start"; // untranslated
Blockly.Msg.ARD_TFT_LINE_YPOSEND = "Y Position End"; // untranslated
Blockly.Msg.ARD_TFT_MAKE_CIRC = "Draw Circle"; // untranslated
Blockly.Msg.ARD_TFT_MAKE_LINE = "Draw Line"; // untranslated
Blockly.Msg.ARD_TFT_MAKE_RECT = "Draw Rectangle"; // untranslated
Blockly.Msg.ARD_TFT_RECT_COLOUR = "Colour"; // untranslated
Blockly.Msg.ARD_TFT_RECT_HEIGHT = "Height"; // untranslated
Blockly.Msg.ARD_TFT_RECT_TIP = "Draw a rectangle on the screen with the given coordinates in the given colour. If Filled is checked the rectangle is filled, otherwise only an outline"; // untranslated
Blockly.Msg.ARD_TFT_RECT_WIDTH = "Width"; // untranslated
Blockly.Msg.ARD_TFT_RECT_XPOSBEGIN = "X Position Top Left"; // untranslated
Blockly.Msg.ARD_TFT_RECT_YPOSBEGIN = "Y Position Top Left"; // untranslated
Blockly.Msg.ARD_TFT_SPRITE_NAME = "Sprite named"; // untranslated
Blockly.Msg.ARD_TFT_TEXT_COLOUR = "Colour of the text"; // untranslated
Blockly.Msg.ARD_TFT_TEXT_SIZE = "Size"; // untranslated
Blockly.Msg.ARD_TFT_TEXT_TIP = "Write a text to the screen in the given colour at the given position."; // untranslated
Blockly.Msg.ARD_TFT_TEXT_WRITE = "Write text"; // untranslated
Blockly.Msg.ARD_TFT_TEXT_XPOS = "X Position"; // untranslated
Blockly.Msg.ARD_TFT_TEXT_YPOS = "Y Position"; // untranslated
Blockly.Msg.ARD_TIME_DELAY = "wait"; // untranslated
Blockly.Msg.ARD_TIME_DELAY_MICROS = "microseconds"; // untranslated
Blockly.Msg.ARD_TIME_DELAY_MICRO_TIP = "Wait specific time in microseconds"; // untranslated
Blockly.Msg.ARD_TIME_DELAY_TIP = "Wait specific time in milliseconds"; // untranslated
Blockly.Msg.ARD_TIME_INF = "wait forever (end program)"; // untranslated
Blockly.Msg.ARD_TIME_INF_TIP = "Wait indefinitely, stopping the program."; // untranslated
Blockly.Msg.ARD_TIME_MICROS = "current elapsed Time (microseconds)"; // untranslated
Blockly.Msg.ARD_TIME_MICROS_TIP = "Returns the number of microseconds since the Arduino board began running the current program. Has to be stored in a positive long integer"; // untranslated
Blockly.Msg.ARD_TIME_MILLIS = "current elapsed Time (milliseconds)"; // untranslated
Blockly.Msg.ARD_TIME_MILLIS_TIP = "Returns the number of milliseconds since the Arduino board began running the current program. Has to be stored in a positive long integer"; // untranslated
Blockly.Msg.ARD_TIME_MS = "milliseconds"; // untranslated
Blockly.Msg.ARD_TONEDURATION = "and duration (ms)"; // untranslated
Blockly.Msg.ARD_TONEDURATION_TIP = "Sets tone on a buzzer to the specified frequency within range 31 - 65535 and given duration in milliseconds. Careful: a durations continues, also during delays, a new tone can only be given if a previous tone is terminated!"; // untranslated
Blockly.Msg.ARD_TONEFREQ = "at frequency"; // untranslated
Blockly.Msg.ARD_TONEPITCH_TIP = "Sets tone on a buzzer to the specified pitch and given duration in milliseconds. Careful: a durations continues, also during delays, a new tone can only be given if a previous tone is terminated!"; // untranslated
Blockly.Msg.ARD_TONE_FREQ = "frequency"; // untranslated
Blockly.Msg.ARD_TONE_PIN = "Tone PIN#"; // untranslated
Blockly.Msg.ARD_TONE_PIN_TIP = "Generate audio tones on a pin"; // untranslated
Blockly.Msg.ARD_TONE_TIP = "Sets tone on pin to specified frequency within range 31 - 65535"; // untranslated
Blockly.Msg.ARD_TONE_WARNING = "Frequency must be in range 31 - 65535"; // untranslated
Blockly.Msg.ARD_TONE_WARNING2 = "A duration must be positive (>0)"; // untranslated
Blockly.Msg.ARD_TYPE_ARRAY = "Array"; // untranslated
Blockly.Msg.ARD_TYPE_BOOL = "Boolean"; // untranslated
Blockly.Msg.ARD_TYPE_CHAR = "Character"; // untranslated
Blockly.Msg.ARD_TYPE_CHILDBLOCKMISSING = "ChildBlockMissing"; // untranslated
Blockly.Msg.ARD_TYPE_DECIMAL = "Decimal"; // untranslated
Blockly.Msg.ARD_TYPE_LONG = "Large Number"; // untranslated
Blockly.Msg.ARD_TYPE_NULL = "Null"; // untranslated
Blockly.Msg.ARD_TYPE_NUMBER = "Number"; // untranslated
Blockly.Msg.ARD_TYPE_SHORT = "Short Number"; // untranslated
Blockly.Msg.ARD_TYPE_TEXT = "Text"; // untranslated
Blockly.Msg.ARD_TYPE_UNDEF = "Undefined"; // untranslated
Blockly.Msg.ARD_UNKNOWN_ALLBOTJOINT = "The old joint value %1 is no longer available"; // untranslated
Blockly.Msg.ARD_VAR_AS = "as"; // untranslated
Blockly.Msg.ARD_VAR_AS_TIP = "Sets a value to a specific type"; // untranslated
Blockly.Msg.ARD_WRITE_TO = "to"; // untranslated
Blockly.Msg.B4A_COMPILE_EMPTY = "Compiler returned empty file - Device not flashed"; // untranslated
Blockly.Msg.B4A_ERROR = "ERROR!"; // untranslated
Blockly.Msg.B4A_FLASHING = "Flashing to device"; // untranslated
Blockly.Msg.B4A_MSG_EXTENSION = "Message from extension: "; // untranslated
Blockly.Msg.B4A_NO_CHROME = "You need to use Google Chrome to use this Upload functionality"; // untranslated
Blockly.Msg.B4A_NO_EXTENSION = "Chrome Extension is not installed"; // untranslated
Blockly.Msg.B4A_SET_IP_COMPILER = "New IP Address Compiler"; // untranslated
Blockly.Msg.B4A_SUCCESS = "SUCCESS!"; // untranslated
Blockly.Msg.B4A_UPLOAD_FAIL = "Upload failed. Chrome Extension is not installed"; // untranslated
Blockly.Msg.B4A_VERIFY_FAIL = "Verify failed. Chrome Extension is not installed"; // untranslated
Blockly.Msg.COLOUR_RGB255_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 255. See https://www.google.be/search?q=color+picker"; // untranslated
Blockly.Msg.NEW_INSTANCE = "New instance..."; // untranslated
Blockly.Msg.NEW_INSTANCE_TITLE = "New instance name:"; // untranslated
Blockly.Msg.RENAME_INSTANCE = "Rename instance..."; // untranslated
Blockly.Msg.RENAME_INSTANCE_TITLE = "Rename all '%1' instances to:"; // untranslated
Blockly.Msg.REPLACE_EXISTING_BLOCKS = "Replace existing blocks? 'Cancel' will merge."; // untranslated
Blockly.Msg.UPLOAD_CLICK_1 = "To Upload your code to Arduino:"; // untranslated
Blockly.Msg.UPLOAD_CLICK_2 = " 1. click on the Arduino tab"; // untranslated
Blockly.Msg.UPLOAD_CLICK_3 = " 2. select all the code, and copy (CTRL+A and CTRL+C)"; // untranslated
Blockly.Msg.UPLOAD_CLICK_4 = " 3. In the Arduino IDE or in a http://codebender.cc sketch, paste the code (CTRL+V)"; // untranslated
Blockly.Msg.UPLOAD_CLICK_5 = " 4. Upload to your connected Arduino"; // untranslated
Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.ARD_CONTROLS_EFFECT_IF_TITLE_IF = Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_IF;
Blockly.Msg.ARD_CONTROLS_EFFECT_IF_TOOLTIP = Blockly.Msg.CONTROLS_IF_IF_TOOLTIP;
Blockly.Msg.ARD_CONTROLS_EFFECT_ELSEIF_TITLE_ELSEIF = Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_ELSEIF;
Blockly.Msg.ARD_CONTROLS_EFFECT_ELSE_TITLE_ELSE = Blockly.Msg.ARD_CONTROLS_EFFECT_MSG_ELSE; | ingegno/Blockly4Arduino | Blockly4Arduino/msg/js/lki.js | JavaScript | apache-2.0 | 84,017 | [
30522,
1013,
1013,
2023,
5371,
2001,
8073,
7013,
1012,
2079,
2025,
19933,
1012,
1005,
2224,
9384,
1005,
1025,
30524,
1006,
1005,
3796,
2135,
1012,
5796,
2290,
1005,
1007,
1025,
3796,
2135,
1012,
5796,
2290,
1012,
5587,
1035,
7615,
1027,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html>
<head>
<title>TestNG reports</title>
<link type="text/css" href="testng-reports.css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="testng-reports.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['table']});
google.setOnLoadCallback(drawTable);
var suiteTableInitFunctions = new Array();
var suiteTableData = new Array();
</script>
<!--
<script type="text/javascript" src="jquery-ui/js/jquery-ui-1.8.16.custom.min.js"></script>
-->
</head>
<body>
<div class="top-banner-root">
<span class="top-banner-title-font">Test results</span>
<br/>
<span class="top-banner-font-1">1 suite</span>
</div> <!-- top-banner-root -->
<div class="navigator-root">
<div class="navigator-suite-header">
<span>All suites</span>
<a href="#" class="collapse-all-link" title="Collapse/expand all the suites">
<img class="collapse-all-icon" src="collapseall.gif">
</img> <!-- collapse-all-icon -->
</a> <!-- collapse-all-link -->
</div> <!-- navigator-suite-header -->
<div class="suite">
<div class="rounded-window">
<div class="suite-header light-rounded-window-top">
<a href="#" class="navigator-link" panel-name="suite-Default_suite">
<span class="suite-name border-passed">Default suite</span>
</a> <!-- navigator-link -->
</div> <!-- suite-header light-rounded-window-top -->
<div class="navigator-suite-content">
<div class="suite-section-title">
<span>Info</span>
</div> <!-- suite-section-title -->
<div class="suite-section-content">
<ul>
<li>
<a href="#" class="navigator-link " panel-name="test-xml-Default_suite">
<span>C:\Users\hohwille\AppData\Local\Temp\testng-eclipse--1868900122\testng-customsuite.xml</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="testlist-Default_suite">
<span class="test-stats">1 test</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="group-Default_suite">
<span>1 group</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="times-Default_suite">
<span>Times</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="reporter-Default_suite">
<span>Reporter output</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="ignored-methods-Default_suite">
<span>Ignored methods</span>
</a> <!-- navigator-link -->
</li>
<li>
<a href="#" class="navigator-link " panel-name="chronological-Default_suite">
<span>Chronological view</span>
</a> <!-- navigator-link -->
</li>
</ul>
</div> <!-- suite-section-content -->
<div class="result-section">
<div class="suite-section-title">
<span>Results</span>
</div> <!-- suite-section-title -->
<div class="suite-section-content">
<ul>
<li>
<span class="method-stats">1 method, 1 passed</span>
</li>
<li>
<span class="method-list-title passed">Passed methods</span>
<span class="show-or-hide-methods passed">
<a href="#" panel-name="suite-Default_suite" class="hide-methods passed suite-Default_suite"> (hide)</a> <!-- hide-methods passed suite-Default_suite -->
<a href="#" panel-name="suite-Default_suite" class="show-methods passed suite-Default_suite"> (show)</a> <!-- show-methods passed suite-Default_suite -->
</span>
<div class="method-list-content passed suite-Default_suite">
<span>
<img width="3%" src="passed.png"/>
<a href="#" class="method navigator-link" panel-name="suite-Default_suite" title="javax.time.format.TestDateTimeFormatter" hash-for-method="test_withLocale_same">test_withLocale_same</a> <!-- method navigator-link -->
</span>
<br/>
</div> <!-- method-list-content passed suite-Default_suite -->
</li>
</ul>
</div> <!-- suite-section-content -->
</div> <!-- result-section -->
</div> <!-- navigator-suite-content -->
</div> <!-- rounded-window -->
</div> <!-- suite -->
</div> <!-- navigator-root -->
<div class="wrapper">
<div class="main-panel-root">
<div panel-name="suite-Default_suite" class="panel Default_suite">
<div class="suite-Default_suite-class-passed">
<div class="main-panel-header rounded-window-top">
<img src="passed.png"/>
<span class="class-name">javax.time.format.TestDateTimeFormatter</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<div class="method">
<div class="method-content">
<a name="test_withLocale_same">
</a> <!-- test_withLocale_same -->
<span class="method-name">test_withLocale_same</span>
</div> <!-- method-content -->
</div> <!-- method -->
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- suite-Default_suite-class-passed -->
</div> <!-- panel Default_suite -->
<div panel-name="test-xml-Default_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">C:\Users\hohwille\AppData\Local\Temp\testng-eclipse--1868900122\testng-customsuite.xml</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default suite">
<test verbose="2" name="Default test">
<classes>
<class name="javax.time.format.TestDateTimeFormatter"/>
</classes>
</test> <!-- Default test -->
</suite> <!-- Default suite -->
</pre>
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="testlist-Default_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Tests for Default suite</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<ul>
<li>
<span class="test-name">Default test (1 class)</span>
</li>
</ul>
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="group-Default_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Groups for Default suite</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<div class="test-group">
<span class="test-group-name">implementation</span>
<br/>
<div class="method-in-group">
<span class="method-in-group-name">test_withLocale_same</span>
<br/>
</div> <!-- method-in-group -->
</div> <!-- test-group -->
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="times-Default_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Times for Default suite</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<div class="times-div">
<script type="text/javascript">
suiteTableInitFunctions.push('tableData_Default_suite');
function tableData_Default_suite() {
var data = new google.visualization.DataTable();
data.addColumn('number', 'Number');
data.addColumn('string', 'Method');
data.addColumn('string', 'Class');
data.addColumn('number', 'Time (ms)');
data.addRows(1);
data.setCell(0, 0, 0)
data.setCell(0, 1, 'test_withLocale_same')
data.setCell(0, 2, 'javax.time.format.TestDateTimeFormatter')
data.setCell(0, 3, 8);
window.suiteTableData['Default_suite']= { tableData: data, tableDiv: 'times-div-Default_suite'}
return data;
}
</script>
<span class="suite-total-time">Total running time: 8 ms</span>
<div id="times-div-Default_suite">
</div> <!-- times-div-Default_suite -->
</div> <!-- times-div -->
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="reporter-Default_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Reporter output for Default suite</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="ignored-methods-Default_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">0 ignored methods</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
<div panel-name="chronological-Default_suite" class="panel">
<div class="main-panel-header rounded-window-top">
<span class="header-content">Methods in chronological order</span>
</div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom">
<div class="chronological-class">
<div class="chronological-class-name">javax.time.format.TestDateTimeFormatter</div> <!-- chronological-class-name -->
<div class="configuration-method before">
<span class="method-name">setUp</span>
<span class="method-start">0 ms</span>
</div> <!-- configuration-method before -->
<div class="test-method">
<span class="method-name">test_withLocale_same</span>
<span class="method-start">11 ms</span>
</div> <!-- test-method -->
</div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel -->
</div> <!-- main-panel-root -->
</div> <!-- wrapper -->
</body>
</html>
| m-m-m/java8-backports | mmm-util-backport-java.time/test-output/index.html | HTML | apache-2.0 | 12,107 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
2516,
1028,
3231,
3070,
4311,
1026,
1013,
2516,
1028,
1026,
4957,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
17850,
12879,
1027,
1000,
3231,
3070,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package stacks3;
import java.io.*;
// Todo
public class Zad3 {
public static void main(String[] args) {
Stos stos = new Stos();
while (true) {
System.out.println("Podaj napis do odwrócenia (Puste konczy program)");
String napis = "";
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
napis = br.readLine();
System.out.println(napis);
}
catch (IOException e){
e.printStackTrace();
}
if (napis.isEmpty()) {
break;
}
for (String litera : napis.split("")) {
stos.dodajDoStosu(litera);
}
String napisDoWypisania = "";
while (true){
try{
napisDoWypisania += stos.pobierzZeStosu();
}
catch (PustyStosException e){
break;
}
}
System.out.println(napisDoWypisania);
}
}
} | novirael/school-codebase | java/algorithms/src/stacks3/Zad3.java | Java | mit | 1,100 | [
30522,
7427,
20829,
2509,
1025,
12324,
9262,
1012,
22834,
1012,
1008,
1025,
1013,
1013,
28681,
2080,
2270,
2465,
23564,
2094,
2509,
1063,
2270,
10763,
11675,
2364,
1006,
5164,
1031,
1033,
12098,
5620,
1007,
1063,
2358,
2891,
2358,
2891,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MessagesComponent } from './messages.component';
import { MessageService } from '../message.service';
describe('MessagesComponent', () => {
let component: MessagesComponent;
let fixture: ComponentFixture<MessagesComponent>;
let messageService: MessageService;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MessagesComponent],
providers: [MessageService]
}).compileComponents();
messageService = TestBed.inject(MessageService);
}));
beforeEach(() => {
fixture = TestBed.createComponent(MessagesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});
| mdvorak/resource-router | src/app/messages/messages.component.spec.ts | TypeScript | mit | 833 | [
30522,
12324,
1063,
6922,
8873,
18413,
5397,
1010,
3231,
8270,
1010,
3524,
29278,
3022,
6038,
2278,
1065,
2013,
1005,
1030,
16108,
1013,
4563,
1013,
5604,
1005,
1025,
12324,
1063,
7696,
9006,
29513,
3372,
1065,
2013,
1005,
1012,
1013,
7696,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -o - | FileCheck %s --check-prefix=DEFAULT
// RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -o - -fwrapv | FileCheck %s --check-prefix=WRAPV
// RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -o - -ftrapv | FileCheck %s --check-prefix=TRAPV
// RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -o - -fsanitize=signed-integer-overflow | FileCheck %s --check-prefix=CATCH_UB
// RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -o - -ftrapv -ftrapv-handler foo | FileCheck %s --check-prefix=TRAPV_HANDLER
// Tests for signed integer overflow stuff.
// rdar://7432000 rdar://7221421
void test1() {
// DEFAULT-LABEL: define void @test1
// WRAPV-LABEL: define void @test1
// TRAPV-LABEL: define void @test1
extern volatile int f11G, a, b;
// DEFAULT: add nsw i32
// WRAPV: add i32
// TRAPV: llvm.sadd.with.overflow.i32
// CATCH_UB: llvm.sadd.with.overflow.i32
// TRAPV_HANDLER: foo(
f11G = a + b;
// DEFAULT: sub nsw i32
// WRAPV: sub i32
// TRAPV: llvm.ssub.with.overflow.i32
// CATCH_UB: llvm.ssub.with.overflow.i32
// TRAPV_HANDLER: foo(
f11G = a - b;
// DEFAULT: mul nsw i32
// WRAPV: mul i32
// TRAPV: llvm.smul.with.overflow.i32
// CATCH_UB: llvm.smul.with.overflow.i32
// TRAPV_HANDLER: foo(
f11G = a * b;
// DEFAULT: sub nsw i32 0,
// WRAPV: sub i32 0,
// TRAPV: llvm.ssub.with.overflow.i32(i32 0
// CATCH_UB: llvm.ssub.with.overflow.i32(i32 0
// TRAPV_HANDLER: foo(
f11G = -a;
// PR7426 - Overflow checking for increments.
// DEFAULT: add nsw i32 {{.*}}, 1
// WRAPV: add i32 {{.*}}, 1
// TRAPV: llvm.sadd.with.overflow.i32({{.*}}, i32 1)
// CATCH_UB: llvm.sadd.with.overflow.i32({{.*}}, i32 1)
// TRAPV_HANDLER: foo(
++a;
// DEFAULT: add nsw i32 {{.*}}, -1
// WRAPV: add i32 {{.*}}, -1
// TRAPV: llvm.ssub.with.overflow.i32({{.*}}, i32 1)
// CATCH_UB: llvm.ssub.with.overflow.i32({{.*}}, i32 1)
// TRAPV_HANDLER: foo(
--a;
// -fwrapv should turn off inbounds for GEP's, PR9256
extern int* P;
++P;
// DEFAULT: getelementptr inbounds i32, i32*
// WRAPV: getelementptr i32, i32*
// TRAPV: getelementptr inbounds i32, i32*
// CATCH_UB: getelementptr inbounds i32, i32*
// PR9350: char pre-increment never overflows.
extern volatile signed char PR9350_char_inc;
// DEFAULT: add i8 {{.*}}, 1
// WRAPV: add i8 {{.*}}, 1
// TRAPV: add i8 {{.*}}, 1
// CATCH_UB: add i8 {{.*}}, 1
++PR9350_char_inc;
// PR9350: char pre-decrement never overflows.
extern volatile signed char PR9350_char_dec;
// DEFAULT: add i8 {{.*}}, -1
// WRAPV: add i8 {{.*}}, -1
// TRAPV: add i8 {{.*}}, -1
// CATCH_UB: add i8 {{.*}}, -1
--PR9350_char_dec;
// PR9350: short pre-increment never overflows.
extern volatile signed short PR9350_short_inc;
// DEFAULT: add i16 {{.*}}, 1
// WRAPV: add i16 {{.*}}, 1
// TRAPV: add i16 {{.*}}, 1
// CATCH_UB: add i16 {{.*}}, 1
++PR9350_short_inc;
// PR9350: short pre-decrement never overflows.
extern volatile signed short PR9350_short_dec;
// DEFAULT: add i16 {{.*}}, -1
// WRAPV: add i16 {{.*}}, -1
// TRAPV: add i16 {{.*}}, -1
// CATCH_UB: add i16 {{.*}}, -1
--PR9350_short_dec;
// PR24256: don't instrument __builtin_frame_address.
__builtin_frame_address(0 + 0);
// DEFAULT: call i8* @llvm.frameaddress(i32 0)
// WRAPV: call i8* @llvm.frameaddress(i32 0)
// TRAPV: call i8* @llvm.frameaddress(i32 0)
// CATCH_UB: call i8* @llvm.frameaddress(i32 0)
}
| youtube/cobalt | third_party/llvm-project/clang/test/CodeGen/integer-overflow.c | C | bsd-3-clause | 3,563 | [
30522,
1013,
1013,
2448,
1024,
1003,
6338,
2290,
1035,
10507,
2487,
1011,
6420,
1060,
20842,
1035,
4185,
1011,
6207,
1011,
11534,
1003,
1055,
1011,
12495,
2102,
1011,
2222,
2615,
2213,
1011,
1051,
1011,
1064,
5371,
5403,
3600,
1003,
1055,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* pkix_pl_crlentry.h
*
* CRL Entry Type Object Definitions
*
*/
#ifndef _PKIX_PL_CRLENTRY_H
#define _PKIX_PL_CRLENTRY_H
#include "pkix_pl_common.h"
#ifdef __cplusplus
extern "C" {
#endif
#define PKIX_PL_CRL_REASONCODE_NOTSET (-1)
struct PKIX_PL_CRLEntryStruct {
CERTCrlEntry *nssCrlEntry;
PKIX_PL_BigInt *serialNumber;
PKIX_List *critExtOids;
PKIX_Int32 userReasonCode;
PKIX_Boolean userReasonCodeAbsent;
};
/* see source file for function documentation */
PKIX_Error *pkix_pl_CRLEntry_RegisterSelf(void *plContext);
/* following functions are called by CRL only hence not public */
PKIX_Error *
pkix_pl_CRLEntry_Create(
CERTCrlEntry **nssCrlEntry, /* head of entry list */
PKIX_List **pCrlEntryList,
void *plContext);
#ifdef __cplusplus
}
#endif
#endif /* _PKIX_PL_CRLENTRY_H */
| wangscript/libjingle-1 | trunk/third_party/nss/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.h | C | bsd-3-clause | 1,068 | [
30522,
1013,
1008,
2023,
3120,
3642,
2433,
2003,
3395,
2000,
1996,
3408,
1997,
1996,
9587,
5831,
4571,
2270,
1008,
6105,
1010,
1058,
1012,
1016,
1012,
1014,
1012,
2065,
1037,
6100,
1997,
1996,
6131,
2140,
2001,
2025,
5500,
2007,
2023,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bertrand: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.11.1 / bertrand - 8.7.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
bertrand
<small>
8.7.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-10-19 05:32:36 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-19 05:32:36 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.11.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-community/bertrand"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Bertrand"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: Knuth's algorithm" "keyword: prime numbers" "keyword: Bertrand's postulate" "category: Mathematics/Arithmetic and Number Theory/Number theory" "category: Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs based on external tools" "category: Miscellaneous/Extracted Programs/Arithmetic" "date: 2002" ]
authors: [ "Laurent Théry" ]
bug-reports: "https://github.com/coq-community/bertrand/issues"
dev-repo: "git+https://github.com/coq-community/bertrand.git"
synopsis: "Correctness of Knuth's algorithm for prime numbers"
description: """
A proof of correctness of the algorithm as described in
`The Art of Computer Programming: Fundamental Algorithms'
by Knuth, pages 147-149"""
flags: light-uninstall
url {
src: "https://github.com/coq-community/bertrand/archive/v8.7.0.tar.gz"
checksum: "md5=94c1f46fd9ba1f18c956f3fac62dff4a"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-bertrand.8.7.0 coq.8.11.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.1).
The following dependencies couldn't be met:
- coq-bertrand -> coq < 8.8~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-bertrand.8.7.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.07.1-2.0.6/released/8.11.1/bertrand/8.7.0.html | HTML | mit | 7,140 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
11374,
1027,
1000,
4372,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
3193,
6442,
1000,
418... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
package backend
import (
"errors"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/consensus/istanbul"
"github.com/ethereum/go-ethereum/p2p"
lru "github.com/hashicorp/golang-lru"
)
const (
istanbulMsg = 0x11
)
var (
// errDecodeFailed is returned when decode message fails
errDecodeFailed = errors.New("fail to decode istanbul message")
)
// Protocol implements consensus.Engine.Protocol
func (sb *backend) Protocol() consensus.Protocol {
return consensus.Protocol{
Name: "istanbul",
Versions: []uint{64},
Lengths: []uint64{18},
}
}
// HandleMsg implements consensus.Handler.HandleMsg
func (sb *backend) HandleMsg(addr common.Address, msg p2p.Msg) (bool, error) {
sb.coreMu.Lock()
defer sb.coreMu.Unlock()
if msg.Code == istanbulMsg {
if !sb.coreStarted {
return true, istanbul.ErrStoppedEngine
}
var data []byte
if err := msg.Decode(&data); err != nil {
return true, errDecodeFailed
}
hash := istanbul.RLPHash(data)
// Mark peer's message
ms, ok := sb.recentMessages.Get(addr)
var m *lru.ARCCache
if ok {
m, _ = ms.(*lru.ARCCache)
} else {
m, _ = lru.NewARC(inmemoryMessages)
sb.recentMessages.Add(addr, m)
}
m.Add(hash, true)
// Mark self known message
if _, ok := sb.knownMessages.Get(hash); ok {
return true, nil
}
sb.knownMessages.Add(hash, true)
go sb.istanbulEventMux.Post(istanbul.MessageEvent{
Payload: data,
})
return true, nil
}
return false, nil
}
// SetBroadcaster implements consensus.Handler.SetBroadcaster
func (sb *backend) SetBroadcaster(broadcaster consensus.Broadcaster) {
sb.broadcaster = broadcaster
}
func (sb *backend) NewChainHead() error {
sb.coreMu.RLock()
defer sb.coreMu.RUnlock()
if !sb.coreStarted {
return istanbul.ErrStoppedEngine
}
go sb.istanbulEventMux.Post(istanbul.FinalCommittedEvent{})
return nil
}
| getamis/go-ethereum | consensus/istanbul/backend/handler.go | GO | lgpl-3.0 | 2,713 | [
30522,
1013,
1013,
9385,
2418,
1996,
2175,
1011,
28855,
14820,
6048,
1013,
1013,
2023,
5371,
2003,
2112,
1997,
1996,
2175,
1011,
28855,
14820,
3075,
1012,
1013,
1013,
1013,
1013,
1996,
2175,
1011,
28855,
14820,
3075,
2003,
2489,
4007,
1024,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
[简体中文](README_ZH.md)
# rawbuf - Scalable & Efficient Serialization Library #

`rawbuf` is a powerful tool kit used in object serialization and deserialization with **full automation** feature, all new design based on [YAS](https://github.com/jobs-github/yas).
The design of rawbuf:

## What is rawbuf ? ##
`rawbuf` is inspired by [flatbuffers](https://github.com/google/flatbuffers) and [slothjson](https://github.com/jobs-github/slothjson). `flatbuffers` is efficient enough but not so stupid & succinct, while `slothjson` is stupid & succinct enough but not so efficient. That is what `rawbuf` needs to do.
`rawbuf` uses flatbuffers-like protocol to describe data, and uses [YAS](https://github.com/jobs-github/yas) for automation. So it is faster than `slothjson` and easier than `flatbuffers`.
Please refer to [slothjson](https://github.com/jobs-github/slothjson) for more details.
## Features ##
* Efficient (4x faster than `slothjson`)
* Succinct interface for people (everything can be done with just a single line of code)
* Simple, powerful code generator with full automation (not need to implement serialize/deserialize interfaces manually)
* Support optional field (easy to serialize/deserialize field optionally)
* Flexible schema (support array, dict, nested object and **nested array & dict**)
* Succinct design (no tricky C++ template technology, easy to understand), reusable, extensible (easy to support new types)
* Cross-Platform (Windows & Linux & OS X)
## Usage ##
Take C++ implement of rawbuf as an example. In the beginning, you need to add the following items to your project:
* `rawbuf`: refer to `cpp/include/rawbuf.h` and `cpp/include/rawbuf.cpp`, the library of rawbuf
**That's all the dependency**.
Then, write a schema named `fxxx_gfw.json`:
{
"structs":
[
{
"type": "fxxx_gfw_t",
"members":
[
["bool", "bool_val", "100"],
["int8_t", "int8_val"],
["int32_t", "int32_val"],
["uint64_t", "uint64_val"],
["double", "double_val", "101"],
["string", "str_val"],
["[int32_t]", "vec_val", "110"],
["{string}", "dict_val"]
]
}
]
}
Run command line:
python cpp/generator/rawbuf.py -f cpp/src/fxxx_gfw.json
It will generate `fxxx_gfw.h` and `fxxx_gfw.cpp`, which you need to add to your project.
Then you can code like this:
rawbuf::fxxx_gfw_t obj_val;
// set the value of "obj_val"
......
// output as instance of "rb_buf_t"
rawbuf::rb_buf_t rb_val = rawbuf::rb_create_buf(rawbuf::rb_sizeof(obj_val));
bool rc = rawbuf::rb_encode(obj_val, rb_val);
// use value of "rb_val"
......
rawbuf::rb_dispose_buf(rb_val); // do not forget!
// output as file
std::string path = "fxxx_gfw_t.bin";
bool rc = rawbuf::rb_dump(obj_val, path);
If you don't want to serialize all fields, code like this:
obj_val.skip_dict_val(); // call "skip_xxx"
The same as deserialize:
rawbuf::rb_buf_t rb_val = rawbuf::rb_create_buf(rawbuf::rb_sizeof(obj_val));
// set the value of "rb_val"
......
// load from "rb_val"
rawbuf::fxxx_gfw_t obj_val;
bool rc = rawbuf::rb_decode(rb_val, 0, obj_val);
......
rawbuf::rb_dispose_buf(rb_val); // do not forget!
// load from file
std::string path = "fxxx_gfw_t.bin";
rawbuf::fxxx_gfw_t obj_val;
bool rc = rawbuf::rb_load(path, obj_val);
After deserialized, if you need to know **whether a field is in binary buffer or not**, code like this:
if (obj_val.rb_has_dict_val()) // call "rb_has_xxx()"
{
......
}
That's all about the usage, simple & stupid, isn't it ?
## Supported Programming Languages ##
* C++
* C
* Go
I implement rawbuf using php & python, but not merge to master branch as the performance does not come up to expectation. Welcome contribution on other programming languages' implementation.
* [php-alpha](https://github.com/jobs-github/rawbuf/tree/php-alpha)
* [python-alpha](https://github.com/jobs-github/rawbuf/tree/python-alpha)
* [php-beta](https://github.com/jobs-github/rawbuf/tree/php-beta)
* [python-beta](https://github.com/jobs-github/rawbuf/tree/python-beta)
Note: the performance of `beta` is better than `alpha`.
## Implement on YAS Extension ##
Language | Implement YAS Extension
--------------|-------------------------
C++ | Yes
C | No
go | No
php-alpha | Yes
python-alpha | Yes
php-beta | No
python-beta | No
## Platforms ##
Platform | Description
---------|----------------------------------------------------------
Linux | CentOS 6.x & Ubuntu 10.04 (kernel 2.6.32) GCC 4.4.7
Win32 | Windows 7, MSVC 10.0
OS X | Mac OS X EI Capitan, GCC 4.2.1, Apple LLVM version 7.3.0
## Performance ##
## Details ##
`rawbuf` and `slothjson` share the **same design, same schema**. The difference between them is the protocol (`text` vs `binary`) and performance.
You can get all details from [here](https://github.com/jobs-github/slothjson) and [here](https://github.com/jobs-github/yas)
## Protocol ##
### scalar ###

### string ###

### object ###

### array ###

### dict ###

## License ##
`rawbuf` is licensed under [New BSD License](https://opensource.org/licenses/BSD-3-Clause), a very flexible license to use.
## Author ##
* chengzhuo (jobs, yao050421103@163.com)
## More ##
- Yet Another Schema - [YAS](https://github.com/jobs-github/yas)
- Object Serialization Artifact For Lazy Man - [slothjson](https://github.com/jobs-github/slothjson)
- High-performance Distributed Storage - [huststore](https://github.com/Qihoo360/huststore) | jobs-github/rawbuf | README.md | Markdown | bsd-3-clause | 5,997 | [
30522,
1031,
100,
100,
1746,
1861,
1033,
1006,
3191,
4168,
1035,
1062,
2232,
1012,
9108,
1007,
1001,
6315,
8569,
2546,
1011,
26743,
3468,
1004,
8114,
7642,
3989,
3075,
1001,
999,
1031,
6315,
8569,
2546,
8154,
1033,
1006,
24501,
1013,
8154... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Synopsis
This is a simple demonstration of how to run a Gradle build, that resolves dependencies, upload artifacts and publish build info to Artifactory.
<br>
Read the full documentation [here](https://www.jfrog.com/confluence/display/RTF/Working+With+Pipeline+Jobs+in+Jenkins). | jenkinsci/pipeline-examples | pipeline-examples/artifactory-gradle-build/README.md | Markdown | mit | 281 | [
30522,
1001,
19962,
22599,
2023,
2003,
1037,
3722,
10467,
1997,
2129,
2000,
2448,
1037,
24665,
4215,
2571,
3857,
1010,
2008,
10663,
2015,
12530,
15266,
1010,
2039,
11066,
10471,
1998,
10172,
3857,
30524,
8649,
1012,
4012,
1013,
13693,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file Debugger.cpp
* @author Gav Wood <i@gavwood.com>
* @date 2015
*/
#include "Debugger.h"
#include <fstream>
#include <QFileDialog>
#include <libevm/VM.h>
#include <libethereum/ExtVM.h>
#include <libethereum/Executive.h>
#include "ui_Debugger.h"
using namespace std;
using namespace dev;
using namespace aleth;
using namespace eth;
Debugger::Debugger(Context* _c, QWidget* _parent):
QDialog(_parent),
ui(new Ui::Debugger),
m_context(_c)
{
ui->setupUi(this);
}
Debugger::~Debugger()
{
delete ui;
}
void Debugger::init()
{
if (m_session.history.size())
{
alterDebugStateGroup(true);
ui->debugCode->setEnabled(false);
ui->debugTimeline->setMinimum(0);
ui->debugTimeline->setMaximum(m_session.history.size());
ui->debugTimeline->setValue(0);
}
}
void Debugger::populate(dev::eth::Executive& _executive, dev::eth::Transaction const& _transaction)
{
finished();
if (m_session.populate(_executive, _transaction))
init();
update();
}
bool DebugSession::populate(dev::eth::Executive& _executive, dev::eth::Transaction const& _transaction)
{
try {
_executive.initialize(_transaction);
if (_executive.execute())
return false;
}
catch (...)
{
// Invalid transaction
return false;
}
vector<WorldState const*> levels;
bytes lastExtCode;
bytesConstRef lastData;
h256 lastHash;
h256 lastDataHash;
auto onOp = [&](uint64_t steps, Instruction inst, bigint newMemSize, bigint gasCost, bigint gas, VM* voidVM, ExtVMFace const* voidExt)
{
VM& vm = *voidVM;
ExtVM const& ext = *static_cast<ExtVM const*>(voidExt);
if (ext.code != lastExtCode)
{
lastExtCode = ext.code;
lastHash = sha3(lastExtCode);
if (!codes.count(lastHash))
codes[lastHash] = ext.code;
}
if (ext.data != lastData)
{
lastData = ext.data;
lastDataHash = sha3(lastData);
if (!codes.count(lastDataHash))
codes[lastDataHash] = ext.data.toBytes();
}
if (levels.size() < ext.depth)
levels.push_back(&history.back());
else
levels.resize(ext.depth);
history.append(WorldState({steps, ext.myAddress, vm.curPC(), inst, newMemSize, static_cast<u256>(gas), lastHash, lastDataHash, vm.stack(), vm.memory(), gasCost, ext.state().storage(ext.myAddress), levels}));
};
_executive.go(onOp);
_executive.finalize();
return true;
}
void Debugger::finished()
{
m_session = DebugSession();
ui->callStack->clear();
ui->debugCode->clear();
ui->debugStack->clear();
ui->debugMemory->setHtml("");
ui->debugStorage->setHtml("");
ui->debugStateInfo->setText("");
alterDebugStateGroup(false);
}
void Debugger::update()
{
if (m_session.history.size())
{
WorldState const& nws = m_session.history[min((int)m_session.history.size() - 1, ui->debugTimeline->value())];
WorldState const& ws = ui->callStack->currentRow() > 0 ? *nws.levels[nws.levels.size() - ui->callStack->currentRow()] : nws;
if (ui->debugTimeline->value() >= m_session.history.size())
{
if (ws.gasCost > ws.gas)
ui->debugMemory->setHtml("<h3>OUT-OF-GAS</h3>");
else if (ws.inst == Instruction::RETURN && ws.stack.size() >= 2)
{
unsigned from = (unsigned)ws.stack.back();
unsigned size = (unsigned)ws.stack[ws.stack.size() - 2];
unsigned o = 0;
bytes out(size, 0);
for (; o < size && from + o < ws.memory.size(); ++o)
out[o] = ws.memory[from + o];
ui->debugMemory->setHtml("<h3>RETURN</h3>" + QString::fromStdString(dev::memDump(out, 16, true)));
}
else if (ws.inst == Instruction::STOP)
ui->debugMemory->setHtml("<h3>STOP</h3>");
else if (ws.inst == Instruction::SUICIDE && ws.stack.size() >= 1)
ui->debugMemory->setHtml("<h3>SUICIDE</h3>0x" + QString::fromStdString(toString(right160(ws.stack.back()))));
else
ui->debugMemory->setHtml("<h3>EXCEPTION</h3>");
ostringstream ss;
ss << dec << "EXIT | GAS: " << dec << max<dev::bigint>(0, (dev::bigint)ws.gas - ws.gasCost);
ui->debugStateInfo->setText(QString::fromStdString(ss.str()));
ui->debugStorage->setHtml("");
ui->debugCallData->setHtml("");
m_session.currentData = h256();
ui->callStack->clear();
m_session.currentLevels.clear();
ui->debugCode->clear();
m_session.currentCode = h256();
ui->debugStack->setHtml("");
}
else
{
if (m_session.currentLevels != nws.levels || !ui->callStack->count())
{
m_session.currentLevels = nws.levels;
ui->callStack->clear();
for (unsigned i = 0; i <= nws.levels.size(); ++i)
{
WorldState const& s = i ? *nws.levels[nws.levels.size() - i] : nws;
ostringstream out;
out << s.cur.abridged();
if (i)
out << " " << instructionInfo(s.inst).name << " @0x" << hex << s.curPC;
ui->callStack->addItem(QString::fromStdString(out.str()));
}
}
if (ws.code != m_session.currentCode)
{
m_session.currentCode = ws.code;
bytes const& code = m_session.codes[ws.code];
QListWidget* dc = ui->debugCode;
dc->clear();
m_session.pcWarp.clear();
for (unsigned i = 0; i <= code.size(); ++i)
{
byte b = i < code.size() ? code[i] : 0;
try
{
QString s = QString::fromStdString(instructionInfo((Instruction)b).name);
ostringstream out;
out << hex << setw(4) << setfill('0') << i;
m_session.pcWarp[i] = dc->count();
if (b >= (byte)Instruction::PUSH1 && b <= (byte)Instruction::PUSH32)
{
unsigned bc = b - (byte)Instruction::PUSH1 + 1;
s = "PUSH 0x" + QString::fromStdString(toHex(bytesConstRef(&code[i + 1], bc)));
i += bc;
}
dc->addItem(QString::fromStdString(out.str()) + " " + s);
}
catch (...)
{
cerr << "Unhandled exception!" << endl << boost::current_exception_diagnostic_information();
break; // probably hit data segment
}
}
}
if (ws.callData != m_session.currentData)
{
m_session.currentData = ws.callData;
if (ws.callData)
{
assert(m_session.codes.count(ws.callData));
ui->debugCallData->setHtml(QString::fromStdString(dev::memDump(m_session.codes[ws.callData], 16, true)));
}
else
ui->debugCallData->setHtml("");
}
QString stack;
for (auto i: ws.stack)
stack.prepend("<div>" + QString::fromStdString(m_context->toHTML(i)) + "</div>");
ui->debugStack->setHtml(stack);
ui->debugMemory->setHtml(QString::fromStdString(dev::memDump(ws.memory, 16, true)));
assert(m_session.codes.count(ws.code));
if (m_session.codes[ws.code].size() >= (unsigned)ws.curPC)
{
int l = m_session.pcWarp[(unsigned)ws.curPC];
ui->debugCode->setCurrentRow(max(0, l - 5));
ui->debugCode->setCurrentRow(min(ui->debugCode->count() - 1, l + 5));
ui->debugCode->setCurrentRow(l);
}
else
cwarn << "PC (" << (unsigned)ws.curPC << ") is after code range (" << m_session.codes[ws.code].size() << ")";
ostringstream ss;
ss << dec << "STEP: " << ws.steps << " | PC: 0x" << hex << ws.curPC << " : " << instructionInfo(ws.inst).name << " | ADDMEM: " << dec << ws.newMemSize << " words | COST: " << dec << ws.gasCost << " | GAS: " << dec << ws.gas;
ui->debugStateInfo->setText(QString::fromStdString(ss.str()));
stringstream s;
auto keys = dev::keysOf(ws.storage);
sort(keys.begin(), keys.end());
for (auto const& key: keys)
s << "@" << m_context->toHTML(key) << " " << m_context->toHTML(ws.storage.at(key)) << "<br/>";
ui->debugStorage->setHtml(QString::fromStdString(s.str()));
}
}
}
void Debugger::on_callStack_currentItemChanged()
{
update();
}
void Debugger::alterDebugStateGroup(bool _enable) const
{
ui->stepOver->setEnabled(_enable);
ui->stepInto->setEnabled(_enable);
ui->stepOut->setEnabled(_enable);
ui->backOver->setEnabled(_enable);
ui->backInto->setEnabled(_enable);
ui->backOut->setEnabled(_enable);
ui->dump->setEnabled(_enable);
ui->dumpStorage->setEnabled(_enable);
ui->dumpPretty->setEnabled(_enable);
}
void Debugger::on_debugTimeline_valueChanged()
{
update();
}
void Debugger::on_stepOver_clicked()
{
if (ui->debugTimeline->value() < m_session.history.size()) {
auto l = m_session.history[ui->debugTimeline->value()].levels.size();
if ((ui->debugTimeline->value() + 1) < m_session.history.size() && m_session.history[ui->debugTimeline->value() + 1].levels.size() > l)
{
on_stepInto_clicked();
if (m_session.history[ui->debugTimeline->value()].levels.size() > l)
on_stepOut_clicked();
}
else
on_stepInto_clicked();
}
}
void Debugger::on_stepInto_clicked()
{
ui->debugTimeline->setValue(ui->debugTimeline->value() + 1);
ui->callStack->setCurrentRow(0);
}
void Debugger::on_stepOut_clicked()
{
if (ui->debugTimeline->value() < m_session.history.size())
{
auto ls = m_session.history[ui->debugTimeline->value()].levels.size();
auto l = ui->debugTimeline->value();
for (; l < m_session.history.size() && m_session.history[l].levels.size() >= ls; ++l) {}
ui->debugTimeline->setValue(l);
ui->callStack->setCurrentRow(0);
}
}
void Debugger::on_backInto_clicked()
{
ui->debugTimeline->setValue(ui->debugTimeline->value() - 1);
ui->callStack->setCurrentRow(0);
}
void Debugger::on_backOver_clicked()
{
auto l = m_session.history[ui->debugTimeline->value()].levels.size();
if (ui->debugTimeline->value() > 0 && m_session.history[ui->debugTimeline->value() - 1].levels.size() > l)
{
on_backInto_clicked();
if (m_session.history[ui->debugTimeline->value()].levels.size() > l)
on_backOut_clicked();
}
else
on_backInto_clicked();
}
void Debugger::on_backOut_clicked()
{
if (ui->debugTimeline->value() > 0 && m_session.history.size() > 0)
{
auto ls = m_session.history[min(ui->debugTimeline->value(), m_session.history.size() - 1)].levels.size();
int l = ui->debugTimeline->value();
for (; l > 0 && m_session.history[l].levels.size() >= ls; --l) {}
ui->debugTimeline->setValue(l);
ui->callStack->setCurrentRow(0);
}
}
void Debugger::on_dump_clicked()
{
QString fn = QFileDialog::getSaveFileName(this, "Select file to output EVM trace");
ofstream f(fn.toStdString());
if (f.is_open())
for (WorldState const& ws: m_session.history)
f << ws.cur << " " << hex << toHex(dev::toCompactBigEndian(ws.curPC, 1)) << " " << hex << toHex(dev::toCompactBigEndian((unsigned)(byte)ws.inst, 1)) << " " << hex << toHex(dev::toCompactBigEndian((uint64_t)ws.gas, 1)) << endl;
}
void Debugger::on_dumpPretty_clicked()
{
QString fn = QFileDialog::getSaveFileName(this, "Select file to output EVM trace");
ofstream f(fn.toStdString());
if (f.is_open())
for (WorldState const& ws: m_session.history)
{
f << endl << " STACK" << endl;
for (auto i: ws.stack)
f << (h256)i << endl;
f << " MEMORY" << endl << dev::memDump(ws.memory);
f << " STORAGE" << endl;
for (auto const& i: ws.storage)
f << showbase << hex << i.first << ": " << i.second << endl;
f << dec << ws.levels.size() << " | " << ws.cur << " | #" << ws.steps << " | " << hex << setw(4) << setfill('0') << ws.curPC << " : " << instructionInfo(ws.inst).name << " | " << dec << ws.gas << " | -" << dec << ws.gasCost << " | " << ws.newMemSize << "x32";
}
}
void Debugger::on_dumpStorage_clicked()
{
QString fn = QFileDialog::getSaveFileName(this, "Select file to output EVM trace");
ofstream f(fn.toStdString());
if (f.is_open())
for (WorldState const& ws: m_session.history)
{
if (ws.inst == Instruction::STOP || ws.inst == Instruction::RETURN || ws.inst == Instruction::SUICIDE)
for (auto i: ws.storage)
f << toHex(dev::toCompactBigEndian(i.first, 1)) << " " << toHex(dev::toCompactBigEndian(i.second, 1)) << endl;
f << ws.cur << " " << hex << toHex(dev::toCompactBigEndian(ws.curPC, 1)) << " " << hex << toHex(dev::toCompactBigEndian((unsigned)(byte)ws.inst, 1)) << " " << hex << toHex(dev::toCompactBigEndian((uint64_t)ws.gas, 1)) << endl;
}
}
| CJentzsch/alethzero | libaleth/Debugger.cpp | C++ | gpl-3.0 | 12,459 | [
30522,
1013,
1008,
2023,
5371,
2003,
2112,
1997,
18133,
2361,
1011,
28855,
14820,
1012,
18133,
2361,
1011,
28855,
14820,
2003,
2489,
4007,
1024,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
2104,
1996,
3408... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
module DataView
class Table
ALL = :all
NONE = :none
attr_reader :cell_presenters, :data
# Initializes Table view (presenter?)
# @param [Brewery::DataTable] Data table to be rendered
def initialize(data_table)
@columns = {}
@data = data_table
@cell_presenters = []
@data.columns.count.times do |c|
@cell_presenters[c] = []
@data.rows.count.times do |r|
@cell_presenters[c][r] = nil
end
end
end
# Renders Data Table as HTML
# @return [String] Data Table in HTML form
def as_html
@cell_presenters.flatten.uniq.each do |p|
p.prepare(self) if p.respond_to? :prepare
end
table = Html::Element.new(:table, "", :class => "data_table")
header = table.new_child(:tr)
@data.columns.each do |col|
header.new_child(:th, col.label, :class => col.identifier)
end
@data.rows.each_index do |row|
html_class = (row % 2 == 1) ? "odd" : "even"
if row == @data.rows.size-1
html_class += " last"
end
row_element = table.new_child(:tr, "", :class => html_class)
@data.rows[row].each_index do |col|
cell_element = row_element.new_child(:td,
@data.formatted_value_at(row, col),
:class => @data.columns[col].identifier)
if presenter = presenter_at(row, col)
presenter.present(cell_element, @data.rows[row][col], row)
end
end
end
table.to_s
end
def link(column)
@columns[:firma] ||= {}
@columns[:firma][:link] = true
self
end
# Adds cell presenter to a position.
# @param [Hash] Hash of position. {:col => ..., :row => ...}
# @param [ID] Presenter class.
#
# Passed hash must have two keys, :col and :row. It can be
# either a symbol (:all, :none, :first, :last) or array of
# elements specified by symbol (column identifier) or an Integer
# (column or row number.)
#
# @example Adding presenter to all rows, but only first column
# table.add_cell_presenter({:row => :all, :col => :first})
# @example Adding presenter to first two rows and column with id :title
# table.add_cell_presenter({:row => [0, 1], :col => [:title]})
def add_cell_presenter(position, presenter)
@data.columns.each_index do |col|
@data.rows.each_index do |row|
if matches_position(position, col, row)
@cell_presenters[col][row] = presenter
end
end
end
end
# Removes cell presenter from a position.
# @param [Hash] Hash of position. {:col => ..., :row => ...}
# @see Table#add_cell_presenter
def remove_cell_presenter(position)
@data.columns.each_index do |col|
@data.rows.each_index do |row|
if matches_position(position, col, row)
@cell_presenters[col][row] = nil
end
end
end
end
# Returns presenter at specified index.
# @param [Integer] Row
# @param [Integer] Column
def presenter_at(row, col)
@cell_presenters[col][row]
end
# Matches position hash against particular index and returns
# true if it's matched.
# @param [Hash] Position
# @param [Integer] Column
# @param [Integer] Row
def matches_position(position, col, row)
matches_col = if position[:col].is_a? Symbol
if position[:col] == :all
true
elsif position[:col] == :none
false
elsif position[:col] == :first &&
col == 0
true
elsif position[:col] == :last &&
col == @data.columns.size-1
true
else
false
end
elsif position[:col].is_a? Array
if position[:col].include?(col)
true
elsif position[:col].include?(@data.columns[col].identifier)
true
else
false
end
end
matches_row = if position[:row].is_a? Symbol
if position[:row] == :all
true
elsif position[:row] == :none
false
elsif position[:row] == :first &&
row == 0
true
elsif position[:row] == :last &&
row == @data.rows.size-1
true
else
false
end
elsif position[:row].is_a? Array
if position[:row].include?(row)
true
else
false
end
end
matches_col && matches_row
end
end
end | Stiivi/vvo-reports | lib/data_view/table.rb | Ruby | gpl-3.0 | 4,622 | [
30522,
11336,
2951,
8584,
2465,
2795,
2035,
1027,
1024,
2035,
3904,
1027,
1024,
3904,
2012,
16344,
1035,
8068,
1024,
3526,
1035,
25588,
1010,
1024,
2951,
1001,
3988,
10057,
2795,
3193,
1006,
10044,
1029,
1007,
1001,
1030,
11498,
2213,
1031,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* This was automagically generated from arch/arm/tools/mach-types!
* Do NOT edit
*/
#ifndef __ASM_ARM_MACH_TYPE_H
#define __ASM_ARM_MACH_TYPE_H
#ifndef __ASSEMBLY__
/* The type of machine we're running on */
extern unsigned int __machine_arch_type;
#endif
/* see arch/arm/kernel/arch.c for a description of these */
#define MACH_TYPE_EBSA110 0
#define MACH_TYPE_RISCPC 1
#define MACH_TYPE_EBSA285 4
#define MACH_TYPE_NETWINDER 5
#define MACH_TYPE_CATS 6
#define MACH_TYPE_SHARK 15
#define MACH_TYPE_BRUTUS 16
#define MACH_TYPE_PERSONAL_SERVER 17
#define MACH_TYPE_L7200 19
#define MACH_TYPE_PLEB 20
#define MACH_TYPE_INTEGRATOR 21
#define MACH_TYPE_H3600 22
#define MACH_TYPE_P720T 24
#define MACH_TYPE_ASSABET 25
#define MACH_TYPE_LART 27
#define MACH_TYPE_GRAPHICSCLIENT 29
#define MACH_TYPE_XP860 30
#define MACH_TYPE_CERF 31
#define MACH_TYPE_NANOENGINE 32
#define MACH_TYPE_JORNADA720 48
#define MACH_TYPE_EDB7211 50
#define MACH_TYPE_PFS168 52
#define MACH_TYPE_FLEXANET 54
#define MACH_TYPE_SIMPAD 87
#define MACH_TYPE_LUBBOCK 89
#define MACH_TYPE_CLEP7212 91
#define MACH_TYPE_SHANNON 97
#define MACH_TYPE_CONSUS 105
#define MACH_TYPE_AAED2000 106
#define MACH_TYPE_CDB89712 107
#define MACH_TYPE_GRAPHICSMASTER 108
#define MACH_TYPE_ADSBITSY 109
#define MACH_TYPE_PXA_IDP 110
#define MACH_TYPE_PT_SYSTEM3 112
#define MACH_TYPE_AUTCPU12 118
#define MACH_TYPE_H3100 136
#define MACH_TYPE_COLLIE 146
#define MACH_TYPE_BADGE4 148
#define MACH_TYPE_FORTUNET 152
#define MACH_TYPE_MX1ADS 160
#define MACH_TYPE_H7201 161
#define MACH_TYPE_H7202 162
#define MACH_TYPE_IQ80321 169
#define MACH_TYPE_KS8695 180
#define MACH_TYPE_SMDK2410 193
#define MACH_TYPE_CEIVA 200
#define MACH_TYPE_VOICEBLUE 218
#define MACH_TYPE_H5400 220
#define MACH_TYPE_OMAP_INNOVATOR 234
#define MACH_TYPE_IXDP2400 242
#define MACH_TYPE_IXDP2800 243
#define MACH_TYPE_IXDP425 245
#define MACH_TYPE_HACKKIT 254
#define MACH_TYPE_IXCDP1100 260
#define MACH_TYPE_AT91RM9200DK 262
#define MACH_TYPE_CINTEGRATOR 275
#define MACH_TYPE_VIPER 283
#define MACH_TYPE_ADI_COYOTE 290
#define MACH_TYPE_IXDP2401 299
#define MACH_TYPE_IXDP2801 300
#define MACH_TYPE_IQ31244 327
#define MACH_TYPE_BAST 331
#define MACH_TYPE_H1940 347
#define MACH_TYPE_ENP2611 356
#define MACH_TYPE_S3C2440 362
#define MACH_TYPE_GUMSTIX 373
#define MACH_TYPE_OMAP_H2 382
#define MACH_TYPE_E740 384
#define MACH_TYPE_IQ80331 385
#define MACH_TYPE_VERSATILE_PB 387
#define MACH_TYPE_KEV7A400 388
#define MACH_TYPE_LPD7A400 389
#define MACH_TYPE_LPD7A404 390
#define MACH_TYPE_CSB337 399
#define MACH_TYPE_MAINSTONE 406
#define MACH_TYPE_XCEP 413
#define MACH_TYPE_ARCOM_VULCAN 414
#define MACH_TYPE_NOMADIK 420
#define MACH_TYPE_CORGI 423
#define MACH_TYPE_POODLE 424
#define MACH_TYPE_ARMCORE 438
#define MACH_TYPE_MX31ADS 447
#define MACH_TYPE_HIMALAYA 448
#define MACH_TYPE_EDB9312 451
#define MACH_TYPE_OMAP_GENERIC 452
#define MACH_TYPE_EDB9301 462
#define MACH_TYPE_EDB9315 463
#define MACH_TYPE_VR1000 475
#define MACH_TYPE_OMAP_PERSEUS2 491
#define MACH_TYPE_E800 496
#define MACH_TYPE_E750 497
#define MACH_TYPE_SCB9328 508
#define MACH_TYPE_OMAP_H3 509
#define MACH_TYPE_OMAP_H4 510
#define MACH_TYPE_OMAP_OSK 515
#define MACH_TYPE_TOSA 520
#define MACH_TYPE_AVILA 526
#define MACH_TYPE_EDB9302 538
#define MACH_TYPE_HUSKY 543
#define MACH_TYPE_SHEPHERD 545
#define MACH_TYPE_H4700 562
#define MACH_TYPE_RX3715 592
#define MACH_TYPE_NSLU2 597
#define MACH_TYPE_E400 598
#define MACH_TYPE_IXDPG425 604
#define MACH_TYPE_VERSATILE_AB 606
#define MACH_TYPE_EDB9307 607
#define MACH_TYPE_KB9200 612
#define MACH_TYPE_SX1 613
#define MACH_TYPE_IXDP465 618
#define MACH_TYPE_IXDP2351 619
#define MACH_TYPE_IQ80332 629
#define MACH_TYPE_GTWX5715 641
#define MACH_TYPE_CSB637 648
#define MACH_TYPE_N30 656
#define MACH_TYPE_NEC_MP900 659
#define MACH_TYPE_KAFA 662
#define MACH_TYPE_TS72XX 673
#define MACH_TYPE_OTOM 680
#define MACH_TYPE_NEXCODER_2440 681
#define MACH_TYPE_ECO920 702
#define MACH_TYPE_ROADRUNNER 704
#define MACH_TYPE_AT91RM9200EK 705
#define MACH_TYPE_SPITZ 713
#define MACH_TYPE_ADSSPHERE 723
#define MACH_TYPE_COLIBRI 729
#define MACH_TYPE_GATEWAY7001 731
#define MACH_TYPE_PCM027 732
#define MACH_TYPE_ANUBIS 734
#define MACH_TYPE_AKITA 744
#define MACH_TYPE_E330 753
#define MACH_TYPE_NOKIA770 755
#define MACH_TYPE_CARMEVA 769
#define MACH_TYPE_EDB9315A 772
#define MACH_TYPE_STARGATE2 774
#define MACH_TYPE_INTELMOTE2 775
#define MACH_TYPE_TRIZEPS4 776
#define MACH_TYPE_PNX4008 782
#define MACH_TYPE_CPUAT91 787
#define MACH_TYPE_IQ81340SC 799
#define MACH_TYPE_IQ81340MC 801
#define MACH_TYPE_MICRO9 811
#define MACH_TYPE_MICRO9L 812
#define MACH_TYPE_OMAP_PALMTE 817
#define MACH_TYPE_REALVIEW_EB 827
#define MACH_TYPE_BORZOI 831
#define MACH_TYPE_PALMLD 835
#define MACH_TYPE_IXDP28X5 838
#define MACH_TYPE_OMAP_PALMTT 839
#define MACH_TYPE_ARCOM_ZEUS 841
#define MACH_TYPE_OSIRIS 842
#define MACH_TYPE_PALMTE2 844
#define MACH_TYPE_MX27ADS 846
#define MACH_TYPE_AT91SAM9261EK 848
#define MACH_TYPE_LOFT 849
#define MACH_TYPE_MX21ADS 851
#define MACH_TYPE_AMS_DELTA 862
#define MACH_TYPE_NAS100D 865
#define MACH_TYPE_MAGICIAN 875
#define MACH_TYPE_NXDKN 880
#define MACH_TYPE_PALMTX 885
#define MACH_TYPE_S3C2413 887
#define MACH_TYPE_WG302V2 890
#define MACH_TYPE_OMAP_2430SDP 900
#define MACH_TYPE_DAVINCI_EVM 901
#define MACH_TYPE_PALMZ72 904
#define MACH_TYPE_NXDB500 905
#define MACH_TYPE_PALMT5 917
#define MACH_TYPE_PALMTC 918
#define MACH_TYPE_OMAP_APOLLON 919
#define MACH_TYPE_ATEB9200 923
#define MACH_TYPE_N35 927
#define MACH_TYPE_LOGICPD_PXA270 930
#define MACH_TYPE_NXEB500HMI 941
#define MACH_TYPE_ESPRESSO 949
#define MACH_TYPE_RX1950 952
#define MACH_TYPE_GESBC9312 958
#define MACH_TYPE_PICOTUX2XX 963
#define MACH_TYPE_DSMG600 964
#define MACH_TYPE_OMAP_FSAMPLE 970
#define MACH_TYPE_SNAPPER_CL15 986
#define MACH_TYPE_OMAP_PALMZ71 993
#define MACH_TYPE_SMDK2412 1009
#define MACH_TYPE_SMDK2413 1022
#define MACH_TYPE_AML_M5900 1024
#define MACH_TYPE_BALLOON3 1029
#define MACH_TYPE_ECBAT91 1072
#define MACH_TYPE_ONEARM 1075
#define MACH_TYPE_SMDK2443 1084
#define MACH_TYPE_FSG 1091
#define MACH_TYPE_AT91SAM9260EK 1099
#define MACH_TYPE_GLANTANK 1100
#define MACH_TYPE_N2100 1101
#define MACH_TYPE_QT2410 1108
#define MACH_TYPE_KIXRP435 1109
#define MACH_TYPE_CC9P9360DEV 1114
#define MACH_TYPE_EDB9302A 1127
#define MACH_TYPE_EDB9307A 1128
#define MACH_TYPE_OMAP_3430SDP 1138
#define MACH_TYPE_VSTMS 1140
#define MACH_TYPE_MICRO9M 1169
#define MACH_TYPE_BUG 1179
#define MACH_TYPE_AT91SAM9263EK 1202
#define MACH_TYPE_EM7210 1212
#define MACH_TYPE_VPAC270 1227
#define MACH_TYPE_TREO680 1230
#define MACH_TYPE_ZYLONITE 1233
#define MACH_TYPE_MX31LITE 1236
#define MACH_TYPE_MIOA701 1257
#define MACH_TYPE_ARMADILLO5X0 1260
#define MACH_TYPE_CC9P9360JS 1264
#define MACH_TYPE_SMDK6400 1270
#define MACH_TYPE_NOKIA_N800 1271
#define MACH_TYPE_EP80219 1281
#define MACH_TYPE_GORAMO_MLR 1292
#define MACH_TYPE_EM_X270 1297
#define MACH_TYPE_NEO1973_GTA02 1304
#define MACH_TYPE_AT91SAM9RLEK 1326
#define MACH_TYPE_COLIBRI320 1340
#define MACH_TYPE_CAM60 1351
#define MACH_TYPE_AT91EB01 1354
#define MACH_TYPE_DB88F5281 1358
#define MACH_TYPE_CSB726 1359
#define MACH_TYPE_DAVINCI_DM6467_EVM 1380
#define MACH_TYPE_DAVINCI_DM355_EVM 1381
#define MACH_TYPE_LITTLETON 1388
#define MACH_TYPE_REALVIEW_PB11MP 1407
#define MACH_TYPE_MX27_3DS 1430
#define MACH_TYPE_HALIBUT 1439
#define MACH_TYPE_TROUT 1440
#define MACH_TYPE_TCT_HAMMER 1460
#define MACH_TYPE_HERALD 1461
#define MACH_TYPE_SIM_ONE 1476
#define MACH_TYPE_JIVE 1490
#define MACH_TYPE_SAM9_L9260 1501
#define MACH_TYPE_REALVIEW_PB1176 1504
#define MACH_TYPE_YL9200 1507
#define MACH_TYPE_RD88F5182 1508
#define MACH_TYPE_KUROBOX_PRO 1509
#define MACH_TYPE_MX31_3DS 1511
#define MACH_TYPE_QONG 1524
#define MACH_TYPE_OMAP2EVM 1534
#define MACH_TYPE_OMAP3EVM 1535
#define MACH_TYPE_DNS323 1542
#define MACH_TYPE_OMAP3_BEAGLE 1546
#define MACH_TYPE_NOKIA_N810 1548
#define MACH_TYPE_PCM038 1551
#define MACH_TYPE_TS209 1565
#define MACH_TYPE_AT91CAP9ADK 1566
#define MACH_TYPE_MX31MOBOARD 1574
#define MACH_TYPE_TERASTATION_PRO2 1584
#define MACH_TYPE_LINKSTATION_PRO 1585
#define MACH_TYPE_E350 1596
#define MACH_TYPE_TS409 1601
#define MACH_TYPE_CM_X300 1616
#define MACH_TYPE_AT91SAM9G20EK 1624
#define MACH_TYPE_SMDK6410 1626
#define MACH_TYPE_U300 1627
#define MACH_TYPE_WRT350N_V2 1633
#define MACH_TYPE_OMAP_LDP 1639
#define MACH_TYPE_MX35_3DS 1645
#define MACH_TYPE_NEUROS_OSD2 1647
#define MACH_TYPE_TRIZEPS4WL 1649
#define MACH_TYPE_TS78XX 1652
#define MACH_TYPE_SFFSDR 1657
#define MACH_TYPE_PCM037 1673
#define MACH_TYPE_DB88F6281_BP 1680
#define MACH_TYPE_RD88F6192_NAS 1681
#define MACH_TYPE_RD88F6281 1682
#define MACH_TYPE_DB78X00_BP 1683
#define MACH_TYPE_SMDK2416 1685
#define MACH_TYPE_WBD111 1690
#define MACH_TYPE_MV2120 1693
#define MACH_TYPE_MX51_3DS 1696
#define MACH_TYPE_IMX27LITE 1701
#define MACH_TYPE_USB_A9260 1709
#define MACH_TYPE_USB_A9263 1710
#define MACH_TYPE_QIL_A9260 1711
#define MACH_TYPE_KZM_ARM11_01 1722
#define MACH_TYPE_NOKIA_N810_WIMAX 1727
#define MACH_TYPE_SAPPHIRE 1729
#define MACH_TYPE_STMP37XX 1732
#define MACH_TYPE_STMP378X 1733
#define MACH_TYPE_EZX_A780 1740
#define MACH_TYPE_EZX_E680 1741
#define MACH_TYPE_EZX_A1200 1742
#define MACH_TYPE_EZX_E6 1743
#define MACH_TYPE_EZX_E2 1744
#define MACH_TYPE_EZX_A910 1745
#define MACH_TYPE_EDMINI_V2 1756
#define MACH_TYPE_ZIPIT2 1757
#define MACH_TYPE_OMAP3_PANDORA 1761
#define MACH_TYPE_MSS2 1766
#define MACH_TYPE_LB88RC8480 1769
#define MACH_TYPE_MX25_3DS 1771
#define MACH_TYPE_OMAP3530_LV_SOM 1773
#define MACH_TYPE_DAVINCI_DA830_EVM 1781
#define MACH_TYPE_AT572D940HFEB 1783
#define MACH_TYPE_DOVE_DB 1788
#define MACH_TYPE_OVERO 1798
#define MACH_TYPE_AT2440EVB 1799
#define MACH_TYPE_NEOCORE926 1800
#define MACH_TYPE_WNR854T 1801
#define MACH_TYPE_RD88F5181L_GE 1812
#define MACH_TYPE_RD88F5181L_FXO 1818
#define MACH_TYPE_STAMP9G20 1824
#define MACH_TYPE_SMDKC100 1826
#define MACH_TYPE_TAVOREVB 1827
#define MACH_TYPE_SAAR 1828
#define MACH_TYPE_AT91SAM9M10G45EK 1830
#define MACH_TYPE_MXLADS 1851
#define MACH_TYPE_LINKSTATION_MINI 1858
#define MACH_TYPE_AFEB9260 1859
#define MACH_TYPE_IMX27IPCAM 1871
#define MACH_TYPE_RD88F6183AP_GE 1894
#define MACH_TYPE_REALVIEW_PBA8 1897
#define MACH_TYPE_REALVIEW_PBX 1901
#define MACH_TYPE_MICRO9S 1902
#define MACH_TYPE_RUT100 1908
#define MACH_TYPE_G3EVM 1919
#define MACH_TYPE_W90P910EVB 1921
#define MACH_TYPE_W90P950EVB 1923
#define MACH_TYPE_W90N960EVB 1924
#define MACH_TYPE_MV88F6281GTW_GE 1932
#define MACH_TYPE_NCP 1933
#define MACH_TYPE_DAVINCI_DM365_EVM 1939
#define MACH_TYPE_CENTRO 1944
#define MACH_TYPE_NOKIA_RX51 1955
#define MACH_TYPE_OMAP_ZOOM2 1967
#define MACH_TYPE_CPUAT9260 1973
#define MACH_TYPE_EUKREA_CPUIMX27 1975
#define MACH_TYPE_ACS5K 1982
#define MACH_TYPE_SNAPPER_9260 1987
#define MACH_TYPE_DSM320 1988
#define MACH_TYPE_EXEDA 1994
#define MACH_TYPE_MINI2440 1999
#define MACH_TYPE_COLIBRI300 2000
#define MACH_TYPE_LINKSTATION_LS_HGL 2005
#define MACH_TYPE_CPUAT9G20 2031
#define MACH_TYPE_SMDK6440 2032
#define MACH_TYPE_NAS4220B 2038
#define MACH_TYPE_ZYLONITE2 2042
#define MACH_TYPE_ASPENITE 2043
#define MACH_TYPE_TTC_DKB 2045
#define MACH_TYPE_PCM043 2072
#define MACH_TYPE_SHEEVAPLUG 2097
#define MACH_TYPE_AVENGERS_LITE 2104
#define MACH_TYPE_MX51_BABBAGE 2125
#define MACH_TYPE_RD78X00_MASA 2135
#define MACH_TYPE_DM355_LEOPARD 2138
#define MACH_TYPE_TS219 2139
#define MACH_TYPE_PCA100 2149
#define MACH_TYPE_DAVINCI_DA850_EVM 2157
#define MACH_TYPE_AT91SAM9G10EK 2159
#define MACH_TYPE_OMAP_4430SDP 2160
#define MACH_TYPE_MAGX_ZN5 2162
#define MACH_TYPE_BTMAVB101 2172
#define MACH_TYPE_BTMAWB101 2173
#define MACH_TYPE_OMAP3_TORPEDO 2178
#define MACH_TYPE_ANW6410 2183
#define MACH_TYPE_IMX27_VISSTRIM_M10 2187
#define MACH_TYPE_PORTUXG20 2191
#define MACH_TYPE_SMDKC110 2193
#define MACH_TYPE_OMAP3517EVM 2200
#define MACH_TYPE_NETSPACE_V2 2201
#define MACH_TYPE_NETSPACE_MAX_V2 2202
#define MACH_TYPE_D2NET_V2 2203
#define MACH_TYPE_NET2BIG_V2 2204
#define MACH_TYPE_NET5BIG_V2 2206
#define MACH_TYPE_INETSPACE_V2 2208
#define MACH_TYPE_AT91SAM9G45EKES 2212
#define MACH_TYPE_PC7302 2220
#define MACH_TYPE_SPEAR600 2236
#define MACH_TYPE_SPEAR300 2237
#define MACH_TYPE_LILLY1131 2239
#define MACH_TYPE_HMT 2254
#define MACH_TYPE_VEXPRESS 2272
#define MACH_TYPE_D2NET 2282
#define MACH_TYPE_BIGDISK 2283
#define MACH_TYPE_AT91SAM9G20EK_2MMC 2288
#define MACH_TYPE_BCMRING 2289
#define MACH_TYPE_DP6XX 2302
#define MACH_TYPE_MAHIMAHI 2304
#define MACH_TYPE_SMDK6442 2324
#define MACH_TYPE_OPENRD_BASE 2325
#define MACH_TYPE_DEVKIT8000 2330
#define MACH_TYPE_MX51_EFIKAMX 2336
#define MACH_TYPE_CM_T35 2341
#define MACH_TYPE_NET2BIG 2342
#define MACH_TYPE_IGEP0020 2344
#define MACH_TYPE_NUC932EVB 2356
#define MACH_TYPE_OPENRD_CLIENT 2361
#define MACH_TYPE_U8500 2368
#define MACH_TYPE_MX51_EFIKASB 2370
#define MACH_TYPE_MARVELL_JASPER 2382
#define MACH_TYPE_FLINT 2383
#define MACH_TYPE_TAVOREVB3 2384
#define MACH_TYPE_TOUCHBOOK 2393
#define MACH_TYPE_RAUMFELD_RC 2413
#define MACH_TYPE_RAUMFELD_CONNECTOR 2414
#define MACH_TYPE_RAUMFELD_SPEAKER 2415
#define MACH_TYPE_TNETV107X 2418
#define MACH_TYPE_SMDKV210 2456
#define MACH_TYPE_OMAP_ZOOM3 2464
#define MACH_TYPE_OMAP_3630SDP 2465
#define MACH_TYPE_SMARTQ7 2479
#define MACH_TYPE_WATSON_EFM_PLUGIN 2491
#define MACH_TYPE_G4EVM 2493
#define MACH_TYPE_OMAPL138_HAWKBOARD 2495
#define MACH_TYPE_TS41X 2502
#define MACH_TYPE_PHY3250 2511
#define MACH_TYPE_MINI6410 2520
#define MACH_TYPE_MX28EVK 2531
#define MACH_TYPE_SMARTQ5 2534
#define MACH_TYPE_DAVINCI_DM6467TEVM 2548
#define MACH_TYPE_MXT_TD60 2550
#define MACH_TYPE_RIOT_BEI2 2576
#define MACH_TYPE_RIOT_X37 2578
#define MACH_TYPE_CAPC7117 2612
#define MACH_TYPE_ICONTROL 2624
#define MACH_TYPE_QSD8X50A_ST1_5 2627
#define MACH_TYPE_MX23EVK 2629
#define MACH_TYPE_AP4EVB 2630
#define MACH_TYPE_MITYOMAPL138 2650
#define MACH_TYPE_GURUPLUG 2659
#define MACH_TYPE_SPEAR310 2660
#define MACH_TYPE_SPEAR320 2661
#define MACH_TYPE_AQUILA 2676
#define MACH_TYPE_ESATA_SHEEVAPLUG 2678
#define MACH_TYPE_MSM7X30_SURF 2679
#define MACH_TYPE_EA2478DEVKIT 2683
#define MACH_TYPE_TERASTATION_WXL 2697
#define MACH_TYPE_MSM7X25_SURF 2703
#define MACH_TYPE_MSM7X25_FFA 2704
#define MACH_TYPE_MSM7X27_SURF 2705
#define MACH_TYPE_MSM7X27_FFA 2706
#define MACH_TYPE_MSM7X30_FFA 2707
#define MACH_TYPE_QSD8X50_SURF 2708
#define MACH_TYPE_MX53_EVK 2716
#define MACH_TYPE_IGEP0030 2717
#define MACH_TYPE_SBC3530 2722
#define MACH_TYPE_SAARB 2727
#define MACH_TYPE_HARMONY 2731
#define MACH_TYPE_MSM7X30_FLUID 2741
#define MACH_TYPE_CM_T3517 2750
#define MACH_TYPE_WBD222 2753
#define MACH_TYPE_MSM8X60_SURF 2755
#define MACH_TYPE_MSM8X60_SIM 2756
#define MACH_TYPE_TCC8000_SDK 2758
#define MACH_TYPE_NANOS 2759
#define MACH_TYPE_STAMP9G45 2761
#define MACH_TYPE_CNS3420VB 2776
#define MACH_TYPE_OMAP4_PANDA 2791
#define MACH_TYPE_TI8168EVM 2800
#define MACH_TYPE_TETON_BGA 2816
#define MACH_TYPE_EUKREA_CPUIMX25SD 2820
#define MACH_TYPE_EUKREA_CPUIMX35SD 2821
#define MACH_TYPE_EUKREA_CPUIMX51SD 2822
#define MACH_TYPE_EUKREA_CPUIMX51 2823
#define MACH_TYPE_SMDKC210 2838
#define MACH_TYPE_OMAP3_BRAILLO 2839
#define MACH_TYPE_SPYPLUG 2840
#define MACH_TYPE_GINGER 2841
#define MACH_TYPE_TNY_T3530 2842
#define MACH_TYPE_PCA102 2843
#define MACH_TYPE_SPADE 2844
#define MACH_TYPE_MXC25_TOPAZ 2845
#define MACH_TYPE_T5325 2846
#define MACH_TYPE_GW2361 2847
#define MACH_TYPE_ELOG 2848
#define MACH_TYPE_INCOME 2849
#define MACH_TYPE_BCM589X 2850
#define MACH_TYPE_ETNA 2851
#define MACH_TYPE_HAWKS 2852
#define MACH_TYPE_MESON 2853
#define MACH_TYPE_XSBASE255 2854
#define MACH_TYPE_PVM2030 2855
#define MACH_TYPE_MIOA502 2856
#define MACH_TYPE_VVBOX_SDORIG2 2857
#define MACH_TYPE_VVBOX_SDLITE2 2858
#define MACH_TYPE_VVBOX_SDPRO4 2859
#define MACH_TYPE_HTC_SPV_M700 2860
#define MACH_TYPE_MX257SX 2861
#define MACH_TYPE_GONI 2862
#define MACH_TYPE_MSM8X55_SVLTE_FFA 2863
#define MACH_TYPE_MSM8X55_SVLTE_SURF 2864
#define MACH_TYPE_QUICKSTEP 2865
#define MACH_TYPE_DMW96 2866
#define MACH_TYPE_HAMMERHEAD 2867
#define MACH_TYPE_TRIDENT 2868
#define MACH_TYPE_LIGHTNING 2869
#define MACH_TYPE_ICONNECT 2870
#define MACH_TYPE_AUTOBOT 2871
#define MACH_TYPE_COCONUT 2872
#define MACH_TYPE_DURIAN 2873
#define MACH_TYPE_CAYENNE 2874
#define MACH_TYPE_FUJI 2875
#define MACH_TYPE_SYNOLOGY_6282 2876
#define MACH_TYPE_EM1SY 2877
#define MACH_TYPE_M502 2878
#define MACH_TYPE_MATRIX518 2879
#define MACH_TYPE_TINY_GURNARD 2880
#define MACH_TYPE_SPEAR1310 2881
#define MACH_TYPE_BV07 2882
#define MACH_TYPE_MXT_TD61 2883
#define MACH_TYPE_OPENRD_ULTIMATE 2884
#define MACH_TYPE_DEVIXP 2885
#define MACH_TYPE_MICCPT 2886
#define MACH_TYPE_MIC256 2887
#define MACH_TYPE_AS1167 2888
#define MACH_TYPE_OMAP3_IBIZA 2889
#define MACH_TYPE_U5500 2890
#define MACH_TYPE_DAVINCI_PICTO 2891
#define MACH_TYPE_MECHA 2892
#define MACH_TYPE_BUBBA3 2893
#define MACH_TYPE_PUPITRE 2894
#define MACH_TYPE_TEGRA_VOGUE 2896
#define MACH_TYPE_TEGRA_E1165 2897
#define MACH_TYPE_SIMPLENET 2898
#define MACH_TYPE_EC4350TBM 2899
#define MACH_TYPE_PEC_TC 2900
#define MACH_TYPE_PEC_HC2 2901
#define MACH_TYPE_ESL_MOBILIS_A 2902
#define MACH_TYPE_ESL_MOBILIS_B 2903
#define MACH_TYPE_ESL_WAVE_A 2904
#define MACH_TYPE_ESL_WAVE_B 2905
#define MACH_TYPE_UNISENSE_MMM 2906
#define MACH_TYPE_BLUESHARK 2907
#define MACH_TYPE_E10 2908
#define MACH_TYPE_APP3K_ROBIN 2909
#define MACH_TYPE_POV15HD 2910
#define MACH_TYPE_STELLA 2911
#define MACH_TYPE_LINKSTATION_LSCHL 2913
#define MACH_TYPE_NETWALKER 2914
#define MACH_TYPE_ACSX106 2915
#define MACH_TYPE_ATLAS5_C1 2916
#define MACH_TYPE_NSB3AST 2917
#define MACH_TYPE_GNET_SLC 2918
#define MACH_TYPE_AF4000 2919
#define MACH_TYPE_ARK9431 2920
#define MACH_TYPE_FS_S5PC100 2921
#define MACH_TYPE_OMAP3505NOVA8 2922
#define MACH_TYPE_OMAP3621_EDP1 2923
#define MACH_TYPE_ORATISAES 2924
#define MACH_TYPE_SMDKV310 2925
#define MACH_TYPE_SIEMENS_L0 2926
#define MACH_TYPE_VENTANA 2927
#define MACH_TYPE_WM8505_7IN_NETBOOK 2928
#define MACH_TYPE_EC4350SDB 2929
#define MACH_TYPE_MIMAS 2930
#define MACH_TYPE_TITAN 2931
#define MACH_TYPE_CRANEBOARD 2932
#define MACH_TYPE_ES2440 2933
#define MACH_TYPE_NAJAY_A9263 2934
#define MACH_TYPE_HTCTORNADO 2935
#define MACH_TYPE_DIMM_MX257 2936
#define MACH_TYPE_JIGEN 2937
#define MACH_TYPE_SMDK6450 2938
#define MACH_TYPE_MENO_QNG 2939
#define MACH_TYPE_NS2416 2940
#define MACH_TYPE_RPC353 2941
#define MACH_TYPE_TQ6410 2942
#define MACH_TYPE_SKY6410 2943
#define MACH_TYPE_DYNASTY 2944
#define MACH_TYPE_VIVO 2945
#define MACH_TYPE_BURY_BL7582 2946
#define MACH_TYPE_BURY_BPS5270 2947
#define MACH_TYPE_BASI 2948
#define MACH_TYPE_TN200 2949
#define MACH_TYPE_C2MMI 2950
#define MACH_TYPE_MESON_6236M 2951
#define MACH_TYPE_MESON_8626M 2952
#define MACH_TYPE_TUBE 2953
#define MACH_TYPE_MESSINA 2954
#define MACH_TYPE_MX50_ARM2 2955
#define MACH_TYPE_CETUS9263 2956
#define MACH_TYPE_BROWNSTONE 2957
#define MACH_TYPE_VMX25 2958
#define MACH_TYPE_VMX51 2959
#define MACH_TYPE_ABACUS 2960
#define MACH_TYPE_CM4745 2961
#define MACH_TYPE_ORATISLINK 2962
#define MACH_TYPE_DAVINCI_DM365_DVR 2963
#define MACH_TYPE_NETVIZ 2964
#define MACH_TYPE_FLEXIBITY 2965
#define MACH_TYPE_WLAN_COMPUTER 2966
#define MACH_TYPE_LPC24XX 2967
#define MACH_TYPE_SPICA 2968
#define MACH_TYPE_GPSDISPLAY 2969
#define MACH_TYPE_BIPNET 2970
#define MACH_TYPE_OVERO_CTU_INERTIAL 2971
#define MACH_TYPE_DAVINCI_DM355_MMM 2972
#define MACH_TYPE_PC9260_V2 2973
#define MACH_TYPE_PTX7545 2974
#define MACH_TYPE_TM_EFDC 2975
#define MACH_TYPE_OMAP3_WALDO1 2977
#define MACH_TYPE_FLYER 2978
#define MACH_TYPE_TORNADO3240 2979
#define MACH_TYPE_SOLI_01 2980
#define MACH_TYPE_OMAPL138_EUROPALC 2981
#define MACH_TYPE_HELIOS_V1 2982
#define MACH_TYPE_NETSPACE_LITE_V2 2983
#define MACH_TYPE_SSC 2984
#define MACH_TYPE_PREMIERWAVE_EN 2985
#define MACH_TYPE_WASABI 2986
#define MACH_TYPE_MX50_RDP 2988
#define MACH_TYPE_UNIVERSAL_C210 2989
#define MACH_TYPE_REAL6410 2990
#define MACH_TYPE_SPX_SAKURA 2991
#define MACH_TYPE_IJ3K_2440 2992
#define MACH_TYPE_OMAP3_BC10 2993
#define MACH_TYPE_THEBE 2994
#define MACH_TYPE_RV082 2995
#define MACH_TYPE_ARMLGUEST 2996
#define MACH_TYPE_TJINC1000 2997
#define MACH_TYPE_DOCKSTAR 2998
#define MACH_TYPE_AX8008 2999
#define MACH_TYPE_GNET_SGCE 3000
#define MACH_TYPE_PXWNAS_500_1000 3001
#define MACH_TYPE_EA20 3002
#define MACH_TYPE_AWM2 3003
#define MACH_TYPE_TI8148EVM 3004
#define MACH_TYPE_SEABOARD 3005
#define MACH_TYPE_LINKSTATION_CHLV2 3006
#define MACH_TYPE_TERA_PRO2_RACK 3007
#define MACH_TYPE_RUBYS 3008
#define MACH_TYPE_AQUARIUS 3009
#define MACH_TYPE_MX53_ARD 3010
#define MACH_TYPE_MX53_SMD 3011
#define MACH_TYPE_LSWXL 3012
#define MACH_TYPE_DOVE_AVNG_V3 3013
#define MACH_TYPE_SDI_ESS_9263 3014
#define MACH_TYPE_JOCPU550 3015
#define MACH_TYPE_MSM8X60_RUMI3 3016
#define MACH_TYPE_MSM8X60_FFA 3017
#define MACH_TYPE_YANOMAMI 3018
#define MACH_TYPE_GTA04 3019
#define MACH_TYPE_CM_A510 3020
#define MACH_TYPE_OMAP3_RFS200 3021
#define MACH_TYPE_KX33XX 3022
#define MACH_TYPE_PTX7510 3023
#define MACH_TYPE_TOP9000 3024
#define MACH_TYPE_TEENOTE 3025
#define MACH_TYPE_TS3 3026
#define MACH_TYPE_A0 3027
#define MACH_TYPE_FSM9XXX_SURF 3028
#define MACH_TYPE_FSM9XXX_FFA 3029
#define MACH_TYPE_FRRHWCDMA60W 3030
#define MACH_TYPE_REMUS 3031
#define MACH_TYPE_AT91CAP7XDK 3032
#define MACH_TYPE_AT91CAP7STK 3033
#define MACH_TYPE_KT_SBC_SAM9_1 3034
#define MACH_TYPE_ARMADA_XP_DB 3036
#define MACH_TYPE_SPDM 3037
#define MACH_TYPE_GTIB 3038
#define MACH_TYPE_DGM3240 3039
#define MACH_TYPE_HTCMEGA 3041
#define MACH_TYPE_TRICORDER 3042
#define MACH_TYPE_TX28 3043
#define MACH_TYPE_BSTBRD 3044
#define MACH_TYPE_PWB3090 3045
#define MACH_TYPE_IDEA6410 3046
#define MACH_TYPE_QBC9263 3047
#define MACH_TYPE_BORABORA 3048
#define MACH_TYPE_VALDEZ 3049
#define MACH_TYPE_LS9G20 3050
#define MACH_TYPE_MIOS_V1 3051
#define MACH_TYPE_S5PC110_CRESPO 3052
#define MACH_TYPE_CONTROLTEK9G20 3053
#define MACH_TYPE_TIN307 3054
#define MACH_TYPE_TIN510 3055
#define MACH_TYPE_BLUECHEESE 3057
#define MACH_TYPE_TEM3X30 3058
#define MACH_TYPE_HARVEST_DESOTO 3059
#define MACH_TYPE_MSM8X60_QRDC 3060
#define MACH_TYPE_SPEAR900 3061
#define MACH_TYPE_PCONTROL_G20 3062
#define MACH_TYPE_RDSTOR 3063
#define MACH_TYPE_USDLOADER 3064
#define MACH_TYPE_TSOPLOADER 3065
#define MACH_TYPE_KRONOS 3066
#define MACH_TYPE_FFCORE 3067
#define MACH_TYPE_MONE 3068
#define MACH_TYPE_UNIT2S 3069
#define MACH_TYPE_ACER_A5 3070
#define MACH_TYPE_ETHERPRO_ISP 3071
#define MACH_TYPE_STRETCHS7000 3072
#define MACH_TYPE_P87_SMARTSIM 3073
#define MACH_TYPE_TULIP 3074
#define MACH_TYPE_SUNFLOWER 3075
#define MACH_TYPE_RIB 3076
#define MACH_TYPE_CLOD 3077
#define MACH_TYPE_RUMP 3078
#define MACH_TYPE_TENDERLOIN 3079
#define MACH_TYPE_SHORTLOIN 3080
#define MACH_TYPE_ANTARES 3082
#define MACH_TYPE_WB40N 3083
#define MACH_TYPE_HERRING 3084
#define MACH_TYPE_NAXY400 3085
#define MACH_TYPE_NAXY1200 3086
#define MACH_TYPE_VPR200 3087
#define MACH_TYPE_BUG20 3088
#define MACH_TYPE_GOFLEXNET 3089
#define MACH_TYPE_TORBRECK 3090
#define MACH_TYPE_SAARB_MG1 3091
#define MACH_TYPE_CALLISTO 3092
#define MACH_TYPE_MULTHSU 3093
#define MACH_TYPE_SALUDA 3094
#define MACH_TYPE_PEMP_OMAP3_APOLLO 3095
#define MACH_TYPE_VC0718 3096
#define MACH_TYPE_MVBLX 3097
#define MACH_TYPE_INHAND_APEIRON 3098
#define MACH_TYPE_INHAND_FURY 3099
#define MACH_TYPE_INHAND_SIREN 3100
#define MACH_TYPE_HDNVP 3101
#define MACH_TYPE_SOFTWINNER 3102
#define MACH_TYPE_PRIMA2_EVB 3103
#define MACH_TYPE_NAS6210 3104
#define MACH_TYPE_UNISDEV 3105
#define MACH_TYPE_SBCA11 3106
#define MACH_TYPE_SAGA 3107
#define MACH_TYPE_NS_K330 3108
#define MACH_TYPE_TANNA 3109
#define MACH_TYPE_IMATE8502 3110
#define MACH_TYPE_ASPEN 3111
#define MACH_TYPE_DAINTREE_CWAC 3112
#define MACH_TYPE_ZMX25 3113
#define MACH_TYPE_MAPLE1 3114
#define MACH_TYPE_QSD8X72_SURF 3115
#define MACH_TYPE_QSD8X72_FFA 3116
#define MACH_TYPE_ABILENE 3117
#define MACH_TYPE_EIGEN_TTR 3118
#define MACH_TYPE_IOMEGA_IX2_200 3119
#define MACH_TYPE_CORETEC_VCX7400 3120
#define MACH_TYPE_SANTIAGO 3121
#define MACH_TYPE_MX257SOL 3122
#define MACH_TYPE_STRASBOURG 3123
#define MACH_TYPE_MSM8X60_FLUID 3124
#define MACH_TYPE_SMARTQV5 3125
#define MACH_TYPE_SMARTQV3 3126
#define MACH_TYPE_SMARTQV7 3127
#define MACH_TYPE_PAZ00 3128
#define MACH_TYPE_ACMENETUSFOXG20 3129
#define MACH_TYPE_FWBD_0404 3131
#define MACH_TYPE_HDGU 3132
#define MACH_TYPE_PYRAMID 3133
#define MACH_TYPE_EPIPHAN 3134
#define MACH_TYPE_OMAP_BENDER 3135
#define MACH_TYPE_GURNARD 3136
#define MACH_TYPE_GTL_IT5100 3137
#define MACH_TYPE_BCM2708 3138
#define MACH_TYPE_MX51_GGC 3139
#define MACH_TYPE_SHARESPACE 3140
#define MACH_TYPE_HABA_KNX_EXPLORER 3141
#define MACH_TYPE_SIMTEC_KIRKMOD 3142
#define MACH_TYPE_CRUX 3143
#define MACH_TYPE_MX51_BRAVO 3144
#define MACH_TYPE_CHARON 3145
#define MACH_TYPE_PICOCOM3 3146
#define MACH_TYPE_PICOCOM4 3147
#define MACH_TYPE_SERRANO 3148
#define MACH_TYPE_DOUBLESHOT 3149
#define MACH_TYPE_EVSY 3150
#define MACH_TYPE_HUASHAN 3151
#define MACH_TYPE_LAUSANNE 3152
#define MACH_TYPE_EMERALD 3153
#define MACH_TYPE_TQMA35 3154
#define MACH_TYPE_MARVEL 3155
#define MACH_TYPE_MANUAE 3156
#define MACH_TYPE_CHACHA 3157
#define MACH_TYPE_LEMON 3158
#define MACH_TYPE_CSC 3159
#define MACH_TYPE_GIRA_KNXIP_ROUTER 3160
#define MACH_TYPE_T20 3161
#define MACH_TYPE_HDMINI 3162
#define MACH_TYPE_SCIPHONE_G2 3163
#define MACH_TYPE_EXPRESS 3164
#define MACH_TYPE_EXPRESS_KT 3165
#define MACH_TYPE_MAXIMASP 3166
#define MACH_TYPE_NITROGEN_IMX51 3167
#define MACH_TYPE_NITROGEN_IMX53 3168
#define MACH_TYPE_SUNFIRE 3169
#define MACH_TYPE_AROWANA 3170
#define MACH_TYPE_TEGRA_DAYTONA 3171
#define MACH_TYPE_TEGRA_SWORDFISH 3172
#define MACH_TYPE_EDISON 3173
#define MACH_TYPE_SVP8500V1 3174
#define MACH_TYPE_SVP8500V2 3175
#define MACH_TYPE_SVP5500 3176
#define MACH_TYPE_B5500 3177
#define MACH_TYPE_S5500 3178
#define MACH_TYPE_ICON 3179
#define MACH_TYPE_ELEPHANT 3180
#define MACH_TYPE_SHOOTER 3182
#define MACH_TYPE_SPADE_LTE 3183
#define MACH_TYPE_PHILHWANI 3184
#define MACH_TYPE_GSNCOMM 3185
#define MACH_TYPE_STRASBOURG_A2 3186
#define MACH_TYPE_MMM 3187
#define MACH_TYPE_DAVINCI_DM365_BV 3188
#define MACH_TYPE_AG5EVM 3189
#define MACH_TYPE_SC575PLC 3190
#define MACH_TYPE_SC575IPC 3191
#define MACH_TYPE_OMAP3_TDM3730 3192
#define MACH_TYPE_TOP9000_EVAL 3194
#define MACH_TYPE_TOP9000_SU 3195
#define MACH_TYPE_UTM300 3196
#define MACH_TYPE_TSUNAGI 3197
#define MACH_TYPE_TS75XX 3198
#define MACH_TYPE_TS47XX 3200
#define MACH_TYPE_DA850_K5 3201
#define MACH_TYPE_AX502 3202
#define MACH_TYPE_IGEP0032 3203
#define MACH_TYPE_ANTERO 3204
#define MACH_TYPE_SYNERGY 3205
#define MACH_TYPE_ICS_IF_VOIP 3206
#define MACH_TYPE_WLF_CRAGG_6410 3207
#define MACH_TYPE_PUNICA 3208
#define MACH_TYPE_TRIMSLICE 3209
#define MACH_TYPE_MX27_WMULTRA 3210
#define MACH_TYPE_MACKEREL 3211
#define MACH_TYPE_FA9X27 3213
#define MACH_TYPE_NS2816TB 3214
#define MACH_TYPE_NS2816_NTPAD 3215
#define MACH_TYPE_NS2816_NTNB 3216
#define MACH_TYPE_KAEN 3217
#define MACH_TYPE_NV1000 3218
#define MACH_TYPE_NUC950TS 3219
#define MACH_TYPE_NOKIA_RM680 3220
#define MACH_TYPE_AST2200 3221
#define MACH_TYPE_LEAD 3222
#define MACH_TYPE_UNINO1 3223
#define MACH_TYPE_GREECO 3224
#define MACH_TYPE_VERDI 3225
#define MACH_TYPE_DM6446_ADBOX 3226
#define MACH_TYPE_QUAD_SALSA 3227
#define MACH_TYPE_ABB_GMA_1_1 3228
#define MACH_TYPE_SVCID 3229
#define MACH_TYPE_MSM8960_SIM 3230
#define MACH_TYPE_MSM8960_RUMI3 3231
#define MACH_TYPE_ICON_G 3232
#define MACH_TYPE_MB3 3233
#define MACH_TYPE_GSIA18S 3234
#define MACH_TYPE_PIVICC 3235
#define MACH_TYPE_PCM048 3236
#define MACH_TYPE_DDS 3237
#define MACH_TYPE_CHALTEN_XA1 3238
#define MACH_TYPE_TS48XX 3239
#define MACH_TYPE_TONGA2_TFTTIMER 3240
#define MACH_TYPE_WHISTLER 3241
#define MACH_TYPE_ASL_PHOENIX 3242
#define MACH_TYPE_AT91SAM9263OTLITE 3243
#define MACH_TYPE_DDPLUG 3244
#define MACH_TYPE_D2PLUG 3245
#define MACH_TYPE_KZM9D 3246
#define MACH_TYPE_VERDI_LTE 3247
#define MACH_TYPE_NANOZOOM 3248
#define MACH_TYPE_DM3730_SOM_LV 3249
#define MACH_TYPE_DM3730_TORPEDO 3250
#define MACH_TYPE_ANCHOVY 3251
#define MACH_TYPE_RE2REV20 3253
#define MACH_TYPE_RE2REV21 3254
#define MACH_TYPE_CNS21XX 3255
#define MACH_TYPE_RIDER 3257
#define MACH_TYPE_NSK330 3258
#define MACH_TYPE_CNS2133EVB 3259
#define MACH_TYPE_Z3_816X_MOD 3260
#define MACH_TYPE_Z3_814X_MOD 3261
#define MACH_TYPE_BEECT 3262
#define MACH_TYPE_DMA_THUNDERBUG 3263
#define MACH_TYPE_OMN_AT91SAM9G20 3264
#define MACH_TYPE_MX25_E2S_UC 3265
#define MACH_TYPE_MIONE 3266
#define MACH_TYPE_TOP9000_TCU 3267
#define MACH_TYPE_TOP9000_BSL 3268
#define MACH_TYPE_KINGDOM 3269
#define MACH_TYPE_ARMADILLO460 3270
#define MACH_TYPE_LQ2 3271
#define MACH_TYPE_SWEDA_TMS2 3272
#define MACH_TYPE_MX53_LOCO 3273
#define MACH_TYPE_ACER_A8 3275
#define MACH_TYPE_ACER_GAUGUIN 3276
#define MACH_TYPE_GUPPY 3277
#define MACH_TYPE_MX61_ARD 3278
#define MACH_TYPE_TX53 3279
#define MACH_TYPE_OMAPL138_CASE_A3 3280
#define MACH_TYPE_UEMD 3281
#define MACH_TYPE_CCWMX51MUT 3282
#define MACH_TYPE_ROCKHOPPER 3283
#define MACH_TYPE_ENCORE 3284
#define MACH_TYPE_HKDKC100 3285
#define MACH_TYPE_TS42XX 3286
#define MACH_TYPE_AEBL 3287
#define MACH_TYPE_WARIO 3288
#define MACH_TYPE_GFS_SPM 3289
#define MACH_TYPE_CM_T3730 3290
#define MACH_TYPE_ISC3 3291
#define MACH_TYPE_RASCAL 3292
#define MACH_TYPE_HREFV60 3293
#define MACH_TYPE_TPT_2_0 3294
#define MACH_TYPE_SPLENDOR 3296
#define MACH_TYPE_MSM8X60_QT 3298
#define MACH_TYPE_HTC_HD_MINI 3299
#define MACH_TYPE_ATHENE 3300
#define MACH_TYPE_DEEP_R_EK_1 3301
#define MACH_TYPE_VIVOW_CT 3302
#define MACH_TYPE_NERY_1000 3303
#define MACH_TYPE_RFL109145_SSRV 3304
#define MACH_TYPE_NMH 3305
#define MACH_TYPE_WN802T 3306
#define MACH_TYPE_DRAGONET 3307
#define MACH_TYPE_AT91SAM9263DESK16L 3309
#define MACH_TYPE_BCMHANA_SV 3310
#define MACH_TYPE_BCMHANA_TABLET 3311
#define MACH_TYPE_KOI 3312
#define MACH_TYPE_TS4800 3313
#define MACH_TYPE_TQMA9263 3314
#define MACH_TYPE_HOLIDAY 3315
#define MACH_TYPE_DMA6410 3316
#define MACH_TYPE_PCATS_OVERLAY 3317
#define MACH_TYPE_HWGW6410 3318
#define MACH_TYPE_SHENZHOU 3319
#define MACH_TYPE_CWME9210 3320
#define MACH_TYPE_CWME9210JS 3321
#define MACH_TYPE_PGS_SITARA 3322
#define MACH_TYPE_COLIBRI_TEGRA2 3323
#define MACH_TYPE_W21 3324
#define MACH_TYPE_POLYSAT1 3325
#define MACH_TYPE_DATAWAY 3326
#define MACH_TYPE_COBRAL138 3327
#define MACH_TYPE_ROVERPCS8 3328
#define MACH_TYPE_MARVELC 3329
#define MACH_TYPE_NAVEFIHID 3330
#define MACH_TYPE_DM365_CV100 3331
#define MACH_TYPE_ABLE 3332
#define MACH_TYPE_LEGACY 3333
#define MACH_TYPE_ICONG 3334
#define MACH_TYPE_ROVER_G8 3335
#define MACH_TYPE_T5388P 3336
#define MACH_TYPE_DINGO 3337
#define MACH_TYPE_GOFLEXHOME 3338
#define MACH_TYPE_LANREADYFN511 3340
#define MACH_TYPE_OMAP3_BAIA 3341
#define MACH_TYPE_OMAP3SMARTDISPLAY 3342
#define MACH_TYPE_XILINX 3343
#define MACH_TYPE_A2F 3344
#define MACH_TYPE_SKY25 3345
#define MACH_TYPE_CCMX53 3346
#define MACH_TYPE_CCMX53JS 3347
#define MACH_TYPE_CCWMX53 3348
#define MACH_TYPE_CCWMX53JS 3349
#define MACH_TYPE_FRISMS 3350
#define MACH_TYPE_MSM7X27A_FFA 3351
#define MACH_TYPE_MSM7X27A_SURF 3352
#define MACH_TYPE_MSM7X27A_RUMI3 3353
#define MACH_TYPE_DIMMSAM9G20 3354
#define MACH_TYPE_DIMM_IMX28 3355
#define MACH_TYPE_AMK_A4 3356
#define MACH_TYPE_GNET_SGME 3357
#define MACH_TYPE_SHOOTER_U 3358
#define MACH_TYPE_VMX53 3359
#define MACH_TYPE_RHINO 3360
#define MACH_TYPE_ARMLEX4210 3361
#define MACH_TYPE_SWARCOEXTMODEM 3362
#define MACH_TYPE_SNOWBALL 3363
#define MACH_TYPE_PCM049 3364
#define MACH_TYPE_VIGOR 3365
#define MACH_TYPE_OSLO_AMUNDSEN 3366
#define MACH_TYPE_GSL_DIAMOND 3367
#define MACH_TYPE_CV2201 3368
#define MACH_TYPE_CV2202 3369
#define MACH_TYPE_CV2203 3370
#define MACH_TYPE_VIT_IBOX 3371
#define MACH_TYPE_DM6441_ESP 3372
#define MACH_TYPE_AT91SAM9X5EK 3373
#define MACH_TYPE_LIBRA 3374
#define MACH_TYPE_EASYCRRH 3375
#define MACH_TYPE_TRIPEL 3376
#define MACH_TYPE_ENDIAN_MINI 3377
#define MACH_TYPE_XILINX_EP107 3378
#define MACH_TYPE_NURI 3379
#define MACH_TYPE_JANUS 3380
#define MACH_TYPE_DDNAS 3381
#define MACH_TYPE_TAG 3382
#define MACH_TYPE_TAGW 3383
#define MACH_TYPE_NITROGEN_VM_IMX51 3384
#define MACH_TYPE_VIPRINET 3385
#define MACH_TYPE_BOCKW 3386
#define MACH_TYPE_EVA2000 3387
#define MACH_TYPE_STEELYARD 3388
#define MACH_TYPE_MACH_SDH001 3390
#define MACH_TYPE_NSSLSBOARD 3392
#define MACH_TYPE_GENEVA_B5 3393
#define MACH_TYPE_SPEAR1340 3394
#define MACH_TYPE_REXMAS 3395
#define MACH_TYPE_MSM8960_CDP 3396
#define MACH_TYPE_MSM8960_MDP 3397
#define MACH_TYPE_MSM8960_FLUID 3398
#define MACH_TYPE_MSM8960_APQ 3399
#define MACH_TYPE_HELIOS_V2 3400
#define MACH_TYPE_MIF10P 3401
#define MACH_TYPE_IAM28 3402
#define MACH_TYPE_PICASSO 3403
#define MACH_TYPE_MR301A 3404
#define MACH_TYPE_NOTLE 3405
#define MACH_TYPE_EELX2 3406
#define MACH_TYPE_MOON 3407
#define MACH_TYPE_RUBY 3408
#define MACH_TYPE_GOLDENGATE 3409
#define MACH_TYPE_CTBU_GEN2 3410
#define MACH_TYPE_KMP_AM17_01 3411
#define MACH_TYPE_WTPLUG 3412
#define MACH_TYPE_MX27SU2 3413
#define MACH_TYPE_NB31 3414
#define MACH_TYPE_HJSDU 3415
#define MACH_TYPE_TD3_REV1 3416
#define MACH_TYPE_EAG_CI4000 3417
#define MACH_TYPE_NET5BIG_NAND_V2 3418
#define MACH_TYPE_CPX2 3419
#define MACH_TYPE_NET2BIG_NAND_V2 3420
#define MACH_TYPE_ECUV5 3421
#define MACH_TYPE_HSGX6D 3422
#define MACH_TYPE_DAWAD7 3423
#define MACH_TYPE_SAM9REPEATER 3424
#define MACH_TYPE_GT_I5700 3425
#define MACH_TYPE_CTERA_PLUG_C2 3426
#define MACH_TYPE_MARVELCT 3427
#define MACH_TYPE_AG11005 3428
#define MACH_TYPE_VANGOGH 3430
#define MACH_TYPE_MATRIX505 3431
#define MACH_TYPE_OCE_NIGMA 3432
#define MACH_TYPE_T55 3433
#define MACH_TYPE_BIO3K 3434
#define MACH_TYPE_EXPRESSCT 3435
#define MACH_TYPE_CARDHU 3436
#define MACH_TYPE_ARUBA 3437
#define MACH_TYPE_BONAIRE 3438
#define MACH_TYPE_NUC700EVB 3439
#define MACH_TYPE_NUC710EVB 3440
#define MACH_TYPE_NUC740EVB 3441
#define MACH_TYPE_NUC745EVB 3442
#define MACH_TYPE_TRANSCEDE 3443
#define MACH_TYPE_MORA 3444
#define MACH_TYPE_NDA_EVM 3445
#define MACH_TYPE_TIMU 3446
#define MACH_TYPE_EXPRESSH 3447
#define MACH_TYPE_VERIDIS_A300 3448
#define MACH_TYPE_DM368_LEOPARD 3449
#define MACH_TYPE_OMAP_MCOP 3450
#define MACH_TYPE_TRITIP 3451
#define MACH_TYPE_SM1K 3452
#define MACH_TYPE_MONCH 3453
#define MACH_TYPE_CURACAO 3454
#define MACH_TYPE_ORIGEN 3455
#define MACH_TYPE_EPC10 3456
#define MACH_TYPE_SGH_I740 3457
#define MACH_TYPE_TUNA 3458
#define MACH_TYPE_MX51_TULIP 3459
#define MACH_TYPE_MX51_ASTER7 3460
#define MACH_TYPE_ACRO37XBRD 3461
#define MACH_TYPE_ELKE 3462
#define MACH_TYPE_SBC6000X 3463
#define MACH_TYPE_R1801E 3464
#define MACH_TYPE_H1600 3465
#define MACH_TYPE_MINI210 3466
#define MACH_TYPE_MINI8168 3467
#define MACH_TYPE_PC7308 3468
#define MACH_TYPE_KMM2M01 3470
#define MACH_TYPE_MX51EREBUS 3471
#define MACH_TYPE_WM8650REFBOARD 3472
#define MACH_TYPE_TUXRAIL 3473
#define MACH_TYPE_ARTHUR 3474
#define MACH_TYPE_DOORBOY 3475
#define MACH_TYPE_XARINA 3476
#define MACH_TYPE_ROVERX7 3477
#define MACH_TYPE_SDVR 3478
#define MACH_TYPE_ACER_MAYA 3479
#define MACH_TYPE_PICO 3480
#define MACH_TYPE_CWMX233 3481
#define MACH_TYPE_CWAM1808 3482
#define MACH_TYPE_CWDM365 3483
#define MACH_TYPE_MX51_MORAY 3484
#define MACH_TYPE_THALES_CBC 3485
#define MACH_TYPE_BLUEPOINT 3486
#define MACH_TYPE_DIR665 3487
#define MACH_TYPE_ACMEROVER1 3488
#define MACH_TYPE_SHOOTER_CT 3489
#define MACH_TYPE_BLISS 3490
#define MACH_TYPE_BLISSC 3491
#define MACH_TYPE_THALES_ADC 3492
#define MACH_TYPE_UBISYS_P9D_EVP 3493
#define MACH_TYPE_ATDGP318 3494
#define MACH_TYPE_IPQ806X_RUMI3 3961
#define MACH_TYPE_IPQ806X_TB726 3962
#define MACH_TYPE_IPQ806X_AP144 3963
#define MACH_TYPE_IPQ806X_DB149 4699
#define MACH_TYPE_IPQ806X_DB149_1XX 4811
#define MACH_TYPE_IPQ806X_DB147 4703
#define MACH_TYPE_IPQ806X_AP148 4704
#define MACH_TYPE_IPQ806X_AP145 4810
#define MACH_TYPE_IPQ806X_AP145_1XX 4812
#define MACH_TYPE_IPQ806X_AP148_1XX 4913
#define MACH_TYPE_IPQ806X_DB149_2XX 4917
#define MACH_TYPE_IPQ806X_STORM 4936
#define MACH_TYPE_IPQ806X_AP160 4971
#define MACH_TYPE_IPQ806X_AP160_2XX 4991
#define MACH_TYPE_IPQ806X_AP161 4972
#define MACH_TYPE_IPQ806X_AK01_1XX 5020
#define MACH_TYPE_OMAP5_SEVM 3777
#define MACH_TYPE_IPQ40XX_AP_DK01_1_S1 0x8010200
#define MACH_TYPE_IPQ40XX_AP_DK01_1_C1 0x8010000
#define MACH_TYPE_IPQ40XX_AP_DK01_1_C2 0x8010100
#define MACH_TYPE_IPQ40XX_AP_DK04_1_C1 0x8010001
#define MACH_TYPE_IPQ40XX_AP_DK04_1_C4 0x8010301
#define MACH_TYPE_IPQ40XX_AP_DK04_1_C2 0x8010101
#define MACH_TYPE_IPQ40XX_AP_DK04_1_C3 0x8010201
#define MACH_TYPE_IPQ40XX_AP_DK04_1_C5 0x8010401
#define MACH_TYPE_IPQ40XX_AP_DK05_1_C1 0x8010007
#define MACH_TYPE_IPQ40XX_AP_DK06_1_C1 0x8010005
#define MACH_TYPE_IPQ40XX_AP_DK07_1_C1 0x8010006
#define MACH_TYPE_IPQ40XX_AP_DK07_1_C2 0x8010106
#define MACH_TYPE_IPQ40XX_DB_DK01_1_C1 0x1010002
#define MACH_TYPE_IPQ40XX_DB_DK02_1_C1 0x1010003
#define MACH_TYPE_IPQ40XX_TB832 0x1010004
#ifdef CONFIG_ARCH_EBSA110
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EBSA110
# endif
# define machine_is_ebsa110() (machine_arch_type == MACH_TYPE_EBSA110)
#else
# define machine_is_ebsa110() (0)
#endif
#ifdef CONFIG_ARCH_RPC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RISCPC
# endif
# define machine_is_riscpc() (machine_arch_type == MACH_TYPE_RISCPC)
#else
# define machine_is_riscpc() (0)
#endif
#ifdef CONFIG_ARCH_EBSA285
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EBSA285
# endif
# define machine_is_ebsa285() (machine_arch_type == MACH_TYPE_EBSA285)
#else
# define machine_is_ebsa285() (0)
#endif
#ifdef CONFIG_ARCH_NETWINDER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NETWINDER
# endif
# define machine_is_netwinder() (machine_arch_type == MACH_TYPE_NETWINDER)
#else
# define machine_is_netwinder() (0)
#endif
#ifdef CONFIG_ARCH_CATS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CATS
# endif
# define machine_is_cats() (machine_arch_type == MACH_TYPE_CATS)
#else
# define machine_is_cats() (0)
#endif
#ifdef CONFIG_ARCH_SHARK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHARK
# endif
# define machine_is_shark() (machine_arch_type == MACH_TYPE_SHARK)
#else
# define machine_is_shark() (0)
#endif
#ifdef CONFIG_SA1100_BRUTUS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BRUTUS
# endif
# define machine_is_brutus() (machine_arch_type == MACH_TYPE_BRUTUS)
#else
# define machine_is_brutus() (0)
#endif
#ifdef CONFIG_ARCH_PERSONAL_SERVER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PERSONAL_SERVER
# endif
# define machine_is_personal_server() (machine_arch_type == MACH_TYPE_PERSONAL_SERVER)
#else
# define machine_is_personal_server() (0)
#endif
#ifdef CONFIG_ARCH_L7200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_L7200
# endif
# define machine_is_l7200() (machine_arch_type == MACH_TYPE_L7200)
#else
# define machine_is_l7200() (0)
#endif
#ifdef CONFIG_SA1100_PLEB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PLEB
# endif
# define machine_is_pleb() (machine_arch_type == MACH_TYPE_PLEB)
#else
# define machine_is_pleb() (0)
#endif
#ifdef CONFIG_ARCH_INTEGRATOR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_INTEGRATOR
# endif
# define machine_is_integrator() (machine_arch_type == MACH_TYPE_INTEGRATOR)
#else
# define machine_is_integrator() (0)
#endif
#ifdef CONFIG_SA1100_H3600
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_H3600
# endif
# define machine_is_h3600() (machine_arch_type == MACH_TYPE_H3600)
#else
# define machine_is_h3600() (0)
#endif
#ifdef CONFIG_ARCH_P720T
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_P720T
# endif
# define machine_is_p720t() (machine_arch_type == MACH_TYPE_P720T)
#else
# define machine_is_p720t() (0)
#endif
#ifdef CONFIG_SA1100_ASSABET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ASSABET
# endif
# define machine_is_assabet() (machine_arch_type == MACH_TYPE_ASSABET)
#else
# define machine_is_assabet() (0)
#endif
#ifdef CONFIG_SA1100_LART
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LART
# endif
# define machine_is_lart() (machine_arch_type == MACH_TYPE_LART)
#else
# define machine_is_lart() (0)
#endif
#ifdef CONFIG_SA1100_GRAPHICSCLIENT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GRAPHICSCLIENT
# endif
# define machine_is_graphicsclient() (machine_arch_type == MACH_TYPE_GRAPHICSCLIENT)
#else
# define machine_is_graphicsclient() (0)
#endif
#ifdef CONFIG_SA1100_XP860
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_XP860
# endif
# define machine_is_xp860() (machine_arch_type == MACH_TYPE_XP860)
#else
# define machine_is_xp860() (0)
#endif
#ifdef CONFIG_SA1100_CERF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CERF
# endif
# define machine_is_cerf() (machine_arch_type == MACH_TYPE_CERF)
#else
# define machine_is_cerf() (0)
#endif
#ifdef CONFIG_SA1100_NANOENGINE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NANOENGINE
# endif
# define machine_is_nanoengine() (machine_arch_type == MACH_TYPE_NANOENGINE)
#else
# define machine_is_nanoengine() (0)
#endif
#ifdef CONFIG_SA1100_JORNADA720
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_JORNADA720
# endif
# define machine_is_jornada720() (machine_arch_type == MACH_TYPE_JORNADA720)
#else
# define machine_is_jornada720() (0)
#endif
#ifdef CONFIG_ARCH_EDB7211
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB7211
# endif
# define machine_is_edb7211() (machine_arch_type == MACH_TYPE_EDB7211)
#else
# define machine_is_edb7211() (0)
#endif
#ifdef CONFIG_SA1100_PFS168
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PFS168
# endif
# define machine_is_pfs168() (machine_arch_type == MACH_TYPE_PFS168)
#else
# define machine_is_pfs168() (0)
#endif
#ifdef CONFIG_SA1100_FLEXANET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FLEXANET
# endif
# define machine_is_flexanet() (machine_arch_type == MACH_TYPE_FLEXANET)
#else
# define machine_is_flexanet() (0)
#endif
#ifdef CONFIG_SA1100_SIMPAD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SIMPAD
# endif
# define machine_is_simpad() (machine_arch_type == MACH_TYPE_SIMPAD)
#else
# define machine_is_simpad() (0)
#endif
#ifdef CONFIG_ARCH_LUBBOCK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LUBBOCK
# endif
# define machine_is_lubbock() (machine_arch_type == MACH_TYPE_LUBBOCK)
#else
# define machine_is_lubbock() (0)
#endif
#ifdef CONFIG_ARCH_CLEP7212
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CLEP7212
# endif
# define machine_is_clep7212() (machine_arch_type == MACH_TYPE_CLEP7212)
#else
# define machine_is_clep7212() (0)
#endif
#ifdef CONFIG_SA1100_SHANNON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHANNON
# endif
# define machine_is_shannon() (machine_arch_type == MACH_TYPE_SHANNON)
#else
# define machine_is_shannon() (0)
#endif
#ifdef CONFIG_SA1100_CONSUS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CONSUS
# endif
# define machine_is_consus() (machine_arch_type == MACH_TYPE_CONSUS)
#else
# define machine_is_consus() (0)
#endif
#ifdef CONFIG_ARCH_AAED2000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AAED2000
# endif
# define machine_is_aaed2000() (machine_arch_type == MACH_TYPE_AAED2000)
#else
# define machine_is_aaed2000() (0)
#endif
#ifdef CONFIG_ARCH_CDB89712
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CDB89712
# endif
# define machine_is_cdb89712() (machine_arch_type == MACH_TYPE_CDB89712)
#else
# define machine_is_cdb89712() (0)
#endif
#ifdef CONFIG_SA1100_GRAPHICSMASTER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GRAPHICSMASTER
# endif
# define machine_is_graphicsmaster() (machine_arch_type == MACH_TYPE_GRAPHICSMASTER)
#else
# define machine_is_graphicsmaster() (0)
#endif
#ifdef CONFIG_SA1100_ADSBITSY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ADSBITSY
# endif
# define machine_is_adsbitsy() (machine_arch_type == MACH_TYPE_ADSBITSY)
#else
# define machine_is_adsbitsy() (0)
#endif
#ifdef CONFIG_ARCH_PXA_IDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PXA_IDP
# endif
# define machine_is_pxa_idp() (machine_arch_type == MACH_TYPE_PXA_IDP)
#else
# define machine_is_pxa_idp() (0)
#endif
#ifdef CONFIG_SA1100_PT_SYSTEM3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PT_SYSTEM3
# endif
# define machine_is_pt_system3() (machine_arch_type == MACH_TYPE_PT_SYSTEM3)
#else
# define machine_is_pt_system3() (0)
#endif
#ifdef CONFIG_ARCH_AUTCPU12
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AUTCPU12
# endif
# define machine_is_autcpu12() (machine_arch_type == MACH_TYPE_AUTCPU12)
#else
# define machine_is_autcpu12() (0)
#endif
#ifdef CONFIG_SA1100_H3100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_H3100
# endif
# define machine_is_h3100() (machine_arch_type == MACH_TYPE_H3100)
#else
# define machine_is_h3100() (0)
#endif
#ifdef CONFIG_SA1100_COLLIE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_COLLIE
# endif
# define machine_is_collie() (machine_arch_type == MACH_TYPE_COLLIE)
#else
# define machine_is_collie() (0)
#endif
#ifdef CONFIG_SA1100_BADGE4
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BADGE4
# endif
# define machine_is_badge4() (machine_arch_type == MACH_TYPE_BADGE4)
#else
# define machine_is_badge4() (0)
#endif
#ifdef CONFIG_ARCH_FORTUNET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FORTUNET
# endif
# define machine_is_fortunet() (machine_arch_type == MACH_TYPE_FORTUNET)
#else
# define machine_is_fortunet() (0)
#endif
#ifdef CONFIG_ARCH_MX1ADS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX1ADS
# endif
# define machine_is_mx1ads() (machine_arch_type == MACH_TYPE_MX1ADS)
#else
# define machine_is_mx1ads() (0)
#endif
#ifdef CONFIG_ARCH_H7201
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_H7201
# endif
# define machine_is_h7201() (machine_arch_type == MACH_TYPE_H7201)
#else
# define machine_is_h7201() (0)
#endif
#ifdef CONFIG_ARCH_H7202
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_H7202
# endif
# define machine_is_h7202() (machine_arch_type == MACH_TYPE_H7202)
#else
# define machine_is_h7202() (0)
#endif
#ifdef CONFIG_ARCH_IQ80321
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IQ80321
# endif
# define machine_is_iq80321() (machine_arch_type == MACH_TYPE_IQ80321)
#else
# define machine_is_iq80321() (0)
#endif
#ifdef CONFIG_ARCH_KS8695
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KS8695
# endif
# define machine_is_ks8695() (machine_arch_type == MACH_TYPE_KS8695)
#else
# define machine_is_ks8695() (0)
#endif
#ifdef CONFIG_ARCH_SMDK2410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK2410
# endif
# define machine_is_smdk2410() (machine_arch_type == MACH_TYPE_SMDK2410)
#else
# define machine_is_smdk2410() (0)
#endif
#ifdef CONFIG_ARCH_CEIVA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CEIVA
# endif
# define machine_is_ceiva() (machine_arch_type == MACH_TYPE_CEIVA)
#else
# define machine_is_ceiva() (0)
#endif
#ifdef CONFIG_MACH_VOICEBLUE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VOICEBLUE
# endif
# define machine_is_voiceblue() (machine_arch_type == MACH_TYPE_VOICEBLUE)
#else
# define machine_is_voiceblue() (0)
#endif
#ifdef CONFIG_ARCH_H5400
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_H5400
# endif
# define machine_is_h5400() (machine_arch_type == MACH_TYPE_H5400)
#else
# define machine_is_h5400() (0)
#endif
#ifdef CONFIG_MACH_OMAP_INNOVATOR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_INNOVATOR
# endif
# define machine_is_omap_innovator() (machine_arch_type == MACH_TYPE_OMAP_INNOVATOR)
#else
# define machine_is_omap_innovator() (0)
#endif
#ifdef CONFIG_ARCH_IXDP2400
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDP2400
# endif
# define machine_is_ixdp2400() (machine_arch_type == MACH_TYPE_IXDP2400)
#else
# define machine_is_ixdp2400() (0)
#endif
#ifdef CONFIG_ARCH_IXDP2800
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDP2800
# endif
# define machine_is_ixdp2800() (machine_arch_type == MACH_TYPE_IXDP2800)
#else
# define machine_is_ixdp2800() (0)
#endif
#ifdef CONFIG_ARCH_IXDP425
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDP425
# endif
# define machine_is_ixdp425() (machine_arch_type == MACH_TYPE_IXDP425)
#else
# define machine_is_ixdp425() (0)
#endif
#ifdef CONFIG_SA1100_HACKKIT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HACKKIT
# endif
# define machine_is_hackkit() (machine_arch_type == MACH_TYPE_HACKKIT)
#else
# define machine_is_hackkit() (0)
#endif
#ifdef CONFIG_ARCH_IXCDP1100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXCDP1100
# endif
# define machine_is_ixcdp1100() (machine_arch_type == MACH_TYPE_IXCDP1100)
#else
# define machine_is_ixcdp1100() (0)
#endif
#ifdef CONFIG_ARCH_AT91RM9200DK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91RM9200DK
# endif
# define machine_is_at91rm9200dk() (machine_arch_type == MACH_TYPE_AT91RM9200DK)
#else
# define machine_is_at91rm9200dk() (0)
#endif
#ifdef CONFIG_ARCH_CINTEGRATOR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CINTEGRATOR
# endif
# define machine_is_cintegrator() (machine_arch_type == MACH_TYPE_CINTEGRATOR)
#else
# define machine_is_cintegrator() (0)
#endif
#ifdef CONFIG_ARCH_VIPER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VIPER
# endif
# define machine_is_viper() (machine_arch_type == MACH_TYPE_VIPER)
#else
# define machine_is_viper() (0)
#endif
#ifdef CONFIG_ARCH_ADI_COYOTE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ADI_COYOTE
# endif
# define machine_is_adi_coyote() (machine_arch_type == MACH_TYPE_ADI_COYOTE)
#else
# define machine_is_adi_coyote() (0)
#endif
#ifdef CONFIG_ARCH_IXDP2401
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDP2401
# endif
# define machine_is_ixdp2401() (machine_arch_type == MACH_TYPE_IXDP2401)
#else
# define machine_is_ixdp2401() (0)
#endif
#ifdef CONFIG_ARCH_IXDP2801
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDP2801
# endif
# define machine_is_ixdp2801() (machine_arch_type == MACH_TYPE_IXDP2801)
#else
# define machine_is_ixdp2801() (0)
#endif
#ifdef CONFIG_ARCH_IQ31244
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IQ31244
# endif
# define machine_is_iq31244() (machine_arch_type == MACH_TYPE_IQ31244)
#else
# define machine_is_iq31244() (0)
#endif
#ifdef CONFIG_ARCH_BAST
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BAST
# endif
# define machine_is_bast() (machine_arch_type == MACH_TYPE_BAST)
#else
# define machine_is_bast() (0)
#endif
#ifdef CONFIG_ARCH_H1940
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_H1940
# endif
# define machine_is_h1940() (machine_arch_type == MACH_TYPE_H1940)
#else
# define machine_is_h1940() (0)
#endif
#ifdef CONFIG_ARCH_ENP2611
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ENP2611
# endif
# define machine_is_enp2611() (machine_arch_type == MACH_TYPE_ENP2611)
#else
# define machine_is_enp2611() (0)
#endif
#ifdef CONFIG_ARCH_S3C2440
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_S3C2440
# endif
# define machine_is_s3c2440() (machine_arch_type == MACH_TYPE_S3C2440)
#else
# define machine_is_s3c2440() (0)
#endif
#ifdef CONFIG_ARCH_GUMSTIX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GUMSTIX
# endif
# define machine_is_gumstix() (machine_arch_type == MACH_TYPE_GUMSTIX)
#else
# define machine_is_gumstix() (0)
#endif
#ifdef CONFIG_MACH_OMAP_H2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_H2
# endif
# define machine_is_omap_h2() (machine_arch_type == MACH_TYPE_OMAP_H2)
#else
# define machine_is_omap_h2() (0)
#endif
#ifdef CONFIG_MACH_E740
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_E740
# endif
# define machine_is_e740() (machine_arch_type == MACH_TYPE_E740)
#else
# define machine_is_e740() (0)
#endif
#ifdef CONFIG_ARCH_IQ80331
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IQ80331
# endif
# define machine_is_iq80331() (machine_arch_type == MACH_TYPE_IQ80331)
#else
# define machine_is_iq80331() (0)
#endif
#ifdef CONFIG_ARCH_VERSATILE_PB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VERSATILE_PB
# endif
# define machine_is_versatile_pb() (machine_arch_type == MACH_TYPE_VERSATILE_PB)
#else
# define machine_is_versatile_pb() (0)
#endif
#ifdef CONFIG_MACH_KEV7A400
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KEV7A400
# endif
# define machine_is_kev7a400() (machine_arch_type == MACH_TYPE_KEV7A400)
#else
# define machine_is_kev7a400() (0)
#endif
#ifdef CONFIG_MACH_LPD7A400
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LPD7A400
# endif
# define machine_is_lpd7a400() (machine_arch_type == MACH_TYPE_LPD7A400)
#else
# define machine_is_lpd7a400() (0)
#endif
#ifdef CONFIG_MACH_LPD7A404
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LPD7A404
# endif
# define machine_is_lpd7a404() (machine_arch_type == MACH_TYPE_LPD7A404)
#else
# define machine_is_lpd7a404() (0)
#endif
#ifdef CONFIG_MACH_CSB337
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CSB337
# endif
# define machine_is_csb337() (machine_arch_type == MACH_TYPE_CSB337)
#else
# define machine_is_csb337() (0)
#endif
#ifdef CONFIG_MACH_MAINSTONE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MAINSTONE
# endif
# define machine_is_mainstone() (machine_arch_type == MACH_TYPE_MAINSTONE)
#else
# define machine_is_mainstone() (0)
#endif
#ifdef CONFIG_MACH_XCEP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_XCEP
# endif
# define machine_is_xcep() (machine_arch_type == MACH_TYPE_XCEP)
#else
# define machine_is_xcep() (0)
#endif
#ifdef CONFIG_MACH_ARCOM_VULCAN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARCOM_VULCAN
# endif
# define machine_is_arcom_vulcan() (machine_arch_type == MACH_TYPE_ARCOM_VULCAN)
#else
# define machine_is_arcom_vulcan() (0)
#endif
#ifdef CONFIG_MACH_NOMADIK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NOMADIK
# endif
# define machine_is_nomadik() (machine_arch_type == MACH_TYPE_NOMADIK)
#else
# define machine_is_nomadik() (0)
#endif
#ifdef CONFIG_MACH_CORGI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CORGI
# endif
# define machine_is_corgi() (machine_arch_type == MACH_TYPE_CORGI)
#else
# define machine_is_corgi() (0)
#endif
#ifdef CONFIG_MACH_POODLE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_POODLE
# endif
# define machine_is_poodle() (machine_arch_type == MACH_TYPE_POODLE)
#else
# define machine_is_poodle() (0)
#endif
#ifdef CONFIG_MACH_ARMCORE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARMCORE
# endif
# define machine_is_armcore() (machine_arch_type == MACH_TYPE_ARMCORE)
#else
# define machine_is_armcore() (0)
#endif
#ifdef CONFIG_MACH_MX31ADS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX31ADS
# endif
# define machine_is_mx31ads() (machine_arch_type == MACH_TYPE_MX31ADS)
#else
# define machine_is_mx31ads() (0)
#endif
#ifdef CONFIG_MACH_HIMALAYA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HIMALAYA
# endif
# define machine_is_himalaya() (machine_arch_type == MACH_TYPE_HIMALAYA)
#else
# define machine_is_himalaya() (0)
#endif
#ifdef CONFIG_MACH_EDB9312
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB9312
# endif
# define machine_is_edb9312() (machine_arch_type == MACH_TYPE_EDB9312)
#else
# define machine_is_edb9312() (0)
#endif
#ifdef CONFIG_MACH_OMAP_GENERIC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_GENERIC
# endif
# define machine_is_omap_generic() (machine_arch_type == MACH_TYPE_OMAP_GENERIC)
#else
# define machine_is_omap_generic() (0)
#endif
#ifdef CONFIG_MACH_EDB9301
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB9301
# endif
# define machine_is_edb9301() (machine_arch_type == MACH_TYPE_EDB9301)
#else
# define machine_is_edb9301() (0)
#endif
#ifdef CONFIG_MACH_EDB9315
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB9315
# endif
# define machine_is_edb9315() (machine_arch_type == MACH_TYPE_EDB9315)
#else
# define machine_is_edb9315() (0)
#endif
#ifdef CONFIG_MACH_VR1000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VR1000
# endif
# define machine_is_vr1000() (machine_arch_type == MACH_TYPE_VR1000)
#else
# define machine_is_vr1000() (0)
#endif
#ifdef CONFIG_MACH_OMAP_PERSEUS2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_PERSEUS2
# endif
# define machine_is_omap_perseus2() (machine_arch_type == MACH_TYPE_OMAP_PERSEUS2)
#else
# define machine_is_omap_perseus2() (0)
#endif
#ifdef CONFIG_MACH_E800
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_E800
# endif
# define machine_is_e800() (machine_arch_type == MACH_TYPE_E800)
#else
# define machine_is_e800() (0)
#endif
#ifdef CONFIG_MACH_E750
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_E750
# endif
# define machine_is_e750() (machine_arch_type == MACH_TYPE_E750)
#else
# define machine_is_e750() (0)
#endif
#ifdef CONFIG_MACH_SCB9328
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SCB9328
# endif
# define machine_is_scb9328() (machine_arch_type == MACH_TYPE_SCB9328)
#else
# define machine_is_scb9328() (0)
#endif
#ifdef CONFIG_MACH_OMAP_H3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_H3
# endif
# define machine_is_omap_h3() (machine_arch_type == MACH_TYPE_OMAP_H3)
#else
# define machine_is_omap_h3() (0)
#endif
#ifdef CONFIG_MACH_OMAP_H4
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_H4
# endif
# define machine_is_omap_h4() (machine_arch_type == MACH_TYPE_OMAP_H4)
#else
# define machine_is_omap_h4() (0)
#endif
#ifdef CONFIG_MACH_OMAP_OSK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_OSK
# endif
# define machine_is_omap_osk() (machine_arch_type == MACH_TYPE_OMAP_OSK)
#else
# define machine_is_omap_osk() (0)
#endif
#ifdef CONFIG_MACH_TOSA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TOSA
# endif
# define machine_is_tosa() (machine_arch_type == MACH_TYPE_TOSA)
#else
# define machine_is_tosa() (0)
#endif
#ifdef CONFIG_MACH_AVILA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AVILA
# endif
# define machine_is_avila() (machine_arch_type == MACH_TYPE_AVILA)
#else
# define machine_is_avila() (0)
#endif
#ifdef CONFIG_MACH_EDB9302
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB9302
# endif
# define machine_is_edb9302() (machine_arch_type == MACH_TYPE_EDB9302)
#else
# define machine_is_edb9302() (0)
#endif
#ifdef CONFIG_MACH_HUSKY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HUSKY
# endif
# define machine_is_husky() (machine_arch_type == MACH_TYPE_HUSKY)
#else
# define machine_is_husky() (0)
#endif
#ifdef CONFIG_MACH_SHEPHERD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHEPHERD
# endif
# define machine_is_shepherd() (machine_arch_type == MACH_TYPE_SHEPHERD)
#else
# define machine_is_shepherd() (0)
#endif
#ifdef CONFIG_MACH_H4700
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_H4700
# endif
# define machine_is_h4700() (machine_arch_type == MACH_TYPE_H4700)
#else
# define machine_is_h4700() (0)
#endif
#ifdef CONFIG_MACH_RX3715
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RX3715
# endif
# define machine_is_rx3715() (machine_arch_type == MACH_TYPE_RX3715)
#else
# define machine_is_rx3715() (0)
#endif
#ifdef CONFIG_MACH_NSLU2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NSLU2
# endif
# define machine_is_nslu2() (machine_arch_type == MACH_TYPE_NSLU2)
#else
# define machine_is_nslu2() (0)
#endif
#ifdef CONFIG_MACH_E400
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_E400
# endif
# define machine_is_e400() (machine_arch_type == MACH_TYPE_E400)
#else
# define machine_is_e400() (0)
#endif
#ifdef CONFIG_MACH_IXDPG425
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDPG425
# endif
# define machine_is_ixdpg425() (machine_arch_type == MACH_TYPE_IXDPG425)
#else
# define machine_is_ixdpg425() (0)
#endif
#ifdef CONFIG_MACH_VERSATILE_AB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VERSATILE_AB
# endif
# define machine_is_versatile_ab() (machine_arch_type == MACH_TYPE_VERSATILE_AB)
#else
# define machine_is_versatile_ab() (0)
#endif
#ifdef CONFIG_MACH_EDB9307
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB9307
# endif
# define machine_is_edb9307() (machine_arch_type == MACH_TYPE_EDB9307)
#else
# define machine_is_edb9307() (0)
#endif
#ifdef CONFIG_MACH_KB9200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KB9200
# endif
# define machine_is_kb9200() (machine_arch_type == MACH_TYPE_KB9200)
#else
# define machine_is_kb9200() (0)
#endif
#ifdef CONFIG_MACH_SX1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SX1
# endif
# define machine_is_sx1() (machine_arch_type == MACH_TYPE_SX1)
#else
# define machine_is_sx1() (0)
#endif
#ifdef CONFIG_MACH_IXDP465
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDP465
# endif
# define machine_is_ixdp465() (machine_arch_type == MACH_TYPE_IXDP465)
#else
# define machine_is_ixdp465() (0)
#endif
#ifdef CONFIG_MACH_IXDP2351
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDP2351
# endif
# define machine_is_ixdp2351() (machine_arch_type == MACH_TYPE_IXDP2351)
#else
# define machine_is_ixdp2351() (0)
#endif
#ifdef CONFIG_MACH_IQ80332
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IQ80332
# endif
# define machine_is_iq80332() (machine_arch_type == MACH_TYPE_IQ80332)
#else
# define machine_is_iq80332() (0)
#endif
#ifdef CONFIG_MACH_GTWX5715
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GTWX5715
# endif
# define machine_is_gtwx5715() (machine_arch_type == MACH_TYPE_GTWX5715)
#else
# define machine_is_gtwx5715() (0)
#endif
#ifdef CONFIG_MACH_CSB637
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CSB637
# endif
# define machine_is_csb637() (machine_arch_type == MACH_TYPE_CSB637)
#else
# define machine_is_csb637() (0)
#endif
#ifdef CONFIG_MACH_N30
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_N30
# endif
# define machine_is_n30() (machine_arch_type == MACH_TYPE_N30)
#else
# define machine_is_n30() (0)
#endif
#ifdef CONFIG_MACH_NEC_MP900
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NEC_MP900
# endif
# define machine_is_nec_mp900() (machine_arch_type == MACH_TYPE_NEC_MP900)
#else
# define machine_is_nec_mp900() (0)
#endif
#ifdef CONFIG_MACH_KAFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KAFA
# endif
# define machine_is_kafa() (machine_arch_type == MACH_TYPE_KAFA)
#else
# define machine_is_kafa() (0)
#endif
#ifdef CONFIG_MACH_TS72XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS72XX
# endif
# define machine_is_ts72xx() (machine_arch_type == MACH_TYPE_TS72XX)
#else
# define machine_is_ts72xx() (0)
#endif
#ifdef CONFIG_MACH_OTOM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OTOM
# endif
# define machine_is_otom() (machine_arch_type == MACH_TYPE_OTOM)
#else
# define machine_is_otom() (0)
#endif
#ifdef CONFIG_MACH_NEXCODER_2440
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NEXCODER_2440
# endif
# define machine_is_nexcoder_2440() (machine_arch_type == MACH_TYPE_NEXCODER_2440)
#else
# define machine_is_nexcoder_2440() (0)
#endif
#ifdef CONFIG_MACH_ECO920
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ECO920
# endif
# define machine_is_eco920() (machine_arch_type == MACH_TYPE_ECO920)
#else
# define machine_is_eco920() (0)
#endif
#ifdef CONFIG_MACH_ROADRUNNER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ROADRUNNER
# endif
# define machine_is_roadrunner() (machine_arch_type == MACH_TYPE_ROADRUNNER)
#else
# define machine_is_roadrunner() (0)
#endif
#ifdef CONFIG_MACH_AT91RM9200EK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91RM9200EK
# endif
# define machine_is_at91rm9200ek() (machine_arch_type == MACH_TYPE_AT91RM9200EK)
#else
# define machine_is_at91rm9200ek() (0)
#endif
#ifdef CONFIG_MACH_SPITZ
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPITZ
# endif
# define machine_is_spitz() (machine_arch_type == MACH_TYPE_SPITZ)
#else
# define machine_is_spitz() (0)
#endif
#ifdef CONFIG_MACH_ADSSPHERE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ADSSPHERE
# endif
# define machine_is_adssphere() (machine_arch_type == MACH_TYPE_ADSSPHERE)
#else
# define machine_is_adssphere() (0)
#endif
#ifdef CONFIG_MACH_COLIBRI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_COLIBRI
# endif
# define machine_is_colibri() (machine_arch_type == MACH_TYPE_COLIBRI)
#else
# define machine_is_colibri() (0)
#endif
#ifdef CONFIG_MACH_GATEWAY7001
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GATEWAY7001
# endif
# define machine_is_gateway7001() (machine_arch_type == MACH_TYPE_GATEWAY7001)
#else
# define machine_is_gateway7001() (0)
#endif
#ifdef CONFIG_MACH_PCM027
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCM027
# endif
# define machine_is_pcm027() (machine_arch_type == MACH_TYPE_PCM027)
#else
# define machine_is_pcm027() (0)
#endif
#ifdef CONFIG_MACH_ANUBIS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ANUBIS
# endif
# define machine_is_anubis() (machine_arch_type == MACH_TYPE_ANUBIS)
#else
# define machine_is_anubis() (0)
#endif
#ifdef CONFIG_MACH_AKITA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AKITA
# endif
# define machine_is_akita() (machine_arch_type == MACH_TYPE_AKITA)
#else
# define machine_is_akita() (0)
#endif
#ifdef CONFIG_MACH_E330
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_E330
# endif
# define machine_is_e330() (machine_arch_type == MACH_TYPE_E330)
#else
# define machine_is_e330() (0)
#endif
#ifdef CONFIG_MACH_NOKIA770
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NOKIA770
# endif
# define machine_is_nokia770() (machine_arch_type == MACH_TYPE_NOKIA770)
#else
# define machine_is_nokia770() (0)
#endif
#ifdef CONFIG_MACH_CARMEVA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CARMEVA
# endif
# define machine_is_carmeva() (machine_arch_type == MACH_TYPE_CARMEVA)
#else
# define machine_is_carmeva() (0)
#endif
#ifdef CONFIG_MACH_EDB9315A
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB9315A
# endif
# define machine_is_edb9315a() (machine_arch_type == MACH_TYPE_EDB9315A)
#else
# define machine_is_edb9315a() (0)
#endif
#ifdef CONFIG_MACH_STARGATE2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STARGATE2
# endif
# define machine_is_stargate2() (machine_arch_type == MACH_TYPE_STARGATE2)
#else
# define machine_is_stargate2() (0)
#endif
#ifdef CONFIG_MACH_INTELMOTE2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_INTELMOTE2
# endif
# define machine_is_intelmote2() (machine_arch_type == MACH_TYPE_INTELMOTE2)
#else
# define machine_is_intelmote2() (0)
#endif
#ifdef CONFIG_MACH_TRIZEPS4
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TRIZEPS4
# endif
# define machine_is_trizeps4() (machine_arch_type == MACH_TYPE_TRIZEPS4)
#else
# define machine_is_trizeps4() (0)
#endif
#ifdef CONFIG_MACH_PNX4008
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PNX4008
# endif
# define machine_is_pnx4008() (machine_arch_type == MACH_TYPE_PNX4008)
#else
# define machine_is_pnx4008() (0)
#endif
#ifdef CONFIG_MACH_CPUAT91
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CPUAT91
# endif
# define machine_is_cpuat91() (machine_arch_type == MACH_TYPE_CPUAT91)
#else
# define machine_is_cpuat91() (0)
#endif
#ifdef CONFIG_MACH_IQ81340SC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IQ81340SC
# endif
# define machine_is_iq81340sc() (machine_arch_type == MACH_TYPE_IQ81340SC)
#else
# define machine_is_iq81340sc() (0)
#endif
#ifdef CONFIG_MACH_IQ81340MC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IQ81340MC
# endif
# define machine_is_iq81340mc() (machine_arch_type == MACH_TYPE_IQ81340MC)
#else
# define machine_is_iq81340mc() (0)
#endif
#ifdef CONFIG_MACH_MICRO9
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MICRO9
# endif
# define machine_is_micro9() (machine_arch_type == MACH_TYPE_MICRO9)
#else
# define machine_is_micro9() (0)
#endif
#ifdef CONFIG_MACH_MICRO9L
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MICRO9L
# endif
# define machine_is_micro9l() (machine_arch_type == MACH_TYPE_MICRO9L)
#else
# define machine_is_micro9l() (0)
#endif
#ifdef CONFIG_MACH_OMAP_PALMTE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_PALMTE
# endif
# define machine_is_omap_palmte() (machine_arch_type == MACH_TYPE_OMAP_PALMTE)
#else
# define machine_is_omap_palmte() (0)
#endif
#ifdef CONFIG_MACH_REALVIEW_EB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_REALVIEW_EB
# endif
# define machine_is_realview_eb() (machine_arch_type == MACH_TYPE_REALVIEW_EB)
#else
# define machine_is_realview_eb() (0)
#endif
#ifdef CONFIG_MACH_BORZOI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BORZOI
# endif
# define machine_is_borzoi() (machine_arch_type == MACH_TYPE_BORZOI)
#else
# define machine_is_borzoi() (0)
#endif
#ifdef CONFIG_MACH_PALMLD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PALMLD
# endif
# define machine_is_palmld() (machine_arch_type == MACH_TYPE_PALMLD)
#else
# define machine_is_palmld() (0)
#endif
#ifdef CONFIG_MACH_IXDP28X5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IXDP28X5
# endif
# define machine_is_ixdp28x5() (machine_arch_type == MACH_TYPE_IXDP28X5)
#else
# define machine_is_ixdp28x5() (0)
#endif
#ifdef CONFIG_MACH_OMAP_PALMTT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_PALMTT
# endif
# define machine_is_omap_palmtt() (machine_arch_type == MACH_TYPE_OMAP_PALMTT)
#else
# define machine_is_omap_palmtt() (0)
#endif
#ifdef CONFIG_MACH_ARCOM_ZEUS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARCOM_ZEUS
# endif
# define machine_is_arcom_zeus() (machine_arch_type == MACH_TYPE_ARCOM_ZEUS)
#else
# define machine_is_arcom_zeus() (0)
#endif
#ifdef CONFIG_MACH_OSIRIS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OSIRIS
# endif
# define machine_is_osiris() (machine_arch_type == MACH_TYPE_OSIRIS)
#else
# define machine_is_osiris() (0)
#endif
#ifdef CONFIG_MACH_PALMTE2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PALMTE2
# endif
# define machine_is_palmte2() (machine_arch_type == MACH_TYPE_PALMTE2)
#else
# define machine_is_palmte2() (0)
#endif
#ifdef CONFIG_MACH_MX27ADS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX27ADS
# endif
# define machine_is_mx27ads() (machine_arch_type == MACH_TYPE_MX27ADS)
#else
# define machine_is_mx27ads() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9261EK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9261EK
# endif
# define machine_is_at91sam9261ek() (machine_arch_type == MACH_TYPE_AT91SAM9261EK)
#else
# define machine_is_at91sam9261ek() (0)
#endif
#ifdef CONFIG_MACH_LOFT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LOFT
# endif
# define machine_is_loft() (machine_arch_type == MACH_TYPE_LOFT)
#else
# define machine_is_loft() (0)
#endif
#ifdef CONFIG_MACH_MX21ADS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX21ADS
# endif
# define machine_is_mx21ads() (machine_arch_type == MACH_TYPE_MX21ADS)
#else
# define machine_is_mx21ads() (0)
#endif
#ifdef CONFIG_MACH_AMS_DELTA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AMS_DELTA
# endif
# define machine_is_ams_delta() (machine_arch_type == MACH_TYPE_AMS_DELTA)
#else
# define machine_is_ams_delta() (0)
#endif
#ifdef CONFIG_MACH_NAS100D
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NAS100D
# endif
# define machine_is_nas100d() (machine_arch_type == MACH_TYPE_NAS100D)
#else
# define machine_is_nas100d() (0)
#endif
#ifdef CONFIG_MACH_MAGICIAN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MAGICIAN
# endif
# define machine_is_magician() (machine_arch_type == MACH_TYPE_MAGICIAN)
#else
# define machine_is_magician() (0)
#endif
#ifdef CONFIG_MACH_NXDKN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NXDKN
# endif
# define machine_is_nxdkn() (machine_arch_type == MACH_TYPE_NXDKN)
#else
# define machine_is_nxdkn() (0)
#endif
#ifdef CONFIG_MACH_PALMTX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PALMTX
# endif
# define machine_is_palmtx() (machine_arch_type == MACH_TYPE_PALMTX)
#else
# define machine_is_palmtx() (0)
#endif
#ifdef CONFIG_MACH_S3C2413
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_S3C2413
# endif
# define machine_is_s3c2413() (machine_arch_type == MACH_TYPE_S3C2413)
#else
# define machine_is_s3c2413() (0)
#endif
#ifdef CONFIG_MACH_WG302V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WG302V2
# endif
# define machine_is_wg302v2() (machine_arch_type == MACH_TYPE_WG302V2)
#else
# define machine_is_wg302v2() (0)
#endif
#ifdef CONFIG_MACH_OMAP_2430SDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_2430SDP
# endif
# define machine_is_omap_2430sdp() (machine_arch_type == MACH_TYPE_OMAP_2430SDP)
#else
# define machine_is_omap_2430sdp() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_EVM
# endif
# define machine_is_davinci_evm() (machine_arch_type == MACH_TYPE_DAVINCI_EVM)
#else
# define machine_is_davinci_evm() (0)
#endif
#ifdef CONFIG_MACH_PALMZ72
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PALMZ72
# endif
# define machine_is_palmz72() (machine_arch_type == MACH_TYPE_PALMZ72)
#else
# define machine_is_palmz72() (0)
#endif
#ifdef CONFIG_MACH_NXDB500
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NXDB500
# endif
# define machine_is_nxdb500() (machine_arch_type == MACH_TYPE_NXDB500)
#else
# define machine_is_nxdb500() (0)
#endif
#ifdef CONFIG_MACH_PALMT5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PALMT5
# endif
# define machine_is_palmt5() (machine_arch_type == MACH_TYPE_PALMT5)
#else
# define machine_is_palmt5() (0)
#endif
#ifdef CONFIG_MACH_PALMTC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PALMTC
# endif
# define machine_is_palmtc() (machine_arch_type == MACH_TYPE_PALMTC)
#else
# define machine_is_palmtc() (0)
#endif
#ifdef CONFIG_MACH_OMAP_APOLLON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_APOLLON
# endif
# define machine_is_omap_apollon() (machine_arch_type == MACH_TYPE_OMAP_APOLLON)
#else
# define machine_is_omap_apollon() (0)
#endif
#ifdef CONFIG_MACH_ATEB9200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ATEB9200
# endif
# define machine_is_ateb9200() (machine_arch_type == MACH_TYPE_ATEB9200)
#else
# define machine_is_ateb9200() (0)
#endif
#ifdef CONFIG_MACH_N35
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_N35
# endif
# define machine_is_n35() (machine_arch_type == MACH_TYPE_N35)
#else
# define machine_is_n35() (0)
#endif
#ifdef CONFIG_MACH_LOGICPD_PXA270
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LOGICPD_PXA270
# endif
# define machine_is_logicpd_pxa270() (machine_arch_type == MACH_TYPE_LOGICPD_PXA270)
#else
# define machine_is_logicpd_pxa270() (0)
#endif
#ifdef CONFIG_MACH_NXEB500HMI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NXEB500HMI
# endif
# define machine_is_nxeb500hmi() (machine_arch_type == MACH_TYPE_NXEB500HMI)
#else
# define machine_is_nxeb500hmi() (0)
#endif
#ifdef CONFIG_MACH_ESPRESSO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ESPRESSO
# endif
# define machine_is_espresso() (machine_arch_type == MACH_TYPE_ESPRESSO)
#else
# define machine_is_espresso() (0)
#endif
#ifdef CONFIG_MACH_RX1950
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RX1950
# endif
# define machine_is_rx1950() (machine_arch_type == MACH_TYPE_RX1950)
#else
# define machine_is_rx1950() (0)
#endif
#ifdef CONFIG_MACH_GESBC9312
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GESBC9312
# endif
# define machine_is_gesbc9312() (machine_arch_type == MACH_TYPE_GESBC9312)
#else
# define machine_is_gesbc9312() (0)
#endif
#ifdef CONFIG_MACH_PICOTUX2XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PICOTUX2XX
# endif
# define machine_is_picotux2xx() (machine_arch_type == MACH_TYPE_PICOTUX2XX)
#else
# define machine_is_picotux2xx() (0)
#endif
#ifdef CONFIG_MACH_DSMG600
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DSMG600
# endif
# define machine_is_dsmg600() (machine_arch_type == MACH_TYPE_DSMG600)
#else
# define machine_is_dsmg600() (0)
#endif
#ifdef CONFIG_MACH_OMAP_FSAMPLE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_FSAMPLE
# endif
# define machine_is_omap_fsample() (machine_arch_type == MACH_TYPE_OMAP_FSAMPLE)
#else
# define machine_is_omap_fsample() (0)
#endif
#ifdef CONFIG_MACH_SNAPPER_CL15
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SNAPPER_CL15
# endif
# define machine_is_snapper_cl15() (machine_arch_type == MACH_TYPE_SNAPPER_CL15)
#else
# define machine_is_snapper_cl15() (0)
#endif
#ifdef CONFIG_MACH_OMAP_PALMZ71
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_PALMZ71
# endif
# define machine_is_omap_palmz71() (machine_arch_type == MACH_TYPE_OMAP_PALMZ71)
#else
# define machine_is_omap_palmz71() (0)
#endif
#ifdef CONFIG_MACH_SMDK2412
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK2412
# endif
# define machine_is_smdk2412() (machine_arch_type == MACH_TYPE_SMDK2412)
#else
# define machine_is_smdk2412() (0)
#endif
#ifdef CONFIG_MACH_SMDK2413
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK2413
# endif
# define machine_is_smdk2413() (machine_arch_type == MACH_TYPE_SMDK2413)
#else
# define machine_is_smdk2413() (0)
#endif
#ifdef CONFIG_MACH_AML_M5900
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AML_M5900
# endif
# define machine_is_aml_m5900() (machine_arch_type == MACH_TYPE_AML_M5900)
#else
# define machine_is_aml_m5900() (0)
#endif
#ifdef CONFIG_MACH_BALLOON3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BALLOON3
# endif
# define machine_is_balloon3() (machine_arch_type == MACH_TYPE_BALLOON3)
#else
# define machine_is_balloon3() (0)
#endif
#ifdef CONFIG_MACH_ECBAT91
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ECBAT91
# endif
# define machine_is_ecbat91() (machine_arch_type == MACH_TYPE_ECBAT91)
#else
# define machine_is_ecbat91() (0)
#endif
#ifdef CONFIG_MACH_ONEARM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ONEARM
# endif
# define machine_is_onearm() (machine_arch_type == MACH_TYPE_ONEARM)
#else
# define machine_is_onearm() (0)
#endif
#ifdef CONFIG_MACH_SMDK2443
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK2443
# endif
# define machine_is_smdk2443() (machine_arch_type == MACH_TYPE_SMDK2443)
#else
# define machine_is_smdk2443() (0)
#endif
#ifdef CONFIG_MACH_FSG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FSG
# endif
# define machine_is_fsg() (machine_arch_type == MACH_TYPE_FSG)
#else
# define machine_is_fsg() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9260EK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9260EK
# endif
# define machine_is_at91sam9260ek() (machine_arch_type == MACH_TYPE_AT91SAM9260EK)
#else
# define machine_is_at91sam9260ek() (0)
#endif
#ifdef CONFIG_MACH_GLANTANK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GLANTANK
# endif
# define machine_is_glantank() (machine_arch_type == MACH_TYPE_GLANTANK)
#else
# define machine_is_glantank() (0)
#endif
#ifdef CONFIG_MACH_N2100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_N2100
# endif
# define machine_is_n2100() (machine_arch_type == MACH_TYPE_N2100)
#else
# define machine_is_n2100() (0)
#endif
#ifdef CONFIG_MACH_QT2410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QT2410
# endif
# define machine_is_qt2410() (machine_arch_type == MACH_TYPE_QT2410)
#else
# define machine_is_qt2410() (0)
#endif
#ifdef CONFIG_MACH_KIXRP435
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KIXRP435
# endif
# define machine_is_kixrp435() (machine_arch_type == MACH_TYPE_KIXRP435)
#else
# define machine_is_kixrp435() (0)
#endif
#ifdef CONFIG_MACH_CC9P9360DEV
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CC9P9360DEV
# endif
# define machine_is_cc9p9360dev() (machine_arch_type == MACH_TYPE_CC9P9360DEV)
#else
# define machine_is_cc9p9360dev() (0)
#endif
#ifdef CONFIG_MACH_EDB9302A
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB9302A
# endif
# define machine_is_edb9302a() (machine_arch_type == MACH_TYPE_EDB9302A)
#else
# define machine_is_edb9302a() (0)
#endif
#ifdef CONFIG_MACH_EDB9307A
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDB9307A
# endif
# define machine_is_edb9307a() (machine_arch_type == MACH_TYPE_EDB9307A)
#else
# define machine_is_edb9307a() (0)
#endif
#ifdef CONFIG_MACH_OMAP_3430SDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_3430SDP
# endif
# define machine_is_omap_3430sdp() (machine_arch_type == MACH_TYPE_OMAP_3430SDP)
#else
# define machine_is_omap_3430sdp() (0)
#endif
#ifdef CONFIG_MACH_VSTMS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VSTMS
# endif
# define machine_is_vstms() (machine_arch_type == MACH_TYPE_VSTMS)
#else
# define machine_is_vstms() (0)
#endif
#ifdef CONFIG_MACH_MICRO9M
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MICRO9M
# endif
# define machine_is_micro9m() (machine_arch_type == MACH_TYPE_MICRO9M)
#else
# define machine_is_micro9m() (0)
#endif
#ifdef CONFIG_MACH_BUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BUG
# endif
# define machine_is_bug() (machine_arch_type == MACH_TYPE_BUG)
#else
# define machine_is_bug() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9263EK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9263EK
# endif
# define machine_is_at91sam9263ek() (machine_arch_type == MACH_TYPE_AT91SAM9263EK)
#else
# define machine_is_at91sam9263ek() (0)
#endif
#ifdef CONFIG_MACH_EM7210
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EM7210
# endif
# define machine_is_em7210() (machine_arch_type == MACH_TYPE_EM7210)
#else
# define machine_is_em7210() (0)
#endif
#ifdef CONFIG_MACH_VPAC270
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VPAC270
# endif
# define machine_is_vpac270() (machine_arch_type == MACH_TYPE_VPAC270)
#else
# define machine_is_vpac270() (0)
#endif
#ifdef CONFIG_MACH_TREO680
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TREO680
# endif
# define machine_is_treo680() (machine_arch_type == MACH_TYPE_TREO680)
#else
# define machine_is_treo680() (0)
#endif
#ifdef CONFIG_MACH_ZYLONITE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ZYLONITE
# endif
# define machine_is_zylonite() (machine_arch_type == MACH_TYPE_ZYLONITE)
#else
# define machine_is_zylonite() (0)
#endif
#ifdef CONFIG_MACH_MX31LITE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX31LITE
# endif
# define machine_is_mx31lite() (machine_arch_type == MACH_TYPE_MX31LITE)
#else
# define machine_is_mx31lite() (0)
#endif
#ifdef CONFIG_MACH_MIOA701
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MIOA701
# endif
# define machine_is_mioa701() (machine_arch_type == MACH_TYPE_MIOA701)
#else
# define machine_is_mioa701() (0)
#endif
#ifdef CONFIG_MACH_ARMADILLO5X0
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARMADILLO5X0
# endif
# define machine_is_armadillo5x0() (machine_arch_type == MACH_TYPE_ARMADILLO5X0)
#else
# define machine_is_armadillo5x0() (0)
#endif
#ifdef CONFIG_MACH_CC9P9360JS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CC9P9360JS
# endif
# define machine_is_cc9p9360js() (machine_arch_type == MACH_TYPE_CC9P9360JS)
#else
# define machine_is_cc9p9360js() (0)
#endif
#ifdef CONFIG_MACH_SMDK6400
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK6400
# endif
# define machine_is_smdk6400() (machine_arch_type == MACH_TYPE_SMDK6400)
#else
# define machine_is_smdk6400() (0)
#endif
#ifdef CONFIG_MACH_NOKIA_N800
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NOKIA_N800
# endif
# define machine_is_nokia_n800() (machine_arch_type == MACH_TYPE_NOKIA_N800)
#else
# define machine_is_nokia_n800() (0)
#endif
#ifdef CONFIG_MACH_EP80219
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EP80219
# endif
# define machine_is_ep80219() (machine_arch_type == MACH_TYPE_EP80219)
#else
# define machine_is_ep80219() (0)
#endif
#ifdef CONFIG_MACH_GORAMO_MLR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GORAMO_MLR
# endif
# define machine_is_goramo_mlr() (machine_arch_type == MACH_TYPE_GORAMO_MLR)
#else
# define machine_is_goramo_mlr() (0)
#endif
#ifdef CONFIG_MACH_EM_X270
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EM_X270
# endif
# define machine_is_em_x270() (machine_arch_type == MACH_TYPE_EM_X270)
#else
# define machine_is_em_x270() (0)
#endif
#ifdef CONFIG_MACH_NEO1973_GTA02
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NEO1973_GTA02
# endif
# define machine_is_neo1973_gta02() (machine_arch_type == MACH_TYPE_NEO1973_GTA02)
#else
# define machine_is_neo1973_gta02() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9RLEK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9RLEK
# endif
# define machine_is_at91sam9rlek() (machine_arch_type == MACH_TYPE_AT91SAM9RLEK)
#else
# define machine_is_at91sam9rlek() (0)
#endif
#ifdef CONFIG_MACH_COLIBRI320
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_COLIBRI320
# endif
# define machine_is_colibri320() (machine_arch_type == MACH_TYPE_COLIBRI320)
#else
# define machine_is_colibri320() (0)
#endif
#ifdef CONFIG_MACH_CAM60
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CAM60
# endif
# define machine_is_cam60() (machine_arch_type == MACH_TYPE_CAM60)
#else
# define machine_is_cam60() (0)
#endif
#ifdef CONFIG_MACH_AT91EB01
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91EB01
# endif
# define machine_is_at91eb01() (machine_arch_type == MACH_TYPE_AT91EB01)
#else
# define machine_is_at91eb01() (0)
#endif
#ifdef CONFIG_MACH_DB88F5281
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DB88F5281
# endif
# define machine_is_db88f5281() (machine_arch_type == MACH_TYPE_DB88F5281)
#else
# define machine_is_db88f5281() (0)
#endif
#ifdef CONFIG_MACH_CSB726
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CSB726
# endif
# define machine_is_csb726() (machine_arch_type == MACH_TYPE_CSB726)
#else
# define machine_is_csb726() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DM6467_EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DM6467_EVM
# endif
# define machine_is_davinci_dm6467_evm() (machine_arch_type == MACH_TYPE_DAVINCI_DM6467_EVM)
#else
# define machine_is_davinci_dm6467_evm() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DM355_EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DM355_EVM
# endif
# define machine_is_davinci_dm355_evm() (machine_arch_type == MACH_TYPE_DAVINCI_DM355_EVM)
#else
# define machine_is_davinci_dm355_evm() (0)
#endif
#ifdef CONFIG_MACH_LITTLETON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LITTLETON
# endif
# define machine_is_littleton() (machine_arch_type == MACH_TYPE_LITTLETON)
#else
# define machine_is_littleton() (0)
#endif
#ifdef CONFIG_MACH_REALVIEW_PB11MP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_REALVIEW_PB11MP
# endif
# define machine_is_realview_pb11mp() (machine_arch_type == MACH_TYPE_REALVIEW_PB11MP)
#else
# define machine_is_realview_pb11mp() (0)
#endif
#ifdef CONFIG_MACH_MX27_3DS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX27_3DS
# endif
# define machine_is_mx27_3ds() (machine_arch_type == MACH_TYPE_MX27_3DS)
#else
# define machine_is_mx27_3ds() (0)
#endif
#ifdef CONFIG_MACH_HALIBUT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HALIBUT
# endif
# define machine_is_halibut() (machine_arch_type == MACH_TYPE_HALIBUT)
#else
# define machine_is_halibut() (0)
#endif
#ifdef CONFIG_MACH_TROUT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TROUT
# endif
# define machine_is_trout() (machine_arch_type == MACH_TYPE_TROUT)
#else
# define machine_is_trout() (0)
#endif
#ifdef CONFIG_MACH_TCT_HAMMER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TCT_HAMMER
# endif
# define machine_is_tct_hammer() (machine_arch_type == MACH_TYPE_TCT_HAMMER)
#else
# define machine_is_tct_hammer() (0)
#endif
#ifdef CONFIG_MACH_HERALD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HERALD
# endif
# define machine_is_herald() (machine_arch_type == MACH_TYPE_HERALD)
#else
# define machine_is_herald() (0)
#endif
#ifdef CONFIG_MACH_SIM_ONE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SIM_ONE
# endif
# define machine_is_sim_one() (machine_arch_type == MACH_TYPE_SIM_ONE)
#else
# define machine_is_sim_one() (0)
#endif
#ifdef CONFIG_MACH_JIVE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_JIVE
# endif
# define machine_is_jive() (machine_arch_type == MACH_TYPE_JIVE)
#else
# define machine_is_jive() (0)
#endif
#ifdef CONFIG_MACH_SAM9_L9260
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SAM9_L9260
# endif
# define machine_is_sam9_l9260() (machine_arch_type == MACH_TYPE_SAM9_L9260)
#else
# define machine_is_sam9_l9260() (0)
#endif
#ifdef CONFIG_MACH_REALVIEW_PB1176
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_REALVIEW_PB1176
# endif
# define machine_is_realview_pb1176() (machine_arch_type == MACH_TYPE_REALVIEW_PB1176)
#else
# define machine_is_realview_pb1176() (0)
#endif
#ifdef CONFIG_MACH_YL9200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_YL9200
# endif
# define machine_is_yl9200() (machine_arch_type == MACH_TYPE_YL9200)
#else
# define machine_is_yl9200() (0)
#endif
#ifdef CONFIG_MACH_RD88F5182
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RD88F5182
# endif
# define machine_is_rd88f5182() (machine_arch_type == MACH_TYPE_RD88F5182)
#else
# define machine_is_rd88f5182() (0)
#endif
#ifdef CONFIG_MACH_KUROBOX_PRO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KUROBOX_PRO
# endif
# define machine_is_kurobox_pro() (machine_arch_type == MACH_TYPE_KUROBOX_PRO)
#else
# define machine_is_kurobox_pro() (0)
#endif
#ifdef CONFIG_MACH_MX31_3DS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX31_3DS
# endif
# define machine_is_mx31_3ds() (machine_arch_type == MACH_TYPE_MX31_3DS)
#else
# define machine_is_mx31_3ds() (0)
#endif
#ifdef CONFIG_MACH_QONG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QONG
# endif
# define machine_is_qong() (machine_arch_type == MACH_TYPE_QONG)
#else
# define machine_is_qong() (0)
#endif
#ifdef CONFIG_MACH_OMAP2EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP2EVM
# endif
# define machine_is_omap2evm() (machine_arch_type == MACH_TYPE_OMAP2EVM)
#else
# define machine_is_omap2evm() (0)
#endif
#ifdef CONFIG_MACH_OMAP3EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3EVM
# endif
# define machine_is_omap3evm() (machine_arch_type == MACH_TYPE_OMAP3EVM)
#else
# define machine_is_omap3evm() (0)
#endif
#ifdef CONFIG_MACH_DNS323
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DNS323
# endif
# define machine_is_dns323() (machine_arch_type == MACH_TYPE_DNS323)
#else
# define machine_is_dns323() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_BEAGLE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_BEAGLE
# endif
# define machine_is_omap3_beagle() (machine_arch_type == MACH_TYPE_OMAP3_BEAGLE)
#else
# define machine_is_omap3_beagle() (0)
#endif
#ifdef CONFIG_MACH_NOKIA_N810
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NOKIA_N810
# endif
# define machine_is_nokia_n810() (machine_arch_type == MACH_TYPE_NOKIA_N810)
#else
# define machine_is_nokia_n810() (0)
#endif
#ifdef CONFIG_MACH_PCM038
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCM038
# endif
# define machine_is_pcm038() (machine_arch_type == MACH_TYPE_PCM038)
#else
# define machine_is_pcm038() (0)
#endif
#ifdef CONFIG_MACH_TS209
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS209
# endif
# define machine_is_ts_x09() (machine_arch_type == MACH_TYPE_TS209)
#else
# define machine_is_ts_x09() (0)
#endif
#ifdef CONFIG_MACH_AT91CAP9ADK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91CAP9ADK
# endif
# define machine_is_at91cap9adk() (machine_arch_type == MACH_TYPE_AT91CAP9ADK)
#else
# define machine_is_at91cap9adk() (0)
#endif
#ifdef CONFIG_MACH_MX31MOBOARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX31MOBOARD
# endif
# define machine_is_mx31moboard() (machine_arch_type == MACH_TYPE_MX31MOBOARD)
#else
# define machine_is_mx31moboard() (0)
#endif
#ifdef CONFIG_MACH_TERASTATION_PRO2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TERASTATION_PRO2
# endif
# define machine_is_terastation_pro2() (machine_arch_type == MACH_TYPE_TERASTATION_PRO2)
#else
# define machine_is_terastation_pro2() (0)
#endif
#ifdef CONFIG_MACH_LINKSTATION_PRO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LINKSTATION_PRO
# endif
# define machine_is_linkstation_pro() (machine_arch_type == MACH_TYPE_LINKSTATION_PRO)
#else
# define machine_is_linkstation_pro() (0)
#endif
#ifdef CONFIG_MACH_E350
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_E350
# endif
# define machine_is_e350() (machine_arch_type == MACH_TYPE_E350)
#else
# define machine_is_e350() (0)
#endif
#ifdef CONFIG_MACH_TS409
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS409
# endif
# define machine_is_ts409() (machine_arch_type == MACH_TYPE_TS409)
#else
# define machine_is_ts409() (0)
#endif
#ifdef CONFIG_MACH_CM_X300
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CM_X300
# endif
# define machine_is_cm_x300() (machine_arch_type == MACH_TYPE_CM_X300)
#else
# define machine_is_cm_x300() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9G20EK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9G20EK
# endif
# define machine_is_at91sam9g20ek() (machine_arch_type == MACH_TYPE_AT91SAM9G20EK)
#else
# define machine_is_at91sam9g20ek() (0)
#endif
#ifdef CONFIG_MACH_SMDK6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK6410
# endif
# define machine_is_smdk6410() (machine_arch_type == MACH_TYPE_SMDK6410)
#else
# define machine_is_smdk6410() (0)
#endif
#ifdef CONFIG_MACH_U300
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_U300
# endif
# define machine_is_u300() (machine_arch_type == MACH_TYPE_U300)
#else
# define machine_is_u300() (0)
#endif
#ifdef CONFIG_MACH_WRT350N_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WRT350N_V2
# endif
# define machine_is_wrt350n_v2() (machine_arch_type == MACH_TYPE_WRT350N_V2)
#else
# define machine_is_wrt350n_v2() (0)
#endif
#ifdef CONFIG_MACH_OMAP_LDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_LDP
# endif
# define machine_is_omap_ldp() (machine_arch_type == MACH_TYPE_OMAP_LDP)
#else
# define machine_is_omap_ldp() (0)
#endif
#ifdef CONFIG_MACH_MX35_3DS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX35_3DS
# endif
# define machine_is_mx35_3ds() (machine_arch_type == MACH_TYPE_MX35_3DS)
#else
# define machine_is_mx35_3ds() (0)
#endif
#ifdef CONFIG_MACH_NEUROS_OSD2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NEUROS_OSD2
# endif
# define machine_is_neuros_osd2() (machine_arch_type == MACH_TYPE_NEUROS_OSD2)
#else
# define machine_is_neuros_osd2() (0)
#endif
#ifdef CONFIG_MACH_TRIZEPS4WL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TRIZEPS4WL
# endif
# define machine_is_trizeps4wl() (machine_arch_type == MACH_TYPE_TRIZEPS4WL)
#else
# define machine_is_trizeps4wl() (0)
#endif
#ifdef CONFIG_MACH_TS78XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS78XX
# endif
# define machine_is_ts78xx() (machine_arch_type == MACH_TYPE_TS78XX)
#else
# define machine_is_ts78xx() (0)
#endif
#ifdef CONFIG_MACH_SFFSDR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SFFSDR
# endif
# define machine_is_sffsdr() (machine_arch_type == MACH_TYPE_SFFSDR)
#else
# define machine_is_sffsdr() (0)
#endif
#ifdef CONFIG_MACH_PCM037
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCM037
# endif
# define machine_is_pcm037() (machine_arch_type == MACH_TYPE_PCM037)
#else
# define machine_is_pcm037() (0)
#endif
#ifdef CONFIG_MACH_DB88F6281_BP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DB88F6281_BP
# endif
# define machine_is_db88f6281_bp() (machine_arch_type == MACH_TYPE_DB88F6281_BP)
#else
# define machine_is_db88f6281_bp() (0)
#endif
#ifdef CONFIG_MACH_RD88F6192_NAS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RD88F6192_NAS
# endif
# define machine_is_rd88f6192_nas() (machine_arch_type == MACH_TYPE_RD88F6192_NAS)
#else
# define machine_is_rd88f6192_nas() (0)
#endif
#ifdef CONFIG_MACH_RD88F6281
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RD88F6281
# endif
# define machine_is_rd88f6281() (machine_arch_type == MACH_TYPE_RD88F6281)
#else
# define machine_is_rd88f6281() (0)
#endif
#ifdef CONFIG_MACH_DB78X00_BP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DB78X00_BP
# endif
# define machine_is_db78x00_bp() (machine_arch_type == MACH_TYPE_DB78X00_BP)
#else
# define machine_is_db78x00_bp() (0)
#endif
#ifdef CONFIG_MACH_SMDK2416
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK2416
# endif
# define machine_is_smdk2416() (machine_arch_type == MACH_TYPE_SMDK2416)
#else
# define machine_is_smdk2416() (0)
#endif
#ifdef CONFIG_MACH_WBD111
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WBD111
# endif
# define machine_is_wbd111() (machine_arch_type == MACH_TYPE_WBD111)
#else
# define machine_is_wbd111() (0)
#endif
#ifdef CONFIG_MACH_MV2120
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MV2120
# endif
# define machine_is_mv2120() (machine_arch_type == MACH_TYPE_MV2120)
#else
# define machine_is_mv2120() (0)
#endif
#ifdef CONFIG_MACH_MX51_3DS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_3DS
# endif
# define machine_is_mx51_3ds() (machine_arch_type == MACH_TYPE_MX51_3DS)
#else
# define machine_is_mx51_3ds() (0)
#endif
#ifdef CONFIG_MACH_IMX27LITE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IMX27LITE
# endif
# define machine_is_imx27lite() (machine_arch_type == MACH_TYPE_IMX27LITE)
#else
# define machine_is_imx27lite() (0)
#endif
#ifdef CONFIG_MACH_USB_A9260
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_USB_A9260
# endif
# define machine_is_usb_a9260() (machine_arch_type == MACH_TYPE_USB_A9260)
#else
# define machine_is_usb_a9260() (0)
#endif
#ifdef CONFIG_MACH_USB_A9263
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_USB_A9263
# endif
# define machine_is_usb_a9263() (machine_arch_type == MACH_TYPE_USB_A9263)
#else
# define machine_is_usb_a9263() (0)
#endif
#ifdef CONFIG_MACH_QIL_A9260
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QIL_A9260
# endif
# define machine_is_qil_a9260() (machine_arch_type == MACH_TYPE_QIL_A9260)
#else
# define machine_is_qil_a9260() (0)
#endif
#ifdef CONFIG_MACH_KZM_ARM11_01
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KZM_ARM11_01
# endif
# define machine_is_kzm_arm11_01() (machine_arch_type == MACH_TYPE_KZM_ARM11_01)
#else
# define machine_is_kzm_arm11_01() (0)
#endif
#ifdef CONFIG_MACH_NOKIA_N810_WIMAX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NOKIA_N810_WIMAX
# endif
# define machine_is_nokia_n810_wimax() (machine_arch_type == MACH_TYPE_NOKIA_N810_WIMAX)
#else
# define machine_is_nokia_n810_wimax() (0)
#endif
#ifdef CONFIG_MACH_SAPPHIRE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SAPPHIRE
# endif
# define machine_is_sapphire() (machine_arch_type == MACH_TYPE_SAPPHIRE)
#else
# define machine_is_sapphire() (0)
#endif
#ifdef CONFIG_MACH_STMP37XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STMP37XX
# endif
# define machine_is_stmp37xx() (machine_arch_type == MACH_TYPE_STMP37XX)
#else
# define machine_is_stmp37xx() (0)
#endif
#ifdef CONFIG_MACH_STMP378X
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STMP378X
# endif
# define machine_is_stmp378x() (machine_arch_type == MACH_TYPE_STMP378X)
#else
# define machine_is_stmp378x() (0)
#endif
#ifdef CONFIG_MACH_EZX_A780
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EZX_A780
# endif
# define machine_is_ezx_a780() (machine_arch_type == MACH_TYPE_EZX_A780)
#else
# define machine_is_ezx_a780() (0)
#endif
#ifdef CONFIG_MACH_EZX_E680
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EZX_E680
# endif
# define machine_is_ezx_e680() (machine_arch_type == MACH_TYPE_EZX_E680)
#else
# define machine_is_ezx_e680() (0)
#endif
#ifdef CONFIG_MACH_EZX_A1200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EZX_A1200
# endif
# define machine_is_ezx_a1200() (machine_arch_type == MACH_TYPE_EZX_A1200)
#else
# define machine_is_ezx_a1200() (0)
#endif
#ifdef CONFIG_MACH_EZX_E6
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EZX_E6
# endif
# define machine_is_ezx_e6() (machine_arch_type == MACH_TYPE_EZX_E6)
#else
# define machine_is_ezx_e6() (0)
#endif
#ifdef CONFIG_MACH_EZX_E2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EZX_E2
# endif
# define machine_is_ezx_e2() (machine_arch_type == MACH_TYPE_EZX_E2)
#else
# define machine_is_ezx_e2() (0)
#endif
#ifdef CONFIG_MACH_EZX_A910
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EZX_A910
# endif
# define machine_is_ezx_a910() (machine_arch_type == MACH_TYPE_EZX_A910)
#else
# define machine_is_ezx_a910() (0)
#endif
#ifdef CONFIG_MACH_EDMINI_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDMINI_V2
# endif
# define machine_is_edmini_v2() (machine_arch_type == MACH_TYPE_EDMINI_V2)
#else
# define machine_is_edmini_v2() (0)
#endif
#ifdef CONFIG_MACH_ZIPIT2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ZIPIT2
# endif
# define machine_is_zipit2() (machine_arch_type == MACH_TYPE_ZIPIT2)
#else
# define machine_is_zipit2() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_PANDORA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_PANDORA
# endif
# define machine_is_omap3_pandora() (machine_arch_type == MACH_TYPE_OMAP3_PANDORA)
#else
# define machine_is_omap3_pandora() (0)
#endif
#ifdef CONFIG_MACH_MSS2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSS2
# endif
# define machine_is_mss2() (machine_arch_type == MACH_TYPE_MSS2)
#else
# define machine_is_mss2() (0)
#endif
#ifdef CONFIG_MACH_LB88RC8480
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LB88RC8480
# endif
# define machine_is_lb88rc8480() (machine_arch_type == MACH_TYPE_LB88RC8480)
#else
# define machine_is_lb88rc8480() (0)
#endif
#ifdef CONFIG_MACH_MX25_3DS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX25_3DS
# endif
# define machine_is_mx25_3ds() (machine_arch_type == MACH_TYPE_MX25_3DS)
#else
# define machine_is_mx25_3ds() (0)
#endif
#ifdef CONFIG_MACH_OMAP3530_LV_SOM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3530_LV_SOM
# endif
# define machine_is_omap3530_lv_som() (machine_arch_type == MACH_TYPE_OMAP3530_LV_SOM)
#else
# define machine_is_omap3530_lv_som() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DA830_EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DA830_EVM
# endif
# define machine_is_davinci_da830_evm() (machine_arch_type == MACH_TYPE_DAVINCI_DA830_EVM)
#else
# define machine_is_davinci_da830_evm() (0)
#endif
#ifdef CONFIG_MACH_AT572D940HFEB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT572D940HFEB
# endif
# define machine_is_at572d940hfek() (machine_arch_type == MACH_TYPE_AT572D940HFEB)
#else
# define machine_is_at572d940hfek() (0)
#endif
#ifdef CONFIG_MACH_DOVE_DB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DOVE_DB
# endif
# define machine_is_dove_db() (machine_arch_type == MACH_TYPE_DOVE_DB)
#else
# define machine_is_dove_db() (0)
#endif
#ifdef CONFIG_MACH_OVERO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OVERO
# endif
# define machine_is_overo() (machine_arch_type == MACH_TYPE_OVERO)
#else
# define machine_is_overo() (0)
#endif
#ifdef CONFIG_MACH_AT2440EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT2440EVB
# endif
# define machine_is_at2440evb() (machine_arch_type == MACH_TYPE_AT2440EVB)
#else
# define machine_is_at2440evb() (0)
#endif
#ifdef CONFIG_MACH_NEOCORE926
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NEOCORE926
# endif
# define machine_is_neocore926() (machine_arch_type == MACH_TYPE_NEOCORE926)
#else
# define machine_is_neocore926() (0)
#endif
#ifdef CONFIG_MACH_WNR854T
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WNR854T
# endif
# define machine_is_wnr854t() (machine_arch_type == MACH_TYPE_WNR854T)
#else
# define machine_is_wnr854t() (0)
#endif
#ifdef CONFIG_MACH_RD88F5181L_GE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RD88F5181L_GE
# endif
# define machine_is_rd88f5181l_ge() (machine_arch_type == MACH_TYPE_RD88F5181L_GE)
#else
# define machine_is_rd88f5181l_ge() (0)
#endif
#ifdef CONFIG_MACH_RD88F5181L_FXO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RD88F5181L_FXO
# endif
# define machine_is_rd88f5181l_fxo() (machine_arch_type == MACH_TYPE_RD88F5181L_FXO)
#else
# define machine_is_rd88f5181l_fxo() (0)
#endif
#ifdef CONFIG_MACH_STAMP9G20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STAMP9G20
# endif
# define machine_is_stamp9g20() (machine_arch_type == MACH_TYPE_STAMP9G20)
#else
# define machine_is_stamp9g20() (0)
#endif
#ifdef CONFIG_MACH_SMDKC100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDKC100
# endif
# define machine_is_smdkc100() (machine_arch_type == MACH_TYPE_SMDKC100)
#else
# define machine_is_smdkc100() (0)
#endif
#ifdef CONFIG_MACH_TAVOREVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TAVOREVB
# endif
# define machine_is_tavorevb() (machine_arch_type == MACH_TYPE_TAVOREVB)
#else
# define machine_is_tavorevb() (0)
#endif
#ifdef CONFIG_MACH_SAAR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SAAR
# endif
# define machine_is_saar() (machine_arch_type == MACH_TYPE_SAAR)
#else
# define machine_is_saar() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9M10G45EK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9M10G45EK
# endif
# define machine_is_at91sam9m10g45ek() (machine_arch_type == MACH_TYPE_AT91SAM9M10G45EK)
#else
# define machine_is_at91sam9m10g45ek() (0)
#endif
#ifdef CONFIG_MACH_MXLADS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MXLADS
# endif
# define machine_is_mxlads() (machine_arch_type == MACH_TYPE_MXLADS)
#else
# define machine_is_mxlads() (0)
#endif
#ifdef CONFIG_MACH_LINKSTATION_MINI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LINKSTATION_MINI
# endif
# define machine_is_linkstation_mini() (machine_arch_type == MACH_TYPE_LINKSTATION_MINI)
#else
# define machine_is_linkstation_mini() (0)
#endif
#ifdef CONFIG_MACH_AFEB9260
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AFEB9260
# endif
# define machine_is_afeb9260() (machine_arch_type == MACH_TYPE_AFEB9260)
#else
# define machine_is_afeb9260() (0)
#endif
#ifdef CONFIG_MACH_IMX27IPCAM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IMX27IPCAM
# endif
# define machine_is_imx27ipcam() (machine_arch_type == MACH_TYPE_IMX27IPCAM)
#else
# define machine_is_imx27ipcam() (0)
#endif
#ifdef CONFIG_MACH_RD88F6183AP_GE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RD88F6183AP_GE
# endif
# define machine_is_rd88f6183ap_ge() (machine_arch_type == MACH_TYPE_RD88F6183AP_GE)
#else
# define machine_is_rd88f6183ap_ge() (0)
#endif
#ifdef CONFIG_MACH_REALVIEW_PBA8
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_REALVIEW_PBA8
# endif
# define machine_is_realview_pba8() (machine_arch_type == MACH_TYPE_REALVIEW_PBA8)
#else
# define machine_is_realview_pba8() (0)
#endif
#ifdef CONFIG_MACH_REALVIEW_PBX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_REALVIEW_PBX
# endif
# define machine_is_realview_pbx() (machine_arch_type == MACH_TYPE_REALVIEW_PBX)
#else
# define machine_is_realview_pbx() (0)
#endif
#ifdef CONFIG_MACH_MICRO9S
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MICRO9S
# endif
# define machine_is_micro9s() (machine_arch_type == MACH_TYPE_MICRO9S)
#else
# define machine_is_micro9s() (0)
#endif
#ifdef CONFIG_MACH_RUT100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RUT100
# endif
# define machine_is_rut100() (machine_arch_type == MACH_TYPE_RUT100)
#else
# define machine_is_rut100() (0)
#endif
#ifdef CONFIG_MACH_G3EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_G3EVM
# endif
# define machine_is_g3evm() (machine_arch_type == MACH_TYPE_G3EVM)
#else
# define machine_is_g3evm() (0)
#endif
#ifdef CONFIG_MACH_W90P910EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_W90P910EVB
# endif
# define machine_is_w90p910evb() (machine_arch_type == MACH_TYPE_W90P910EVB)
#else
# define machine_is_w90p910evb() (0)
#endif
#ifdef CONFIG_MACH_W90P950EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_W90P950EVB
# endif
# define machine_is_w90p950evb() (machine_arch_type == MACH_TYPE_W90P950EVB)
#else
# define machine_is_w90p950evb() (0)
#endif
#ifdef CONFIG_MACH_W90N960EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_W90N960EVB
# endif
# define machine_is_w90n960evb() (machine_arch_type == MACH_TYPE_W90N960EVB)
#else
# define machine_is_w90n960evb() (0)
#endif
#ifdef CONFIG_MACH_MV88F6281GTW_GE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MV88F6281GTW_GE
# endif
# define machine_is_mv88f6281gtw_ge() (machine_arch_type == MACH_TYPE_MV88F6281GTW_GE)
#else
# define machine_is_mv88f6281gtw_ge() (0)
#endif
#ifdef CONFIG_MACH_NCP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NCP
# endif
# define machine_is_ncp() (machine_arch_type == MACH_TYPE_NCP)
#else
# define machine_is_ncp() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DM365_EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DM365_EVM
# endif
# define machine_is_davinci_dm365_evm() (machine_arch_type == MACH_TYPE_DAVINCI_DM365_EVM)
#else
# define machine_is_davinci_dm365_evm() (0)
#endif
#ifdef CONFIG_MACH_CENTRO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CENTRO
# endif
# define machine_is_centro() (machine_arch_type == MACH_TYPE_CENTRO)
#else
# define machine_is_centro() (0)
#endif
#ifdef CONFIG_MACH_NOKIA_RX51
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NOKIA_RX51
# endif
# define machine_is_nokia_rx51() (machine_arch_type == MACH_TYPE_NOKIA_RX51)
#else
# define machine_is_nokia_rx51() (0)
#endif
#ifdef CONFIG_MACH_OMAP_ZOOM2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_ZOOM2
# endif
# define machine_is_omap_zoom2() (machine_arch_type == MACH_TYPE_OMAP_ZOOM2)
#else
# define machine_is_omap_zoom2() (0)
#endif
#ifdef CONFIG_MACH_CPUAT9260
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CPUAT9260
# endif
# define machine_is_cpuat9260() (machine_arch_type == MACH_TYPE_CPUAT9260)
#else
# define machine_is_cpuat9260() (0)
#endif
#ifdef CONFIG_MACH_EUKREA_CPUIMX27
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EUKREA_CPUIMX27
# endif
# define machine_is_eukrea_cpuimx27() (machine_arch_type == MACH_TYPE_EUKREA_CPUIMX27)
#else
# define machine_is_eukrea_cpuimx27() (0)
#endif
#ifdef CONFIG_MACH_ACS5K
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACS5K
# endif
# define machine_is_acs5k() (machine_arch_type == MACH_TYPE_ACS5K)
#else
# define machine_is_acs5k() (0)
#endif
#ifdef CONFIG_MACH_SNAPPER_9260
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SNAPPER_9260
# endif
# define machine_is_snapper_9260() (machine_arch_type == MACH_TYPE_SNAPPER_9260)
#else
# define machine_is_snapper_9260() (0)
#endif
#ifdef CONFIG_MACH_DSM320
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DSM320
# endif
# define machine_is_dsm320() (machine_arch_type == MACH_TYPE_DSM320)
#else
# define machine_is_dsm320() (0)
#endif
#ifdef CONFIG_MACH_EXEDA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EXEDA
# endif
# define machine_is_exeda() (machine_arch_type == MACH_TYPE_EXEDA)
#else
# define machine_is_exeda() (0)
#endif
#ifdef CONFIG_MACH_MINI2440
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MINI2440
# endif
# define machine_is_mini2440() (machine_arch_type == MACH_TYPE_MINI2440)
#else
# define machine_is_mini2440() (0)
#endif
#ifdef CONFIG_MACH_COLIBRI300
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_COLIBRI300
# endif
# define machine_is_colibri300() (machine_arch_type == MACH_TYPE_COLIBRI300)
#else
# define machine_is_colibri300() (0)
#endif
#ifdef CONFIG_MACH_LINKSTATION_LS_HGL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LINKSTATION_LS_HGL
# endif
# define machine_is_linkstation_ls_hgl() (machine_arch_type == MACH_TYPE_LINKSTATION_LS_HGL)
#else
# define machine_is_linkstation_ls_hgl() (0)
#endif
#ifdef CONFIG_MACH_CPUAT9G20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CPUAT9G20
# endif
# define machine_is_cpuat9g20() (machine_arch_type == MACH_TYPE_CPUAT9G20)
#else
# define machine_is_cpuat9g20() (0)
#endif
#ifdef CONFIG_MACH_SMDK6440
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK6440
# endif
# define machine_is_smdk6440() (machine_arch_type == MACH_TYPE_SMDK6440)
#else
# define machine_is_smdk6440() (0)
#endif
#ifdef CONFIG_MACH_NAS4220B
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NAS4220B
# endif
# define machine_is_nas4220b() (machine_arch_type == MACH_TYPE_NAS4220B)
#else
# define machine_is_nas4220b() (0)
#endif
#ifdef CONFIG_MACH_ZYLONITE2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ZYLONITE2
# endif
# define machine_is_zylonite2() (machine_arch_type == MACH_TYPE_ZYLONITE2)
#else
# define machine_is_zylonite2() (0)
#endif
#ifdef CONFIG_MACH_ASPENITE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ASPENITE
# endif
# define machine_is_aspenite() (machine_arch_type == MACH_TYPE_ASPENITE)
#else
# define machine_is_aspenite() (0)
#endif
#ifdef CONFIG_MACH_TTC_DKB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TTC_DKB
# endif
# define machine_is_ttc_dkb() (machine_arch_type == MACH_TYPE_TTC_DKB)
#else
# define machine_is_ttc_dkb() (0)
#endif
#ifdef CONFIG_MACH_PCM043
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCM043
# endif
# define machine_is_pcm043() (machine_arch_type == MACH_TYPE_PCM043)
#else
# define machine_is_pcm043() (0)
#endif
#ifdef CONFIG_MACH_SHEEVAPLUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHEEVAPLUG
# endif
# define machine_is_sheevaplug() (machine_arch_type == MACH_TYPE_SHEEVAPLUG)
#else
# define machine_is_sheevaplug() (0)
#endif
#ifdef CONFIG_MACH_AVENGERS_LITE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AVENGERS_LITE
# endif
# define machine_is_avengers_lite() (machine_arch_type == MACH_TYPE_AVENGERS_LITE)
#else
# define machine_is_avengers_lite() (0)
#endif
#ifdef CONFIG_MACH_MX51_BABBAGE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_BABBAGE
# endif
# define machine_is_mx51_babbage() (machine_arch_type == MACH_TYPE_MX51_BABBAGE)
#else
# define machine_is_mx51_babbage() (0)
#endif
#ifdef CONFIG_MACH_RD78X00_MASA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RD78X00_MASA
# endif
# define machine_is_rd78x00_masa() (machine_arch_type == MACH_TYPE_RD78X00_MASA)
#else
# define machine_is_rd78x00_masa() (0)
#endif
#ifdef CONFIG_MACH_DM355_LEOPARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DM355_LEOPARD
# endif
# define machine_is_dm355_leopard() (machine_arch_type == MACH_TYPE_DM355_LEOPARD)
#else
# define machine_is_dm355_leopard() (0)
#endif
#ifdef CONFIG_MACH_TS219
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS219
# endif
# define machine_is_ts219() (machine_arch_type == MACH_TYPE_TS219)
#else
# define machine_is_ts219() (0)
#endif
#ifdef CONFIG_MACH_PCA100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCA100
# endif
# define machine_is_pca100() (machine_arch_type == MACH_TYPE_PCA100)
#else
# define machine_is_pca100() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DA850_EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DA850_EVM
# endif
# define machine_is_davinci_da850_evm() (machine_arch_type == MACH_TYPE_DAVINCI_DA850_EVM)
#else
# define machine_is_davinci_da850_evm() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9G10EK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9G10EK
# endif
# define machine_is_at91sam9g10ek() (machine_arch_type == MACH_TYPE_AT91SAM9G10EK)
#else
# define machine_is_at91sam9g10ek() (0)
#endif
#ifdef CONFIG_MACH_OMAP_4430SDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_4430SDP
# endif
# define machine_is_omap_4430sdp() (machine_arch_type == MACH_TYPE_OMAP_4430SDP)
#else
# define machine_is_omap_4430sdp() (0)
#endif
#ifdef CONFIG_MACH_MAGX_ZN5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MAGX_ZN5
# endif
# define machine_is_magx_zn5() (machine_arch_type == MACH_TYPE_MAGX_ZN5)
#else
# define machine_is_magx_zn5() (0)
#endif
#ifdef CONFIG_MACH_BTMAVB101
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BTMAVB101
# endif
# define machine_is_btmavb101() (machine_arch_type == MACH_TYPE_BTMAVB101)
#else
# define machine_is_btmavb101() (0)
#endif
#ifdef CONFIG_MACH_BTMAWB101
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BTMAWB101
# endif
# define machine_is_btmawb101() (machine_arch_type == MACH_TYPE_BTMAWB101)
#else
# define machine_is_btmawb101() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_TORPEDO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_TORPEDO
# endif
# define machine_is_omap3_torpedo() (machine_arch_type == MACH_TYPE_OMAP3_TORPEDO)
#else
# define machine_is_omap3_torpedo() (0)
#endif
#ifdef CONFIG_MACH_ANW6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ANW6410
# endif
# define machine_is_anw6410() (machine_arch_type == MACH_TYPE_ANW6410)
#else
# define machine_is_anw6410() (0)
#endif
#ifdef CONFIG_MACH_IMX27_VISSTRIM_M10
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IMX27_VISSTRIM_M10
# endif
# define machine_is_imx27_visstrim_m10() (machine_arch_type == MACH_TYPE_IMX27_VISSTRIM_M10)
#else
# define machine_is_imx27_visstrim_m10() (0)
#endif
#ifdef CONFIG_MACH_PORTUXG20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PORTUXG20
# endif
# define machine_is_portuxg20() (machine_arch_type == MACH_TYPE_PORTUXG20)
#else
# define machine_is_portuxg20() (0)
#endif
#ifdef CONFIG_MACH_SMDKC110
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDKC110
# endif
# define machine_is_smdkc110() (machine_arch_type == MACH_TYPE_SMDKC110)
#else
# define machine_is_smdkc110() (0)
#endif
#ifdef CONFIG_MACH_OMAP3517EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3517EVM
# endif
# define machine_is_omap3517evm() (machine_arch_type == MACH_TYPE_OMAP3517EVM)
#else
# define machine_is_omap3517evm() (0)
#endif
#ifdef CONFIG_MACH_NETSPACE_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NETSPACE_V2
# endif
# define machine_is_netspace_v2() (machine_arch_type == MACH_TYPE_NETSPACE_V2)
#else
# define machine_is_netspace_v2() (0)
#endif
#ifdef CONFIG_MACH_NETSPACE_MAX_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NETSPACE_MAX_V2
# endif
# define machine_is_netspace_max_v2() (machine_arch_type == MACH_TYPE_NETSPACE_MAX_V2)
#else
# define machine_is_netspace_max_v2() (0)
#endif
#ifdef CONFIG_MACH_D2NET_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_D2NET_V2
# endif
# define machine_is_d2net_v2() (machine_arch_type == MACH_TYPE_D2NET_V2)
#else
# define machine_is_d2net_v2() (0)
#endif
#ifdef CONFIG_MACH_NET2BIG_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NET2BIG_V2
# endif
# define machine_is_net2big_v2() (machine_arch_type == MACH_TYPE_NET2BIG_V2)
#else
# define machine_is_net2big_v2() (0)
#endif
#ifdef CONFIG_MACH_NET5BIG_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NET5BIG_V2
# endif
# define machine_is_net5big_v2() (machine_arch_type == MACH_TYPE_NET5BIG_V2)
#else
# define machine_is_net5big_v2() (0)
#endif
#ifdef CONFIG_MACH_INETSPACE_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_INETSPACE_V2
# endif
# define machine_is_inetspace_v2() (machine_arch_type == MACH_TYPE_INETSPACE_V2)
#else
# define machine_is_inetspace_v2() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9G45EKES
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9G45EKES
# endif
# define machine_is_at91sam9g45ekes() (machine_arch_type == MACH_TYPE_AT91SAM9G45EKES)
#else
# define machine_is_at91sam9g45ekes() (0)
#endif
#ifdef CONFIG_MACH_PC7302
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PC7302
# endif
# define machine_is_pc7302() (machine_arch_type == MACH_TYPE_PC7302)
#else
# define machine_is_pc7302() (0)
#endif
#ifdef CONFIG_MACH_SPEAR600
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPEAR600
# endif
# define machine_is_spear600() (machine_arch_type == MACH_TYPE_SPEAR600)
#else
# define machine_is_spear600() (0)
#endif
#ifdef CONFIG_MACH_SPEAR300
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPEAR300
# endif
# define machine_is_spear300() (machine_arch_type == MACH_TYPE_SPEAR300)
#else
# define machine_is_spear300() (0)
#endif
#ifdef CONFIG_MACH_LILLY1131
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LILLY1131
# endif
# define machine_is_lilly1131() (machine_arch_type == MACH_TYPE_LILLY1131)
#else
# define machine_is_lilly1131() (0)
#endif
#ifdef CONFIG_MACH_HMT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HMT
# endif
# define machine_is_hmt() (machine_arch_type == MACH_TYPE_HMT)
#else
# define machine_is_hmt() (0)
#endif
#ifdef CONFIG_MACH_VEXPRESS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VEXPRESS
# endif
# define machine_is_vexpress() (machine_arch_type == MACH_TYPE_VEXPRESS)
#else
# define machine_is_vexpress() (0)
#endif
#ifdef CONFIG_MACH_D2NET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_D2NET
# endif
# define machine_is_d2net() (machine_arch_type == MACH_TYPE_D2NET)
#else
# define machine_is_d2net() (0)
#endif
#ifdef CONFIG_MACH_BIGDISK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BIGDISK
# endif
# define machine_is_bigdisk() (machine_arch_type == MACH_TYPE_BIGDISK)
#else
# define machine_is_bigdisk() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9G20EK_2MMC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9G20EK_2MMC
# endif
# define machine_is_at91sam9g20ek_2mmc() (machine_arch_type == MACH_TYPE_AT91SAM9G20EK_2MMC)
#else
# define machine_is_at91sam9g20ek_2mmc() (0)
#endif
#ifdef CONFIG_MACH_BCMRING
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BCMRING
# endif
# define machine_is_bcmring() (machine_arch_type == MACH_TYPE_BCMRING)
#else
# define machine_is_bcmring() (0)
#endif
#ifdef CONFIG_MACH_DP6XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DP6XX
# endif
# define machine_is_dp6xx() (machine_arch_type == MACH_TYPE_DP6XX)
#else
# define machine_is_dp6xx() (0)
#endif
#ifdef CONFIG_MACH_MAHIMAHI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MAHIMAHI
# endif
# define machine_is_mahimahi() (machine_arch_type == MACH_TYPE_MAHIMAHI)
#else
# define machine_is_mahimahi() (0)
#endif
#ifdef CONFIG_MACH_SMDK6442
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK6442
# endif
# define machine_is_smdk6442() (machine_arch_type == MACH_TYPE_SMDK6442)
#else
# define machine_is_smdk6442() (0)
#endif
#ifdef CONFIG_MACH_OPENRD_BASE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OPENRD_BASE
# endif
# define machine_is_openrd_base() (machine_arch_type == MACH_TYPE_OPENRD_BASE)
#else
# define machine_is_openrd_base() (0)
#endif
#ifdef CONFIG_MACH_DEVKIT8000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DEVKIT8000
# endif
# define machine_is_devkit8000() (machine_arch_type == MACH_TYPE_DEVKIT8000)
#else
# define machine_is_devkit8000() (0)
#endif
#ifdef CONFIG_MACH_MX51_EFIKAMX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_EFIKAMX
# endif
# define machine_is_mx51_efikamx() (machine_arch_type == MACH_TYPE_MX51_EFIKAMX)
#else
# define machine_is_mx51_efikamx() (0)
#endif
#ifdef CONFIG_MACH_CM_T35
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CM_T35
# endif
# define machine_is_cm_t35() (machine_arch_type == MACH_TYPE_CM_T35)
#else
# define machine_is_cm_t35() (0)
#endif
#ifdef CONFIG_MACH_NET2BIG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NET2BIG
# endif
# define machine_is_net2big() (machine_arch_type == MACH_TYPE_NET2BIG)
#else
# define machine_is_net2big() (0)
#endif
#ifdef CONFIG_MACH_IGEP0020
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IGEP0020
# endif
# define machine_is_igep0020() (machine_arch_type == MACH_TYPE_IGEP0020)
#else
# define machine_is_igep0020() (0)
#endif
#ifdef CONFIG_MACH_NUC932EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NUC932EVB
# endif
# define machine_is_nuc932evb() (machine_arch_type == MACH_TYPE_NUC932EVB)
#else
# define machine_is_nuc932evb() (0)
#endif
#ifdef CONFIG_MACH_OPENRD_CLIENT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OPENRD_CLIENT
# endif
# define machine_is_openrd_client() (machine_arch_type == MACH_TYPE_OPENRD_CLIENT)
#else
# define machine_is_openrd_client() (0)
#endif
#ifdef CONFIG_MACH_U8500
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_U8500
# endif
# define machine_is_u8500() (machine_arch_type == MACH_TYPE_U8500)
#else
# define machine_is_u8500() (0)
#endif
#ifdef CONFIG_MACH_MX51_EFIKASB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_EFIKASB
# endif
# define machine_is_mx51_efikasb() (machine_arch_type == MACH_TYPE_MX51_EFIKASB)
#else
# define machine_is_mx51_efikasb() (0)
#endif
#ifdef CONFIG_MACH_MARVELL_JASPER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MARVELL_JASPER
# endif
# define machine_is_marvell_jasper() (machine_arch_type == MACH_TYPE_MARVELL_JASPER)
#else
# define machine_is_marvell_jasper() (0)
#endif
#ifdef CONFIG_MACH_FLINT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FLINT
# endif
# define machine_is_flint() (machine_arch_type == MACH_TYPE_FLINT)
#else
# define machine_is_flint() (0)
#endif
#ifdef CONFIG_MACH_TAVOREVB3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TAVOREVB3
# endif
# define machine_is_tavorevb3() (machine_arch_type == MACH_TYPE_TAVOREVB3)
#else
# define machine_is_tavorevb3() (0)
#endif
#ifdef CONFIG_MACH_TOUCHBOOK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TOUCHBOOK
# endif
# define machine_is_touchbook() (machine_arch_type == MACH_TYPE_TOUCHBOOK)
#else
# define machine_is_touchbook() (0)
#endif
#ifdef CONFIG_MACH_RAUMFELD_RC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RAUMFELD_RC
# endif
# define machine_is_raumfeld_rc() (machine_arch_type == MACH_TYPE_RAUMFELD_RC)
#else
# define machine_is_raumfeld_rc() (0)
#endif
#ifdef CONFIG_MACH_RAUMFELD_CONNECTOR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RAUMFELD_CONNECTOR
# endif
# define machine_is_raumfeld_connector() (machine_arch_type == MACH_TYPE_RAUMFELD_CONNECTOR)
#else
# define machine_is_raumfeld_connector() (0)
#endif
#ifdef CONFIG_MACH_RAUMFELD_SPEAKER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RAUMFELD_SPEAKER
# endif
# define machine_is_raumfeld_speaker() (machine_arch_type == MACH_TYPE_RAUMFELD_SPEAKER)
#else
# define machine_is_raumfeld_speaker() (0)
#endif
#ifdef CONFIG_MACH_TNETV107X
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TNETV107X
# endif
# define machine_is_tnetv107x() (machine_arch_type == MACH_TYPE_TNETV107X)
#else
# define machine_is_tnetv107x() (0)
#endif
#ifdef CONFIG_MACH_SMDKV210
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDKV210
# endif
# define machine_is_smdkv210() (machine_arch_type == MACH_TYPE_SMDKV210)
#else
# define machine_is_smdkv210() (0)
#endif
#ifdef CONFIG_MACH_OMAP_ZOOM3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_ZOOM3
# endif
# define machine_is_omap_zoom3() (machine_arch_type == MACH_TYPE_OMAP_ZOOM3)
#else
# define machine_is_omap_zoom3() (0)
#endif
#ifdef CONFIG_MACH_OMAP_3630SDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_3630SDP
# endif
# define machine_is_omap_3630sdp() (machine_arch_type == MACH_TYPE_OMAP_3630SDP)
#else
# define machine_is_omap_3630sdp() (0)
#endif
#ifdef CONFIG_MACH_SMARTQ7
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMARTQ7
# endif
# define machine_is_smartq7() (machine_arch_type == MACH_TYPE_SMARTQ7)
#else
# define machine_is_smartq7() (0)
#endif
#ifdef CONFIG_MACH_WATSON_EFM_PLUGIN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WATSON_EFM_PLUGIN
# endif
# define machine_is_watson_efm_plugin() (machine_arch_type == MACH_TYPE_WATSON_EFM_PLUGIN)
#else
# define machine_is_watson_efm_plugin() (0)
#endif
#ifdef CONFIG_MACH_G4EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_G4EVM
# endif
# define machine_is_g4evm() (machine_arch_type == MACH_TYPE_G4EVM)
#else
# define machine_is_g4evm() (0)
#endif
#ifdef CONFIG_MACH_OMAPL138_HAWKBOARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAPL138_HAWKBOARD
# endif
# define machine_is_omapl138_hawkboard() (machine_arch_type == MACH_TYPE_OMAPL138_HAWKBOARD)
#else
# define machine_is_omapl138_hawkboard() (0)
#endif
#ifdef CONFIG_MACH_TS41X
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS41X
# endif
# define machine_is_ts41x() (machine_arch_type == MACH_TYPE_TS41X)
#else
# define machine_is_ts41x() (0)
#endif
#ifdef CONFIG_MACH_PHY3250
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PHY3250
# endif
# define machine_is_phy3250() (machine_arch_type == MACH_TYPE_PHY3250)
#else
# define machine_is_phy3250() (0)
#endif
#ifdef CONFIG_MACH_MINI6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MINI6410
# endif
# define machine_is_mini6410() (machine_arch_type == MACH_TYPE_MINI6410)
#else
# define machine_is_mini6410() (0)
#endif
#ifdef CONFIG_MACH_MX28EVK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX28EVK
# endif
# define machine_is_mx28evk() (machine_arch_type == MACH_TYPE_MX28EVK)
#else
# define machine_is_mx28evk() (0)
#endif
#ifdef CONFIG_MACH_SMARTQ5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMARTQ5
# endif
# define machine_is_smartq5() (machine_arch_type == MACH_TYPE_SMARTQ5)
#else
# define machine_is_smartq5() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DM6467TEVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DM6467TEVM
# endif
# define machine_is_davinci_dm6467tevm() (machine_arch_type == MACH_TYPE_DAVINCI_DM6467TEVM)
#else
# define machine_is_davinci_dm6467tevm() (0)
#endif
#ifdef CONFIG_MACH_MXT_TD60
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MXT_TD60
# endif
# define machine_is_mxt_td60() (machine_arch_type == MACH_TYPE_MXT_TD60)
#else
# define machine_is_mxt_td60() (0)
#endif
#ifdef CONFIG_MACH_RIOT_BEI2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RIOT_BEI2
# endif
# define machine_is_riot_bei2() (machine_arch_type == MACH_TYPE_RIOT_BEI2)
#else
# define machine_is_riot_bei2() (0)
#endif
#ifdef CONFIG_MACH_RIOT_X37
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RIOT_X37
# endif
# define machine_is_riot_x37() (machine_arch_type == MACH_TYPE_RIOT_X37)
#else
# define machine_is_riot_x37() (0)
#endif
#ifdef CONFIG_MACH_CAPC7117
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CAPC7117
# endif
# define machine_is_capc7117() (machine_arch_type == MACH_TYPE_CAPC7117)
#else
# define machine_is_capc7117() (0)
#endif
#ifdef CONFIG_MACH_ICONTROL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ICONTROL
# endif
# define machine_is_icontrol() (machine_arch_type == MACH_TYPE_ICONTROL)
#else
# define machine_is_icontrol() (0)
#endif
#ifdef CONFIG_MACH_QSD8X50A_ST1_5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QSD8X50A_ST1_5
# endif
# define machine_is_qsd8x50a_st1_5() (machine_arch_type == MACH_TYPE_QSD8X50A_ST1_5)
#else
# define machine_is_qsd8x50a_st1_5() (0)
#endif
#ifdef CONFIG_MACH_MX23EVK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX23EVK
# endif
# define machine_is_mx23evk() (machine_arch_type == MACH_TYPE_MX23EVK)
#else
# define machine_is_mx23evk() (0)
#endif
#ifdef CONFIG_MACH_AP4EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AP4EVB
# endif
# define machine_is_ap4evb() (machine_arch_type == MACH_TYPE_AP4EVB)
#else
# define machine_is_ap4evb() (0)
#endif
#ifdef CONFIG_MACH_MITYOMAPL138
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MITYOMAPL138
# endif
# define machine_is_mityomapl138() (machine_arch_type == MACH_TYPE_MITYOMAPL138)
#else
# define machine_is_mityomapl138() (0)
#endif
#ifdef CONFIG_MACH_GURUPLUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GURUPLUG
# endif
# define machine_is_guruplug() (machine_arch_type == MACH_TYPE_GURUPLUG)
#else
# define machine_is_guruplug() (0)
#endif
#ifdef CONFIG_MACH_SPEAR310
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPEAR310
# endif
# define machine_is_spear310() (machine_arch_type == MACH_TYPE_SPEAR310)
#else
# define machine_is_spear310() (0)
#endif
#ifdef CONFIG_MACH_SPEAR320
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPEAR320
# endif
# define machine_is_spear320() (machine_arch_type == MACH_TYPE_SPEAR320)
#else
# define machine_is_spear320() (0)
#endif
#ifdef CONFIG_MACH_AQUILA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AQUILA
# endif
# define machine_is_aquila() (machine_arch_type == MACH_TYPE_AQUILA)
#else
# define machine_is_aquila() (0)
#endif
#ifdef CONFIG_MACH_ESATA_SHEEVAPLUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ESATA_SHEEVAPLUG
# endif
# define machine_is_sheeva_esata() (machine_arch_type == MACH_TYPE_ESATA_SHEEVAPLUG)
#else
# define machine_is_sheeva_esata() (0)
#endif
#ifdef CONFIG_MACH_MSM7X30_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X30_SURF
# endif
# define machine_is_msm7x30_surf() (machine_arch_type == MACH_TYPE_MSM7X30_SURF)
#else
# define machine_is_msm7x30_surf() (0)
#endif
#ifdef CONFIG_MACH_EA2478DEVKIT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EA2478DEVKIT
# endif
# define machine_is_ea2478devkit() (machine_arch_type == MACH_TYPE_EA2478DEVKIT)
#else
# define machine_is_ea2478devkit() (0)
#endif
#ifdef CONFIG_MACH_TERASTATION_WXL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TERASTATION_WXL
# endif
# define machine_is_terastation_wxl() (machine_arch_type == MACH_TYPE_TERASTATION_WXL)
#else
# define machine_is_terastation_wxl() (0)
#endif
#ifdef CONFIG_MACH_MSM7X25_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X25_SURF
# endif
# define machine_is_msm7x25_surf() (machine_arch_type == MACH_TYPE_MSM7X25_SURF)
#else
# define machine_is_msm7x25_surf() (0)
#endif
#ifdef CONFIG_MACH_MSM7X25_FFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X25_FFA
# endif
# define machine_is_msm7x25_ffa() (machine_arch_type == MACH_TYPE_MSM7X25_FFA)
#else
# define machine_is_msm7x25_ffa() (0)
#endif
#ifdef CONFIG_MACH_MSM7X27_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X27_SURF
# endif
# define machine_is_msm7x27_surf() (machine_arch_type == MACH_TYPE_MSM7X27_SURF)
#else
# define machine_is_msm7x27_surf() (0)
#endif
#ifdef CONFIG_MACH_MSM7X27_FFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X27_FFA
# endif
# define machine_is_msm7x27_ffa() (machine_arch_type == MACH_TYPE_MSM7X27_FFA)
#else
# define machine_is_msm7x27_ffa() (0)
#endif
#ifdef CONFIG_MACH_MSM7X30_FFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X30_FFA
# endif
# define machine_is_msm7x30_ffa() (machine_arch_type == MACH_TYPE_MSM7X30_FFA)
#else
# define machine_is_msm7x30_ffa() (0)
#endif
#ifdef CONFIG_MACH_QSD8X50_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QSD8X50_SURF
# endif
# define machine_is_qsd8x50_surf() (machine_arch_type == MACH_TYPE_QSD8X50_SURF)
#else
# define machine_is_qsd8x50_surf() (0)
#endif
#ifdef CONFIG_MACH_MX53_EVK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX53_EVK
# endif
# define machine_is_mx53_evk() (machine_arch_type == MACH_TYPE_MX53_EVK)
#else
# define machine_is_mx53_evk() (0)
#endif
#ifdef CONFIG_MACH_IGEP0030
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IGEP0030
# endif
# define machine_is_igep0030() (machine_arch_type == MACH_TYPE_IGEP0030)
#else
# define machine_is_igep0030() (0)
#endif
#ifdef CONFIG_MACH_SBC3530
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SBC3530
# endif
# define machine_is_sbc3530() (machine_arch_type == MACH_TYPE_SBC3530)
#else
# define machine_is_sbc3530() (0)
#endif
#ifdef CONFIG_MACH_SAARB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SAARB
# endif
# define machine_is_saarb() (machine_arch_type == MACH_TYPE_SAARB)
#else
# define machine_is_saarb() (0)
#endif
#ifdef CONFIG_MACH_HARMONY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HARMONY
# endif
# define machine_is_harmony() (machine_arch_type == MACH_TYPE_HARMONY)
#else
# define machine_is_harmony() (0)
#endif
#ifdef CONFIG_MACH_MSM7X30_FLUID
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X30_FLUID
# endif
# define machine_is_msm7x30_fluid() (machine_arch_type == MACH_TYPE_MSM7X30_FLUID)
#else
# define machine_is_msm7x30_fluid() (0)
#endif
#ifdef CONFIG_MACH_CM_T3517
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CM_T3517
# endif
# define machine_is_cm_t3517() (machine_arch_type == MACH_TYPE_CM_T3517)
#else
# define machine_is_cm_t3517() (0)
#endif
#ifdef CONFIG_MACH_WBD222
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WBD222
# endif
# define machine_is_wbd222() (machine_arch_type == MACH_TYPE_WBD222)
#else
# define machine_is_wbd222() (0)
#endif
#ifdef CONFIG_MACH_MSM8X60_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X60_SURF
# endif
# define machine_is_msm8x60_surf() (machine_arch_type == MACH_TYPE_MSM8X60_SURF)
#else
# define machine_is_msm8x60_surf() (0)
#endif
#ifdef CONFIG_MACH_MSM8X60_SIM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X60_SIM
# endif
# define machine_is_msm8x60_sim() (machine_arch_type == MACH_TYPE_MSM8X60_SIM)
#else
# define machine_is_msm8x60_sim() (0)
#endif
#ifdef CONFIG_MACH_TCC8000_SDK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TCC8000_SDK
# endif
# define machine_is_tcc8000_sdk() (machine_arch_type == MACH_TYPE_TCC8000_SDK)
#else
# define machine_is_tcc8000_sdk() (0)
#endif
#ifdef CONFIG_MACH_NANOS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NANOS
# endif
# define machine_is_nanos() (machine_arch_type == MACH_TYPE_NANOS)
#else
# define machine_is_nanos() (0)
#endif
#ifdef CONFIG_MACH_STAMP9G45
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STAMP9G45
# endif
# define machine_is_stamp9g45() (machine_arch_type == MACH_TYPE_STAMP9G45)
#else
# define machine_is_stamp9g45() (0)
#endif
#ifdef CONFIG_MACH_CNS3420VB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CNS3420VB
# endif
# define machine_is_cns3420vb() (machine_arch_type == MACH_TYPE_CNS3420VB)
#else
# define machine_is_cns3420vb() (0)
#endif
#ifdef CONFIG_MACH_OMAP4_PANDA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP4_PANDA
# endif
# define machine_is_omap4_panda() (machine_arch_type == MACH_TYPE_OMAP4_PANDA)
#else
# define machine_is_omap4_panda() (0)
#endif
#ifdef CONFIG_MACH_TI8168EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TI8168EVM
# endif
# define machine_is_ti8168evm() (machine_arch_type == MACH_TYPE_TI8168EVM)
#else
# define machine_is_ti8168evm() (0)
#endif
#ifdef CONFIG_MACH_TETON_BGA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TETON_BGA
# endif
# define machine_is_teton_bga() (machine_arch_type == MACH_TYPE_TETON_BGA)
#else
# define machine_is_teton_bga() (0)
#endif
#ifdef CONFIG_MACH_EUKREA_CPUIMX25SD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EUKREA_CPUIMX25SD
# endif
# define machine_is_eukrea_cpuimx25sd() (machine_arch_type == MACH_TYPE_EUKREA_CPUIMX25SD)
#else
# define machine_is_eukrea_cpuimx25sd() (0)
#endif
#ifdef CONFIG_MACH_EUKREA_CPUIMX35SD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EUKREA_CPUIMX35SD
# endif
# define machine_is_eukrea_cpuimx35sd() (machine_arch_type == MACH_TYPE_EUKREA_CPUIMX35SD)
#else
# define machine_is_eukrea_cpuimx35sd() (0)
#endif
#ifdef CONFIG_MACH_EUKREA_CPUIMX51SD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EUKREA_CPUIMX51SD
# endif
# define machine_is_eukrea_cpuimx51sd() (machine_arch_type == MACH_TYPE_EUKREA_CPUIMX51SD)
#else
# define machine_is_eukrea_cpuimx51sd() (0)
#endif
#ifdef CONFIG_MACH_EUKREA_CPUIMX51
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EUKREA_CPUIMX51
# endif
# define machine_is_eukrea_cpuimx51() (machine_arch_type == MACH_TYPE_EUKREA_CPUIMX51)
#else
# define machine_is_eukrea_cpuimx51() (0)
#endif
#ifdef CONFIG_MACH_SMDKC210
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDKC210
# endif
# define machine_is_smdkc210() (machine_arch_type == MACH_TYPE_SMDKC210)
#else
# define machine_is_smdkc210() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_BRAILLO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_BRAILLO
# endif
# define machine_is_omap3_braillo() (machine_arch_type == MACH_TYPE_OMAP3_BRAILLO)
#else
# define machine_is_omap3_braillo() (0)
#endif
#ifdef CONFIG_MACH_SPYPLUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPYPLUG
# endif
# define machine_is_spyplug() (machine_arch_type == MACH_TYPE_SPYPLUG)
#else
# define machine_is_spyplug() (0)
#endif
#ifdef CONFIG_MACH_GINGER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GINGER
# endif
# define machine_is_ginger() (machine_arch_type == MACH_TYPE_GINGER)
#else
# define machine_is_ginger() (0)
#endif
#ifdef CONFIG_MACH_TNY_T3530
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TNY_T3530
# endif
# define machine_is_tny_t3530() (machine_arch_type == MACH_TYPE_TNY_T3530)
#else
# define machine_is_tny_t3530() (0)
#endif
#ifdef CONFIG_MACH_PCA102
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCA102
# endif
# define machine_is_pca102() (machine_arch_type == MACH_TYPE_PCA102)
#else
# define machine_is_pca102() (0)
#endif
#ifdef CONFIG_MACH_SPADE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPADE
# endif
# define machine_is_spade() (machine_arch_type == MACH_TYPE_SPADE)
#else
# define machine_is_spade() (0)
#endif
#ifdef CONFIG_MACH_MXC25_TOPAZ
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MXC25_TOPAZ
# endif
# define machine_is_mxc25_topaz() (machine_arch_type == MACH_TYPE_MXC25_TOPAZ)
#else
# define machine_is_mxc25_topaz() (0)
#endif
#ifdef CONFIG_MACH_T5325
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_T5325
# endif
# define machine_is_t5325() (machine_arch_type == MACH_TYPE_T5325)
#else
# define machine_is_t5325() (0)
#endif
#ifdef CONFIG_MACH_GW2361
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GW2361
# endif
# define machine_is_gw2361() (machine_arch_type == MACH_TYPE_GW2361)
#else
# define machine_is_gw2361() (0)
#endif
#ifdef CONFIG_MACH_ELOG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ELOG
# endif
# define machine_is_elog() (machine_arch_type == MACH_TYPE_ELOG)
#else
# define machine_is_elog() (0)
#endif
#ifdef CONFIG_MACH_INCOME
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_INCOME
# endif
# define machine_is_income() (machine_arch_type == MACH_TYPE_INCOME)
#else
# define machine_is_income() (0)
#endif
#ifdef CONFIG_MACH_BCM589X
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BCM589X
# endif
# define machine_is_bcm589x() (machine_arch_type == MACH_TYPE_BCM589X)
#else
# define machine_is_bcm589x() (0)
#endif
#ifdef CONFIG_MACH_ETNA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ETNA
# endif
# define machine_is_etna() (machine_arch_type == MACH_TYPE_ETNA)
#else
# define machine_is_etna() (0)
#endif
#ifdef CONFIG_MACH_HAWKS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HAWKS
# endif
# define machine_is_hawks() (machine_arch_type == MACH_TYPE_HAWKS)
#else
# define machine_is_hawks() (0)
#endif
#ifdef CONFIG_MACH_MESON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MESON
# endif
# define machine_is_meson() (machine_arch_type == MACH_TYPE_MESON)
#else
# define machine_is_meson() (0)
#endif
#ifdef CONFIG_MACH_XSBASE255
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_XSBASE255
# endif
# define machine_is_xsbase255() (machine_arch_type == MACH_TYPE_XSBASE255)
#else
# define machine_is_xsbase255() (0)
#endif
#ifdef CONFIG_MACH_PVM2030
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PVM2030
# endif
# define machine_is_pvm2030() (machine_arch_type == MACH_TYPE_PVM2030)
#else
# define machine_is_pvm2030() (0)
#endif
#ifdef CONFIG_MACH_MIOA502
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MIOA502
# endif
# define machine_is_mioa502() (machine_arch_type == MACH_TYPE_MIOA502)
#else
# define machine_is_mioa502() (0)
#endif
#ifdef CONFIG_MACH_VVBOX_SDORIG2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VVBOX_SDORIG2
# endif
# define machine_is_vvbox_sdorig2() (machine_arch_type == MACH_TYPE_VVBOX_SDORIG2)
#else
# define machine_is_vvbox_sdorig2() (0)
#endif
#ifdef CONFIG_MACH_VVBOX_SDLITE2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VVBOX_SDLITE2
# endif
# define machine_is_vvbox_sdlite2() (machine_arch_type == MACH_TYPE_VVBOX_SDLITE2)
#else
# define machine_is_vvbox_sdlite2() (0)
#endif
#ifdef CONFIG_MACH_VVBOX_SDPRO4
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VVBOX_SDPRO4
# endif
# define machine_is_vvbox_sdpro4() (machine_arch_type == MACH_TYPE_VVBOX_SDPRO4)
#else
# define machine_is_vvbox_sdpro4() (0)
#endif
#ifdef CONFIG_MACH_HTC_SPV_M700
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HTC_SPV_M700
# endif
# define machine_is_htc_spv_m700() (machine_arch_type == MACH_TYPE_HTC_SPV_M700)
#else
# define machine_is_htc_spv_m700() (0)
#endif
#ifdef CONFIG_MACH_MX257SX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX257SX
# endif
# define machine_is_mx257sx() (machine_arch_type == MACH_TYPE_MX257SX)
#else
# define machine_is_mx257sx() (0)
#endif
#ifdef CONFIG_MACH_GONI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GONI
# endif
# define machine_is_goni() (machine_arch_type == MACH_TYPE_GONI)
#else
# define machine_is_goni() (0)
#endif
#ifdef CONFIG_MACH_MSM8X55_SVLTE_FFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X55_SVLTE_FFA
# endif
# define machine_is_msm8x55_svlte_ffa() (machine_arch_type == MACH_TYPE_MSM8X55_SVLTE_FFA)
#else
# define machine_is_msm8x55_svlte_ffa() (0)
#endif
#ifdef CONFIG_MACH_MSM8X55_SVLTE_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X55_SVLTE_SURF
# endif
# define machine_is_msm8x55_svlte_surf() (machine_arch_type == MACH_TYPE_MSM8X55_SVLTE_SURF)
#else
# define machine_is_msm8x55_svlte_surf() (0)
#endif
#ifdef CONFIG_MACH_QUICKSTEP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QUICKSTEP
# endif
# define machine_is_quickstep() (machine_arch_type == MACH_TYPE_QUICKSTEP)
#else
# define machine_is_quickstep() (0)
#endif
#ifdef CONFIG_MACH_DMW96
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DMW96
# endif
# define machine_is_dmw96() (machine_arch_type == MACH_TYPE_DMW96)
#else
# define machine_is_dmw96() (0)
#endif
#ifdef CONFIG_MACH_HAMMERHEAD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HAMMERHEAD
# endif
# define machine_is_hammerhead() (machine_arch_type == MACH_TYPE_HAMMERHEAD)
#else
# define machine_is_hammerhead() (0)
#endif
#ifdef CONFIG_MACH_TRIDENT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TRIDENT
# endif
# define machine_is_trident() (machine_arch_type == MACH_TYPE_TRIDENT)
#else
# define machine_is_trident() (0)
#endif
#ifdef CONFIG_MACH_LIGHTNING
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LIGHTNING
# endif
# define machine_is_lightning() (machine_arch_type == MACH_TYPE_LIGHTNING)
#else
# define machine_is_lightning() (0)
#endif
#ifdef CONFIG_MACH_ICONNECT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ICONNECT
# endif
# define machine_is_iconnect() (machine_arch_type == MACH_TYPE_ICONNECT)
#else
# define machine_is_iconnect() (0)
#endif
#ifdef CONFIG_MACH_AUTOBOT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AUTOBOT
# endif
# define machine_is_autobot() (machine_arch_type == MACH_TYPE_AUTOBOT)
#else
# define machine_is_autobot() (0)
#endif
#ifdef CONFIG_MACH_COCONUT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_COCONUT
# endif
# define machine_is_coconut() (machine_arch_type == MACH_TYPE_COCONUT)
#else
# define machine_is_coconut() (0)
#endif
#ifdef CONFIG_MACH_DURIAN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DURIAN
# endif
# define machine_is_durian() (machine_arch_type == MACH_TYPE_DURIAN)
#else
# define machine_is_durian() (0)
#endif
#ifdef CONFIG_MACH_CAYENNE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CAYENNE
# endif
# define machine_is_cayenne() (machine_arch_type == MACH_TYPE_CAYENNE)
#else
# define machine_is_cayenne() (0)
#endif
#ifdef CONFIG_MACH_FUJI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FUJI
# endif
# define machine_is_fuji() (machine_arch_type == MACH_TYPE_FUJI)
#else
# define machine_is_fuji() (0)
#endif
#ifdef CONFIG_MACH_SYNOLOGY_6282
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SYNOLOGY_6282
# endif
# define machine_is_synology_6282() (machine_arch_type == MACH_TYPE_SYNOLOGY_6282)
#else
# define machine_is_synology_6282() (0)
#endif
#ifdef CONFIG_MACH_EM1SY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EM1SY
# endif
# define machine_is_em1sy() (machine_arch_type == MACH_TYPE_EM1SY)
#else
# define machine_is_em1sy() (0)
#endif
#ifdef CONFIG_MACH_M502
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_M502
# endif
# define machine_is_m502() (machine_arch_type == MACH_TYPE_M502)
#else
# define machine_is_m502() (0)
#endif
#ifdef CONFIG_MACH_MATRIX518
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MATRIX518
# endif
# define machine_is_matrix518() (machine_arch_type == MACH_TYPE_MATRIX518)
#else
# define machine_is_matrix518() (0)
#endif
#ifdef CONFIG_MACH_TINY_GURNARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TINY_GURNARD
# endif
# define machine_is_tiny_gurnard() (machine_arch_type == MACH_TYPE_TINY_GURNARD)
#else
# define machine_is_tiny_gurnard() (0)
#endif
#ifdef CONFIG_MACH_SPEAR1310
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPEAR1310
# endif
# define machine_is_spear1310() (machine_arch_type == MACH_TYPE_SPEAR1310)
#else
# define machine_is_spear1310() (0)
#endif
#ifdef CONFIG_MACH_BV07
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BV07
# endif
# define machine_is_bv07() (machine_arch_type == MACH_TYPE_BV07)
#else
# define machine_is_bv07() (0)
#endif
#ifdef CONFIG_MACH_MXT_TD61
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MXT_TD61
# endif
# define machine_is_mxt_td61() (machine_arch_type == MACH_TYPE_MXT_TD61)
#else
# define machine_is_mxt_td61() (0)
#endif
#ifdef CONFIG_MACH_OPENRD_ULTIMATE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OPENRD_ULTIMATE
# endif
# define machine_is_openrd_ultimate() (machine_arch_type == MACH_TYPE_OPENRD_ULTIMATE)
#else
# define machine_is_openrd_ultimate() (0)
#endif
#ifdef CONFIG_MACH_DEVIXP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DEVIXP
# endif
# define machine_is_devixp() (machine_arch_type == MACH_TYPE_DEVIXP)
#else
# define machine_is_devixp() (0)
#endif
#ifdef CONFIG_MACH_MICCPT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MICCPT
# endif
# define machine_is_miccpt() (machine_arch_type == MACH_TYPE_MICCPT)
#else
# define machine_is_miccpt() (0)
#endif
#ifdef CONFIG_MACH_MIC256
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MIC256
# endif
# define machine_is_mic256() (machine_arch_type == MACH_TYPE_MIC256)
#else
# define machine_is_mic256() (0)
#endif
#ifdef CONFIG_MACH_AS1167
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AS1167
# endif
# define machine_is_as1167() (machine_arch_type == MACH_TYPE_AS1167)
#else
# define machine_is_as1167() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_IBIZA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_IBIZA
# endif
# define machine_is_omap3_ibiza() (machine_arch_type == MACH_TYPE_OMAP3_IBIZA)
#else
# define machine_is_omap3_ibiza() (0)
#endif
#ifdef CONFIG_MACH_U5500
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_U5500
# endif
# define machine_is_u5500() (machine_arch_type == MACH_TYPE_U5500)
#else
# define machine_is_u5500() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_PICTO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_PICTO
# endif
# define machine_is_davinci_picto() (machine_arch_type == MACH_TYPE_DAVINCI_PICTO)
#else
# define machine_is_davinci_picto() (0)
#endif
#ifdef CONFIG_MACH_MECHA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MECHA
# endif
# define machine_is_mecha() (machine_arch_type == MACH_TYPE_MECHA)
#else
# define machine_is_mecha() (0)
#endif
#ifdef CONFIG_MACH_BUBBA3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BUBBA3
# endif
# define machine_is_bubba3() (machine_arch_type == MACH_TYPE_BUBBA3)
#else
# define machine_is_bubba3() (0)
#endif
#ifdef CONFIG_MACH_PUPITRE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PUPITRE
# endif
# define machine_is_pupitre() (machine_arch_type == MACH_TYPE_PUPITRE)
#else
# define machine_is_pupitre() (0)
#endif
#ifdef CONFIG_MACH_TEGRA_VOGUE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TEGRA_VOGUE
# endif
# define machine_is_tegra_vogue() (machine_arch_type == MACH_TYPE_TEGRA_VOGUE)
#else
# define machine_is_tegra_vogue() (0)
#endif
#ifdef CONFIG_MACH_TEGRA_E1165
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TEGRA_E1165
# endif
# define machine_is_tegra_e1165() (machine_arch_type == MACH_TYPE_TEGRA_E1165)
#else
# define machine_is_tegra_e1165() (0)
#endif
#ifdef CONFIG_MACH_SIMPLENET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SIMPLENET
# endif
# define machine_is_simplenet() (machine_arch_type == MACH_TYPE_SIMPLENET)
#else
# define machine_is_simplenet() (0)
#endif
#ifdef CONFIG_MACH_EC4350TBM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EC4350TBM
# endif
# define machine_is_ec4350tbm() (machine_arch_type == MACH_TYPE_EC4350TBM)
#else
# define machine_is_ec4350tbm() (0)
#endif
#ifdef CONFIG_MACH_PEC_TC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PEC_TC
# endif
# define machine_is_pec_tc() (machine_arch_type == MACH_TYPE_PEC_TC)
#else
# define machine_is_pec_tc() (0)
#endif
#ifdef CONFIG_MACH_PEC_HC2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PEC_HC2
# endif
# define machine_is_pec_hc2() (machine_arch_type == MACH_TYPE_PEC_HC2)
#else
# define machine_is_pec_hc2() (0)
#endif
#ifdef CONFIG_MACH_ESL_MOBILIS_A
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ESL_MOBILIS_A
# endif
# define machine_is_esl_mobilis_a() (machine_arch_type == MACH_TYPE_ESL_MOBILIS_A)
#else
# define machine_is_esl_mobilis_a() (0)
#endif
#ifdef CONFIG_MACH_ESL_MOBILIS_B
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ESL_MOBILIS_B
# endif
# define machine_is_esl_mobilis_b() (machine_arch_type == MACH_TYPE_ESL_MOBILIS_B)
#else
# define machine_is_esl_mobilis_b() (0)
#endif
#ifdef CONFIG_MACH_ESL_WAVE_A
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ESL_WAVE_A
# endif
# define machine_is_esl_wave_a() (machine_arch_type == MACH_TYPE_ESL_WAVE_A)
#else
# define machine_is_esl_wave_a() (0)
#endif
#ifdef CONFIG_MACH_ESL_WAVE_B
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ESL_WAVE_B
# endif
# define machine_is_esl_wave_b() (machine_arch_type == MACH_TYPE_ESL_WAVE_B)
#else
# define machine_is_esl_wave_b() (0)
#endif
#ifdef CONFIG_MACH_UNISENSE_MMM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_UNISENSE_MMM
# endif
# define machine_is_unisense_mmm() (machine_arch_type == MACH_TYPE_UNISENSE_MMM)
#else
# define machine_is_unisense_mmm() (0)
#endif
#ifdef CONFIG_MACH_BLUESHARK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BLUESHARK
# endif
# define machine_is_blueshark() (machine_arch_type == MACH_TYPE_BLUESHARK)
#else
# define machine_is_blueshark() (0)
#endif
#ifdef CONFIG_MACH_E10
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_E10
# endif
# define machine_is_e10() (machine_arch_type == MACH_TYPE_E10)
#else
# define machine_is_e10() (0)
#endif
#ifdef CONFIG_MACH_APP3K_ROBIN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_APP3K_ROBIN
# endif
# define machine_is_app3k_robin() (machine_arch_type == MACH_TYPE_APP3K_ROBIN)
#else
# define machine_is_app3k_robin() (0)
#endif
#ifdef CONFIG_MACH_POV15HD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_POV15HD
# endif
# define machine_is_pov15hd() (machine_arch_type == MACH_TYPE_POV15HD)
#else
# define machine_is_pov15hd() (0)
#endif
#ifdef CONFIG_MACH_STELLA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STELLA
# endif
# define machine_is_stella() (machine_arch_type == MACH_TYPE_STELLA)
#else
# define machine_is_stella() (0)
#endif
#ifdef CONFIG_MACH_LINKSTATION_LSCHL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LINKSTATION_LSCHL
# endif
# define machine_is_linkstation_lschl() (machine_arch_type == MACH_TYPE_LINKSTATION_LSCHL)
#else
# define machine_is_linkstation_lschl() (0)
#endif
#ifdef CONFIG_MACH_NETWALKER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NETWALKER
# endif
# define machine_is_netwalker() (machine_arch_type == MACH_TYPE_NETWALKER)
#else
# define machine_is_netwalker() (0)
#endif
#ifdef CONFIG_MACH_ACSX106
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACSX106
# endif
# define machine_is_acsx106() (machine_arch_type == MACH_TYPE_ACSX106)
#else
# define machine_is_acsx106() (0)
#endif
#ifdef CONFIG_MACH_ATLAS5_C1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ATLAS5_C1
# endif
# define machine_is_atlas5_c1() (machine_arch_type == MACH_TYPE_ATLAS5_C1)
#else
# define machine_is_atlas5_c1() (0)
#endif
#ifdef CONFIG_MACH_NSB3AST
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NSB3AST
# endif
# define machine_is_nsb3ast() (machine_arch_type == MACH_TYPE_NSB3AST)
#else
# define machine_is_nsb3ast() (0)
#endif
#ifdef CONFIG_MACH_GNET_SLC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GNET_SLC
# endif
# define machine_is_gnet_slc() (machine_arch_type == MACH_TYPE_GNET_SLC)
#else
# define machine_is_gnet_slc() (0)
#endif
#ifdef CONFIG_MACH_AF4000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AF4000
# endif
# define machine_is_af4000() (machine_arch_type == MACH_TYPE_AF4000)
#else
# define machine_is_af4000() (0)
#endif
#ifdef CONFIG_MACH_ARK9431
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARK9431
# endif
# define machine_is_ark9431() (machine_arch_type == MACH_TYPE_ARK9431)
#else
# define machine_is_ark9431() (0)
#endif
#ifdef CONFIG_MACH_FS_S5PC100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FS_S5PC100
# endif
# define machine_is_fs_s5pc100() (machine_arch_type == MACH_TYPE_FS_S5PC100)
#else
# define machine_is_fs_s5pc100() (0)
#endif
#ifdef CONFIG_MACH_OMAP3505NOVA8
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3505NOVA8
# endif
# define machine_is_omap3505nova8() (machine_arch_type == MACH_TYPE_OMAP3505NOVA8)
#else
# define machine_is_omap3505nova8() (0)
#endif
#ifdef CONFIG_MACH_OMAP3621_EDP1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3621_EDP1
# endif
# define machine_is_omap3621_edp1() (machine_arch_type == MACH_TYPE_OMAP3621_EDP1)
#else
# define machine_is_omap3621_edp1() (0)
#endif
#ifdef CONFIG_MACH_ORATISAES
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ORATISAES
# endif
# define machine_is_oratisaes() (machine_arch_type == MACH_TYPE_ORATISAES)
#else
# define machine_is_oratisaes() (0)
#endif
#ifdef CONFIG_MACH_SMDKV310
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDKV310
# endif
# define machine_is_smdkv310() (machine_arch_type == MACH_TYPE_SMDKV310)
#else
# define machine_is_smdkv310() (0)
#endif
#ifdef CONFIG_MACH_SIEMENS_L0
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SIEMENS_L0
# endif
# define machine_is_siemens_l0() (machine_arch_type == MACH_TYPE_SIEMENS_L0)
#else
# define machine_is_siemens_l0() (0)
#endif
#ifdef CONFIG_MACH_VENTANA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VENTANA
# endif
# define machine_is_ventana() (machine_arch_type == MACH_TYPE_VENTANA)
#else
# define machine_is_ventana() (0)
#endif
#ifdef CONFIG_MACH_WM8505_7IN_NETBOOK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WM8505_7IN_NETBOOK
# endif
# define machine_is_wm8505_7in_netbook() (machine_arch_type == MACH_TYPE_WM8505_7IN_NETBOOK)
#else
# define machine_is_wm8505_7in_netbook() (0)
#endif
#ifdef CONFIG_MACH_EC4350SDB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EC4350SDB
# endif
# define machine_is_ec4350sdb() (machine_arch_type == MACH_TYPE_EC4350SDB)
#else
# define machine_is_ec4350sdb() (0)
#endif
#ifdef CONFIG_MACH_MIMAS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MIMAS
# endif
# define machine_is_mimas() (machine_arch_type == MACH_TYPE_MIMAS)
#else
# define machine_is_mimas() (0)
#endif
#ifdef CONFIG_MACH_TITAN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TITAN
# endif
# define machine_is_titan() (machine_arch_type == MACH_TYPE_TITAN)
#else
# define machine_is_titan() (0)
#endif
#ifdef CONFIG_MACH_CRANEBOARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CRANEBOARD
# endif
# define machine_is_craneboard() (machine_arch_type == MACH_TYPE_CRANEBOARD)
#else
# define machine_is_craneboard() (0)
#endif
#ifdef CONFIG_MACH_ES2440
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ES2440
# endif
# define machine_is_es2440() (machine_arch_type == MACH_TYPE_ES2440)
#else
# define machine_is_es2440() (0)
#endif
#ifdef CONFIG_MACH_NAJAY_A9263
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NAJAY_A9263
# endif
# define machine_is_najay_a9263() (machine_arch_type == MACH_TYPE_NAJAY_A9263)
#else
# define machine_is_najay_a9263() (0)
#endif
#ifdef CONFIG_MACH_HTCTORNADO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HTCTORNADO
# endif
# define machine_is_htctornado() (machine_arch_type == MACH_TYPE_HTCTORNADO)
#else
# define machine_is_htctornado() (0)
#endif
#ifdef CONFIG_MACH_DIMM_MX257
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DIMM_MX257
# endif
# define machine_is_dimm_mx257() (machine_arch_type == MACH_TYPE_DIMM_MX257)
#else
# define machine_is_dimm_mx257() (0)
#endif
#ifdef CONFIG_MACH_JIGEN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_JIGEN
# endif
# define machine_is_jigen301() (machine_arch_type == MACH_TYPE_JIGEN)
#else
# define machine_is_jigen301() (0)
#endif
#ifdef CONFIG_MACH_SMDK6450
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMDK6450
# endif
# define machine_is_smdk6450() (machine_arch_type == MACH_TYPE_SMDK6450)
#else
# define machine_is_smdk6450() (0)
#endif
#ifdef CONFIG_MACH_MENO_QNG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MENO_QNG
# endif
# define machine_is_meno_qng() (machine_arch_type == MACH_TYPE_MENO_QNG)
#else
# define machine_is_meno_qng() (0)
#endif
#ifdef CONFIG_MACH_NS2416
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NS2416
# endif
# define machine_is_ns2416() (machine_arch_type == MACH_TYPE_NS2416)
#else
# define machine_is_ns2416() (0)
#endif
#ifdef CONFIG_MACH_RPC353
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RPC353
# endif
# define machine_is_rpc353() (machine_arch_type == MACH_TYPE_RPC353)
#else
# define machine_is_rpc353() (0)
#endif
#ifdef CONFIG_MACH_TQ6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TQ6410
# endif
# define machine_is_tq6410() (machine_arch_type == MACH_TYPE_TQ6410)
#else
# define machine_is_tq6410() (0)
#endif
#ifdef CONFIG_MACH_SKY6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SKY6410
# endif
# define machine_is_sky6410() (machine_arch_type == MACH_TYPE_SKY6410)
#else
# define machine_is_sky6410() (0)
#endif
#ifdef CONFIG_MACH_DYNASTY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DYNASTY
# endif
# define machine_is_dynasty() (machine_arch_type == MACH_TYPE_DYNASTY)
#else
# define machine_is_dynasty() (0)
#endif
#ifdef CONFIG_MACH_VIVO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VIVO
# endif
# define machine_is_vivo() (machine_arch_type == MACH_TYPE_VIVO)
#else
# define machine_is_vivo() (0)
#endif
#ifdef CONFIG_MACH_BURY_BL7582
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BURY_BL7582
# endif
# define machine_is_bury_bl7582() (machine_arch_type == MACH_TYPE_BURY_BL7582)
#else
# define machine_is_bury_bl7582() (0)
#endif
#ifdef CONFIG_MACH_BURY_BPS5270
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BURY_BPS5270
# endif
# define machine_is_bury_bps5270() (machine_arch_type == MACH_TYPE_BURY_BPS5270)
#else
# define machine_is_bury_bps5270() (0)
#endif
#ifdef CONFIG_MACH_BASI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BASI
# endif
# define machine_is_basi() (machine_arch_type == MACH_TYPE_BASI)
#else
# define machine_is_basi() (0)
#endif
#ifdef CONFIG_MACH_TN200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TN200
# endif
# define machine_is_tn200() (machine_arch_type == MACH_TYPE_TN200)
#else
# define machine_is_tn200() (0)
#endif
#ifdef CONFIG_MACH_C2MMI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_C2MMI
# endif
# define machine_is_c2mmi() (machine_arch_type == MACH_TYPE_C2MMI)
#else
# define machine_is_c2mmi() (0)
#endif
#ifdef CONFIG_MACH_MESON_6236M
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MESON_6236M
# endif
# define machine_is_meson_6236m() (machine_arch_type == MACH_TYPE_MESON_6236M)
#else
# define machine_is_meson_6236m() (0)
#endif
#ifdef CONFIG_MACH_MESON_8626M
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MESON_8626M
# endif
# define machine_is_meson_8626m() (machine_arch_type == MACH_TYPE_MESON_8626M)
#else
# define machine_is_meson_8626m() (0)
#endif
#ifdef CONFIG_MACH_TUBE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TUBE
# endif
# define machine_is_tube() (machine_arch_type == MACH_TYPE_TUBE)
#else
# define machine_is_tube() (0)
#endif
#ifdef CONFIG_MACH_MESSINA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MESSINA
# endif
# define machine_is_messina() (machine_arch_type == MACH_TYPE_MESSINA)
#else
# define machine_is_messina() (0)
#endif
#ifdef CONFIG_MACH_MX50_ARM2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX50_ARM2
# endif
# define machine_is_mx50_arm2() (machine_arch_type == MACH_TYPE_MX50_ARM2)
#else
# define machine_is_mx50_arm2() (0)
#endif
#ifdef CONFIG_MACH_CETUS9263
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CETUS9263
# endif
# define machine_is_cetus9263() (machine_arch_type == MACH_TYPE_CETUS9263)
#else
# define machine_is_cetus9263() (0)
#endif
#ifdef CONFIG_MACH_BROWNSTONE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BROWNSTONE
# endif
# define machine_is_brownstone() (machine_arch_type == MACH_TYPE_BROWNSTONE)
#else
# define machine_is_brownstone() (0)
#endif
#ifdef CONFIG_MACH_VMX25
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VMX25
# endif
# define machine_is_vmx25() (machine_arch_type == MACH_TYPE_VMX25)
#else
# define machine_is_vmx25() (0)
#endif
#ifdef CONFIG_MACH_VMX51
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VMX51
# endif
# define machine_is_vmx51() (machine_arch_type == MACH_TYPE_VMX51)
#else
# define machine_is_vmx51() (0)
#endif
#ifdef CONFIG_MACH_ABACUS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ABACUS
# endif
# define machine_is_abacus() (machine_arch_type == MACH_TYPE_ABACUS)
#else
# define machine_is_abacus() (0)
#endif
#ifdef CONFIG_MACH_CM4745
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CM4745
# endif
# define machine_is_cm4745() (machine_arch_type == MACH_TYPE_CM4745)
#else
# define machine_is_cm4745() (0)
#endif
#ifdef CONFIG_MACH_ORATISLINK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ORATISLINK
# endif
# define machine_is_oratislink() (machine_arch_type == MACH_TYPE_ORATISLINK)
#else
# define machine_is_oratislink() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DM365_DVR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DM365_DVR
# endif
# define machine_is_davinci_dm365_dvr() (machine_arch_type == MACH_TYPE_DAVINCI_DM365_DVR)
#else
# define machine_is_davinci_dm365_dvr() (0)
#endif
#ifdef CONFIG_MACH_NETVIZ
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NETVIZ
# endif
# define machine_is_netviz() (machine_arch_type == MACH_TYPE_NETVIZ)
#else
# define machine_is_netviz() (0)
#endif
#ifdef CONFIG_MACH_FLEXIBITY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FLEXIBITY
# endif
# define machine_is_flexibity() (machine_arch_type == MACH_TYPE_FLEXIBITY)
#else
# define machine_is_flexibity() (0)
#endif
#ifdef CONFIG_MACH_WLAN_COMPUTER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WLAN_COMPUTER
# endif
# define machine_is_wlan_computer() (machine_arch_type == MACH_TYPE_WLAN_COMPUTER)
#else
# define machine_is_wlan_computer() (0)
#endif
#ifdef CONFIG_MACH_LPC24XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LPC24XX
# endif
# define machine_is_lpc24xx() (machine_arch_type == MACH_TYPE_LPC24XX)
#else
# define machine_is_lpc24xx() (0)
#endif
#ifdef CONFIG_MACH_SPICA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPICA
# endif
# define machine_is_spica() (machine_arch_type == MACH_TYPE_SPICA)
#else
# define machine_is_spica() (0)
#endif
#ifdef CONFIG_MACH_GPSDISPLAY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GPSDISPLAY
# endif
# define machine_is_gpsdisplay() (machine_arch_type == MACH_TYPE_GPSDISPLAY)
#else
# define machine_is_gpsdisplay() (0)
#endif
#ifdef CONFIG_MACH_BIPNET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BIPNET
# endif
# define machine_is_bipnet() (machine_arch_type == MACH_TYPE_BIPNET)
#else
# define machine_is_bipnet() (0)
#endif
#ifdef CONFIG_MACH_OVERO_CTU_INERTIAL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OVERO_CTU_INERTIAL
# endif
# define machine_is_overo_ctu_inertial() (machine_arch_type == MACH_TYPE_OVERO_CTU_INERTIAL)
#else
# define machine_is_overo_ctu_inertial() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DM355_MMM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DM355_MMM
# endif
# define machine_is_davinci_dm355_mmm() (machine_arch_type == MACH_TYPE_DAVINCI_DM355_MMM)
#else
# define machine_is_davinci_dm355_mmm() (0)
#endif
#ifdef CONFIG_MACH_PC9260_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PC9260_V2
# endif
# define machine_is_pc9260_v2() (machine_arch_type == MACH_TYPE_PC9260_V2)
#else
# define machine_is_pc9260_v2() (0)
#endif
#ifdef CONFIG_MACH_PTX7545
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PTX7545
# endif
# define machine_is_ptx7545() (machine_arch_type == MACH_TYPE_PTX7545)
#else
# define machine_is_ptx7545() (0)
#endif
#ifdef CONFIG_MACH_TM_EFDC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TM_EFDC
# endif
# define machine_is_tm_efdc() (machine_arch_type == MACH_TYPE_TM_EFDC)
#else
# define machine_is_tm_efdc() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_WALDO1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_WALDO1
# endif
# define machine_is_omap3_waldo1() (machine_arch_type == MACH_TYPE_OMAP3_WALDO1)
#else
# define machine_is_omap3_waldo1() (0)
#endif
#ifdef CONFIG_MACH_FLYER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FLYER
# endif
# define machine_is_flyer() (machine_arch_type == MACH_TYPE_FLYER)
#else
# define machine_is_flyer() (0)
#endif
#ifdef CONFIG_MACH_TORNADO3240
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TORNADO3240
# endif
# define machine_is_tornado3240() (machine_arch_type == MACH_TYPE_TORNADO3240)
#else
# define machine_is_tornado3240() (0)
#endif
#ifdef CONFIG_MACH_SOLI_01
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SOLI_01
# endif
# define machine_is_soli_01() (machine_arch_type == MACH_TYPE_SOLI_01)
#else
# define machine_is_soli_01() (0)
#endif
#ifdef CONFIG_MACH_OMAPL138_EUROPALC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAPL138_EUROPALC
# endif
# define machine_is_omapl138_europalc() (machine_arch_type == MACH_TYPE_OMAPL138_EUROPALC)
#else
# define machine_is_omapl138_europalc() (0)
#endif
#ifdef CONFIG_MACH_HELIOS_V1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HELIOS_V1
# endif
# define machine_is_helios_v1() (machine_arch_type == MACH_TYPE_HELIOS_V1)
#else
# define machine_is_helios_v1() (0)
#endif
#ifdef CONFIG_MACH_NETSPACE_LITE_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NETSPACE_LITE_V2
# endif
# define machine_is_netspace_lite_v2() (machine_arch_type == MACH_TYPE_NETSPACE_LITE_V2)
#else
# define machine_is_netspace_lite_v2() (0)
#endif
#ifdef CONFIG_MACH_SSC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SSC
# endif
# define machine_is_ssc() (machine_arch_type == MACH_TYPE_SSC)
#else
# define machine_is_ssc() (0)
#endif
#ifdef CONFIG_MACH_PREMIERWAVE_EN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PREMIERWAVE_EN
# endif
# define machine_is_premierwave_en() (machine_arch_type == MACH_TYPE_PREMIERWAVE_EN)
#else
# define machine_is_premierwave_en() (0)
#endif
#ifdef CONFIG_MACH_WASABI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WASABI
# endif
# define machine_is_wasabi() (machine_arch_type == MACH_TYPE_WASABI)
#else
# define machine_is_wasabi() (0)
#endif
#ifdef CONFIG_MACH_MX50_RDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX50_RDP
# endif
# define machine_is_mx50_rdp() (machine_arch_type == MACH_TYPE_MX50_RDP)
#else
# define machine_is_mx50_rdp() (0)
#endif
#ifdef CONFIG_MACH_UNIVERSAL_C210
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_UNIVERSAL_C210
# endif
# define machine_is_universal_c210() (machine_arch_type == MACH_TYPE_UNIVERSAL_C210)
#else
# define machine_is_universal_c210() (0)
#endif
#ifdef CONFIG_MACH_REAL6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_REAL6410
# endif
# define machine_is_real6410() (machine_arch_type == MACH_TYPE_REAL6410)
#else
# define machine_is_real6410() (0)
#endif
#ifdef CONFIG_MACH_SPX_SAKURA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPX_SAKURA
# endif
# define machine_is_spx_sakura() (machine_arch_type == MACH_TYPE_SPX_SAKURA)
#else
# define machine_is_spx_sakura() (0)
#endif
#ifdef CONFIG_MACH_IJ3K_2440
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IJ3K_2440
# endif
# define machine_is_ij3k_2440() (machine_arch_type == MACH_TYPE_IJ3K_2440)
#else
# define machine_is_ij3k_2440() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_BC10
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_BC10
# endif
# define machine_is_omap3_bc10() (machine_arch_type == MACH_TYPE_OMAP3_BC10)
#else
# define machine_is_omap3_bc10() (0)
#endif
#ifdef CONFIG_MACH_THEBE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_THEBE
# endif
# define machine_is_thebe() (machine_arch_type == MACH_TYPE_THEBE)
#else
# define machine_is_thebe() (0)
#endif
#ifdef CONFIG_MACH_RV082
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RV082
# endif
# define machine_is_rv082() (machine_arch_type == MACH_TYPE_RV082)
#else
# define machine_is_rv082() (0)
#endif
#ifdef CONFIG_MACH_ARMLGUEST
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARMLGUEST
# endif
# define machine_is_armlguest() (machine_arch_type == MACH_TYPE_ARMLGUEST)
#else
# define machine_is_armlguest() (0)
#endif
#ifdef CONFIG_MACH_TJINC1000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TJINC1000
# endif
# define machine_is_tjinc1000() (machine_arch_type == MACH_TYPE_TJINC1000)
#else
# define machine_is_tjinc1000() (0)
#endif
#ifdef CONFIG_MACH_DOCKSTAR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DOCKSTAR
# endif
# define machine_is_dockstar() (machine_arch_type == MACH_TYPE_DOCKSTAR)
#else
# define machine_is_dockstar() (0)
#endif
#ifdef CONFIG_MACH_AX8008
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AX8008
# endif
# define machine_is_ax8008() (machine_arch_type == MACH_TYPE_AX8008)
#else
# define machine_is_ax8008() (0)
#endif
#ifdef CONFIG_MACH_GNET_SGCE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GNET_SGCE
# endif
# define machine_is_gnet_sgce() (machine_arch_type == MACH_TYPE_GNET_SGCE)
#else
# define machine_is_gnet_sgce() (0)
#endif
#ifdef CONFIG_MACH_PXWNAS_500_1000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PXWNAS_500_1000
# endif
# define machine_is_pxwnas_500_1000() (machine_arch_type == MACH_TYPE_PXWNAS_500_1000)
#else
# define machine_is_pxwnas_500_1000() (0)
#endif
#ifdef CONFIG_MACH_EA20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EA20
# endif
# define machine_is_ea20() (machine_arch_type == MACH_TYPE_EA20)
#else
# define machine_is_ea20() (0)
#endif
#ifdef CONFIG_MACH_AWM2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AWM2
# endif
# define machine_is_awm2() (machine_arch_type == MACH_TYPE_AWM2)
#else
# define machine_is_awm2() (0)
#endif
#ifdef CONFIG_MACH_TI8148EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TI8148EVM
# endif
# define machine_is_ti8148evm() (machine_arch_type == MACH_TYPE_TI8148EVM)
#else
# define machine_is_ti8148evm() (0)
#endif
#ifdef CONFIG_MACH_SEABOARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SEABOARD
# endif
# define machine_is_seaboard() (machine_arch_type == MACH_TYPE_SEABOARD)
#else
# define machine_is_seaboard() (0)
#endif
#ifdef CONFIG_MACH_LINKSTATION_CHLV2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LINKSTATION_CHLV2
# endif
# define machine_is_linkstation_chlv2() (machine_arch_type == MACH_TYPE_LINKSTATION_CHLV2)
#else
# define machine_is_linkstation_chlv2() (0)
#endif
#ifdef CONFIG_MACH_TERA_PRO2_RACK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TERA_PRO2_RACK
# endif
# define machine_is_tera_pro2_rack() (machine_arch_type == MACH_TYPE_TERA_PRO2_RACK)
#else
# define machine_is_tera_pro2_rack() (0)
#endif
#ifdef CONFIG_MACH_RUBYS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RUBYS
# endif
# define machine_is_rubys() (machine_arch_type == MACH_TYPE_RUBYS)
#else
# define machine_is_rubys() (0)
#endif
#ifdef CONFIG_MACH_AQUARIUS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AQUARIUS
# endif
# define machine_is_aquarius() (machine_arch_type == MACH_TYPE_AQUARIUS)
#else
# define machine_is_aquarius() (0)
#endif
#ifdef CONFIG_MACH_MX53_ARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX53_ARD
# endif
# define machine_is_mx53_ard() (machine_arch_type == MACH_TYPE_MX53_ARD)
#else
# define machine_is_mx53_ard() (0)
#endif
#ifdef CONFIG_MACH_MX53_SMD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX53_SMD
# endif
# define machine_is_mx53_smd() (machine_arch_type == MACH_TYPE_MX53_SMD)
#else
# define machine_is_mx53_smd() (0)
#endif
#ifdef CONFIG_MACH_LSWXL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LSWXL
# endif
# define machine_is_lswxl() (machine_arch_type == MACH_TYPE_LSWXL)
#else
# define machine_is_lswxl() (0)
#endif
#ifdef CONFIG_MACH_DOVE_AVNG_V3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DOVE_AVNG_V3
# endif
# define machine_is_dove_avng_v3() (machine_arch_type == MACH_TYPE_DOVE_AVNG_V3)
#else
# define machine_is_dove_avng_v3() (0)
#endif
#ifdef CONFIG_MACH_SDI_ESS_9263
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SDI_ESS_9263
# endif
# define machine_is_sdi_ess_9263() (machine_arch_type == MACH_TYPE_SDI_ESS_9263)
#else
# define machine_is_sdi_ess_9263() (0)
#endif
#ifdef CONFIG_MACH_JOCPU550
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_JOCPU550
# endif
# define machine_is_jocpu550() (machine_arch_type == MACH_TYPE_JOCPU550)
#else
# define machine_is_jocpu550() (0)
#endif
#ifdef CONFIG_MACH_MSM8X60_RUMI3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X60_RUMI3
# endif
# define machine_is_msm8x60_rumi3() (machine_arch_type == MACH_TYPE_MSM8X60_RUMI3)
#else
# define machine_is_msm8x60_rumi3() (0)
#endif
#ifdef CONFIG_MACH_MSM8X60_FFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X60_FFA
# endif
# define machine_is_msm8x60_ffa() (machine_arch_type == MACH_TYPE_MSM8X60_FFA)
#else
# define machine_is_msm8x60_ffa() (0)
#endif
#ifdef CONFIG_MACH_YANOMAMI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_YANOMAMI
# endif
# define machine_is_yanomami() (machine_arch_type == MACH_TYPE_YANOMAMI)
#else
# define machine_is_yanomami() (0)
#endif
#ifdef CONFIG_MACH_GTA04
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GTA04
# endif
# define machine_is_gta04() (machine_arch_type == MACH_TYPE_GTA04)
#else
# define machine_is_gta04() (0)
#endif
#ifdef CONFIG_MACH_CM_A510
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CM_A510
# endif
# define machine_is_cm_a510() (machine_arch_type == MACH_TYPE_CM_A510)
#else
# define machine_is_cm_a510() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_RFS200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_RFS200
# endif
# define machine_is_omap3_rfs200() (machine_arch_type == MACH_TYPE_OMAP3_RFS200)
#else
# define machine_is_omap3_rfs200() (0)
#endif
#ifdef CONFIG_MACH_KX33XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KX33XX
# endif
# define machine_is_kx33xx() (machine_arch_type == MACH_TYPE_KX33XX)
#else
# define machine_is_kx33xx() (0)
#endif
#ifdef CONFIG_MACH_PTX7510
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PTX7510
# endif
# define machine_is_ptx7510() (machine_arch_type == MACH_TYPE_PTX7510)
#else
# define machine_is_ptx7510() (0)
#endif
#ifdef CONFIG_MACH_TOP9000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TOP9000
# endif
# define machine_is_top9000() (machine_arch_type == MACH_TYPE_TOP9000)
#else
# define machine_is_top9000() (0)
#endif
#ifdef CONFIG_MACH_TEENOTE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TEENOTE
# endif
# define machine_is_teenote() (machine_arch_type == MACH_TYPE_TEENOTE)
#else
# define machine_is_teenote() (0)
#endif
#ifdef CONFIG_MACH_TS3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS3
# endif
# define machine_is_ts3() (machine_arch_type == MACH_TYPE_TS3)
#else
# define machine_is_ts3() (0)
#endif
#ifdef CONFIG_MACH_A0
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_A0
# endif
# define machine_is_a0() (machine_arch_type == MACH_TYPE_A0)
#else
# define machine_is_a0() (0)
#endif
#ifdef CONFIG_MACH_FSM9XXX_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FSM9XXX_SURF
# endif
# define machine_is_fsm9xxx_surf() (machine_arch_type == MACH_TYPE_FSM9XXX_SURF)
#else
# define machine_is_fsm9xxx_surf() (0)
#endif
#ifdef CONFIG_MACH_FSM9XXX_FFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FSM9XXX_FFA
# endif
# define machine_is_fsm9xxx_ffa() (machine_arch_type == MACH_TYPE_FSM9XXX_FFA)
#else
# define machine_is_fsm9xxx_ffa() (0)
#endif
#ifdef CONFIG_MACH_FRRHWCDMA60W
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FRRHWCDMA60W
# endif
# define machine_is_frrhwcdma60w() (machine_arch_type == MACH_TYPE_FRRHWCDMA60W)
#else
# define machine_is_frrhwcdma60w() (0)
#endif
#ifdef CONFIG_MACH_REMUS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_REMUS
# endif
# define machine_is_remus() (machine_arch_type == MACH_TYPE_REMUS)
#else
# define machine_is_remus() (0)
#endif
#ifdef CONFIG_MACH_AT91CAP7XDK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91CAP7XDK
# endif
# define machine_is_at91cap7xdk() (machine_arch_type == MACH_TYPE_AT91CAP7XDK)
#else
# define machine_is_at91cap7xdk() (0)
#endif
#ifdef CONFIG_MACH_AT91CAP7STK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91CAP7STK
# endif
# define machine_is_at91cap7stk() (machine_arch_type == MACH_TYPE_AT91CAP7STK)
#else
# define machine_is_at91cap7stk() (0)
#endif
#ifdef CONFIG_MACH_KT_SBC_SAM9_1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KT_SBC_SAM9_1
# endif
# define machine_is_kt_sbc_sam9_1() (machine_arch_type == MACH_TYPE_KT_SBC_SAM9_1)
#else
# define machine_is_kt_sbc_sam9_1() (0)
#endif
#ifdef CONFIG_MACH_ARMADA_XP_DB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARMADA_XP_DB
# endif
# define machine_is_armada_xp_db() (machine_arch_type == MACH_TYPE_ARMADA_XP_DB)
#else
# define machine_is_armada_xp_db() (0)
#endif
#ifdef CONFIG_MACH_SPDM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPDM
# endif
# define machine_is_spdm() (machine_arch_type == MACH_TYPE_SPDM)
#else
# define machine_is_spdm() (0)
#endif
#ifdef CONFIG_MACH_GTIB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GTIB
# endif
# define machine_is_gtib() (machine_arch_type == MACH_TYPE_GTIB)
#else
# define machine_is_gtib() (0)
#endif
#ifdef CONFIG_MACH_DGM3240
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DGM3240
# endif
# define machine_is_dgm3240() (machine_arch_type == MACH_TYPE_DGM3240)
#else
# define machine_is_dgm3240() (0)
#endif
#ifdef CONFIG_MACH_HTCMEGA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HTCMEGA
# endif
# define machine_is_htcmega() (machine_arch_type == MACH_TYPE_HTCMEGA)
#else
# define machine_is_htcmega() (0)
#endif
#ifdef CONFIG_MACH_TRICORDER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TRICORDER
# endif
# define machine_is_tricorder() (machine_arch_type == MACH_TYPE_TRICORDER)
#else
# define machine_is_tricorder() (0)
#endif
#ifdef CONFIG_MACH_TX28
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TX28
# endif
# define machine_is_tx28() (machine_arch_type == MACH_TYPE_TX28)
#else
# define machine_is_tx28() (0)
#endif
#ifdef CONFIG_MACH_BSTBRD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BSTBRD
# endif
# define machine_is_bstbrd() (machine_arch_type == MACH_TYPE_BSTBRD)
#else
# define machine_is_bstbrd() (0)
#endif
#ifdef CONFIG_MACH_PWB3090
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PWB3090
# endif
# define machine_is_pwb3090() (machine_arch_type == MACH_TYPE_PWB3090)
#else
# define machine_is_pwb3090() (0)
#endif
#ifdef CONFIG_MACH_IDEA6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IDEA6410
# endif
# define machine_is_idea6410() (machine_arch_type == MACH_TYPE_IDEA6410)
#else
# define machine_is_idea6410() (0)
#endif
#ifdef CONFIG_MACH_QBC9263
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QBC9263
# endif
# define machine_is_qbc9263() (machine_arch_type == MACH_TYPE_QBC9263)
#else
# define machine_is_qbc9263() (0)
#endif
#ifdef CONFIG_MACH_BORABORA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BORABORA
# endif
# define machine_is_borabora() (machine_arch_type == MACH_TYPE_BORABORA)
#else
# define machine_is_borabora() (0)
#endif
#ifdef CONFIG_MACH_VALDEZ
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VALDEZ
# endif
# define machine_is_valdez() (machine_arch_type == MACH_TYPE_VALDEZ)
#else
# define machine_is_valdez() (0)
#endif
#ifdef CONFIG_MACH_LS9G20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LS9G20
# endif
# define machine_is_ls9g20() (machine_arch_type == MACH_TYPE_LS9G20)
#else
# define machine_is_ls9g20() (0)
#endif
#ifdef CONFIG_MACH_MIOS_V1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MIOS_V1
# endif
# define machine_is_mios_v1() (machine_arch_type == MACH_TYPE_MIOS_V1)
#else
# define machine_is_mios_v1() (0)
#endif
#ifdef CONFIG_MACH_S5PC110_CRESPO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_S5PC110_CRESPO
# endif
# define machine_is_s5pc110_crespo() (machine_arch_type == MACH_TYPE_S5PC110_CRESPO)
#else
# define machine_is_s5pc110_crespo() (0)
#endif
#ifdef CONFIG_MACH_CONTROLTEK9G20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CONTROLTEK9G20
# endif
# define machine_is_controltek9g20() (machine_arch_type == MACH_TYPE_CONTROLTEK9G20)
#else
# define machine_is_controltek9g20() (0)
#endif
#ifdef CONFIG_MACH_TIN307
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TIN307
# endif
# define machine_is_tin307() (machine_arch_type == MACH_TYPE_TIN307)
#else
# define machine_is_tin307() (0)
#endif
#ifdef CONFIG_MACH_TIN510
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TIN510
# endif
# define machine_is_tin510() (machine_arch_type == MACH_TYPE_TIN510)
#else
# define machine_is_tin510() (0)
#endif
#ifdef CONFIG_MACH_BLUECHEESE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BLUECHEESE
# endif
# define machine_is_bluecheese() (machine_arch_type == MACH_TYPE_BLUECHEESE)
#else
# define machine_is_bluecheese() (0)
#endif
#ifdef CONFIG_MACH_TEM3X30
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TEM3X30
# endif
# define machine_is_tem3x30() (machine_arch_type == MACH_TYPE_TEM3X30)
#else
# define machine_is_tem3x30() (0)
#endif
#ifdef CONFIG_MACH_HARVEST_DESOTO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HARVEST_DESOTO
# endif
# define machine_is_harvest_desoto() (machine_arch_type == MACH_TYPE_HARVEST_DESOTO)
#else
# define machine_is_harvest_desoto() (0)
#endif
#ifdef CONFIG_MACH_MSM8X60_QRDC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X60_QRDC
# endif
# define machine_is_msm8x60_qrdc() (machine_arch_type == MACH_TYPE_MSM8X60_QRDC)
#else
# define machine_is_msm8x60_qrdc() (0)
#endif
#ifdef CONFIG_MACH_SPEAR900
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPEAR900
# endif
# define machine_is_spear900() (machine_arch_type == MACH_TYPE_SPEAR900)
#else
# define machine_is_spear900() (0)
#endif
#ifdef CONFIG_MACH_PCONTROL_G20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCONTROL_G20
# endif
# define machine_is_pcontrol_g20() (machine_arch_type == MACH_TYPE_PCONTROL_G20)
#else
# define machine_is_pcontrol_g20() (0)
#endif
#ifdef CONFIG_MACH_RDSTOR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RDSTOR
# endif
# define machine_is_rdstor() (machine_arch_type == MACH_TYPE_RDSTOR)
#else
# define machine_is_rdstor() (0)
#endif
#ifdef CONFIG_MACH_USDLOADER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_USDLOADER
# endif
# define machine_is_usdloader() (machine_arch_type == MACH_TYPE_USDLOADER)
#else
# define machine_is_usdloader() (0)
#endif
#ifdef CONFIG_MACH_TSOPLOADER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TSOPLOADER
# endif
# define machine_is_tsoploader() (machine_arch_type == MACH_TYPE_TSOPLOADER)
#else
# define machine_is_tsoploader() (0)
#endif
#ifdef CONFIG_MACH_KRONOS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KRONOS
# endif
# define machine_is_kronos() (machine_arch_type == MACH_TYPE_KRONOS)
#else
# define machine_is_kronos() (0)
#endif
#ifdef CONFIG_MACH_FFCORE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FFCORE
# endif
# define machine_is_ffcore() (machine_arch_type == MACH_TYPE_FFCORE)
#else
# define machine_is_ffcore() (0)
#endif
#ifdef CONFIG_MACH_MONE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MONE
# endif
# define machine_is_mone() (machine_arch_type == MACH_TYPE_MONE)
#else
# define machine_is_mone() (0)
#endif
#ifdef CONFIG_MACH_UNIT2S
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_UNIT2S
# endif
# define machine_is_unit2s() (machine_arch_type == MACH_TYPE_UNIT2S)
#else
# define machine_is_unit2s() (0)
#endif
#ifdef CONFIG_MACH_ACER_A5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACER_A5
# endif
# define machine_is_acer_a5() (machine_arch_type == MACH_TYPE_ACER_A5)
#else
# define machine_is_acer_a5() (0)
#endif
#ifdef CONFIG_MACH_ETHERPRO_ISP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ETHERPRO_ISP
# endif
# define machine_is_etherpro_isp() (machine_arch_type == MACH_TYPE_ETHERPRO_ISP)
#else
# define machine_is_etherpro_isp() (0)
#endif
#ifdef CONFIG_MACH_STRETCHS7000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STRETCHS7000
# endif
# define machine_is_stretchs7000() (machine_arch_type == MACH_TYPE_STRETCHS7000)
#else
# define machine_is_stretchs7000() (0)
#endif
#ifdef CONFIG_MACH_P87_SMARTSIM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_P87_SMARTSIM
# endif
# define machine_is_p87_smartsim() (machine_arch_type == MACH_TYPE_P87_SMARTSIM)
#else
# define machine_is_p87_smartsim() (0)
#endif
#ifdef CONFIG_MACH_TULIP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TULIP
# endif
# define machine_is_tulip() (machine_arch_type == MACH_TYPE_TULIP)
#else
# define machine_is_tulip() (0)
#endif
#ifdef CONFIG_MACH_SUNFLOWER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SUNFLOWER
# endif
# define machine_is_sunflower() (machine_arch_type == MACH_TYPE_SUNFLOWER)
#else
# define machine_is_sunflower() (0)
#endif
#ifdef CONFIG_MACH_RIB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RIB
# endif
# define machine_is_rib() (machine_arch_type == MACH_TYPE_RIB)
#else
# define machine_is_rib() (0)
#endif
#ifdef CONFIG_MACH_CLOD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CLOD
# endif
# define machine_is_clod() (machine_arch_type == MACH_TYPE_CLOD)
#else
# define machine_is_clod() (0)
#endif
#ifdef CONFIG_MACH_RUMP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RUMP
# endif
# define machine_is_rump() (machine_arch_type == MACH_TYPE_RUMP)
#else
# define machine_is_rump() (0)
#endif
#ifdef CONFIG_MACH_TENDERLOIN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TENDERLOIN
# endif
# define machine_is_tenderloin() (machine_arch_type == MACH_TYPE_TENDERLOIN)
#else
# define machine_is_tenderloin() (0)
#endif
#ifdef CONFIG_MACH_SHORTLOIN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHORTLOIN
# endif
# define machine_is_shortloin() (machine_arch_type == MACH_TYPE_SHORTLOIN)
#else
# define machine_is_shortloin() (0)
#endif
#ifdef CONFIG_MACH_ANTARES
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ANTARES
# endif
# define machine_is_antares() (machine_arch_type == MACH_TYPE_ANTARES)
#else
# define machine_is_antares() (0)
#endif
#ifdef CONFIG_MACH_WB40N
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WB40N
# endif
# define machine_is_wb40n() (machine_arch_type == MACH_TYPE_WB40N)
#else
# define machine_is_wb40n() (0)
#endif
#ifdef CONFIG_MACH_HERRING
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HERRING
# endif
# define machine_is_herring() (machine_arch_type == MACH_TYPE_HERRING)
#else
# define machine_is_herring() (0)
#endif
#ifdef CONFIG_MACH_NAXY400
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NAXY400
# endif
# define machine_is_naxy400() (machine_arch_type == MACH_TYPE_NAXY400)
#else
# define machine_is_naxy400() (0)
#endif
#ifdef CONFIG_MACH_NAXY1200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NAXY1200
# endif
# define machine_is_naxy1200() (machine_arch_type == MACH_TYPE_NAXY1200)
#else
# define machine_is_naxy1200() (0)
#endif
#ifdef CONFIG_MACH_VPR200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VPR200
# endif
# define machine_is_vpr200() (machine_arch_type == MACH_TYPE_VPR200)
#else
# define machine_is_vpr200() (0)
#endif
#ifdef CONFIG_MACH_BUG20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BUG20
# endif
# define machine_is_bug20() (machine_arch_type == MACH_TYPE_BUG20)
#else
# define machine_is_bug20() (0)
#endif
#ifdef CONFIG_MACH_GOFLEXNET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GOFLEXNET
# endif
# define machine_is_goflexnet() (machine_arch_type == MACH_TYPE_GOFLEXNET)
#else
# define machine_is_goflexnet() (0)
#endif
#ifdef CONFIG_MACH_TORBRECK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TORBRECK
# endif
# define machine_is_torbreck() (machine_arch_type == MACH_TYPE_TORBRECK)
#else
# define machine_is_torbreck() (0)
#endif
#ifdef CONFIG_MACH_SAARB_MG1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SAARB_MG1
# endif
# define machine_is_saarb_mg1() (machine_arch_type == MACH_TYPE_SAARB_MG1)
#else
# define machine_is_saarb_mg1() (0)
#endif
#ifdef CONFIG_MACH_CALLISTO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CALLISTO
# endif
# define machine_is_callisto() (machine_arch_type == MACH_TYPE_CALLISTO)
#else
# define machine_is_callisto() (0)
#endif
#ifdef CONFIG_MACH_MULTHSU
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MULTHSU
# endif
# define machine_is_multhsu() (machine_arch_type == MACH_TYPE_MULTHSU)
#else
# define machine_is_multhsu() (0)
#endif
#ifdef CONFIG_MACH_SALUDA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SALUDA
# endif
# define machine_is_saluda() (machine_arch_type == MACH_TYPE_SALUDA)
#else
# define machine_is_saluda() (0)
#endif
#ifdef CONFIG_MACH_PEMP_OMAP3_APOLLO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PEMP_OMAP3_APOLLO
# endif
# define machine_is_pemp_omap3_apollo() (machine_arch_type == MACH_TYPE_PEMP_OMAP3_APOLLO)
#else
# define machine_is_pemp_omap3_apollo() (0)
#endif
#ifdef CONFIG_MACH_VC0718
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VC0718
# endif
# define machine_is_vc0718() (machine_arch_type == MACH_TYPE_VC0718)
#else
# define machine_is_vc0718() (0)
#endif
#ifdef CONFIG_MACH_MVBLX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MVBLX
# endif
# define machine_is_mvblx() (machine_arch_type == MACH_TYPE_MVBLX)
#else
# define machine_is_mvblx() (0)
#endif
#ifdef CONFIG_MACH_INHAND_APEIRON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_INHAND_APEIRON
# endif
# define machine_is_inhand_apeiron() (machine_arch_type == MACH_TYPE_INHAND_APEIRON)
#else
# define machine_is_inhand_apeiron() (0)
#endif
#ifdef CONFIG_MACH_INHAND_FURY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_INHAND_FURY
# endif
# define machine_is_inhand_fury() (machine_arch_type == MACH_TYPE_INHAND_FURY)
#else
# define machine_is_inhand_fury() (0)
#endif
#ifdef CONFIG_MACH_INHAND_SIREN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_INHAND_SIREN
# endif
# define machine_is_inhand_siren() (machine_arch_type == MACH_TYPE_INHAND_SIREN)
#else
# define machine_is_inhand_siren() (0)
#endif
#ifdef CONFIG_MACH_HDNVP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HDNVP
# endif
# define machine_is_hdnvp() (machine_arch_type == MACH_TYPE_HDNVP)
#else
# define machine_is_hdnvp() (0)
#endif
#ifdef CONFIG_MACH_SOFTWINNER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SOFTWINNER
# endif
# define machine_is_softwinner() (machine_arch_type == MACH_TYPE_SOFTWINNER)
#else
# define machine_is_softwinner() (0)
#endif
#ifdef CONFIG_MACH_PRIMA2_EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PRIMA2_EVB
# endif
# define machine_is_prima2_evb() (machine_arch_type == MACH_TYPE_PRIMA2_EVB)
#else
# define machine_is_prima2_evb() (0)
#endif
#ifdef CONFIG_MACH_NAS6210
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NAS6210
# endif
# define machine_is_nas6210() (machine_arch_type == MACH_TYPE_NAS6210)
#else
# define machine_is_nas6210() (0)
#endif
#ifdef CONFIG_MACH_UNISDEV
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_UNISDEV
# endif
# define machine_is_unisdev() (machine_arch_type == MACH_TYPE_UNISDEV)
#else
# define machine_is_unisdev() (0)
#endif
#ifdef CONFIG_MACH_SBCA11
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SBCA11
# endif
# define machine_is_sbca11() (machine_arch_type == MACH_TYPE_SBCA11)
#else
# define machine_is_sbca11() (0)
#endif
#ifdef CONFIG_MACH_SAGA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SAGA
# endif
# define machine_is_saga() (machine_arch_type == MACH_TYPE_SAGA)
#else
# define machine_is_saga() (0)
#endif
#ifdef CONFIG_MACH_NS_K330
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NS_K330
# endif
# define machine_is_ns_k330() (machine_arch_type == MACH_TYPE_NS_K330)
#else
# define machine_is_ns_k330() (0)
#endif
#ifdef CONFIG_MACH_TANNA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TANNA
# endif
# define machine_is_tanna() (machine_arch_type == MACH_TYPE_TANNA)
#else
# define machine_is_tanna() (0)
#endif
#ifdef CONFIG_MACH_IMATE8502
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IMATE8502
# endif
# define machine_is_imate8502() (machine_arch_type == MACH_TYPE_IMATE8502)
#else
# define machine_is_imate8502() (0)
#endif
#ifdef CONFIG_MACH_ASPEN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ASPEN
# endif
# define machine_is_aspen() (machine_arch_type == MACH_TYPE_ASPEN)
#else
# define machine_is_aspen() (0)
#endif
#ifdef CONFIG_MACH_DAINTREE_CWAC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAINTREE_CWAC
# endif
# define machine_is_daintree_cwac() (machine_arch_type == MACH_TYPE_DAINTREE_CWAC)
#else
# define machine_is_daintree_cwac() (0)
#endif
#ifdef CONFIG_MACH_ZMX25
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ZMX25
# endif
# define machine_is_zmx25() (machine_arch_type == MACH_TYPE_ZMX25)
#else
# define machine_is_zmx25() (0)
#endif
#ifdef CONFIG_MACH_MAPLE1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MAPLE1
# endif
# define machine_is_maple1() (machine_arch_type == MACH_TYPE_MAPLE1)
#else
# define machine_is_maple1() (0)
#endif
#ifdef CONFIG_MACH_QSD8X72_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QSD8X72_SURF
# endif
# define machine_is_qsd8x72_surf() (machine_arch_type == MACH_TYPE_QSD8X72_SURF)
#else
# define machine_is_qsd8x72_surf() (0)
#endif
#ifdef CONFIG_MACH_QSD8X72_FFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QSD8X72_FFA
# endif
# define machine_is_qsd8x72_ffa() (machine_arch_type == MACH_TYPE_QSD8X72_FFA)
#else
# define machine_is_qsd8x72_ffa() (0)
#endif
#ifdef CONFIG_MACH_ABILENE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ABILENE
# endif
# define machine_is_abilene() (machine_arch_type == MACH_TYPE_ABILENE)
#else
# define machine_is_abilene() (0)
#endif
#ifdef CONFIG_MACH_EIGEN_TTR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EIGEN_TTR
# endif
# define machine_is_eigen_ttr() (machine_arch_type == MACH_TYPE_EIGEN_TTR)
#else
# define machine_is_eigen_ttr() (0)
#endif
#ifdef CONFIG_MACH_IOMEGA_IX2_200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IOMEGA_IX2_200
# endif
# define machine_is_iomega_ix2_200() (machine_arch_type == MACH_TYPE_IOMEGA_IX2_200)
#else
# define machine_is_iomega_ix2_200() (0)
#endif
#ifdef CONFIG_MACH_CORETEC_VCX7400
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CORETEC_VCX7400
# endif
# define machine_is_coretec_vcx7400() (machine_arch_type == MACH_TYPE_CORETEC_VCX7400)
#else
# define machine_is_coretec_vcx7400() (0)
#endif
#ifdef CONFIG_MACH_SANTIAGO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SANTIAGO
# endif
# define machine_is_santiago() (machine_arch_type == MACH_TYPE_SANTIAGO)
#else
# define machine_is_santiago() (0)
#endif
#ifdef CONFIG_MACH_MX257SOL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX257SOL
# endif
# define machine_is_mx257sol() (machine_arch_type == MACH_TYPE_MX257SOL)
#else
# define machine_is_mx257sol() (0)
#endif
#ifdef CONFIG_MACH_STRASBOURG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STRASBOURG
# endif
# define machine_is_strasbourg() (machine_arch_type == MACH_TYPE_STRASBOURG)
#else
# define machine_is_strasbourg() (0)
#endif
#ifdef CONFIG_MACH_MSM8X60_FLUID
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X60_FLUID
# endif
# define machine_is_msm8x60_fluid() (machine_arch_type == MACH_TYPE_MSM8X60_FLUID)
#else
# define machine_is_msm8x60_fluid() (0)
#endif
#ifdef CONFIG_MACH_SMARTQV5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMARTQV5
# endif
# define machine_is_smartqv5() (machine_arch_type == MACH_TYPE_SMARTQV5)
#else
# define machine_is_smartqv5() (0)
#endif
#ifdef CONFIG_MACH_SMARTQV3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMARTQV3
# endif
# define machine_is_smartqv3() (machine_arch_type == MACH_TYPE_SMARTQV3)
#else
# define machine_is_smartqv3() (0)
#endif
#ifdef CONFIG_MACH_SMARTQV7
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SMARTQV7
# endif
# define machine_is_smartqv7() (machine_arch_type == MACH_TYPE_SMARTQV7)
#else
# define machine_is_smartqv7() (0)
#endif
#ifdef CONFIG_MACH_PAZ00
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PAZ00
# endif
# define machine_is_paz00() (machine_arch_type == MACH_TYPE_PAZ00)
#else
# define machine_is_paz00() (0)
#endif
#ifdef CONFIG_MACH_ACMENETUSFOXG20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACMENETUSFOXG20
# endif
# define machine_is_acmenetusfoxg20() (machine_arch_type == MACH_TYPE_ACMENETUSFOXG20)
#else
# define machine_is_acmenetusfoxg20() (0)
#endif
#ifdef CONFIG_MACH_FWBD_0404
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FWBD_0404
# endif
# define machine_is_fwbd_0404() (machine_arch_type == MACH_TYPE_FWBD_0404)
#else
# define machine_is_fwbd_0404() (0)
#endif
#ifdef CONFIG_MACH_HDGU
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HDGU
# endif
# define machine_is_hdgu() (machine_arch_type == MACH_TYPE_HDGU)
#else
# define machine_is_hdgu() (0)
#endif
#ifdef CONFIG_MACH_PYRAMID
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PYRAMID
# endif
# define machine_is_pyramid() (machine_arch_type == MACH_TYPE_PYRAMID)
#else
# define machine_is_pyramid() (0)
#endif
#ifdef CONFIG_MACH_EPIPHAN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EPIPHAN
# endif
# define machine_is_epiphan() (machine_arch_type == MACH_TYPE_EPIPHAN)
#else
# define machine_is_epiphan() (0)
#endif
#ifdef CONFIG_MACH_OMAP_BENDER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_BENDER
# endif
# define machine_is_omap_bender() (machine_arch_type == MACH_TYPE_OMAP_BENDER)
#else
# define machine_is_omap_bender() (0)
#endif
#ifdef CONFIG_MACH_GURNARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GURNARD
# endif
# define machine_is_gurnard() (machine_arch_type == MACH_TYPE_GURNARD)
#else
# define machine_is_gurnard() (0)
#endif
#ifdef CONFIG_MACH_GTL_IT5100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GTL_IT5100
# endif
# define machine_is_gtl_it5100() (machine_arch_type == MACH_TYPE_GTL_IT5100)
#else
# define machine_is_gtl_it5100() (0)
#endif
#ifdef CONFIG_MACH_BCM2708
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BCM2708
# endif
# define machine_is_bcm2708() (machine_arch_type == MACH_TYPE_BCM2708)
#else
# define machine_is_bcm2708() (0)
#endif
#ifdef CONFIG_MACH_MX51_GGC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_GGC
# endif
# define machine_is_mx51_ggc() (machine_arch_type == MACH_TYPE_MX51_GGC)
#else
# define machine_is_mx51_ggc() (0)
#endif
#ifdef CONFIG_MACH_SHARESPACE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHARESPACE
# endif
# define machine_is_sharespace() (machine_arch_type == MACH_TYPE_SHARESPACE)
#else
# define machine_is_sharespace() (0)
#endif
#ifdef CONFIG_MACH_HABA_KNX_EXPLORER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HABA_KNX_EXPLORER
# endif
# define machine_is_haba_knx_explorer() (machine_arch_type == MACH_TYPE_HABA_KNX_EXPLORER)
#else
# define machine_is_haba_knx_explorer() (0)
#endif
#ifdef CONFIG_MACH_SIMTEC_KIRKMOD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SIMTEC_KIRKMOD
# endif
# define machine_is_simtec_kirkmod() (machine_arch_type == MACH_TYPE_SIMTEC_KIRKMOD)
#else
# define machine_is_simtec_kirkmod() (0)
#endif
#ifdef CONFIG_MACH_CRUX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CRUX
# endif
# define machine_is_crux() (machine_arch_type == MACH_TYPE_CRUX)
#else
# define machine_is_crux() (0)
#endif
#ifdef CONFIG_MACH_MX51_BRAVO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_BRAVO
# endif
# define machine_is_mx51_bravo() (machine_arch_type == MACH_TYPE_MX51_BRAVO)
#else
# define machine_is_mx51_bravo() (0)
#endif
#ifdef CONFIG_MACH_CHARON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CHARON
# endif
# define machine_is_charon() (machine_arch_type == MACH_TYPE_CHARON)
#else
# define machine_is_charon() (0)
#endif
#ifdef CONFIG_MACH_PICOCOM3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PICOCOM3
# endif
# define machine_is_picocom3() (machine_arch_type == MACH_TYPE_PICOCOM3)
#else
# define machine_is_picocom3() (0)
#endif
#ifdef CONFIG_MACH_PICOCOM4
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PICOCOM4
# endif
# define machine_is_picocom4() (machine_arch_type == MACH_TYPE_PICOCOM4)
#else
# define machine_is_picocom4() (0)
#endif
#ifdef CONFIG_MACH_SERRANO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SERRANO
# endif
# define machine_is_serrano() (machine_arch_type == MACH_TYPE_SERRANO)
#else
# define machine_is_serrano() (0)
#endif
#ifdef CONFIG_MACH_DOUBLESHOT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DOUBLESHOT
# endif
# define machine_is_doubleshot() (machine_arch_type == MACH_TYPE_DOUBLESHOT)
#else
# define machine_is_doubleshot() (0)
#endif
#ifdef CONFIG_MACH_EVSY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EVSY
# endif
# define machine_is_evsy() (machine_arch_type == MACH_TYPE_EVSY)
#else
# define machine_is_evsy() (0)
#endif
#ifdef CONFIG_MACH_HUASHAN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HUASHAN
# endif
# define machine_is_huashan() (machine_arch_type == MACH_TYPE_HUASHAN)
#else
# define machine_is_huashan() (0)
#endif
#ifdef CONFIG_MACH_LAUSANNE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LAUSANNE
# endif
# define machine_is_lausanne() (machine_arch_type == MACH_TYPE_LAUSANNE)
#else
# define machine_is_lausanne() (0)
#endif
#ifdef CONFIG_MACH_EMERALD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EMERALD
# endif
# define machine_is_emerald() (machine_arch_type == MACH_TYPE_EMERALD)
#else
# define machine_is_emerald() (0)
#endif
#ifdef CONFIG_MACH_TQMA35
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TQMA35
# endif
# define machine_is_tqma35() (machine_arch_type == MACH_TYPE_TQMA35)
#else
# define machine_is_tqma35() (0)
#endif
#ifdef CONFIG_MACH_MARVEL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MARVEL
# endif
# define machine_is_marvel() (machine_arch_type == MACH_TYPE_MARVEL)
#else
# define machine_is_marvel() (0)
#endif
#ifdef CONFIG_MACH_MANUAE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MANUAE
# endif
# define machine_is_manuae() (machine_arch_type == MACH_TYPE_MANUAE)
#else
# define machine_is_manuae() (0)
#endif
#ifdef CONFIG_MACH_CHACHA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CHACHA
# endif
# define machine_is_chacha() (machine_arch_type == MACH_TYPE_CHACHA)
#else
# define machine_is_chacha() (0)
#endif
#ifdef CONFIG_MACH_LEMON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LEMON
# endif
# define machine_is_lemon() (machine_arch_type == MACH_TYPE_LEMON)
#else
# define machine_is_lemon() (0)
#endif
#ifdef CONFIG_MACH_CSC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CSC
# endif
# define machine_is_csc() (machine_arch_type == MACH_TYPE_CSC)
#else
# define machine_is_csc() (0)
#endif
#ifdef CONFIG_MACH_GIRA_KNXIP_ROUTER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GIRA_KNXIP_ROUTER
# endif
# define machine_is_gira_knxip_router() (machine_arch_type == MACH_TYPE_GIRA_KNXIP_ROUTER)
#else
# define machine_is_gira_knxip_router() (0)
#endif
#ifdef CONFIG_MACH_T20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_T20
# endif
# define machine_is_t20() (machine_arch_type == MACH_TYPE_T20)
#else
# define machine_is_t20() (0)
#endif
#ifdef CONFIG_MACH_HDMINI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HDMINI
# endif
# define machine_is_hdmini() (machine_arch_type == MACH_TYPE_HDMINI)
#else
# define machine_is_hdmini() (0)
#endif
#ifdef CONFIG_MACH_SCIPHONE_G2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SCIPHONE_G2
# endif
# define machine_is_sciphone_g2() (machine_arch_type == MACH_TYPE_SCIPHONE_G2)
#else
# define machine_is_sciphone_g2() (0)
#endif
#ifdef CONFIG_MACH_EXPRESS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EXPRESS
# endif
# define machine_is_express() (machine_arch_type == MACH_TYPE_EXPRESS)
#else
# define machine_is_express() (0)
#endif
#ifdef CONFIG_MACH_EXPRESS_KT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EXPRESS_KT
# endif
# define machine_is_express_kt() (machine_arch_type == MACH_TYPE_EXPRESS_KT)
#else
# define machine_is_express_kt() (0)
#endif
#ifdef CONFIG_MACH_MAXIMASP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MAXIMASP
# endif
# define machine_is_maximasp() (machine_arch_type == MACH_TYPE_MAXIMASP)
#else
# define machine_is_maximasp() (0)
#endif
#ifdef CONFIG_MACH_NITROGEN_IMX51
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NITROGEN_IMX51
# endif
# define machine_is_nitrogen_imx51() (machine_arch_type == MACH_TYPE_NITROGEN_IMX51)
#else
# define machine_is_nitrogen_imx51() (0)
#endif
#ifdef CONFIG_MACH_NITROGEN_IMX53
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NITROGEN_IMX53
# endif
# define machine_is_nitrogen_imx53() (machine_arch_type == MACH_TYPE_NITROGEN_IMX53)
#else
# define machine_is_nitrogen_imx53() (0)
#endif
#ifdef CONFIG_MACH_SUNFIRE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SUNFIRE
# endif
# define machine_is_sunfire() (machine_arch_type == MACH_TYPE_SUNFIRE)
#else
# define machine_is_sunfire() (0)
#endif
#ifdef CONFIG_MACH_AROWANA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AROWANA
# endif
# define machine_is_arowana() (machine_arch_type == MACH_TYPE_AROWANA)
#else
# define machine_is_arowana() (0)
#endif
#ifdef CONFIG_MACH_TEGRA_DAYTONA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TEGRA_DAYTONA
# endif
# define machine_is_tegra_daytona() (machine_arch_type == MACH_TYPE_TEGRA_DAYTONA)
#else
# define machine_is_tegra_daytona() (0)
#endif
#ifdef CONFIG_MACH_TEGRA_SWORDFISH
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TEGRA_SWORDFISH
# endif
# define machine_is_tegra_swordfish() (machine_arch_type == MACH_TYPE_TEGRA_SWORDFISH)
#else
# define machine_is_tegra_swordfish() (0)
#endif
#ifdef CONFIG_MACH_EDISON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EDISON
# endif
# define machine_is_edison() (machine_arch_type == MACH_TYPE_EDISON)
#else
# define machine_is_edison() (0)
#endif
#ifdef CONFIG_MACH_SVP8500V1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SVP8500V1
# endif
# define machine_is_svp8500v1() (machine_arch_type == MACH_TYPE_SVP8500V1)
#else
# define machine_is_svp8500v1() (0)
#endif
#ifdef CONFIG_MACH_SVP8500V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SVP8500V2
# endif
# define machine_is_svp8500v2() (machine_arch_type == MACH_TYPE_SVP8500V2)
#else
# define machine_is_svp8500v2() (0)
#endif
#ifdef CONFIG_MACH_SVP5500
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SVP5500
# endif
# define machine_is_svp5500() (machine_arch_type == MACH_TYPE_SVP5500)
#else
# define machine_is_svp5500() (0)
#endif
#ifdef CONFIG_MACH_B5500
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_B5500
# endif
# define machine_is_b5500() (machine_arch_type == MACH_TYPE_B5500)
#else
# define machine_is_b5500() (0)
#endif
#ifdef CONFIG_MACH_S5500
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_S5500
# endif
# define machine_is_s5500() (machine_arch_type == MACH_TYPE_S5500)
#else
# define machine_is_s5500() (0)
#endif
#ifdef CONFIG_MACH_ICON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ICON
# endif
# define machine_is_icon() (machine_arch_type == MACH_TYPE_ICON)
#else
# define machine_is_icon() (0)
#endif
#ifdef CONFIG_MACH_ELEPHANT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ELEPHANT
# endif
# define machine_is_elephant() (machine_arch_type == MACH_TYPE_ELEPHANT)
#else
# define machine_is_elephant() (0)
#endif
#ifdef CONFIG_MACH_SHOOTER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHOOTER
# endif
# define machine_is_shooter() (machine_arch_type == MACH_TYPE_SHOOTER)
#else
# define machine_is_shooter() (0)
#endif
#ifdef CONFIG_MACH_SPADE_LTE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPADE_LTE
# endif
# define machine_is_spade_lte() (machine_arch_type == MACH_TYPE_SPADE_LTE)
#else
# define machine_is_spade_lte() (0)
#endif
#ifdef CONFIG_MACH_PHILHWANI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PHILHWANI
# endif
# define machine_is_philhwani() (machine_arch_type == MACH_TYPE_PHILHWANI)
#else
# define machine_is_philhwani() (0)
#endif
#ifdef CONFIG_MACH_GSNCOMM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GSNCOMM
# endif
# define machine_is_gsncomm() (machine_arch_type == MACH_TYPE_GSNCOMM)
#else
# define machine_is_gsncomm() (0)
#endif
#ifdef CONFIG_MACH_STRASBOURG_A2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STRASBOURG_A2
# endif
# define machine_is_strasbourg_a2() (machine_arch_type == MACH_TYPE_STRASBOURG_A2)
#else
# define machine_is_strasbourg_a2() (0)
#endif
#ifdef CONFIG_MACH_MMM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MMM
# endif
# define machine_is_mmm() (machine_arch_type == MACH_TYPE_MMM)
#else
# define machine_is_mmm() (0)
#endif
#ifdef CONFIG_MACH_DAVINCI_DM365_BV
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAVINCI_DM365_BV
# endif
# define machine_is_davinci_dm365_bv() (machine_arch_type == MACH_TYPE_DAVINCI_DM365_BV)
#else
# define machine_is_davinci_dm365_bv() (0)
#endif
#ifdef CONFIG_MACH_AG5EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AG5EVM
# endif
# define machine_is_ag5evm() (machine_arch_type == MACH_TYPE_AG5EVM)
#else
# define machine_is_ag5evm() (0)
#endif
#ifdef CONFIG_MACH_SC575PLC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SC575PLC
# endif
# define machine_is_sc575plc() (machine_arch_type == MACH_TYPE_SC575PLC)
#else
# define machine_is_sc575plc() (0)
#endif
#ifdef CONFIG_MACH_SC575IPC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SC575IPC
# endif
# define machine_is_sc575hmi() (machine_arch_type == MACH_TYPE_SC575IPC)
#else
# define machine_is_sc575hmi() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_TDM3730
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_TDM3730
# endif
# define machine_is_omap3_tdm3730() (machine_arch_type == MACH_TYPE_OMAP3_TDM3730)
#else
# define machine_is_omap3_tdm3730() (0)
#endif
#ifdef CONFIG_MACH_TOP9000_EVAL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TOP9000_EVAL
# endif
# define machine_is_top9000_eval() (machine_arch_type == MACH_TYPE_TOP9000_EVAL)
#else
# define machine_is_top9000_eval() (0)
#endif
#ifdef CONFIG_MACH_TOP9000_SU
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TOP9000_SU
# endif
# define machine_is_top9000_su() (machine_arch_type == MACH_TYPE_TOP9000_SU)
#else
# define machine_is_top9000_su() (0)
#endif
#ifdef CONFIG_MACH_UTM300
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_UTM300
# endif
# define machine_is_utm300() (machine_arch_type == MACH_TYPE_UTM300)
#else
# define machine_is_utm300() (0)
#endif
#ifdef CONFIG_MACH_TSUNAGI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TSUNAGI
# endif
# define machine_is_tsunagi() (machine_arch_type == MACH_TYPE_TSUNAGI)
#else
# define machine_is_tsunagi() (0)
#endif
#ifdef CONFIG_MACH_TS75XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS75XX
# endif
# define machine_is_ts75xx() (machine_arch_type == MACH_TYPE_TS75XX)
#else
# define machine_is_ts75xx() (0)
#endif
#ifdef CONFIG_MACH_TS47XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS47XX
# endif
# define machine_is_ts47xx() (machine_arch_type == MACH_TYPE_TS47XX)
#else
# define machine_is_ts47xx() (0)
#endif
#ifdef CONFIG_MACH_DA850_K5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DA850_K5
# endif
# define machine_is_da850_k5() (machine_arch_type == MACH_TYPE_DA850_K5)
#else
# define machine_is_da850_k5() (0)
#endif
#ifdef CONFIG_MACH_AX502
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AX502
# endif
# define machine_is_ax502() (machine_arch_type == MACH_TYPE_AX502)
#else
# define machine_is_ax502() (0)
#endif
#ifdef CONFIG_MACH_IGEP0032
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IGEP0032
# endif
# define machine_is_igep0032() (machine_arch_type == MACH_TYPE_IGEP0032)
#else
# define machine_is_igep0032() (0)
#endif
#ifdef CONFIG_MACH_ANTERO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ANTERO
# endif
# define machine_is_antero() (machine_arch_type == MACH_TYPE_ANTERO)
#else
# define machine_is_antero() (0)
#endif
#ifdef CONFIG_MACH_SYNERGY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SYNERGY
# endif
# define machine_is_synergy() (machine_arch_type == MACH_TYPE_SYNERGY)
#else
# define machine_is_synergy() (0)
#endif
#ifdef CONFIG_MACH_ICS_IF_VOIP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ICS_IF_VOIP
# endif
# define machine_is_ics_if_voip() (machine_arch_type == MACH_TYPE_ICS_IF_VOIP)
#else
# define machine_is_ics_if_voip() (0)
#endif
#ifdef CONFIG_MACH_WLF_CRAGG_6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WLF_CRAGG_6410
# endif
# define machine_is_wlf_cragg_6410() (machine_arch_type == MACH_TYPE_WLF_CRAGG_6410)
#else
# define machine_is_wlf_cragg_6410() (0)
#endif
#ifdef CONFIG_MACH_PUNICA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PUNICA
# endif
# define machine_is_punica() (machine_arch_type == MACH_TYPE_PUNICA)
#else
# define machine_is_punica() (0)
#endif
#ifdef CONFIG_MACH_TRIMSLICE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TRIMSLICE
# endif
# define machine_is_trimslice() (machine_arch_type == MACH_TYPE_TRIMSLICE)
#else
# define machine_is_trimslice() (0)
#endif
#ifdef CONFIG_MACH_MX27_WMULTRA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX27_WMULTRA
# endif
# define machine_is_mx27_wmultra() (machine_arch_type == MACH_TYPE_MX27_WMULTRA)
#else
# define machine_is_mx27_wmultra() (0)
#endif
#ifdef CONFIG_MACH_MACKEREL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MACKEREL
# endif
# define machine_is_mackerel() (machine_arch_type == MACH_TYPE_MACKEREL)
#else
# define machine_is_mackerel() (0)
#endif
#ifdef CONFIG_MACH_FA9X27
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FA9X27
# endif
# define machine_is_fa9x27() (machine_arch_type == MACH_TYPE_FA9X27)
#else
# define machine_is_fa9x27() (0)
#endif
#ifdef CONFIG_MACH_NS2816TB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NS2816TB
# endif
# define machine_is_ns2816tb() (machine_arch_type == MACH_TYPE_NS2816TB)
#else
# define machine_is_ns2816tb() (0)
#endif
#ifdef CONFIG_MACH_NS2816_NTPAD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NS2816_NTPAD
# endif
# define machine_is_ns2816_ntpad() (machine_arch_type == MACH_TYPE_NS2816_NTPAD)
#else
# define machine_is_ns2816_ntpad() (0)
#endif
#ifdef CONFIG_MACH_NS2816_NTNB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NS2816_NTNB
# endif
# define machine_is_ns2816_ntnb() (machine_arch_type == MACH_TYPE_NS2816_NTNB)
#else
# define machine_is_ns2816_ntnb() (0)
#endif
#ifdef CONFIG_MACH_KAEN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KAEN
# endif
# define machine_is_kaen() (machine_arch_type == MACH_TYPE_KAEN)
#else
# define machine_is_kaen() (0)
#endif
#ifdef CONFIG_MACH_NV1000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NV1000
# endif
# define machine_is_nv1000() (machine_arch_type == MACH_TYPE_NV1000)
#else
# define machine_is_nv1000() (0)
#endif
#ifdef CONFIG_MACH_NUC950TS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NUC950TS
# endif
# define machine_is_nuc950ts() (machine_arch_type == MACH_TYPE_NUC950TS)
#else
# define machine_is_nuc950ts() (0)
#endif
#ifdef CONFIG_MACH_NOKIA_RM680
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NOKIA_RM680
# endif
# define machine_is_nokia_rm680() (machine_arch_type == MACH_TYPE_NOKIA_RM680)
#else
# define machine_is_nokia_rm680() (0)
#endif
#ifdef CONFIG_MACH_AST2200
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AST2200
# endif
# define machine_is_ast2200() (machine_arch_type == MACH_TYPE_AST2200)
#else
# define machine_is_ast2200() (0)
#endif
#ifdef CONFIG_MACH_LEAD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LEAD
# endif
# define machine_is_lead() (machine_arch_type == MACH_TYPE_LEAD)
#else
# define machine_is_lead() (0)
#endif
#ifdef CONFIG_MACH_UNINO1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_UNINO1
# endif
# define machine_is_unino1() (machine_arch_type == MACH_TYPE_UNINO1)
#else
# define machine_is_unino1() (0)
#endif
#ifdef CONFIG_MACH_GREECO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GREECO
# endif
# define machine_is_greeco() (machine_arch_type == MACH_TYPE_GREECO)
#else
# define machine_is_greeco() (0)
#endif
#ifdef CONFIG_MACH_VERDI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VERDI
# endif
# define machine_is_verdi() (machine_arch_type == MACH_TYPE_VERDI)
#else
# define machine_is_verdi() (0)
#endif
#ifdef CONFIG_MACH_DM6446_ADBOX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DM6446_ADBOX
# endif
# define machine_is_dm6446_adbox() (machine_arch_type == MACH_TYPE_DM6446_ADBOX)
#else
# define machine_is_dm6446_adbox() (0)
#endif
#ifdef CONFIG_MACH_QUAD_SALSA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_QUAD_SALSA
# endif
# define machine_is_quad_salsa() (machine_arch_type == MACH_TYPE_QUAD_SALSA)
#else
# define machine_is_quad_salsa() (0)
#endif
#ifdef CONFIG_MACH_ABB_GMA_1_1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ABB_GMA_1_1
# endif
# define machine_is_abb_gma_1_1() (machine_arch_type == MACH_TYPE_ABB_GMA_1_1)
#else
# define machine_is_abb_gma_1_1() (0)
#endif
#ifdef CONFIG_MACH_SVCID
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SVCID
# endif
# define machine_is_svcid() (machine_arch_type == MACH_TYPE_SVCID)
#else
# define machine_is_svcid() (0)
#endif
#ifdef CONFIG_MACH_MSM8960_SIM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8960_SIM
# endif
# define machine_is_msm8960_sim() (machine_arch_type == MACH_TYPE_MSM8960_SIM)
#else
# define machine_is_msm8960_sim() (0)
#endif
#ifdef CONFIG_MACH_MSM8960_RUMI3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8960_RUMI3
# endif
# define machine_is_msm8960_rumi3() (machine_arch_type == MACH_TYPE_MSM8960_RUMI3)
#else
# define machine_is_msm8960_rumi3() (0)
#endif
#ifdef CONFIG_MACH_ICON_G
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ICON_G
# endif
# define machine_is_icon_g() (machine_arch_type == MACH_TYPE_ICON_G)
#else
# define machine_is_icon_g() (0)
#endif
#ifdef CONFIG_MACH_MB3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MB3
# endif
# define machine_is_mb3() (machine_arch_type == MACH_TYPE_MB3)
#else
# define machine_is_mb3() (0)
#endif
#ifdef CONFIG_MACH_GSIA18S
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GSIA18S
# endif
# define machine_is_gsia18s() (machine_arch_type == MACH_TYPE_GSIA18S)
#else
# define machine_is_gsia18s() (0)
#endif
#ifdef CONFIG_MACH_PIVICC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PIVICC
# endif
# define machine_is_pivicc() (machine_arch_type == MACH_TYPE_PIVICC)
#else
# define machine_is_pivicc() (0)
#endif
#ifdef CONFIG_MACH_PCM048
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCM048
# endif
# define machine_is_pcm048() (machine_arch_type == MACH_TYPE_PCM048)
#else
# define machine_is_pcm048() (0)
#endif
#ifdef CONFIG_MACH_DDS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DDS
# endif
# define machine_is_dds() (machine_arch_type == MACH_TYPE_DDS)
#else
# define machine_is_dds() (0)
#endif
#ifdef CONFIG_MACH_CHALTEN_XA1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CHALTEN_XA1
# endif
# define machine_is_chalten_xa1() (machine_arch_type == MACH_TYPE_CHALTEN_XA1)
#else
# define machine_is_chalten_xa1() (0)
#endif
#ifdef CONFIG_MACH_TS48XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS48XX
# endif
# define machine_is_ts48xx() (machine_arch_type == MACH_TYPE_TS48XX)
#else
# define machine_is_ts48xx() (0)
#endif
#ifdef CONFIG_MACH_TONGA2_TFTTIMER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TONGA2_TFTTIMER
# endif
# define machine_is_tonga2_tfttimer() (machine_arch_type == MACH_TYPE_TONGA2_TFTTIMER)
#else
# define machine_is_tonga2_tfttimer() (0)
#endif
#ifdef CONFIG_MACH_WHISTLER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WHISTLER
# endif
# define machine_is_whistler() (machine_arch_type == MACH_TYPE_WHISTLER)
#else
# define machine_is_whistler() (0)
#endif
#ifdef CONFIG_MACH_ASL_PHOENIX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ASL_PHOENIX
# endif
# define machine_is_asl_phoenix() (machine_arch_type == MACH_TYPE_ASL_PHOENIX)
#else
# define machine_is_asl_phoenix() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9263OTLITE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9263OTLITE
# endif
# define machine_is_at91sam9263otlite() (machine_arch_type == MACH_TYPE_AT91SAM9263OTLITE)
#else
# define machine_is_at91sam9263otlite() (0)
#endif
#ifdef CONFIG_MACH_DDPLUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DDPLUG
# endif
# define machine_is_ddplug() (machine_arch_type == MACH_TYPE_DDPLUG)
#else
# define machine_is_ddplug() (0)
#endif
#ifdef CONFIG_MACH_D2PLUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_D2PLUG
# endif
# define machine_is_d2plug() (machine_arch_type == MACH_TYPE_D2PLUG)
#else
# define machine_is_d2plug() (0)
#endif
#ifdef CONFIG_MACH_KZM9D
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KZM9D
# endif
# define machine_is_kzm9d() (machine_arch_type == MACH_TYPE_KZM9D)
#else
# define machine_is_kzm9d() (0)
#endif
#ifdef CONFIG_MACH_VERDI_LTE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VERDI_LTE
# endif
# define machine_is_verdi_lte() (machine_arch_type == MACH_TYPE_VERDI_LTE)
#else
# define machine_is_verdi_lte() (0)
#endif
#ifdef CONFIG_MACH_NANOZOOM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NANOZOOM
# endif
# define machine_is_nanozoom() (machine_arch_type == MACH_TYPE_NANOZOOM)
#else
# define machine_is_nanozoom() (0)
#endif
#ifdef CONFIG_MACH_DM3730_SOM_LV
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DM3730_SOM_LV
# endif
# define machine_is_dm3730_som_lv() (machine_arch_type == MACH_TYPE_DM3730_SOM_LV)
#else
# define machine_is_dm3730_som_lv() (0)
#endif
#ifdef CONFIG_MACH_DM3730_TORPEDO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DM3730_TORPEDO
# endif
# define machine_is_dm3730_torpedo() (machine_arch_type == MACH_TYPE_DM3730_TORPEDO)
#else
# define machine_is_dm3730_torpedo() (0)
#endif
#ifdef CONFIG_MACH_ANCHOVY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ANCHOVY
# endif
# define machine_is_anchovy() (machine_arch_type == MACH_TYPE_ANCHOVY)
#else
# define machine_is_anchovy() (0)
#endif
#ifdef CONFIG_MACH_RE2REV20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RE2REV20
# endif
# define machine_is_re2rev20() (machine_arch_type == MACH_TYPE_RE2REV20)
#else
# define machine_is_re2rev20() (0)
#endif
#ifdef CONFIG_MACH_RE2REV21
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RE2REV21
# endif
# define machine_is_re2rev21() (machine_arch_type == MACH_TYPE_RE2REV21)
#else
# define machine_is_re2rev21() (0)
#endif
#ifdef CONFIG_MACH_CNS21XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CNS21XX
# endif
# define machine_is_cns21xx() (machine_arch_type == MACH_TYPE_CNS21XX)
#else
# define machine_is_cns21xx() (0)
#endif
#ifdef CONFIG_MACH_RIDER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RIDER
# endif
# define machine_is_rider() (machine_arch_type == MACH_TYPE_RIDER)
#else
# define machine_is_rider() (0)
#endif
#ifdef CONFIG_MACH_NSK330
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NSK330
# endif
# define machine_is_nsk330() (machine_arch_type == MACH_TYPE_NSK330)
#else
# define machine_is_nsk330() (0)
#endif
#ifdef CONFIG_MACH_CNS2133EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CNS2133EVB
# endif
# define machine_is_cns2133evb() (machine_arch_type == MACH_TYPE_CNS2133EVB)
#else
# define machine_is_cns2133evb() (0)
#endif
#ifdef CONFIG_MACH_Z3_816X_MOD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_Z3_816X_MOD
# endif
# define machine_is_z3_816x_mod() (machine_arch_type == MACH_TYPE_Z3_816X_MOD)
#else
# define machine_is_z3_816x_mod() (0)
#endif
#ifdef CONFIG_MACH_Z3_814X_MOD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_Z3_814X_MOD
# endif
# define machine_is_z3_814x_mod() (machine_arch_type == MACH_TYPE_Z3_814X_MOD)
#else
# define machine_is_z3_814x_mod() (0)
#endif
#ifdef CONFIG_MACH_BEECT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BEECT
# endif
# define machine_is_beect() (machine_arch_type == MACH_TYPE_BEECT)
#else
# define machine_is_beect() (0)
#endif
#ifdef CONFIG_MACH_DMA_THUNDERBUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DMA_THUNDERBUG
# endif
# define machine_is_dma_thunderbug() (machine_arch_type == MACH_TYPE_DMA_THUNDERBUG)
#else
# define machine_is_dma_thunderbug() (0)
#endif
#ifdef CONFIG_MACH_OMN_AT91SAM9G20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMN_AT91SAM9G20
# endif
# define machine_is_omn_at91sam9g20() (machine_arch_type == MACH_TYPE_OMN_AT91SAM9G20)
#else
# define machine_is_omn_at91sam9g20() (0)
#endif
#ifdef CONFIG_MACH_MX25_E2S_UC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX25_E2S_UC
# endif
# define machine_is_mx25_e2s_uc() (machine_arch_type == MACH_TYPE_MX25_E2S_UC)
#else
# define machine_is_mx25_e2s_uc() (0)
#endif
#ifdef CONFIG_MACH_MIONE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MIONE
# endif
# define machine_is_mione() (machine_arch_type == MACH_TYPE_MIONE)
#else
# define machine_is_mione() (0)
#endif
#ifdef CONFIG_MACH_TOP9000_TCU
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TOP9000_TCU
# endif
# define machine_is_top9000_tcu() (machine_arch_type == MACH_TYPE_TOP9000_TCU)
#else
# define machine_is_top9000_tcu() (0)
#endif
#ifdef CONFIG_MACH_TOP9000_BSL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TOP9000_BSL
# endif
# define machine_is_top9000_bsl() (machine_arch_type == MACH_TYPE_TOP9000_BSL)
#else
# define machine_is_top9000_bsl() (0)
#endif
#ifdef CONFIG_MACH_KINGDOM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KINGDOM
# endif
# define machine_is_kingdom() (machine_arch_type == MACH_TYPE_KINGDOM)
#else
# define machine_is_kingdom() (0)
#endif
#ifdef CONFIG_MACH_ARMADILLO460
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARMADILLO460
# endif
# define machine_is_armadillo460() (machine_arch_type == MACH_TYPE_ARMADILLO460)
#else
# define machine_is_armadillo460() (0)
#endif
#ifdef CONFIG_MACH_LQ2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LQ2
# endif
# define machine_is_lq2() (machine_arch_type == MACH_TYPE_LQ2)
#else
# define machine_is_lq2() (0)
#endif
#ifdef CONFIG_MACH_SWEDA_TMS2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SWEDA_TMS2
# endif
# define machine_is_sweda_tms2() (machine_arch_type == MACH_TYPE_SWEDA_TMS2)
#else
# define machine_is_sweda_tms2() (0)
#endif
#ifdef CONFIG_MACH_MX53_LOCO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX53_LOCO
# endif
# define machine_is_mx53_loco() (machine_arch_type == MACH_TYPE_MX53_LOCO)
#else
# define machine_is_mx53_loco() (0)
#endif
#ifdef CONFIG_MACH_ACER_A8
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACER_A8
# endif
# define machine_is_acer_a8() (machine_arch_type == MACH_TYPE_ACER_A8)
#else
# define machine_is_acer_a8() (0)
#endif
#ifdef CONFIG_MACH_ACER_GAUGUIN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACER_GAUGUIN
# endif
# define machine_is_acer_gauguin() (machine_arch_type == MACH_TYPE_ACER_GAUGUIN)
#else
# define machine_is_acer_gauguin() (0)
#endif
#ifdef CONFIG_MACH_GUPPY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GUPPY
# endif
# define machine_is_guppy() (machine_arch_type == MACH_TYPE_GUPPY)
#else
# define machine_is_guppy() (0)
#endif
#ifdef CONFIG_MACH_MX61_ARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX61_ARD
# endif
# define machine_is_mx61_ard() (machine_arch_type == MACH_TYPE_MX61_ARD)
#else
# define machine_is_mx61_ard() (0)
#endif
#ifdef CONFIG_MACH_TX53
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TX53
# endif
# define machine_is_tx53() (machine_arch_type == MACH_TYPE_TX53)
#else
# define machine_is_tx53() (0)
#endif
#ifdef CONFIG_MACH_OMAPL138_CASE_A3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAPL138_CASE_A3
# endif
# define machine_is_omapl138_case_a3() (machine_arch_type == MACH_TYPE_OMAPL138_CASE_A3)
#else
# define machine_is_omapl138_case_a3() (0)
#endif
#ifdef CONFIG_MACH_UEMD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_UEMD
# endif
# define machine_is_uemd() (machine_arch_type == MACH_TYPE_UEMD)
#else
# define machine_is_uemd() (0)
#endif
#ifdef CONFIG_MACH_CCWMX51MUT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CCWMX51MUT
# endif
# define machine_is_ccwmx51mut() (machine_arch_type == MACH_TYPE_CCWMX51MUT)
#else
# define machine_is_ccwmx51mut() (0)
#endif
#ifdef CONFIG_MACH_ROCKHOPPER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ROCKHOPPER
# endif
# define machine_is_rockhopper() (machine_arch_type == MACH_TYPE_ROCKHOPPER)
#else
# define machine_is_rockhopper() (0)
#endif
#ifdef CONFIG_MACH_ENCORE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ENCORE
# endif
# define machine_is_encore() (machine_arch_type == MACH_TYPE_ENCORE)
#else
# define machine_is_encore() (0)
#endif
#ifdef CONFIG_MACH_HKDKC100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HKDKC100
# endif
# define machine_is_hkdkc100() (machine_arch_type == MACH_TYPE_HKDKC100)
#else
# define machine_is_hkdkc100() (0)
#endif
#ifdef CONFIG_MACH_TS42XX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS42XX
# endif
# define machine_is_ts42xx() (machine_arch_type == MACH_TYPE_TS42XX)
#else
# define machine_is_ts42xx() (0)
#endif
#ifdef CONFIG_MACH_AEBL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AEBL
# endif
# define machine_is_aebl() (machine_arch_type == MACH_TYPE_AEBL)
#else
# define machine_is_aebl() (0)
#endif
#ifdef CONFIG_MACH_WARIO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WARIO
# endif
# define machine_is_wario() (machine_arch_type == MACH_TYPE_WARIO)
#else
# define machine_is_wario() (0)
#endif
#ifdef CONFIG_MACH_GFS_SPM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GFS_SPM
# endif
# define machine_is_gfs_spm() (machine_arch_type == MACH_TYPE_GFS_SPM)
#else
# define machine_is_gfs_spm() (0)
#endif
#ifdef CONFIG_MACH_CM_T3730
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CM_T3730
# endif
# define machine_is_cm_t3730() (machine_arch_type == MACH_TYPE_CM_T3730)
#else
# define machine_is_cm_t3730() (0)
#endif
#ifdef CONFIG_MACH_ISC3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ISC3
# endif
# define machine_is_isc3() (machine_arch_type == MACH_TYPE_ISC3)
#else
# define machine_is_isc3() (0)
#endif
#ifdef CONFIG_MACH_RASCAL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RASCAL
# endif
# define machine_is_rascal() (machine_arch_type == MACH_TYPE_RASCAL)
#else
# define machine_is_rascal() (0)
#endif
#ifdef CONFIG_MACH_HREFV60
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HREFV60
# endif
# define machine_is_hrefv60() (machine_arch_type == MACH_TYPE_HREFV60)
#else
# define machine_is_hrefv60() (0)
#endif
#ifdef CONFIG_MACH_TPT_2_0
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TPT_2_0
# endif
# define machine_is_tpt_2_0() (machine_arch_type == MACH_TYPE_TPT_2_0)
#else
# define machine_is_tpt_2_0() (0)
#endif
#ifdef CONFIG_MACH_SPLENDOR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPLENDOR
# endif
# define machine_is_splendor() (machine_arch_type == MACH_TYPE_SPLENDOR)
#else
# define machine_is_splendor() (0)
#endif
#ifdef CONFIG_MACH_MSM8X60_QT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8X60_QT
# endif
# define machine_is_msm8x60_qt() (machine_arch_type == MACH_TYPE_MSM8X60_QT)
#else
# define machine_is_msm8x60_qt() (0)
#endif
#ifdef CONFIG_MACH_HTC_HD_MINI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HTC_HD_MINI
# endif
# define machine_is_htc_hd_mini() (machine_arch_type == MACH_TYPE_HTC_HD_MINI)
#else
# define machine_is_htc_hd_mini() (0)
#endif
#ifdef CONFIG_MACH_ATHENE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ATHENE
# endif
# define machine_is_athene() (machine_arch_type == MACH_TYPE_ATHENE)
#else
# define machine_is_athene() (0)
#endif
#ifdef CONFIG_MACH_DEEP_R_EK_1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DEEP_R_EK_1
# endif
# define machine_is_deep_r_ek_1() (machine_arch_type == MACH_TYPE_DEEP_R_EK_1)
#else
# define machine_is_deep_r_ek_1() (0)
#endif
#ifdef CONFIG_MACH_VIVOW_CT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VIVOW_CT
# endif
# define machine_is_vivow_ct() (machine_arch_type == MACH_TYPE_VIVOW_CT)
#else
# define machine_is_vivow_ct() (0)
#endif
#ifdef CONFIG_MACH_NERY_1000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NERY_1000
# endif
# define machine_is_nery_1000() (machine_arch_type == MACH_TYPE_NERY_1000)
#else
# define machine_is_nery_1000() (0)
#endif
#ifdef CONFIG_MACH_RFL109145_SSRV
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RFL109145_SSRV
# endif
# define machine_is_rfl109145_ssrv() (machine_arch_type == MACH_TYPE_RFL109145_SSRV)
#else
# define machine_is_rfl109145_ssrv() (0)
#endif
#ifdef CONFIG_MACH_NMH
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NMH
# endif
# define machine_is_nmh() (machine_arch_type == MACH_TYPE_NMH)
#else
# define machine_is_nmh() (0)
#endif
#ifdef CONFIG_MACH_WN802T
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WN802T
# endif
# define machine_is_wn802t() (machine_arch_type == MACH_TYPE_WN802T)
#else
# define machine_is_wn802t() (0)
#endif
#ifdef CONFIG_MACH_DRAGONET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DRAGONET
# endif
# define machine_is_dragonet() (machine_arch_type == MACH_TYPE_DRAGONET)
#else
# define machine_is_dragonet() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9263DESK16L
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9263DESK16L
# endif
# define machine_is_at91sam9263desk16l() (machine_arch_type == MACH_TYPE_AT91SAM9263DESK16L)
#else
# define machine_is_at91sam9263desk16l() (0)
#endif
#ifdef CONFIG_MACH_BCMHANA_SV
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BCMHANA_SV
# endif
# define machine_is_bcmhana_sv() (machine_arch_type == MACH_TYPE_BCMHANA_SV)
#else
# define machine_is_bcmhana_sv() (0)
#endif
#ifdef CONFIG_MACH_BCMHANA_TABLET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BCMHANA_TABLET
# endif
# define machine_is_bcmhana_tablet() (machine_arch_type == MACH_TYPE_BCMHANA_TABLET)
#else
# define machine_is_bcmhana_tablet() (0)
#endif
#ifdef CONFIG_MACH_KOI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KOI
# endif
# define machine_is_koi() (machine_arch_type == MACH_TYPE_KOI)
#else
# define machine_is_koi() (0)
#endif
#ifdef CONFIG_MACH_TS4800
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TS4800
# endif
# define machine_is_ts4800() (machine_arch_type == MACH_TYPE_TS4800)
#else
# define machine_is_ts4800() (0)
#endif
#ifdef CONFIG_MACH_TQMA9263
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TQMA9263
# endif
# define machine_is_tqma9263() (machine_arch_type == MACH_TYPE_TQMA9263)
#else
# define machine_is_tqma9263() (0)
#endif
#ifdef CONFIG_MACH_HOLIDAY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HOLIDAY
# endif
# define machine_is_holiday() (machine_arch_type == MACH_TYPE_HOLIDAY)
#else
# define machine_is_holiday() (0)
#endif
#ifdef CONFIG_MACH_DMA6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DMA6410
# endif
# define machine_is_dma_6410() (machine_arch_type == MACH_TYPE_DMA6410)
#else
# define machine_is_dma_6410() (0)
#endif
#ifdef CONFIG_MACH_PCATS_OVERLAY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCATS_OVERLAY
# endif
# define machine_is_pcats_overlay() (machine_arch_type == MACH_TYPE_PCATS_OVERLAY)
#else
# define machine_is_pcats_overlay() (0)
#endif
#ifdef CONFIG_MACH_HWGW6410
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HWGW6410
# endif
# define machine_is_hwgw6410() (machine_arch_type == MACH_TYPE_HWGW6410)
#else
# define machine_is_hwgw6410() (0)
#endif
#ifdef CONFIG_MACH_SHENZHOU
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHENZHOU
# endif
# define machine_is_shenzhou() (machine_arch_type == MACH_TYPE_SHENZHOU)
#else
# define machine_is_shenzhou() (0)
#endif
#ifdef CONFIG_MACH_CWME9210
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CWME9210
# endif
# define machine_is_cwme9210() (machine_arch_type == MACH_TYPE_CWME9210)
#else
# define machine_is_cwme9210() (0)
#endif
#ifdef CONFIG_MACH_CWME9210JS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CWME9210JS
# endif
# define machine_is_cwme9210js() (machine_arch_type == MACH_TYPE_CWME9210JS)
#else
# define machine_is_cwme9210js() (0)
#endif
#ifdef CONFIG_MACH_PGS_SITARA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PGS_SITARA
# endif
# define machine_is_pgs_v1() (machine_arch_type == MACH_TYPE_PGS_SITARA)
#else
# define machine_is_pgs_v1() (0)
#endif
#ifdef CONFIG_MACH_COLIBRI_TEGRA2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_COLIBRI_TEGRA2
# endif
# define machine_is_colibri_tegra2() (machine_arch_type == MACH_TYPE_COLIBRI_TEGRA2)
#else
# define machine_is_colibri_tegra2() (0)
#endif
#ifdef CONFIG_MACH_W21
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_W21
# endif
# define machine_is_w21() (machine_arch_type == MACH_TYPE_W21)
#else
# define machine_is_w21() (0)
#endif
#ifdef CONFIG_MACH_POLYSAT1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_POLYSAT1
# endif
# define machine_is_polysat1() (machine_arch_type == MACH_TYPE_POLYSAT1)
#else
# define machine_is_polysat1() (0)
#endif
#ifdef CONFIG_MACH_DATAWAY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DATAWAY
# endif
# define machine_is_dataway() (machine_arch_type == MACH_TYPE_DATAWAY)
#else
# define machine_is_dataway() (0)
#endif
#ifdef CONFIG_MACH_COBRAL138
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_COBRAL138
# endif
# define machine_is_cobral138() (machine_arch_type == MACH_TYPE_COBRAL138)
#else
# define machine_is_cobral138() (0)
#endif
#ifdef CONFIG_MACH_ROVERPCS8
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ROVERPCS8
# endif
# define machine_is_roverpcs8() (machine_arch_type == MACH_TYPE_ROVERPCS8)
#else
# define machine_is_roverpcs8() (0)
#endif
#ifdef CONFIG_MACH_MARVELC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MARVELC
# endif
# define machine_is_marvelc() (machine_arch_type == MACH_TYPE_MARVELC)
#else
# define machine_is_marvelc() (0)
#endif
#ifdef CONFIG_MACH_NAVEFIHID
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NAVEFIHID
# endif
# define machine_is_navefihid() (machine_arch_type == MACH_TYPE_NAVEFIHID)
#else
# define machine_is_navefihid() (0)
#endif
#ifdef CONFIG_MACH_DM365_CV100
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DM365_CV100
# endif
# define machine_is_dm365_cv100() (machine_arch_type == MACH_TYPE_DM365_CV100)
#else
# define machine_is_dm365_cv100() (0)
#endif
#ifdef CONFIG_MACH_ABLE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ABLE
# endif
# define machine_is_able() (machine_arch_type == MACH_TYPE_ABLE)
#else
# define machine_is_able() (0)
#endif
#ifdef CONFIG_MACH_LEGACY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LEGACY
# endif
# define machine_is_legacy() (machine_arch_type == MACH_TYPE_LEGACY)
#else
# define machine_is_legacy() (0)
#endif
#ifdef CONFIG_MACH_ICONG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ICONG
# endif
# define machine_is_icong() (machine_arch_type == MACH_TYPE_ICONG)
#else
# define machine_is_icong() (0)
#endif
#ifdef CONFIG_MACH_ROVER_G8
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ROVER_G8
# endif
# define machine_is_rover_g8() (machine_arch_type == MACH_TYPE_ROVER_G8)
#else
# define machine_is_rover_g8() (0)
#endif
#ifdef CONFIG_MACH_T5388P
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_T5388P
# endif
# define machine_is_t5388p() (machine_arch_type == MACH_TYPE_T5388P)
#else
# define machine_is_t5388p() (0)
#endif
#ifdef CONFIG_MACH_DINGO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DINGO
# endif
# define machine_is_dingo() (machine_arch_type == MACH_TYPE_DINGO)
#else
# define machine_is_dingo() (0)
#endif
#ifdef CONFIG_MACH_GOFLEXHOME
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GOFLEXHOME
# endif
# define machine_is_goflexhome() (machine_arch_type == MACH_TYPE_GOFLEXHOME)
#else
# define machine_is_goflexhome() (0)
#endif
#ifdef CONFIG_MACH_LANREADYFN511
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LANREADYFN511
# endif
# define machine_is_lanreadyfn511() (machine_arch_type == MACH_TYPE_LANREADYFN511)
#else
# define machine_is_lanreadyfn511() (0)
#endif
#ifdef CONFIG_MACH_OMAP3_BAIA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3_BAIA
# endif
# define machine_is_omap3_baia() (machine_arch_type == MACH_TYPE_OMAP3_BAIA)
#else
# define machine_is_omap3_baia() (0)
#endif
#ifdef CONFIG_MACH_OMAP3SMARTDISPLAY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP3SMARTDISPLAY
# endif
# define machine_is_omap3smartdisplay() (machine_arch_type == MACH_TYPE_OMAP3SMARTDISPLAY)
#else
# define machine_is_omap3smartdisplay() (0)
#endif
#ifdef CONFIG_MACH_XILINX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_XILINX
# endif
# define machine_is_xilinx() (machine_arch_type == MACH_TYPE_XILINX)
#else
# define machine_is_xilinx() (0)
#endif
#ifdef CONFIG_MACH_A2F
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_A2F
# endif
# define machine_is_a2f() (machine_arch_type == MACH_TYPE_A2F)
#else
# define machine_is_a2f() (0)
#endif
#ifdef CONFIG_MACH_SKY25
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SKY25
# endif
# define machine_is_sky25() (machine_arch_type == MACH_TYPE_SKY25)
#else
# define machine_is_sky25() (0)
#endif
#ifdef CONFIG_MACH_CCMX53
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CCMX53
# endif
# define machine_is_ccmx53() (machine_arch_type == MACH_TYPE_CCMX53)
#else
# define machine_is_ccmx53() (0)
#endif
#ifdef CONFIG_MACH_CCMX53JS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CCMX53JS
# endif
# define machine_is_ccmx53js() (machine_arch_type == MACH_TYPE_CCMX53JS)
#else
# define machine_is_ccmx53js() (0)
#endif
#ifdef CONFIG_MACH_CCWMX53
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CCWMX53
# endif
# define machine_is_ccwmx53() (machine_arch_type == MACH_TYPE_CCWMX53)
#else
# define machine_is_ccwmx53() (0)
#endif
#ifdef CONFIG_MACH_CCWMX53JS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CCWMX53JS
# endif
# define machine_is_ccwmx53js() (machine_arch_type == MACH_TYPE_CCWMX53JS)
#else
# define machine_is_ccwmx53js() (0)
#endif
#ifdef CONFIG_MACH_FRISMS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_FRISMS
# endif
# define machine_is_frisms() (machine_arch_type == MACH_TYPE_FRISMS)
#else
# define machine_is_frisms() (0)
#endif
#ifdef CONFIG_MACH_MSM7X27A_FFA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X27A_FFA
# endif
# define machine_is_msm7x27a_ffa() (machine_arch_type == MACH_TYPE_MSM7X27A_FFA)
#else
# define machine_is_msm7x27a_ffa() (0)
#endif
#ifdef CONFIG_MACH_MSM7X27A_SURF
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X27A_SURF
# endif
# define machine_is_msm7x27a_surf() (machine_arch_type == MACH_TYPE_MSM7X27A_SURF)
#else
# define machine_is_msm7x27a_surf() (0)
#endif
#ifdef CONFIG_MACH_MSM7X27A_RUMI3
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM7X27A_RUMI3
# endif
# define machine_is_msm7x27a_rumi3() (machine_arch_type == MACH_TYPE_MSM7X27A_RUMI3)
#else
# define machine_is_msm7x27a_rumi3() (0)
#endif
#ifdef CONFIG_MACH_DIMMSAM9G20
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DIMMSAM9G20
# endif
# define machine_is_dimmsam9g20() (machine_arch_type == MACH_TYPE_DIMMSAM9G20)
#else
# define machine_is_dimmsam9g20() (0)
#endif
#ifdef CONFIG_MACH_DIMM_IMX28
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DIMM_IMX28
# endif
# define machine_is_dimm_imx28() (machine_arch_type == MACH_TYPE_DIMM_IMX28)
#else
# define machine_is_dimm_imx28() (0)
#endif
#ifdef CONFIG_MACH_AMK_A4
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AMK_A4
# endif
# define machine_is_amk_a4() (machine_arch_type == MACH_TYPE_AMK_A4)
#else
# define machine_is_amk_a4() (0)
#endif
#ifdef CONFIG_MACH_GNET_SGME
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GNET_SGME
# endif
# define machine_is_gnet_sgme() (machine_arch_type == MACH_TYPE_GNET_SGME)
#else
# define machine_is_gnet_sgme() (0)
#endif
#ifdef CONFIG_MACH_SHOOTER_U
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHOOTER_U
# endif
# define machine_is_shooter_u() (machine_arch_type == MACH_TYPE_SHOOTER_U)
#else
# define machine_is_shooter_u() (0)
#endif
#ifdef CONFIG_MACH_VMX53
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VMX53
# endif
# define machine_is_vmx53() (machine_arch_type == MACH_TYPE_VMX53)
#else
# define machine_is_vmx53() (0)
#endif
#ifdef CONFIG_MACH_RHINO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RHINO
# endif
# define machine_is_rhino() (machine_arch_type == MACH_TYPE_RHINO)
#else
# define machine_is_rhino() (0)
#endif
#ifdef CONFIG_MACH_ARMLEX4210
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARMLEX4210
# endif
# define machine_is_armlex4210() (machine_arch_type == MACH_TYPE_ARMLEX4210)
#else
# define machine_is_armlex4210() (0)
#endif
#ifdef CONFIG_MACH_SWARCOEXTMODEM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SWARCOEXTMODEM
# endif
# define machine_is_swarcoextmodem() (machine_arch_type == MACH_TYPE_SWARCOEXTMODEM)
#else
# define machine_is_swarcoextmodem() (0)
#endif
#ifdef CONFIG_MACH_SNOWBALL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SNOWBALL
# endif
# define machine_is_snowball() (machine_arch_type == MACH_TYPE_SNOWBALL)
#else
# define machine_is_snowball() (0)
#endif
#ifdef CONFIG_MACH_PCM049
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PCM049
# endif
# define machine_is_pcm049() (machine_arch_type == MACH_TYPE_PCM049)
#else
# define machine_is_pcm049() (0)
#endif
#ifdef CONFIG_MACH_VIGOR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VIGOR
# endif
# define machine_is_vigor() (machine_arch_type == MACH_TYPE_VIGOR)
#else
# define machine_is_vigor() (0)
#endif
#ifdef CONFIG_MACH_OSLO_AMUNDSEN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OSLO_AMUNDSEN
# endif
# define machine_is_oslo_amundsen() (machine_arch_type == MACH_TYPE_OSLO_AMUNDSEN)
#else
# define machine_is_oslo_amundsen() (0)
#endif
#ifdef CONFIG_MACH_GSL_DIAMOND
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GSL_DIAMOND
# endif
# define machine_is_gsl_diamond() (machine_arch_type == MACH_TYPE_GSL_DIAMOND)
#else
# define machine_is_gsl_diamond() (0)
#endif
#ifdef CONFIG_MACH_CV2201
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CV2201
# endif
# define machine_is_cv2201() (machine_arch_type == MACH_TYPE_CV2201)
#else
# define machine_is_cv2201() (0)
#endif
#ifdef CONFIG_MACH_CV2202
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CV2202
# endif
# define machine_is_cv2202() (machine_arch_type == MACH_TYPE_CV2202)
#else
# define machine_is_cv2202() (0)
#endif
#ifdef CONFIG_MACH_CV2203
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CV2203
# endif
# define machine_is_cv2203() (machine_arch_type == MACH_TYPE_CV2203)
#else
# define machine_is_cv2203() (0)
#endif
#ifdef CONFIG_MACH_VIT_IBOX
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VIT_IBOX
# endif
# define machine_is_vit_ibox() (machine_arch_type == MACH_TYPE_VIT_IBOX)
#else
# define machine_is_vit_ibox() (0)
#endif
#ifdef CONFIG_MACH_DM6441_ESP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DM6441_ESP
# endif
# define machine_is_dm6441_esp() (machine_arch_type == MACH_TYPE_DM6441_ESP)
#else
# define machine_is_dm6441_esp() (0)
#endif
#ifdef CONFIG_MACH_AT91SAM9X5EK
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AT91SAM9X5EK
# endif
# define machine_is_at91sam9x5ek() (machine_arch_type == MACH_TYPE_AT91SAM9X5EK)
#else
# define machine_is_at91sam9x5ek() (0)
#endif
#ifdef CONFIG_MACH_LIBRA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_LIBRA
# endif
# define machine_is_libra() (machine_arch_type == MACH_TYPE_LIBRA)
#else
# define machine_is_libra() (0)
#endif
#ifdef CONFIG_MACH_EASYCRRH
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EASYCRRH
# endif
# define machine_is_easycrrh() (machine_arch_type == MACH_TYPE_EASYCRRH)
#else
# define machine_is_easycrrh() (0)
#endif
#ifdef CONFIG_MACH_TRIPEL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TRIPEL
# endif
# define machine_is_tripel() (machine_arch_type == MACH_TYPE_TRIPEL)
#else
# define machine_is_tripel() (0)
#endif
#ifdef CONFIG_MACH_ENDIAN_MINI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ENDIAN_MINI
# endif
# define machine_is_endian_mini() (machine_arch_type == MACH_TYPE_ENDIAN_MINI)
#else
# define machine_is_endian_mini() (0)
#endif
#ifdef CONFIG_MACH_XILINX_EP107
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_XILINX_EP107
# endif
# define machine_is_xilinx_ep107() (machine_arch_type == MACH_TYPE_XILINX_EP107)
#else
# define machine_is_xilinx_ep107() (0)
#endif
#ifdef CONFIG_MACH_NURI
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NURI
# endif
# define machine_is_nuri() (machine_arch_type == MACH_TYPE_NURI)
#else
# define machine_is_nuri() (0)
#endif
#ifdef CONFIG_MACH_JANUS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_JANUS
# endif
# define machine_is_janus() (machine_arch_type == MACH_TYPE_JANUS)
#else
# define machine_is_janus() (0)
#endif
#ifdef CONFIG_MACH_DDNAS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DDNAS
# endif
# define machine_is_ddnas() (machine_arch_type == MACH_TYPE_DDNAS)
#else
# define machine_is_ddnas() (0)
#endif
#ifdef CONFIG_MACH_TAG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TAG
# endif
# define machine_is_tag() (machine_arch_type == MACH_TYPE_TAG)
#else
# define machine_is_tag() (0)
#endif
#ifdef CONFIG_MACH_TAGW
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TAGW
# endif
# define machine_is_tagw() (machine_arch_type == MACH_TYPE_TAGW)
#else
# define machine_is_tagw() (0)
#endif
#ifdef CONFIG_MACH_NITROGEN_VM_IMX51
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NITROGEN_VM_IMX51
# endif
# define machine_is_nitrogen_vm_imx51() (machine_arch_type == MACH_TYPE_NITROGEN_VM_IMX51)
#else
# define machine_is_nitrogen_vm_imx51() (0)
#endif
#ifdef CONFIG_MACH_VIPRINET
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VIPRINET
# endif
# define machine_is_viprinet() (machine_arch_type == MACH_TYPE_VIPRINET)
#else
# define machine_is_viprinet() (0)
#endif
#ifdef CONFIG_MACH_BOCKW
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BOCKW
# endif
# define machine_is_bockw() (machine_arch_type == MACH_TYPE_BOCKW)
#else
# define machine_is_bockw() (0)
#endif
#ifdef CONFIG_MACH_EVA2000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EVA2000
# endif
# define machine_is_eva2000() (machine_arch_type == MACH_TYPE_EVA2000)
#else
# define machine_is_eva2000() (0)
#endif
#ifdef CONFIG_MACH_STEELYARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_STEELYARD
# endif
# define machine_is_steelyard() (machine_arch_type == MACH_TYPE_STEELYARD)
#else
# define machine_is_steelyard() (0)
#endif
#ifdef CONFIG_MACH_MACH_SDH001
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MACH_SDH001
# endif
# define machine_is_sdh001() (machine_arch_type == MACH_TYPE_MACH_SDH001)
#else
# define machine_is_sdh001() (0)
#endif
#ifdef CONFIG_MACH_NSSLSBOARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NSSLSBOARD
# endif
# define machine_is_nsslsboard() (machine_arch_type == MACH_TYPE_NSSLSBOARD)
#else
# define machine_is_nsslsboard() (0)
#endif
#ifdef CONFIG_MACH_GENEVA_B5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GENEVA_B5
# endif
# define machine_is_geneva_b5() (machine_arch_type == MACH_TYPE_GENEVA_B5)
#else
# define machine_is_geneva_b5() (0)
#endif
#ifdef CONFIG_MACH_SPEAR1340
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SPEAR1340
# endif
# define machine_is_spear1340() (machine_arch_type == MACH_TYPE_SPEAR1340)
#else
# define machine_is_spear1340() (0)
#endif
#ifdef CONFIG_MACH_REXMAS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_REXMAS
# endif
# define machine_is_rexmas() (machine_arch_type == MACH_TYPE_REXMAS)
#else
# define machine_is_rexmas() (0)
#endif
#ifdef CONFIG_MACH_MSM8960_CDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8960_CDP
# endif
# define machine_is_msm8960_cdp() (machine_arch_type == MACH_TYPE_MSM8960_CDP)
#else
# define machine_is_msm8960_cdp() (0)
#endif
#ifdef CONFIG_MACH_MSM8960_MDP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8960_MDP
# endif
# define machine_is_msm8960_mdp() (machine_arch_type == MACH_TYPE_MSM8960_MDP)
#else
# define machine_is_msm8960_mdp() (0)
#endif
#ifdef CONFIG_MACH_MSM8960_FLUID
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8960_FLUID
# endif
# define machine_is_msm8960_fluid() (machine_arch_type == MACH_TYPE_MSM8960_FLUID)
#else
# define machine_is_msm8960_fluid() (0)
#endif
#ifdef CONFIG_MACH_MSM8960_APQ
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MSM8960_APQ
# endif
# define machine_is_msm8960_apq() (machine_arch_type == MACH_TYPE_MSM8960_APQ)
#else
# define machine_is_msm8960_apq() (0)
#endif
#ifdef CONFIG_MACH_HELIOS_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HELIOS_V2
# endif
# define machine_is_helios_v2() (machine_arch_type == MACH_TYPE_HELIOS_V2)
#else
# define machine_is_helios_v2() (0)
#endif
#ifdef CONFIG_MACH_MIF10P
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MIF10P
# endif
# define machine_is_mif10p() (machine_arch_type == MACH_TYPE_MIF10P)
#else
# define machine_is_mif10p() (0)
#endif
#ifdef CONFIG_MACH_IAM28
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_IAM28
# endif
# define machine_is_iam28() (machine_arch_type == MACH_TYPE_IAM28)
#else
# define machine_is_iam28() (0)
#endif
#ifdef CONFIG_MACH_PICASSO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PICASSO
# endif
# define machine_is_picasso() (machine_arch_type == MACH_TYPE_PICASSO)
#else
# define machine_is_picasso() (0)
#endif
#ifdef CONFIG_MACH_MR301A
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MR301A
# endif
# define machine_is_mr301a() (machine_arch_type == MACH_TYPE_MR301A)
#else
# define machine_is_mr301a() (0)
#endif
#ifdef CONFIG_MACH_NOTLE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NOTLE
# endif
# define machine_is_notle() (machine_arch_type == MACH_TYPE_NOTLE)
#else
# define machine_is_notle() (0)
#endif
#ifdef CONFIG_MACH_EELX2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EELX2
# endif
# define machine_is_eelx2() (machine_arch_type == MACH_TYPE_EELX2)
#else
# define machine_is_eelx2() (0)
#endif
#ifdef CONFIG_MACH_MOON
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MOON
# endif
# define machine_is_moon() (machine_arch_type == MACH_TYPE_MOON)
#else
# define machine_is_moon() (0)
#endif
#ifdef CONFIG_MACH_RUBY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_RUBY
# endif
# define machine_is_ruby() (machine_arch_type == MACH_TYPE_RUBY)
#else
# define machine_is_ruby() (0)
#endif
#ifdef CONFIG_MACH_GOLDENGATE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GOLDENGATE
# endif
# define machine_is_goldengate() (machine_arch_type == MACH_TYPE_GOLDENGATE)
#else
# define machine_is_goldengate() (0)
#endif
#ifdef CONFIG_MACH_CTBU_GEN2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CTBU_GEN2
# endif
# define machine_is_ctbu_gen2() (machine_arch_type == MACH_TYPE_CTBU_GEN2)
#else
# define machine_is_ctbu_gen2() (0)
#endif
#ifdef CONFIG_MACH_KMP_AM17_01
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KMP_AM17_01
# endif
# define machine_is_kmp_am17_01() (machine_arch_type == MACH_TYPE_KMP_AM17_01)
#else
# define machine_is_kmp_am17_01() (0)
#endif
#ifdef CONFIG_MACH_WTPLUG
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WTPLUG
# endif
# define machine_is_wtplug() (machine_arch_type == MACH_TYPE_WTPLUG)
#else
# define machine_is_wtplug() (0)
#endif
#ifdef CONFIG_MACH_MX27SU2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX27SU2
# endif
# define machine_is_mx27su2() (machine_arch_type == MACH_TYPE_MX27SU2)
#else
# define machine_is_mx27su2() (0)
#endif
#ifdef CONFIG_MACH_NB31
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NB31
# endif
# define machine_is_nb31() (machine_arch_type == MACH_TYPE_NB31)
#else
# define machine_is_nb31() (0)
#endif
#ifdef CONFIG_MACH_HJSDU
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HJSDU
# endif
# define machine_is_hjsdu() (machine_arch_type == MACH_TYPE_HJSDU)
#else
# define machine_is_hjsdu() (0)
#endif
#ifdef CONFIG_MACH_TD3_REV1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TD3_REV1
# endif
# define machine_is_td3_rev1() (machine_arch_type == MACH_TYPE_TD3_REV1)
#else
# define machine_is_td3_rev1() (0)
#endif
#ifdef CONFIG_MACH_EAG_CI4000
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EAG_CI4000
# endif
# define machine_is_eag_ci4000() (machine_arch_type == MACH_TYPE_EAG_CI4000)
#else
# define machine_is_eag_ci4000() (0)
#endif
#ifdef CONFIG_MACH_NET5BIG_NAND_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NET5BIG_NAND_V2
# endif
# define machine_is_net5big_nand_v2() (machine_arch_type == MACH_TYPE_NET5BIG_NAND_V2)
#else
# define machine_is_net5big_nand_v2() (0)
#endif
#ifdef CONFIG_MACH_CPX2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CPX2
# endif
# define machine_is_cpx2() (machine_arch_type == MACH_TYPE_CPX2)
#else
# define machine_is_cpx2() (0)
#endif
#ifdef CONFIG_MACH_NET2BIG_NAND_V2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NET2BIG_NAND_V2
# endif
# define machine_is_net2big_nand_v2() (machine_arch_type == MACH_TYPE_NET2BIG_NAND_V2)
#else
# define machine_is_net2big_nand_v2() (0)
#endif
#ifdef CONFIG_MACH_ECUV5
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ECUV5
# endif
# define machine_is_ecuv5() (machine_arch_type == MACH_TYPE_ECUV5)
#else
# define machine_is_ecuv5() (0)
#endif
#ifdef CONFIG_MACH_HSGX6D
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_HSGX6D
# endif
# define machine_is_hsgx6d() (machine_arch_type == MACH_TYPE_HSGX6D)
#else
# define machine_is_hsgx6d() (0)
#endif
#ifdef CONFIG_MACH_DAWAD7
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DAWAD7
# endif
# define machine_is_dawad7() (machine_arch_type == MACH_TYPE_DAWAD7)
#else
# define machine_is_dawad7() (0)
#endif
#ifdef CONFIG_MACH_SAM9REPEATER
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SAM9REPEATER
# endif
# define machine_is_sam9repeater() (machine_arch_type == MACH_TYPE_SAM9REPEATER)
#else
# define machine_is_sam9repeater() (0)
#endif
#ifdef CONFIG_MACH_GT_I5700
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_GT_I5700
# endif
# define machine_is_gt_i5700() (machine_arch_type == MACH_TYPE_GT_I5700)
#else
# define machine_is_gt_i5700() (0)
#endif
#ifdef CONFIG_MACH_CTERA_PLUG_C2
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CTERA_PLUG_C2
# endif
# define machine_is_ctera_plug_c2() (machine_arch_type == MACH_TYPE_CTERA_PLUG_C2)
#else
# define machine_is_ctera_plug_c2() (0)
#endif
#ifdef CONFIG_MACH_MARVELCT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MARVELCT
# endif
# define machine_is_marvelct() (machine_arch_type == MACH_TYPE_MARVELCT)
#else
# define machine_is_marvelct() (0)
#endif
#ifdef CONFIG_MACH_AG11005
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_AG11005
# endif
# define machine_is_ag11005() (machine_arch_type == MACH_TYPE_AG11005)
#else
# define machine_is_ag11005() (0)
#endif
#ifdef CONFIG_MACH_VANGOGH
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VANGOGH
# endif
# define machine_is_vangogh() (machine_arch_type == MACH_TYPE_VANGOGH)
#else
# define machine_is_vangogh() (0)
#endif
#ifdef CONFIG_MACH_MATRIX505
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MATRIX505
# endif
# define machine_is_matrix505() (machine_arch_type == MACH_TYPE_MATRIX505)
#else
# define machine_is_matrix505() (0)
#endif
#ifdef CONFIG_MACH_OCE_NIGMA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OCE_NIGMA
# endif
# define machine_is_oce_nigma() (machine_arch_type == MACH_TYPE_OCE_NIGMA)
#else
# define machine_is_oce_nigma() (0)
#endif
#ifdef CONFIG_MACH_T55
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_T55
# endif
# define machine_is_t55() (machine_arch_type == MACH_TYPE_T55)
#else
# define machine_is_t55() (0)
#endif
#ifdef CONFIG_MACH_BIO3K
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BIO3K
# endif
# define machine_is_bio3k() (machine_arch_type == MACH_TYPE_BIO3K)
#else
# define machine_is_bio3k() (0)
#endif
#ifdef CONFIG_MACH_EXPRESSCT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EXPRESSCT
# endif
# define machine_is_expressct() (machine_arch_type == MACH_TYPE_EXPRESSCT)
#else
# define machine_is_expressct() (0)
#endif
#ifdef CONFIG_MACH_CARDHU
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CARDHU
# endif
# define machine_is_cardhu() (machine_arch_type == MACH_TYPE_CARDHU)
#else
# define machine_is_cardhu() (0)
#endif
#ifdef CONFIG_MACH_ARUBA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARUBA
# endif
# define machine_is_aruba() (machine_arch_type == MACH_TYPE_ARUBA)
#else
# define machine_is_aruba() (0)
#endif
#ifdef CONFIG_MACH_BONAIRE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BONAIRE
# endif
# define machine_is_bonaire() (machine_arch_type == MACH_TYPE_BONAIRE)
#else
# define machine_is_bonaire() (0)
#endif
#ifdef CONFIG_MACH_NUC700EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NUC700EVB
# endif
# define machine_is_nuc700evb() (machine_arch_type == MACH_TYPE_NUC700EVB)
#else
# define machine_is_nuc700evb() (0)
#endif
#ifdef CONFIG_MACH_NUC710EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NUC710EVB
# endif
# define machine_is_nuc710evb() (machine_arch_type == MACH_TYPE_NUC710EVB)
#else
# define machine_is_nuc710evb() (0)
#endif
#ifdef CONFIG_MACH_NUC740EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NUC740EVB
# endif
# define machine_is_nuc740evb() (machine_arch_type == MACH_TYPE_NUC740EVB)
#else
# define machine_is_nuc740evb() (0)
#endif
#ifdef CONFIG_MACH_NUC745EVB
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NUC745EVB
# endif
# define machine_is_nuc745evb() (machine_arch_type == MACH_TYPE_NUC745EVB)
#else
# define machine_is_nuc745evb() (0)
#endif
#ifdef CONFIG_MACH_TRANSCEDE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TRANSCEDE
# endif
# define machine_is_transcede() (machine_arch_type == MACH_TYPE_TRANSCEDE)
#else
# define machine_is_transcede() (0)
#endif
#ifdef CONFIG_MACH_MORA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MORA
# endif
# define machine_is_mora() (machine_arch_type == MACH_TYPE_MORA)
#else
# define machine_is_mora() (0)
#endif
#ifdef CONFIG_MACH_NDA_EVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_NDA_EVM
# endif
# define machine_is_nda_evm() (machine_arch_type == MACH_TYPE_NDA_EVM)
#else
# define machine_is_nda_evm() (0)
#endif
#ifdef CONFIG_MACH_TIMU
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TIMU
# endif
# define machine_is_timu() (machine_arch_type == MACH_TYPE_TIMU)
#else
# define machine_is_timu() (0)
#endif
#ifdef CONFIG_MACH_EXPRESSH
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EXPRESSH
# endif
# define machine_is_expressh() (machine_arch_type == MACH_TYPE_EXPRESSH)
#else
# define machine_is_expressh() (0)
#endif
#ifdef CONFIG_MACH_VERIDIS_A300
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_VERIDIS_A300
# endif
# define machine_is_veridis_a300() (machine_arch_type == MACH_TYPE_VERIDIS_A300)
#else
# define machine_is_veridis_a300() (0)
#endif
#ifdef CONFIG_MACH_DM368_LEOPARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DM368_LEOPARD
# endif
# define machine_is_dm368_leopard() (machine_arch_type == MACH_TYPE_DM368_LEOPARD)
#else
# define machine_is_dm368_leopard() (0)
#endif
#ifdef CONFIG_MACH_OMAP_MCOP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP_MCOP
# endif
# define machine_is_omap_mcop() (machine_arch_type == MACH_TYPE_OMAP_MCOP)
#else
# define machine_is_omap_mcop() (0)
#endif
#ifdef CONFIG_MACH_TRITIP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TRITIP
# endif
# define machine_is_tritip() (machine_arch_type == MACH_TYPE_TRITIP)
#else
# define machine_is_tritip() (0)
#endif
#ifdef CONFIG_MACH_SM1K
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SM1K
# endif
# define machine_is_sm1k() (machine_arch_type == MACH_TYPE_SM1K)
#else
# define machine_is_sm1k() (0)
#endif
#ifdef CONFIG_MACH_MONCH
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MONCH
# endif
# define machine_is_monch() (machine_arch_type == MACH_TYPE_MONCH)
#else
# define machine_is_monch() (0)
#endif
#ifdef CONFIG_MACH_CURACAO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CURACAO
# endif
# define machine_is_curacao() (machine_arch_type == MACH_TYPE_CURACAO)
#else
# define machine_is_curacao() (0)
#endif
#ifdef CONFIG_MACH_ORIGEN
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ORIGEN
# endif
# define machine_is_origen() (machine_arch_type == MACH_TYPE_ORIGEN)
#else
# define machine_is_origen() (0)
#endif
#ifdef CONFIG_MACH_EPC10
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_EPC10
# endif
# define machine_is_epc10() (machine_arch_type == MACH_TYPE_EPC10)
#else
# define machine_is_epc10() (0)
#endif
#ifdef CONFIG_MACH_SGH_I740
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SGH_I740
# endif
# define machine_is_sgh_i740() (machine_arch_type == MACH_TYPE_SGH_I740)
#else
# define machine_is_sgh_i740() (0)
#endif
#ifdef CONFIG_MACH_TUNA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TUNA
# endif
# define machine_is_tuna() (machine_arch_type == MACH_TYPE_TUNA)
#else
# define machine_is_tuna() (0)
#endif
#ifdef CONFIG_MACH_MX51_TULIP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_TULIP
# endif
# define machine_is_mx51_tulip() (machine_arch_type == MACH_TYPE_MX51_TULIP)
#else
# define machine_is_mx51_tulip() (0)
#endif
#ifdef CONFIG_MACH_MX51_ASTER7
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_ASTER7
# endif
# define machine_is_mx51_aster7() (machine_arch_type == MACH_TYPE_MX51_ASTER7)
#else
# define machine_is_mx51_aster7() (0)
#endif
#ifdef CONFIG_MACH_ACRO37XBRD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACRO37XBRD
# endif
# define machine_is_acro37xbrd() (machine_arch_type == MACH_TYPE_ACRO37XBRD)
#else
# define machine_is_acro37xbrd() (0)
#endif
#ifdef CONFIG_MACH_ELKE
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ELKE
# endif
# define machine_is_elke() (machine_arch_type == MACH_TYPE_ELKE)
#else
# define machine_is_elke() (0)
#endif
#ifdef CONFIG_MACH_SBC6000X
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SBC6000X
# endif
# define machine_is_sbc6000x() (machine_arch_type == MACH_TYPE_SBC6000X)
#else
# define machine_is_sbc6000x() (0)
#endif
#ifdef CONFIG_MACH_R1801E
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_R1801E
# endif
# define machine_is_r1801e() (machine_arch_type == MACH_TYPE_R1801E)
#else
# define machine_is_r1801e() (0)
#endif
#ifdef CONFIG_MACH_H1600
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_H1600
# endif
# define machine_is_h1600() (machine_arch_type == MACH_TYPE_H1600)
#else
# define machine_is_h1600() (0)
#endif
#ifdef CONFIG_MACH_MINI210
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MINI210
# endif
# define machine_is_mini210() (machine_arch_type == MACH_TYPE_MINI210)
#else
# define machine_is_mini210() (0)
#endif
#ifdef CONFIG_MACH_MINI8168
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MINI8168
# endif
# define machine_is_mini8168() (machine_arch_type == MACH_TYPE_MINI8168)
#else
# define machine_is_mini8168() (0)
#endif
#ifdef CONFIG_MACH_PC7308
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PC7308
# endif
# define machine_is_pc7308() (machine_arch_type == MACH_TYPE_PC7308)
#else
# define machine_is_pc7308() (0)
#endif
#ifdef CONFIG_MACH_KMM2M01
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_KMM2M01
# endif
# define machine_is_kmm2m01() (machine_arch_type == MACH_TYPE_KMM2M01)
#else
# define machine_is_kmm2m01() (0)
#endif
#ifdef CONFIG_MACH_MX51EREBUS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51EREBUS
# endif
# define machine_is_mx51erebus() (machine_arch_type == MACH_TYPE_MX51EREBUS)
#else
# define machine_is_mx51erebus() (0)
#endif
#ifdef CONFIG_MACH_WM8650REFBOARD
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_WM8650REFBOARD
# endif
# define machine_is_wm8650refboard() (machine_arch_type == MACH_TYPE_WM8650REFBOARD)
#else
# define machine_is_wm8650refboard() (0)
#endif
#ifdef CONFIG_MACH_TUXRAIL
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_TUXRAIL
# endif
# define machine_is_tuxrail() (machine_arch_type == MACH_TYPE_TUXRAIL)
#else
# define machine_is_tuxrail() (0)
#endif
#ifdef CONFIG_MACH_ARTHUR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ARTHUR
# endif
# define machine_is_arthur() (machine_arch_type == MACH_TYPE_ARTHUR)
#else
# define machine_is_arthur() (0)
#endif
#ifdef CONFIG_MACH_DOORBOY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DOORBOY
# endif
# define machine_is_doorboy() (machine_arch_type == MACH_TYPE_DOORBOY)
#else
# define machine_is_doorboy() (0)
#endif
#ifdef CONFIG_MACH_XARINA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_XARINA
# endif
# define machine_is_xarina() (machine_arch_type == MACH_TYPE_XARINA)
#else
# define machine_is_xarina() (0)
#endif
#ifdef CONFIG_MACH_ROVERX7
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ROVERX7
# endif
# define machine_is_roverx7() (machine_arch_type == MACH_TYPE_ROVERX7)
#else
# define machine_is_roverx7() (0)
#endif
#ifdef CONFIG_MACH_SDVR
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SDVR
# endif
# define machine_is_sdvr() (machine_arch_type == MACH_TYPE_SDVR)
#else
# define machine_is_sdvr() (0)
#endif
#ifdef CONFIG_MACH_ACER_MAYA
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACER_MAYA
# endif
# define machine_is_acer_maya() (machine_arch_type == MACH_TYPE_ACER_MAYA)
#else
# define machine_is_acer_maya() (0)
#endif
#ifdef CONFIG_MACH_PICO
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_PICO
# endif
# define machine_is_pico() (machine_arch_type == MACH_TYPE_PICO)
#else
# define machine_is_pico() (0)
#endif
#ifdef CONFIG_MACH_CWMX233
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CWMX233
# endif
# define machine_is_cwmx233() (machine_arch_type == MACH_TYPE_CWMX233)
#else
# define machine_is_cwmx233() (0)
#endif
#ifdef CONFIG_MACH_CWAM1808
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CWAM1808
# endif
# define machine_is_cwam1808() (machine_arch_type == MACH_TYPE_CWAM1808)
#else
# define machine_is_cwam1808() (0)
#endif
#ifdef CONFIG_MACH_CWDM365
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_CWDM365
# endif
# define machine_is_cwdm365() (machine_arch_type == MACH_TYPE_CWDM365)
#else
# define machine_is_cwdm365() (0)
#endif
#ifdef CONFIG_MACH_MX51_MORAY
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_MX51_MORAY
# endif
# define machine_is_mx51_moray() (machine_arch_type == MACH_TYPE_MX51_MORAY)
#else
# define machine_is_mx51_moray() (0)
#endif
#ifdef CONFIG_MACH_THALES_CBC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_THALES_CBC
# endif
# define machine_is_thales_cbc() (machine_arch_type == MACH_TYPE_THALES_CBC)
#else
# define machine_is_thales_cbc() (0)
#endif
#ifdef CONFIG_MACH_BLUEPOINT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BLUEPOINT
# endif
# define machine_is_bluepoint() (machine_arch_type == MACH_TYPE_BLUEPOINT)
#else
# define machine_is_bluepoint() (0)
#endif
#ifdef CONFIG_MACH_DIR665
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_DIR665
# endif
# define machine_is_dir665() (machine_arch_type == MACH_TYPE_DIR665)
#else
# define machine_is_dir665() (0)
#endif
#ifdef CONFIG_MACH_ACMEROVER1
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ACMEROVER1
# endif
# define machine_is_acmerover1() (machine_arch_type == MACH_TYPE_ACMEROVER1)
#else
# define machine_is_acmerover1() (0)
#endif
#ifdef CONFIG_MACH_SHOOTER_CT
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_SHOOTER_CT
# endif
# define machine_is_shooter_ct() (machine_arch_type == MACH_TYPE_SHOOTER_CT)
#else
# define machine_is_shooter_ct() (0)
#endif
#ifdef CONFIG_MACH_BLISS
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BLISS
# endif
# define machine_is_bliss() (machine_arch_type == MACH_TYPE_BLISS)
#else
# define machine_is_bliss() (0)
#endif
#ifdef CONFIG_MACH_BLISSC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_BLISSC
# endif
# define machine_is_blissc() (machine_arch_type == MACH_TYPE_BLISSC)
#else
# define machine_is_blissc() (0)
#endif
#ifdef CONFIG_MACH_THALES_ADC
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_THALES_ADC
# endif
# define machine_is_thales_adc() (machine_arch_type == MACH_TYPE_THALES_ADC)
#else
# define machine_is_thales_adc() (0)
#endif
#ifdef CONFIG_MACH_UBISYS_P9D_EVP
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_UBISYS_P9D_EVP
# endif
# define machine_is_ubisys_p9d_evp() (machine_arch_type == MACH_TYPE_UBISYS_P9D_EVP)
#else
# define machine_is_ubisys_p9d_evp() (0)
#endif
#ifdef CONFIG_MACH_ATDGP318
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_ATDGP318
# endif
# define machine_is_atdgp318() (machine_arch_type == MACH_TYPE_ATDGP318)
#else
# define machine_is_atdgp318() (0)
#endif
#ifdef CONFIG_MACH_OMAP5_SEVM
# ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type __machine_arch_type
# else
# define machine_arch_type MACH_TYPE_OMAP5_SEVM
# endif
# define machine_is_omap5_sevm() (machine_arch_type == MACH_TYPE_OMAP5_SEVM)
#else
# define machine_is_omap5_sevm() (0)
#endif
/*
* These have not yet been registered
*/
#ifndef machine_arch_type
#define machine_arch_type __machine_arch_type
#endif
#endif
| dan82840/Netgear-RBR40 | git_home/u-boot.git/arch/arm/include/asm/mach-types.h | C | gpl-2.0 | 394,292 | [
30522,
1013,
1008,
1008,
2023,
2001,
8285,
2863,
26715,
2135,
7013,
30524,
13629,
2546,
1035,
1035,
2004,
2213,
1035,
2849,
1035,
24532,
1035,
2828,
1035,
1044,
1001,
9375,
1035,
1035,
2004,
2213,
1035,
2849,
1035,
24532,
1035,
2828,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/******************************************************************************
* ____ ____ _ _ _ *
* /# /_\_ | _ \ (_) __| | (_) ___ _ __ *
* | |/o\o\ | | | | | | / _` | | | / _ \ | '__| *
* | \\_/_/ | |_| | | | | (_| | | | | __/ | | *
* / |_ | |____/ |_| \__,_| |_| \___| |_| *
* | ||\_ ~| *
* | ||| \/ *
* | ||| Project : DLibs : usefull tools for C++ programming *
* \// | *
* || | Developper : Didier FABERT <didier.fabert@gmail.com> *
* ||_ \ Date : 2009, April *
* \_| o| ,__, *
* \___/ Copyright (C) 2009 by didier fabert (oo)____ *
* ||||__ (__) )\ *
* (___)_) File : dexception.h ||--|| * *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
#ifndef DEXCEPTION_H
#define DEXCEPTION_H
#include "dstring.h"
#include <exception>
/**
* @relates DException
* @def DEXCEPTION_INFO
* replace the three arguments : __FILE__, __LINE__, __FUNCTION__ \n
* Usefull for DException declaration because it can be written like this :
* @code
* //DException( message, errnb, __FILE__, __LINE__, __FUNCTION__ )
* DException( message, errnb, DEXCEPTION_INFO );
* @endcode
* @deprecated Use the DEXCEPTION macro instead.
*/
#define DEXCEPTION_INFO __FILE__, __LINE__, __FUNCTION__
/**
* @relates DException
* @def DEXCEPTION(message,errnb).\n
* @param message ( const DString & ) the message of the exception.
* @param errnb ( int ) The error number.
*/
#define DEXCEPTION( message, errnb ) \
DException( message, errnb, __FILE__, __LINE__, __FUNCTION__ )
/**
* @relates DException
* @def DEXCEPTION_XML(message,errnb).\n
* @param message ( const DString & ) the message of the exception.
* @param errnb ( int ) The error number.
*/
#define DEXCEPTION_XML( message, errnb ) \
DException_xml( message, errnb, __FILE__, __LINE__, __FUNCTION__ )
/**
* @relates DException
* @def DEXCEPTION_DB(message,errnb).\n
* @param message ( const DString & ) the message of the exception.
* @param errnb ( int ) The error number.
*/
#define DEXCEPTION_DB( message, errnb ) \
DException_database( message, errnb, __FILE__, __LINE__, __FUNCTION__ )
/**
* @relates DException
* @def DEXCEPTION_CONNECT(message,errnb).\n
* @param message ( const DString & ) the message of the exception.
* @param errnb ( int ) The error number.
*/
#define DEXCEPTION_CONNECT( message, errnb ) \
DException_connection( message, errnb, __FILE__, __LINE__, __FUNCTION__ )
/**
* A class for manage exceptions and report a detailed explanation of why a
* exception was thrown.\n
* A macro is available to set easily the file name, the line number and the
* name of the function : \p EXCEPTION_INFO defined as.\n
* @code
* #define DEXCEPTION_INFO __FILE__,__LINE__,__FUNCTION__
* @endcode
* An exception can be generated by the following code :
* @code
* throw DException(description, errno, DEXCEPTION_INFO);
* @endcode
* And an exception can be catched and a explanation can be gotten by the
* following code in the main program :
* @code
* catch (const DException& e)
* {
* cerr << e.what() << endl;
* }
* @endcode
* @brief Manage exception
* @author Didier Fabert <didier.fabert@gmail.com>
* @include dexception.dox
*/
class DException : public std::exception
{
public:
/**
* Constructor
* @param desc A complete description of the matter.
* @param errnb The error number.
* @param file The source file name where the exception was thrown
* (without any path).
* @param line The source file line number where the exception
* was thrown.
* @param function The function name where the exception was
* thrown.
*/
DException( const DString & desc,
const int errnb,
const DString & file,
const int line,
const DString & function ) throw()
: _description( desc ),
_errno( errnb ),
_file( file ),
_line( line ),
_function( function ) {};
/**
* Object copy
*/
DException( const DException &e ) throw() :
std::exception( e ),
_description( e._description ),
_errno( e._errno ),
_file( e._file ),
_line( e._line ),
_function( e._function ) {}
/**
* Destructor
*/
virtual ~DException() throw() {}
/**
* Object assignation
*/
DException & operator= ( const DException &e ) throw()
{
_description = e._description;
_errno = e._errno;
_file = e._file;
_line = e._line;
_function = e._function;
return *this;
}
/**
* Return explanation of why exception was thrown.
*/
virtual const DString dWhat( void ) const throw()
{
DString buffer, message;
message.clear();
message = "Error (";
buffer.setNum( _errno );
message += buffer;
message += ") from file ";
buffer = _file;
message += buffer.section( "/", -1, -1 );
message += " in function ";
message += _function;
message += " at line ";
buffer.setNum( _line );
message += buffer;
message += " : ";
message += _description;
return message;
}
protected:
/// Description of the matter
DString _description;
/// The error number
int _errno;
/// The file where the exception was thrown
DString _file;
/// The line where the exception was thrown
int _line;
/// The function where the exception was thrown
DString _function;
}; // class DException
/**
* @brief Manage connection exception
* @author Didier Fabert <didier.fabert@gmail.com>
*/
class DException_connection : public DException
{
public:
explicit DException_connection( const DString & desc,
const int errnb,
const DString & file,
const int line,
const DString & function )
: DException( desc, errnb, file, line, function ) {};
~DException_connection() throw() {};
}; // class DException_connection
/**
* @brief Manage database query exception
* @author Didier Fabert <didier.fabert@gmail.com>
*/
class DException_database : public DException
{
public:
explicit DException_database( const DString & desc,
const int errnb,
const DString & file,
const int line,
const DString & function )
: DException( desc, errnb, file, line, function ) {};
~DException_database() throw() {};
}; // class DException_database
/**
* @brief Manage xml parsing exception
* @author Didier Fabert <didier.fabert@gmail.com>
*/
class DException_xml : public DException
{
public:
explicit DException_xml( const DString & desc,
const int errnb,
const DString & file,
const int line,
const DString & function )
: DException( desc, errnb, file, line, function ) {};
~DException_xml() throw() {};
}; // class DException_xml
#endif // DEXCEPTION_H
| didier13150/dlibs | src/dexception.h | C | lgpl-3.0 | 8,787 | [
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-2014 OpenERP (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
""" High-level objects for fields. """
from collections import OrderedDict
from datetime import date, datetime
from functools import partial
from operator import attrgetter
from types import NoneType
import logging
import pytz
import xmlrpclib
from openerp.tools import float_round, frozendict, html_sanitize, ustr, OrderedSet
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DATE_FORMAT
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DATETIME_FORMAT
DATE_LENGTH = len(date.today().strftime(DATE_FORMAT))
DATETIME_LENGTH = len(datetime.now().strftime(DATETIME_FORMAT))
EMPTY_DICT = frozendict()
_logger = logging.getLogger(__name__)
class SpecialValue(object):
""" Encapsulates a value in the cache in place of a normal value. """
def __init__(self, value):
self.value = value
def get(self):
return self.value
class FailedValue(SpecialValue):
""" Special value that encapsulates an exception instead of a value. """
def __init__(self, exception):
self.exception = exception
def get(self):
raise self.exception
def _check_value(value):
""" Return ``value``, or call its getter if ``value`` is a :class:`SpecialValue`. """
return value.get() if isinstance(value, SpecialValue) else value
def resolve_all_mro(cls, name, reverse=False):
""" Return the (successively overridden) values of attribute ``name`` in ``cls``
in mro order, or inverse mro order if ``reverse`` is true.
"""
klasses = reversed(cls.__mro__) if reverse else cls.__mro__
for klass in klasses:
if name in klass.__dict__:
yield klass.__dict__[name]
class MetaField(type):
""" Metaclass for field classes. """
by_type = {}
def __new__(meta, name, bases, attrs):
""" Combine the ``_slots`` dict from parent classes, and determine
``__slots__`` for them on the new class.
"""
base_slots = {}
for base in reversed(bases):
base_slots.update(getattr(base, '_slots', ()))
slots = dict(base_slots)
slots.update(attrs.get('_slots', ()))
attrs['__slots__'] = set(slots) - set(base_slots)
attrs['_slots'] = slots
return type.__new__(meta, name, bases, attrs)
def __init__(cls, name, bases, attrs):
super(MetaField, cls).__init__(name, bases, attrs)
if cls.type and cls.type not in MetaField.by_type:
MetaField.by_type[cls.type] = cls
# compute class attributes to avoid calling dir() on fields
cls.column_attrs = []
cls.related_attrs = []
cls.description_attrs = []
for attr in dir(cls):
if attr.startswith('_column_'):
cls.column_attrs.append((attr[8:], attr))
elif attr.startswith('_related_'):
cls.related_attrs.append((attr[9:], attr))
elif attr.startswith('_description_'):
cls.description_attrs.append((attr[13:], attr))
class Field(object):
""" The field descriptor contains the field definition, and manages accesses
and assignments of the corresponding field on records. The following
attributes may be provided when instanciating a field:
:param string: the label of the field seen by users (string); if not
set, the ORM takes the field name in the class (capitalized).
:param help: the tooltip of the field seen by users (string)
:param readonly: whether the field is readonly (boolean, by default ``False``)
:param required: whether the value of the field is required (boolean, by
default ``False``)
:param index: whether the field is indexed in database (boolean, by
default ``False``)
:param default: the default value for the field; this is either a static
value, or a function taking a recordset and returning a value
:param states: a dictionary mapping state values to lists of UI attribute-value
pairs; possible attributes are: 'readonly', 'required', 'invisible'.
Note: Any state-based condition requires the ``state`` field value to be
available on the client-side UI. This is typically done by including it in
the relevant views, possibly made invisible if not relevant for the
end-user.
:param groups: comma-separated list of group xml ids (string); this
restricts the field access to the users of the given groups only
:param bool copy: whether the field value should be copied when the record
is duplicated (default: ``True`` for normal fields, ``False`` for
``one2many`` and computed fields, including property fields and
related fields)
:param string oldname: the previous name of this field, so that ORM can rename
it automatically at migration
.. _field-computed:
.. rubric:: Computed fields
One can define a field whose value is computed instead of simply being
read from the database. The attributes that are specific to computed
fields are given below. To define such a field, simply provide a value
for the attribute ``compute``.
:param compute: name of a method that computes the field
:param inverse: name of a method that inverses the field (optional)
:param search: name of a method that implement search on the field (optional)
:param store: whether the field is stored in database (boolean, by
default ``False`` on computed fields)
:param compute_sudo: whether the field should be recomputed as superuser
to bypass access rights (boolean, by default ``False``)
The methods given for ``compute``, ``inverse`` and ``search`` are model
methods. Their signature is shown in the following example::
upper = fields.Char(compute='_compute_upper',
inverse='_inverse_upper',
search='_search_upper')
@api.depends('name')
def _compute_upper(self):
for rec in self:
rec.upper = rec.name.upper() if rec.name else False
def _inverse_upper(self):
for rec in self:
rec.name = rec.upper.lower() if rec.upper else False
def _search_upper(self, operator, value):
if operator == 'like':
operator = 'ilike'
return [('name', operator, value)]
The compute method has to assign the field on all records of the invoked
recordset. The decorator :meth:`openerp.api.depends` must be applied on
the compute method to specify the field dependencies; those dependencies
are used to determine when to recompute the field; recomputation is
automatic and guarantees cache/database consistency. Note that the same
method can be used for several fields, you simply have to assign all the
given fields in the method; the method will be invoked once for all
those fields.
By default, a computed field is not stored to the database, and is
computed on-the-fly. Adding the attribute ``store=True`` will store the
field's values in the database. The advantage of a stored field is that
searching on that field is done by the database itself. The disadvantage
is that it requires database updates when the field must be recomputed.
The inverse method, as its name says, does the inverse of the compute
method: the invoked records have a value for the field, and you must
apply the necessary changes on the field dependencies such that the
computation gives the expected value. Note that a computed field without
an inverse method is readonly by default.
The search method is invoked when processing domains before doing an
actual search on the model. It must return a domain equivalent to the
condition: ``field operator value``.
.. _field-related:
.. rubric:: Related fields
The value of a related field is given by following a sequence of
relational fields and reading a field on the reached model. The complete
sequence of fields to traverse is specified by the attribute
:param related: sequence of field names
Some field attributes are automatically copied from the source field if
they are not redefined: ``string``, ``help``, ``readonly``, ``required`` (only
if all fields in the sequence are required), ``groups``, ``digits``, ``size``,
``translate``, ``sanitize``, ``selection``, ``comodel_name``, ``domain``,
``context``. All semantic-free attributes are copied from the source
field.
By default, the values of related fields are not stored to the database.
Add the attribute ``store=True`` to make it stored, just like computed
fields. Related fields are automatically recomputed when their
dependencies are modified.
.. _field-company-dependent:
.. rubric:: Company-dependent fields
Formerly known as 'property' fields, the value of those fields depends
on the company. In other words, users that belong to different companies
may see different values for the field on a given record.
:param company_dependent: whether the field is company-dependent (boolean)
.. _field-incremental-definition:
.. rubric:: Incremental definition
A field is defined as class attribute on a model class. If the model
is extended (see :class:`~openerp.models.Model`), one can also extend
the field definition by redefining a field with the same name and same
type on the subclass. In that case, the attributes of the field are
taken from the parent class and overridden by the ones given in
subclasses.
For instance, the second class below only adds a tooltip on the field
``state``::
class First(models.Model):
_name = 'foo'
state = fields.Selection([...], required=True)
class Second(models.Model):
_inherit = 'foo'
state = fields.Selection(help="Blah blah blah")
"""
__metaclass__ = MetaField
type = None # type of the field (string)
relational = False # whether the field is a relational one
_slots = {
'_attrs': EMPTY_DICT, # dictionary of field attributes; it contains:
# - all attributes after __init__()
# - free attributes only after set_class_name()
'automatic': False, # whether the field is automatically created ("magic" field)
'inherited': False, # whether the field is inherited (_inherits)
'column': None, # the column corresponding to the field
'setup_done': False, # whether the field has been set up
'name': None, # name of the field
'model_name': None, # name of the model of this field
'comodel_name': None, # name of the model of values (if relational)
'store': True, # whether the field is stored in database
'index': False, # whether the field is indexed in database
'manual': False, # whether the field is a custom field
'copy': True, # whether the field is copied over by BaseModel.copy()
'depends': (), # collection of field dependencies
'recursive': False, # whether self depends on itself
'compute': None, # compute(recs) computes field on recs
'compute_sudo': False, # whether field should be recomputed as admin
'inverse': None, # inverse(recs) inverses field on recs
'search': None, # search(recs, operator, value) searches on self
'related': None, # sequence of field names, for related fields
'related_sudo': True, # whether related fields should be read as admin
'company_dependent': False, # whether ``self`` is company-dependent (property field)
'default': None, # default(recs) returns the default value
'string': None, # field label
'help': None, # field tooltip
'readonly': False, # whether the field is readonly
'required': False, # whether the field is required
'states': None, # set readonly and required depending on state
'groups': None, # csv list of group xml ids
'change_default': False, # whether the field may trigger a "user-onchange"
'deprecated': None, # whether the field is deprecated
'inverse_fields': (), # collection of inverse fields (objects)
'computed_fields': (), # fields computed with the same method as self
'related_field': None, # corresponding related field
'_triggers': (), # invalidation and recomputation triggers
}
def __init__(self, string=None, **kwargs):
kwargs['string'] = string
attrs = {key: val for key, val in kwargs.iteritems() if val is not None}
self._attrs = attrs or EMPTY_DICT
def __getattr__(self, name):
""" Access non-slot field attribute. """
try:
return self._attrs[name]
except KeyError:
raise AttributeError(name)
def __setattr__(self, name, value):
""" Set slot or non-slot field attribute. """
try:
object.__setattr__(self, name, value)
except AttributeError:
if self._attrs:
self._attrs[name] = value
else:
self._attrs = {name: value} # replace EMPTY_DICT
def __delattr__(self, name):
""" Remove non-slot field attribute. """
try:
del self._attrs[name]
except KeyError:
raise AttributeError(name)
def new(self, **kwargs):
""" Return a field of the same type as ``self``, with its own parameters. """
return type(self)(**kwargs)
def set_class_name(self, cls, name):
""" Assign the model class and field name of ``self``. """
self_attrs = self._attrs
for attr, value in self._slots.iteritems():
setattr(self, attr, value)
self.model_name = cls._name
self.name = name
# determine all inherited field attributes
attrs = {}
for field in resolve_all_mro(cls, name, reverse=True):
if isinstance(field, type(self)):
attrs.update(field._attrs)
else:
attrs.clear()
attrs.update(self_attrs) # necessary in case self is not in cls
# initialize ``self`` with ``attrs``
if attrs.get('compute'):
# by default, computed fields are not stored, not copied and readonly
attrs['store'] = attrs.get('store', False)
attrs['copy'] = attrs.get('copy', False)
attrs['readonly'] = attrs.get('readonly', not attrs.get('inverse'))
if attrs.get('related'):
# by default, related fields are not stored and not copied
attrs['store'] = attrs.get('store', False)
attrs['copy'] = attrs.get('copy', False)
# fix for function fields overridden by regular columns
if not isinstance(attrs.get('column'), (NoneType, fields.function)):
attrs.pop('store', None)
for attr, value in attrs.iteritems():
setattr(self, attr, value)
if not self.string and not self.related:
# related fields get their string from their parent field
self.string = name.replace('_', ' ').capitalize()
# determine self.default and cls._defaults in a consistent way
self._determine_default(cls, name)
def _determine_default(self, cls, name):
""" Retrieve the default value for ``self`` in the hierarchy of ``cls``, and
determine ``self.default`` and ``cls._defaults`` accordingly.
"""
self.default = None
# traverse the class hierarchy upwards, and take the first field
# definition with a default or _defaults for self
for klass in cls.__mro__:
if name in klass.__dict__:
field = klass.__dict__[name]
if not isinstance(field, type(self)):
# klass contains another value overridden by self
return
if 'default' in field._attrs:
# take the default in field, and adapt it for cls._defaults
value = field._attrs['default']
if callable(value):
from openerp import api
self.default = value
cls._defaults[name] = api.model(
lambda recs: self.convert_to_write(value(recs))
)
else:
self.default = lambda recs: value
cls._defaults[name] = value
return
defaults = klass.__dict__.get('_defaults') or {}
if name in defaults:
# take the value from _defaults, and adapt it for self.default
value = defaults[name]
if callable(value):
func = lambda recs: value(recs._model, recs._cr, recs._uid, recs._context)
else:
func = lambda recs: value
self.default = lambda recs: self.convert_to_cache(
func(recs), recs, validate=False,
)
cls._defaults[name] = value
return
def __str__(self):
return "%s.%s" % (self.model_name, self.name)
def __repr__(self):
return "%s.%s" % (self.model_name, self.name)
############################################################################
#
# Field setup
#
def setup(self, env):
""" Make sure that ``self`` is set up, except for recomputation triggers. """
if not self.setup_done:
if self.related:
self._setup_related(env)
else:
self._setup_regular(env)
self.setup_done = True
#
# Setup of non-related fields
#
def _setup_regular(self, env):
""" Setup the attributes of a non-related field. """
recs = env[self.model_name]
def make_depends(deps):
return tuple(deps(recs) if callable(deps) else deps)
# convert compute into a callable and determine depends
if isinstance(self.compute, basestring):
# if the compute method has been overridden, concatenate all their _depends
self.depends = ()
for method in resolve_all_mro(type(recs), self.compute, reverse=True):
self.depends += make_depends(getattr(method, '_depends', ()))
self.compute = getattr(type(recs), self.compute)
else:
self.depends = make_depends(getattr(self.compute, '_depends', ()))
# convert inverse and search into callables
if isinstance(self.inverse, basestring):
self.inverse = getattr(type(recs), self.inverse)
if isinstance(self.search, basestring):
self.search = getattr(type(recs), self.search)
#
# Setup of related fields
#
def _setup_related(self, env):
""" Setup the attributes of a related field. """
# fix the type of self.related if necessary
if isinstance(self.related, basestring):
self.related = tuple(self.related.split('.'))
# determine the chain of fields, and make sure they are all set up
recs = env[self.model_name]
fields = []
for name in self.related:
field = recs._fields[name]
field.setup(env)
recs = recs[name]
fields.append(field)
self.related_field = field
# check type consistency
if self.type != field.type:
raise Warning("Type of related field %s is inconsistent with %s" % (self, field))
# determine dependencies, compute, inverse, and search
self.depends = ('.'.join(self.related),)
self.compute = self._compute_related
if not (self.readonly or field.readonly):
self.inverse = self._inverse_related
if field._description_searchable:
# allow searching on self only if the related field is searchable
self.search = self._search_related
# copy attributes from field to self (string, help, etc.)
for attr, prop in self.related_attrs:
if not getattr(self, attr):
setattr(self, attr, getattr(field, prop))
for attr, value in field._attrs.iteritems():
if attr not in self._attrs:
setattr(self, attr, value)
# special case for states: copy it only for inherited fields
if not self.states and self.inherited:
self.states = field.states
# special case for required: check if all fields are required
if not self.store and not self.required:
self.required = all(field.required for field in fields)
def _compute_related(self, records):
""" Compute the related field ``self`` on ``records``. """
# when related_sudo, bypass access rights checks when reading values
others = records.sudo() if self.related_sudo else records
for record, other in zip(records, others):
if not record.id:
# draft record, do not switch to another environment
other = record
# traverse the intermediate fields; follow the first record at each step
for name in self.related[:-1]:
other = other[name][:1]
record[self.name] = other[self.related[-1]]
def _inverse_related(self, records):
""" Inverse the related field ``self`` on ``records``. """
# store record values, otherwise they may be lost by cache invalidation!
record_value = {record: record[self.name] for record in records}
for record in records:
other = record
# traverse the intermediate fields, and keep at most one record
for name in self.related[:-1]:
other = other[name][:1]
if other:
other[self.related[-1]] = record_value[record]
def _search_related(self, records, operator, value):
""" Determine the domain to search on field ``self``. """
return [('.'.join(self.related), operator, value)]
# properties used by _setup_related() to copy values from related field
_related_comodel_name = property(attrgetter('comodel_name'))
_related_string = property(attrgetter('string'))
_related_help = property(attrgetter('help'))
_related_readonly = property(attrgetter('readonly'))
_related_groups = property(attrgetter('groups'))
@property
def base_field(self):
""" Return the base field of an inherited field, or ``self``. """
return self.related_field.base_field if self.inherited else self
#
# Setup of field triggers
#
# The triggers is a collection of pairs (field, path) of computed fields
# that depend on ``self``. When ``self`` is modified, it invalidates the cache
# of each ``field``, and registers the records to recompute based on ``path``.
# See method ``modified`` below for details.
#
def add_trigger(self, trigger):
""" Add a recomputation trigger on ``self``. """
if trigger not in self._triggers:
self._triggers += (trigger,)
def setup_triggers(self, env):
""" Add the necessary triggers to invalidate/recompute ``self``. """
model = env[self.model_name]
for path in self.depends:
self._setup_dependency([], model, path.split('.'))
def _setup_dependency(self, path0, model, path1):
""" Make ``self`` depend on ``model``; `path0 + path1` is a dependency of
``self``, and ``path0`` is the sequence of field names from ``self.model``
to ``model``.
"""
env = model.env
head, tail = path1[0], path1[1:]
if head == '*':
# special case: add triggers on all fields of model (except self)
fields = set(model._fields.itervalues()) - set([self])
else:
fields = [model._fields[head]]
for field in fields:
if field == self:
_logger.debug("Field %s is recursively defined", self)
self.recursive = True
continue
#_logger.debug("Add trigger on %s to recompute %s", field, self)
field.add_trigger((self, '.'.join(path0 or ['id'])))
# add trigger on inverse fields, too
for invf in field.inverse_fields:
#_logger.debug("Add trigger on %s to recompute %s", invf, self)
invf.add_trigger((self, '.'.join(path0 + [head])))
# recursively traverse the dependency
if tail:
comodel = env[field.comodel_name]
self._setup_dependency(path0 + [head], comodel, tail)
@property
def dependents(self):
""" Return the computed fields that depend on ``self``. """
return (field for field, path in self._triggers)
############################################################################
#
# Field description
#
def get_description(self, env):
""" Return a dictionary that describes the field ``self``. """
desc = {'type': self.type}
for attr, prop in self.description_attrs:
value = getattr(self, prop)
if callable(value):
value = value(env)
if value is not None:
desc[attr] = value
return desc
# properties used by get_description()
_description_store = property(attrgetter('store'))
_description_manual = property(attrgetter('manual'))
_description_depends = property(attrgetter('depends'))
_description_related = property(attrgetter('related'))
_description_company_dependent = property(attrgetter('company_dependent'))
_description_readonly = property(attrgetter('readonly'))
_description_required = property(attrgetter('required'))
_description_states = property(attrgetter('states'))
_description_groups = property(attrgetter('groups'))
_description_change_default = property(attrgetter('change_default'))
_description_deprecated = property(attrgetter('deprecated'))
@property
def _description_searchable(self):
return bool(self.store or self.search or (self.column and self.column._fnct_search))
@property
def _description_sortable(self):
return self.store or (self.inherited and self.related_field._description_sortable)
def _description_string(self, env):
if self.string and env.lang:
field = self.base_field
name = "%s,%s" % (field.model_name, field.name)
trans = env['ir.translation']._get_source(name, 'field', env.lang)
return trans or self.string
return self.string
def _description_help(self, env):
if self.help and env.lang:
name = "%s,%s" % (self.model_name, self.name)
trans = env['ir.translation']._get_source(name, 'help', env.lang)
return trans or self.help
return self.help
############################################################################
#
# Conversion to column instance
#
def to_column(self):
""" Return a column object corresponding to ``self``, or ``None``. """
if not self.store and self.compute:
# non-stored computed fields do not have a corresponding column
self.column = None
return None
# determine column parameters
#_logger.debug("Create fields._column for Field %s", self)
args = {}
for attr, prop in self.column_attrs:
args[attr] = getattr(self, prop)
for attr, value in self._attrs.iteritems():
args[attr] = value
if self.company_dependent:
# company-dependent fields are mapped to former property fields
args['type'] = self.type
args['relation'] = self.comodel_name
self.column = fields.property(**args)
elif self.column:
# let the column provide a valid column for the given parameters
self.column = self.column.new(_computed_field=bool(self.compute), **args)
else:
# create a fresh new column of the right type
self.column = getattr(fields, self.type)(**args)
return self.column
# properties used by to_column() to create a column instance
_column_copy = property(attrgetter('copy'))
_column_select = property(attrgetter('index'))
_column_manual = property(attrgetter('manual'))
_column_string = property(attrgetter('string'))
_column_help = property(attrgetter('help'))
_column_readonly = property(attrgetter('readonly'))
_column_required = property(attrgetter('required'))
_column_states = property(attrgetter('states'))
_column_groups = property(attrgetter('groups'))
_column_change_default = property(attrgetter('change_default'))
_column_deprecated = property(attrgetter('deprecated'))
############################################################################
#
# Conversion of values
#
def null(self, env):
""" return the null value for this field in the given environment """
return False
def convert_to_cache(self, value, record, validate=True):
""" convert ``value`` to the cache level in ``env``; ``value`` may come from
an assignment, or have the format of methods :meth:`BaseModel.read`
or :meth:`BaseModel.write`
:param record: the target record for the assignment, or an empty recordset
:param bool validate: when True, field-specific validation of
``value`` will be performed
"""
return value
def convert_to_read(self, value, use_name_get=True):
""" convert ``value`` from the cache to a value as returned by method
:meth:`BaseModel.read`
:param bool use_name_get: when True, value's diplay name will
be computed using :meth:`BaseModel.name_get`, if relevant
for the field
"""
return False if value is None else value
def convert_to_write(self, value, target=None, fnames=None):
""" convert ``value`` from the cache to a valid value for method
:meth:`BaseModel.write`.
:param target: optional, the record to be modified with this value
:param fnames: for relational fields only, an optional collection of
field names to convert
"""
return self.convert_to_read(value)
def convert_to_onchange(self, value):
""" convert ``value`` from the cache to a valid value for an onchange
method v7.
"""
return self.convert_to_write(value)
def convert_to_export(self, value, env):
""" convert ``value`` from the cache to a valid value for export. The
parameter ``env`` is given for managing translations.
"""
if not value:
return ''
return value if env.context.get('export_raw_data') else ustr(value)
def convert_to_display_name(self, value, record=None):
""" convert ``value`` from the cache to a suitable display name. """
return ustr(value)
############################################################################
#
# Descriptor methods
#
def __get__(self, record, owner):
""" return the value of field ``self`` on ``record`` """
if record is None:
return self # the field is accessed through the owner class
if not record:
# null record -> return the null value for this field
return self.null(record.env)
# only a single record may be accessed
record.ensure_one()
try:
return record._cache[self]
except KeyError:
pass
# cache miss, retrieve value
if record.id:
# normal record -> read or compute value for this field
self.determine_value(record)
else:
# draft record -> compute the value or let it be null
self.determine_draft_value(record)
# the result should be in cache now
return record._cache[self]
def __set__(self, record, value):
""" set the value of field ``self`` on ``record`` """
env = record.env
# only a single record may be updated
record.ensure_one()
# adapt value to the cache level
value = self.convert_to_cache(value, record)
if env.in_draft or not record.id:
# determine dependent fields
spec = self.modified_draft(record)
# set value in cache, inverse field, and mark record as dirty
record._cache[self] = value
if env.in_onchange:
for invf in self.inverse_fields:
invf._update(value, record)
record._set_dirty(self.name)
# determine more dependent fields, and invalidate them
if self.relational:
spec += self.modified_draft(record)
env.invalidate(spec)
else:
# simply write to the database, and update cache
record.write({self.name: self.convert_to_write(value)})
record._cache[self] = value
############################################################################
#
# Computation of field values
#
def _compute_value(self, records):
""" Invoke the compute method on ``records``. """
# initialize the fields to their corresponding null value in cache
for field in self.computed_fields:
records._cache[field] = field.null(records.env)
records.env.computed[field].update(records._ids)
self.compute(records)
for field in self.computed_fields:
records.env.computed[field].difference_update(records._ids)
def compute_value(self, records):
""" Invoke the compute method on ``records``; the results are in cache. """
with records.env.do_in_draft():
try:
self._compute_value(records)
except (AccessError, MissingError):
# some record is forbidden or missing, retry record by record
for record in records:
try:
self._compute_value(record)
except Exception as exc:
record._cache[self.name] = FailedValue(exc)
def determine_value(self, record):
""" Determine the value of ``self`` for ``record``. """
env = record.env
if self.column and not (self.depends and env.in_draft):
# this is a stored field or an old-style function field
if self.depends:
# this is a stored computed field, check for recomputation
recs = record._recompute_check(self)
if recs:
# recompute the value (only in cache)
self.compute_value(recs)
# HACK: if result is in the wrong cache, copy values
if recs.env != env:
for source, target in zip(recs, recs.with_env(env)):
try:
values = target._convert_to_cache({
f.name: source[f.name] for f in self.computed_fields
}, validate=False)
except MissingError as e:
values = FailedValue(e)
target._cache.update(values)
# the result is saved to database by BaseModel.recompute()
return
# read the field from database
record._prefetch_field(self)
elif self.compute:
# this is either a non-stored computed field, or a stored computed
# field in draft mode
if self.recursive:
self.compute_value(record)
else:
recs = record._in_cache_without(self)
self.compute_value(recs)
else:
# this is a non-stored non-computed field
record._cache[self] = self.null(env)
def determine_draft_value(self, record):
""" Determine the value of ``self`` for the given draft ``record``. """
if self.compute:
self._compute_value(record)
else:
record._cache[self] = SpecialValue(self.null(record.env))
def determine_inverse(self, records):
""" Given the value of ``self`` on ``records``, inverse the computation. """
if self.inverse:
self.inverse(records)
def determine_domain(self, records, operator, value):
""" Return a domain representing a condition on ``self``. """
if self.search:
return self.search(records, operator, value)
else:
return [(self.name, operator, value)]
############################################################################
#
# Notification when fields are modified
#
def modified(self, records):
""" Notify that field ``self`` has been modified on ``records``: prepare the
fields/records to recompute, and return a spec indicating what to
invalidate.
"""
# invalidate the fields that depend on self, and prepare recomputation
spec = [(self, records._ids)]
for field, path in self._triggers:
if path and field.store:
# don't move this line to function top, see log
env = records.env(user=SUPERUSER_ID, context={'active_test': False})
target = env[field.model_name].search([(path, 'in', records.ids)])
if target:
spec.append((field, target._ids))
# recompute field on target in the environment of records,
# and as user admin if required
if field.compute_sudo:
target = target.with_env(records.env(user=SUPERUSER_ID))
else:
target = target.with_env(records.env)
target._recompute_todo(field)
else:
spec.append((field, None))
return spec
def modified_draft(self, records):
""" Same as :meth:`modified`, but in draft mode. """
env = records.env
# invalidate the fields on the records in cache that depend on
# ``records``, except fields currently being computed
spec = []
for field, path in self._triggers:
target = env[field.model_name]
computed = target.browse(env.computed[field])
if path == 'id':
target = records - computed
elif path:
target = (target.browse(env.cache[field]) - computed).filtered(
lambda rec: rec._mapped_cache(path) & records
)
else:
target = target.browse(env.cache[field]) - computed
if target:
spec.append((field, target._ids))
return spec
class Boolean(Field):
type = 'boolean'
def convert_to_cache(self, value, record, validate=True):
return bool(value)
def convert_to_export(self, value, env):
if env.context.get('export_raw_data'):
return value
return ustr(value)
class Integer(Field):
type = 'integer'
_slots = {
'group_operator': None, # operator for aggregating values
'group_expression': None, # advance expression for aggregating values
}
_related_group_operator = property(attrgetter('group_operator'))
_column_group_operator = property(attrgetter('group_operator'))
_related_group_expression = property(attrgetter('group_expression'))
_column_group_expression = property(attrgetter('group_expression'))
def convert_to_cache(self, value, record, validate=True):
if isinstance(value, dict):
# special case, when an integer field is used as inverse for a one2many
return value.get('id', False)
return int(value or 0)
def convert_to_read(self, value, use_name_get=True):
# Integer values greater than 2^31-1 are not supported in pure XMLRPC,
# so we have to pass them as floats :-(
if value and value > xmlrpclib.MAXINT:
return float(value)
return value
def _update(self, records, value):
# special case, when an integer field is used as inverse for a one2many
records._cache[self] = value.id or 0
def convert_to_export(self, value, env):
if value or value == 0:
return value if env.context.get('export_raw_data') else ustr(value)
return ''
class Float(Field):
""" The precision digits are given by the attribute
:param digits: a pair (total, decimal), or a function taking a database
cursor and returning a pair (total, decimal)
"""
type = 'float'
_slots = {
'_digits': None, # digits argument passed to class initializer
'group_operator': None, # operator for aggregating values
'group_expression': None, # advance expression for aggregating values
}
def __init__(self, string=None, digits=None, **kwargs):
super(Float, self).__init__(string=string, _digits=digits, **kwargs)
@property
def digits(self):
if callable(self._digits):
with fields._get_cursor() as cr:
return self._digits(cr)
else:
return self._digits
def _setup_digits(self, env):
""" Setup the digits for ``self`` and its corresponding column """
pass
def _setup_regular(self, env):
super(Float, self)._setup_regular(env)
self._setup_digits(env)
_related__digits = property(attrgetter('_digits'))
_related_group_operator = property(attrgetter('group_operator'))
_related_group_expression = property(attrgetter('group_expression'))
_description_digits = property(attrgetter('digits'))
_column_digits = property(lambda self: not callable(self._digits) and self._digits)
_column_digits_compute = property(lambda self: callable(self._digits) and self._digits)
_column_group_operator = property(attrgetter('group_operator'))
_column_group_expression = property(attrgetter('group_expression'))
def convert_to_cache(self, value, record, validate=True):
# apply rounding here, otherwise value in cache may be wrong!
value = float(value or 0.0)
digits = self.digits
return float_round(value, precision_digits=digits[1]) if digits else value
def convert_to_export(self, value, env):
if value or value == 0.0:
return value if env.context.get('export_raw_data') else ustr(value)
return ''
class _String(Field):
""" Abstract class for string fields. """
_slots = {
'translate': False, # whether the field is translated
}
_column_translate = property(attrgetter('translate'))
_related_translate = property(attrgetter('translate'))
_description_translate = property(attrgetter('translate'))
class Char(_String):
""" Basic string field, can be length-limited, usually displayed as a
single-line string in clients
:param int size: the maximum size of values stored for that field
:param bool translate: whether the values of this field can be translated
"""
type = 'char'
_slots = {
'size': None, # maximum size of values (deprecated)
}
_column_size = property(attrgetter('size'))
_related_size = property(attrgetter('size'))
_description_size = property(attrgetter('size'))
def _setup_regular(self, env):
super(Char, self)._setup_regular(env)
assert isinstance(self.size, (NoneType, int)), \
"Char field %s with non-integer size %r" % (self, self.size)
def convert_to_cache(self, value, record, validate=True):
if value is None or value is False:
return False
return ustr(value)[:self.size]
class Text(_String):
""" Very similar to :class:`~.Char` but used for longer contents, does not
have a size and usually displayed as a multiline text box.
:param translate: whether the value of this field can be translated
"""
type = 'text'
def convert_to_cache(self, value, record, validate=True):
if value is None or value is False:
return False
return ustr(value)
class Html(_String):
type = 'html'
_slots = {
'sanitize': True, # whether value must be sanitized
'strip_style': False, # whether to strip style attributes
}
_column_sanitize = property(attrgetter('sanitize'))
_related_sanitize = property(attrgetter('sanitize'))
_description_sanitize = property(attrgetter('sanitize'))
_column_strip_style = property(attrgetter('strip_style'))
_related_strip_style = property(attrgetter('strip_style'))
_description_strip_style = property(attrgetter('strip_style'))
def convert_to_cache(self, value, record, validate=True):
if value is None or value is False:
return False
if validate and self.sanitize:
return html_sanitize(value, strip_style=self.strip_style)
return value
class Date(Field):
type = 'date'
@staticmethod
def today(*args):
""" Return the current day in the format expected by the ORM.
This function may be used to compute default values.
"""
return date.today().strftime(DATE_FORMAT)
@staticmethod
def context_today(record, timestamp=None):
""" Return the current date as seen in the client's timezone in a format
fit for date fields. This method may be used to compute default
values.
:param datetime timestamp: optional datetime value to use instead of
the current date and time (must be a datetime, regular dates
can't be converted between timezones.)
:rtype: str
"""
today = timestamp or datetime.now()
context_today = None
tz_name = record._context.get('tz') or record.env.user.tz
if tz_name:
try:
today_utc = pytz.timezone('UTC').localize(today, is_dst=False) # UTC = no DST
context_today = today_utc.astimezone(pytz.timezone(tz_name))
except Exception:
_logger.debug("failed to compute context/client-specific today date, using UTC value for `today`",
exc_info=True)
return (context_today or today).strftime(DATE_FORMAT)
@staticmethod
def from_string(value):
""" Convert an ORM ``value`` into a :class:`date` value. """
if not value:
return None
value = value[:DATE_LENGTH]
return datetime.strptime(value, DATE_FORMAT).date()
@staticmethod
def to_string(value):
""" Convert a :class:`date` value into the format expected by the ORM. """
return value.strftime(DATE_FORMAT) if value else False
def convert_to_cache(self, value, record, validate=True):
if not value:
return False
if isinstance(value, basestring):
if validate:
# force parsing for validation
self.from_string(value)
return value[:DATE_LENGTH]
return self.to_string(value)
def convert_to_export(self, value, env):
if not value:
return ''
return self.from_string(value) if env.context.get('export_raw_data') else ustr(value)
class Datetime(Field):
type = 'datetime'
@staticmethod
def now(*args):
""" Return the current day and time in the format expected by the ORM.
This function may be used to compute default values.
"""
return datetime.now().strftime(DATETIME_FORMAT)
@staticmethod
def context_timestamp(record, timestamp):
"""Returns the given timestamp converted to the client's timezone.
This method is *not* meant for use as a _defaults initializer,
because datetime fields are automatically converted upon
display on client side. For _defaults you :meth:`fields.datetime.now`
should be used instead.
:param datetime timestamp: naive datetime value (expressed in UTC)
to be converted to the client timezone
:rtype: datetime
:return: timestamp converted to timezone-aware datetime in context
timezone
"""
assert isinstance(timestamp, datetime), 'Datetime instance expected'
tz_name = record._context.get('tz') or record.env.user.tz
utc_timestamp = pytz.utc.localize(timestamp, is_dst=False) # UTC = no DST
if tz_name:
try:
context_tz = pytz.timezone(tz_name)
return utc_timestamp.astimezone(context_tz)
except Exception:
_logger.debug("failed to compute context/client-specific timestamp, "
"using the UTC value",
exc_info=True)
return utc_timestamp
@staticmethod
def from_string(value):
""" Convert an ORM ``value`` into a :class:`datetime` value. """
if not value:
return None
value = value[:DATETIME_LENGTH]
if len(value) == DATE_LENGTH:
value += " 00:00:00"
return datetime.strptime(value, DATETIME_FORMAT)
@staticmethod
def to_string(value):
""" Convert a :class:`datetime` value into the format expected by the ORM. """
return value.strftime(DATETIME_FORMAT) if value else False
def convert_to_cache(self, value, record, validate=True):
if not value:
return False
if isinstance(value, basestring):
if validate:
# force parsing for validation
self.from_string(value)
value = value[:DATETIME_LENGTH]
if len(value) == DATE_LENGTH:
value += " 00:00:00"
return value
return self.to_string(value)
def convert_to_export(self, value, env):
if not value:
return ''
return self.from_string(value) if env.context.get('export_raw_data') else ustr(value)
def convert_to_display_name(self, value, record=None):
assert record, 'Record expected'
return Datetime.to_string(Datetime.context_timestamp(record, Datetime.from_string(value)))
class Binary(Field):
type = 'binary'
class Selection(Field):
"""
:param selection: specifies the possible values for this field.
It is given as either a list of pairs (``value``, ``string``), or a
model method, or a method name.
:param selection_add: provides an extension of the selection in the case
of an overridden field. It is a list of pairs (``value``, ``string``).
The attribute ``selection`` is mandatory except in the case of
:ref:`related fields <field-related>` or :ref:`field extensions
<field-incremental-definition>`.
"""
type = 'selection'
_slots = {
'selection': None, # [(value, string), ...], function or method name
}
def __init__(self, selection=None, string=None, **kwargs):
if callable(selection):
from openerp import api
selection = api.expected(api.model, selection)
super(Selection, self).__init__(selection=selection, string=string, **kwargs)
def _setup_regular(self, env):
super(Selection, self)._setup_regular(env)
assert self.selection is not None, "Field %s without selection" % self
def _setup_related(self, env):
super(Selection, self)._setup_related(env)
# selection must be computed on related field
field = self.related_field
self.selection = lambda model: field._description_selection(model.env)
def set_class_name(self, cls, name):
super(Selection, self).set_class_name(cls, name)
# determine selection (applying 'selection_add' extensions)
for field in resolve_all_mro(cls, name, reverse=True):
if isinstance(field, type(self)):
# We cannot use field.selection or field.selection_add here
# because those attributes are overridden by ``set_class_name``.
if 'selection' in field._attrs:
self.selection = field._attrs['selection']
if 'selection_add' in field._attrs:
# use an OrderedDict to update existing values
selection_add = field._attrs['selection_add']
self.selection = OrderedDict(self.selection + selection_add).items()
else:
self.selection = None
def _description_selection(self, env):
""" return the selection list (pairs (value, label)); labels are
translated according to context language
"""
selection = self.selection
if isinstance(selection, basestring):
return getattr(env[self.model_name], selection)()
if callable(selection):
return selection(env[self.model_name])
# translate selection labels
if env.lang:
name = "%s,%s" % (self.model_name, self.name)
translate = partial(
env['ir.translation']._get_source, name, 'selection', env.lang)
return [(value, translate(label) if label else label) for value, label in selection]
else:
return selection
@property
def _column_selection(self):
if isinstance(self.selection, basestring):
method = self.selection
return lambda self, *a, **kw: getattr(self, method)(*a, **kw)
else:
return self.selection
def get_values(self, env):
""" return a list of the possible values """
selection = self.selection
if isinstance(selection, basestring):
selection = getattr(env[self.model_name], selection)()
elif callable(selection):
selection = selection(env[self.model_name])
return [value for value, _ in selection]
def convert_to_cache(self, value, record, validate=True):
if not validate:
return value or False
if value in self.get_values(record.env):
return value
elif not value:
return False
raise ValueError("Wrong value for %s: %r" % (self, value))
def convert_to_export(self, value, env):
if not isinstance(self.selection, list):
# FIXME: this reproduces an existing buggy behavior!
return value if value else ''
for item in self._description_selection(env):
if item[0] == value:
return item[1]
return False
class Reference(Selection):
type = 'reference'
_slots = {
'size': None, # maximum size of values (deprecated)
}
_related_size = property(attrgetter('size'))
_column_size = property(attrgetter('size'))
def _setup_regular(self, env):
super(Reference, self)._setup_regular(env)
assert isinstance(self.size, (NoneType, int)), \
"Reference field %s with non-integer size %r" % (self, self.size)
def convert_to_cache(self, value, record, validate=True):
if isinstance(value, BaseModel):
if ((not validate or value._name in self.get_values(record.env))
and len(value) <= 1):
return value.with_env(record.env) or False
elif isinstance(value, basestring):
res_model, res_id = value.split(',')
return record.env[res_model].browse(int(res_id))
elif not value:
return False
raise ValueError("Wrong value for %s: %r" % (self, value))
def convert_to_read(self, value, use_name_get=True):
return "%s,%s" % (value._name, value.id) if value else False
def convert_to_export(self, value, env):
return value.name_get()[0][1] if value else ''
def convert_to_display_name(self, value, record=None):
return ustr(value and value.display_name)
class _Relational(Field):
""" Abstract class for relational fields. """
relational = True
_slots = {
'domain': [], # domain for searching values
'context': {}, # context for searching values
}
def _setup_regular(self, env):
super(_Relational, self)._setup_regular(env)
if self.comodel_name not in env.registry:
_logger.warning("Field %s with unknown comodel_name %r"
% (self, self.comodel_name))
self.comodel_name = '_unknown'
@property
def _related_domain(self):
if callable(self.domain):
# will be called with another model than self's
return lambda recs: self.domain(recs.env[self.model_name])
else:
# maybe not correct if domain is a string...
return self.domain
_related_context = property(attrgetter('context'))
_description_relation = property(attrgetter('comodel_name'))
_description_context = property(attrgetter('context'))
def _description_domain(self, env):
return self.domain(env[self.model_name]) if callable(self.domain) else self.domain
_column_obj = property(attrgetter('comodel_name'))
_column_domain = property(attrgetter('domain'))
_column_context = property(attrgetter('context'))
def null(self, env):
return env[self.comodel_name]
def modified(self, records):
# Invalidate cache for self.inverse_fields, too. Note that recomputation
# of fields that depend on self.inverse_fields is already covered by the
# triggers (see above).
spec = super(_Relational, self).modified(records)
for invf in self.inverse_fields:
spec.append((invf, None))
return spec
class Many2one(_Relational):
""" The value of such a field is a recordset of size 0 (no
record) or 1 (a single record).
:param comodel_name: name of the target model (string)
:param domain: an optional domain to set on candidate values on the
client side (domain or string)
:param context: an optional context to use on the client side when
handling that field (dictionary)
:param ondelete: what to do when the referred record is deleted;
possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
:param auto_join: whether JOINs are generated upon search through that
field (boolean, by default ``False``)
:param delegate: set it to ``True`` to make fields of the target model
accessible from the current model (corresponds to ``_inherits``)
The attribute ``comodel_name`` is mandatory except in the case of related
fields or field extensions.
"""
type = 'many2one'
_slots = {
'ondelete': 'set null', # what to do when value is deleted
'auto_join': False, # whether joins are generated upon search
'delegate': False, # whether self implements delegation
}
def __init__(self, comodel_name=None, string=None, **kwargs):
super(Many2one, self).__init__(comodel_name=comodel_name, string=string, **kwargs)
def set_class_name(self, cls, name):
super(Many2one, self).set_class_name(cls, name)
# determine self.delegate
if not self.delegate:
self.delegate = name in cls._inherits.values()
_column_ondelete = property(attrgetter('ondelete'))
_column_auto_join = property(attrgetter('auto_join'))
def _update(self, records, value):
""" Update the cached value of ``self`` for ``records`` with ``value``. """
records._cache[self] = value
def convert_to_cache(self, value, record, validate=True):
if isinstance(value, (NoneType, int, long)):
return record.env[self.comodel_name].browse(value)
if isinstance(value, BaseModel):
if value._name == self.comodel_name and len(value) <= 1:
return value.with_env(record.env)
raise ValueError("Wrong value for %s: %r" % (self, value))
elif isinstance(value, tuple):
return record.env[self.comodel_name].browse(value[0])
elif isinstance(value, dict):
return record.env[self.comodel_name].new(value)
else:
return self.null(record.env)
def convert_to_read(self, value, use_name_get=True):
if use_name_get and value:
# evaluate name_get() as superuser, because the visibility of a
# many2one field value (id and name) depends on the current record's
# access rights, and not the value's access rights.
try:
value_sudo = value.sudo()
# performance trick: make sure that all records of the same
# model as value in value.env will be prefetched in value_sudo.env
value_sudo.env.prefetch[value._name].update(value.env.prefetch[value._name])
return value_sudo.name_get()[0]
except MissingError:
# Should not happen, unless the foreign key is missing.
return False
else:
return value.id
def convert_to_write(self, value, target=None, fnames=None):
return value.id
def convert_to_onchange(self, value):
return value.id
def convert_to_export(self, value, env):
return value.name_get()[0][1] if value else ''
def convert_to_display_name(self, value, record=None):
return ustr(value.display_name)
class UnionUpdate(SpecialValue):
""" Placeholder for a value update; when this value is taken from the cache,
it returns ``record[field.name] | value`` and stores it in the cache.
"""
def __init__(self, field, record, value):
self.args = (field, record, value)
def get(self):
field, record, value = self.args
# in order to read the current field's value, remove self from cache
del record._cache[field]
# read the current field's value, and update it in cache only
record._cache[field] = new_value = record[field.name] | value
return new_value
class _RelationalMulti(_Relational):
""" Abstract class for relational fields *2many. """
def _update(self, records, value):
""" Update the cached value of ``self`` for ``records`` with ``value``. """
for record in records:
if self in record._cache:
record._cache[self] = record[self.name] | value
else:
record._cache[self] = UnionUpdate(self, record, value)
def convert_to_cache(self, value, record, validate=True):
if isinstance(value, BaseModel):
if value._name == self.comodel_name:
return value.with_env(record.env)
elif isinstance(value, list):
# value is a list of record ids or commands
comodel = record.env[self.comodel_name]
ids = OrderedSet(record[self.name].ids)
# modify ids with the commands
for command in value:
if isinstance(command, (tuple, list)):
if command[0] == 0:
ids.add(comodel.new(command[2]).id)
elif command[0] == 1:
comodel.browse(command[1]).update(command[2])
ids.add(command[1])
elif command[0] == 2:
# note: the record will be deleted by write()
ids.discard(command[1])
elif command[0] == 3:
ids.discard(command[1])
elif command[0] == 4:
ids.add(command[1])
elif command[0] == 5:
ids.clear()
elif command[0] == 6:
ids = OrderedSet(command[2])
elif isinstance(command, dict):
ids.add(comodel.new(command).id)
else:
ids.add(command)
# return result as a recordset
return comodel.browse(list(ids))
elif not value:
return self.null(record.env)
raise ValueError("Wrong value for %s: %s" % (self, value))
def convert_to_read(self, value, use_name_get=True):
return value.ids
def convert_to_write(self, value, target=None, fnames=None):
# remove/delete former records
if target is None:
set_ids = []
result = [(6, 0, set_ids)]
add_existing = lambda id: set_ids.append(id)
else:
tag = 2 if self.type == 'one2many' else 3
result = [(tag, record.id) for record in target[self.name] - value]
add_existing = lambda id: result.append((4, id))
if fnames is None:
# take all fields in cache, except the inverses of self
fnames = set(value._fields) - set(MAGIC_COLUMNS)
for invf in self.inverse_fields:
fnames.discard(invf.name)
# add new and existing records
for record in value:
if not record.id:
values = {k: v for k, v in record._cache.iteritems() if k in fnames}
values = record._convert_to_write(values)
result.append((0, 0, values))
elif record._is_dirty():
values = {k: record._cache[k] for k in record._get_dirty() if k in fnames}
values = record._convert_to_write(values)
result.append((1, record.id, values))
else:
add_existing(record.id)
return result
def convert_to_export(self, value, env):
return ','.join(name for id, name in value.name_get()) if value else ''
def convert_to_display_name(self, value, record=None):
raise NotImplementedError()
def _compute_related(self, records):
""" Compute the related field ``self`` on ``records``. """
for record in records:
value = record
# traverse the intermediate fields, and keep at most one record
for name in self.related[:-1]:
value = value[name][:1]
record[self.name] = value[self.related[-1]]
class One2many(_RelationalMulti):
""" One2many field; the value of such a field is the recordset of all the
records in ``comodel_name`` such that the field ``inverse_name`` is equal to
the current record.
:param comodel_name: name of the target model (string)
:param inverse_name: name of the inverse ``Many2one`` field in
``comodel_name`` (string)
:param domain: an optional domain to set on candidate values on the
client side (domain or string)
:param context: an optional context to use on the client side when
handling that field (dictionary)
:param auto_join: whether JOINs are generated upon search through that
field (boolean, by default ``False``)
:param limit: optional limit to use upon read (integer)
The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
the case of related fields or field extensions.
"""
type = 'one2many'
_slots = {
'inverse_name': None, # name of the inverse field
'auto_join': False, # whether joins are generated upon search
'limit': None, # optional limit to use upon read
'copy': False, # o2m are not copied by default
}
def __init__(self, comodel_name=None, inverse_name=None, string=None, **kwargs):
super(One2many, self).__init__(
comodel_name=comodel_name,
inverse_name=inverse_name,
string=string,
**kwargs
)
def _setup_regular(self, env):
super(One2many, self)._setup_regular(env)
if self.inverse_name:
# link self to its inverse field and vice-versa
comodel = env[self.comodel_name]
invf = comodel._fields[self.inverse_name]
# In some rare cases, a ``One2many`` field can link to ``Int`` field
# (res_model/res_id pattern). Only inverse the field if this is
# a ``Many2one`` field.
if isinstance(invf, Many2one):
self.inverse_fields += (invf,)
invf.inverse_fields += (self,)
_description_relation_field = property(attrgetter('inverse_name'))
_column_fields_id = property(attrgetter('inverse_name'))
_column_auto_join = property(attrgetter('auto_join'))
_column_limit = property(attrgetter('limit'))
class Many2many(_RelationalMulti):
""" Many2many field; the value of such a field is the recordset.
:param comodel_name: name of the target model (string)
The attribute ``comodel_name`` is mandatory except in the case of related
fields or field extensions.
:param relation: optional name of the table that stores the relation in
the database (string)
:param column1: optional name of the column referring to "these" records
in the table ``relation`` (string)
:param column2: optional name of the column referring to "those" records
in the table ``relation`` (string)
The attributes ``relation``, ``column1`` and ``column2`` are optional. If not
given, names are automatically generated from model names, provided
``model_name`` and ``comodel_name`` are different!
:param domain: an optional domain to set on candidate values on the
client side (domain or string)
:param context: an optional context to use on the client side when
handling that field (dictionary)
:param limit: optional limit to use upon read (integer)
"""
type = 'many2many'
_slots = {
'relation': None, # name of table
'column1': None, # column of table referring to model
'column2': None, # column of table referring to comodel
'limit': None, # optional limit to use upon read
}
def __init__(self, comodel_name=None, relation=None, column1=None, column2=None,
string=None, **kwargs):
super(Many2many, self).__init__(
comodel_name=comodel_name,
relation=relation,
column1=column1,
column2=column2,
string=string,
**kwargs
)
def _setup_regular(self, env):
super(Many2many, self)._setup_regular(env)
if not self.relation and self.store:
# retrieve self.relation from the corresponding column
column = self.to_column()
if isinstance(column, fields.many2many):
self.relation, self.column1, self.column2 = \
column._sql_names(env[self.model_name])
if self.relation:
m2m = env.registry._m2m
# if inverse field has already been setup, it is present in m2m
invf = m2m.get((self.relation, self.column2, self.column1))
if invf:
self.inverse_fields += (invf,)
invf.inverse_fields += (self,)
else:
# add self in m2m, so that its inverse field can find it
m2m[(self.relation, self.column1, self.column2)] = self
_column_rel = property(attrgetter('relation'))
_column_id1 = property(attrgetter('column1'))
_column_id2 = property(attrgetter('column2'))
_column_limit = property(attrgetter('limit'))
class Serialized(Field):
""" Minimal support for existing sparse and serialized fields. """
type = 'serialized'
def convert_to_cache(self, value, record, validate=True):
return value or {}
class Id(Field):
""" Special case for field 'id'. """
type = 'integer'
_slots = {
'string': 'ID',
'store': True,
'readonly': True,
}
def to_column(self):
self.column = fields.integer(self.string)
return self.column
def __get__(self, record, owner):
if record is None:
return self # the field is accessed through the class owner
if not record:
return False
return record.ensure_one()._ids[0]
def __set__(self, record, value):
raise TypeError("field 'id' cannot be assigned")
# imported here to avoid dependency cycle issues
from openerp import SUPERUSER_ID, registry
from .exceptions import Warning, AccessError, MissingError
from .models import BaseModel, MAGIC_COLUMNS
from .osv import fields
| Antiun/odoo | openerp/fields.py | Python | agpl-3.0 | 75,603 | [
30522,
1001,
1011,
1008,
1011,
16861,
1024,
21183,
2546,
1011,
1022,
1011,
1008,
1011,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
Copyright 2020 University of Toronto
This file is part of TMG-Framework for XTMF2.
TMG-Framework for XTMF2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TMG-Framework for XTMF2 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with TMG-Framework for XTMF2. If not, see <http://www.gnu.org/licenses/>.
*/
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.IO;
using TMG;
using TMG.Frameworks.Data.Processing.AST;
using TMG.Processing;
using TMG.Test.Utilities;
namespace TMG.Test.Processing
{
[TestClass]
public class TestAppendMatrixValueToCSV
{
[TestMethod]
public void AppendMatrixValueToCSV()
{
string csvFileName = Path.GetTempFileName();
string processedCsvFileName = Path.GetTempFileName();
try
{
var zoneSystem = MapHelper.LoadMap(64);
var matrix = new Matrix(zoneSystem, zoneSystem);
// Setup matrix
matrix.GetFromSparseIndexes(5, 2) = 10;
matrix.GetFromSparseIndexes(2, 5) = 11;
matrix.GetFromSparseIndexes(10, 4) = 12;
matrix.GetFromSparseIndexes(4, 10) = 13;
// Setup CSV
using (var writer = new StreamWriter(csvFileName))
{
writer.WriteLine("O,D,OtherData");
writer.WriteLine("5,2,ABC");
writer.WriteLine("2,5,DEF");
writer.WriteLine("10,4,GHI");
writer.WriteLine("4,10,GHI");
}
using (var readStream = Helper.CreateReadStreamFromFile(csvFileName))
using (var writeStream = Helper.CreateWriteStreamFromFile(processedCsvFileName))
{
// Run append
AppendMatrixValueToCSV appendModule = new AppendMatrixValueToCSV()
{
Name = "Append",
Matrix = Helper.CreateParameter(matrix, "Matrix"),
RowIndex = Helper.CreateParameter(0),
ColumnIndex = Helper.CreateParameter(1),
ColumnName = Helper.CreateParameter("MatrixValue"),
InputStream = Helper.CreateParameter(readStream, "Reader"),
OutputStream = Helper.CreateParameter(writeStream, "Writer")
};
appendModule.Invoke();
}
// Test Results
using (var reader = new StreamReader(processedCsvFileName))
{
Assert.AreEqual("O,D,OtherData,MatrixValue", reader.ReadLine());
Assert.AreEqual("5,2,ABC,10", reader.ReadLine());
Assert.AreEqual("2,5,DEF,11", reader.ReadLine());
Assert.AreEqual("10,4,GHI,12", reader.ReadLine());
Assert.AreEqual("4,10,GHI,13", reader.ReadLine());
Assert.AreEqual(null, reader.ReadLine());
}
}
finally
{
if (File.Exists(csvFileName))
{
File.Delete(csvFileName);
}
if (File.Exists(processedCsvFileName))
{
File.Delete(processedCsvFileName);
}
}
}
}
}
| TravelModellingGroup/TMG-Framework | TMG-Framework/tests/TMG-Framework.Test/Processing/TestAppendMatrixValueToCSV.cs | C# | gpl-3.0 | 3,944 | [
30522,
1013,
1008,
9385,
12609,
2118,
1997,
4361,
2023,
5371,
2003,
2112,
1997,
1056,
24798,
1011,
7705,
2005,
1060,
21246,
2546,
2475,
1012,
1056,
24798,
1011,
7705,
2005,
1060,
21246,
2546,
2475,
2003,
2489,
4007,
1024,
2017,
2064,
2417,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
//
// WQCommonCustomItem.h
// SomeUIKit
//
// Created by WangQiang on 2017/4/1.
// Copyright © 2017年 WangQiang. All rights reserved.
//
#import "WQCommonBaseItem.h"
//#import "WQCommonCellProtocol.h"
@interface WQCommonCustomItem : WQCommonBaseItem
+(NSString *)customIdentifire;
/**须遵守 WQCommonCellProtocol*/
@property (assign ,nonatomic) Class cellClass;
@end
| wang68543/WQSomeUIKit | WQSomeUIKit/CommonTableView/Model/WQCommonCustomItem.h | C | mit | 377 | [
30522,
1013,
1013,
1013,
1013,
1059,
4160,
9006,
8202,
7874,
20389,
4221,
2213,
1012,
1044,
1013,
1013,
2070,
10179,
23615,
1013,
1013,
1013,
1013,
2580,
2011,
7418,
14702,
5654,
2006,
2418,
1013,
1018,
1013,
1015,
1012,
1013,
1013,
9385,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (c) 2015. Vin @ vinexs.com (MIT License)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.vinexs.view;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.widget.LinearLayout;
@SuppressWarnings("unused")
public class ScalableLinearLayout extends LinearLayout {
private ScaleGestureDetector scaleDetector;
private float scaleFactor = 1.f;
private float maxScaleFactor = 1.5f;
private float minScaleFactor = 0.5f;
public ScalableLinearLayout(Context context) {
super(context);
scaleDetector = new ScaleGestureDetector(context, new ScaleListener());
}
public ScalableLinearLayout(Context context, AttributeSet attrs) {
super(context, attrs);
scaleDetector = new ScaleGestureDetector(context, new ScaleListener());
}
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouchEvent(MotionEvent event) {
// Let the ScaleGestureDetector inspect all events.
scaleDetector.onTouchEvent(event);
return true;
}
@Override
public void dispatchDraw(Canvas canvas) {
canvas.save();
canvas.scale(scaleFactor, scaleFactor);
super.dispatchDraw(canvas);
canvas.restore();
}
public ScalableLinearLayout setMaxScale(float scale) {
maxScaleFactor = scale;
return this;
}
public ScalableLinearLayout setMinScale(float scale) {
minScaleFactor = scale;
return this;
}
public ScaleGestureDetector getScaleGestureDetector() {
return scaleDetector;
}
private class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
@Override
public boolean onScale(ScaleGestureDetector detector) {
scaleFactor *= detector.getScaleFactor();
scaleFactor = Math.max(minScaleFactor, Math.min(scaleFactor, maxScaleFactor));
invalidate();
return true;
}
}
}
| vinexs/extend-enhance-base | eeb-core/src/main/java/com/vinexs/view/ScalableLinearLayout.java | Java | mit | 3,281 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2325,
1012,
19354,
1030,
15351,
2595,
2015,
1012,
4012,
1006,
10210,
6105,
1007,
1008,
1008,
6656,
2003,
2182,
3762,
4379,
1010,
2489,
1997,
3715,
1010,
2000,
2151,
2711,
11381,
1037,
6100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (C) 2001-2004 by David Brownell
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* this file is part of ehci-hcd.c */
/*-------------------------------------------------------------------------*/
/*
* EHCI Root Hub ... the nonsharable stuff
*
* Registers don't need cpu_to_le32, that happens transparently
*/
/*-------------------------------------------------------------------------*/
#include <linux/usb/otg.h>
#if defined(CONFIG_ARCH_MX6) || defined(CONFIG_ARCH_MVF)
#define MX6_USB_HOST_HACK
#define MVF_USB_HOST_HACK
#include <linux/fsl_devices.h>
#endif
#define PORT_WAKE_BITS (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
#ifdef CONFIG_PM
static int ehci_hub_control(
struct usb_hcd *hcd,
u16 typeReq,
u16 wValue,
u16 wIndex,
char *buf,
u16 wLength
);
/* After a power loss, ports that were owned by the companion must be
* reset so that the companion can still own them.
*/
static void ehci_handover_companion_ports(struct ehci_hcd *ehci)
{
u32 __iomem *reg;
u32 status;
int port;
__le32 buf;
struct usb_hcd *hcd = ehci_to_hcd(ehci);
if (!ehci->owned_ports)
return;
/* Give the connections some time to appear */
msleep(20);
port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
if (test_bit(port, &ehci->owned_ports)) {
reg = &ehci->regs->port_status[port];
status = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
/* Port already owned by companion? */
if (status & PORT_OWNER)
clear_bit(port, &ehci->owned_ports);
else if (test_bit(port, &ehci->companion_ports))
ehci_writel(ehci, status & ~PORT_PE, reg);
else
ehci_hub_control(hcd, SetPortFeature,
USB_PORT_FEAT_RESET, port + 1,
NULL, 0);
}
}
if (!ehci->owned_ports)
return;
msleep(90); /* Wait for resets to complete */
port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
if (test_bit(port, &ehci->owned_ports)) {
ehci_hub_control(hcd, GetPortStatus,
0, port + 1,
(char *) &buf, sizeof(buf));
/* The companion should now own the port,
* but if something went wrong the port must not
* remain enabled.
*/
reg = &ehci->regs->port_status[port];
status = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
if (status & PORT_OWNER)
ehci_writel(ehci, status | PORT_CSC, reg);
else {
ehci_dbg(ehci, "failed handover port %d: %x\n",
port + 1, status);
ehci_writel(ehci, status & ~PORT_PE, reg);
}
}
}
ehci->owned_ports = 0;
}
static int ehci_port_change(struct ehci_hcd *ehci)
{
int i = HCS_N_PORTS(ehci->hcs_params);
/* First check if the controller indicates a change event */
if (ehci_readl(ehci, &ehci->regs->status) & STS_PCD)
return 1;
/*
* Not all controllers appear to update this while going from D3 to D0,
* so check the individual port status registers as well
*/
while (i--)
if (ehci_readl(ehci, &ehci->regs->port_status[i]) & PORT_CSC)
return 1;
return 0;
}
static __maybe_unused void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
bool suspending, bool do_wakeup)
{
int port;
u32 temp;
unsigned long flags;
/* If remote wakeup is enabled for the root hub but disabled
* for the controller, we must adjust all the port wakeup flags
* when the controller is suspended or resumed. In all other
* cases they don't need to be changed.
*/
if (!ehci_to_hcd(ehci)->self.root_hub->do_remote_wakeup || do_wakeup)
return;
spin_lock_irqsave(&ehci->lock, flags);
/* clear phy low-power mode before changing wakeup flags */
if (ehci->has_hostpc) {
port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
u32 __iomem *hostpc_reg;
hostpc_reg = (u32 __iomem *)((u8 *) ehci->regs
+ HOSTPC0 + 4 * port);
temp = ehci_readl(ehci, hostpc_reg);
ehci_writel(ehci, temp & ~HOSTPC_PHCD, hostpc_reg);
}
spin_unlock_irqrestore(&ehci->lock, flags);
msleep(5);
spin_lock_irqsave(&ehci->lock, flags);
}
port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
u32 __iomem *reg = &ehci->regs->port_status[port];
u32 t1 = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
u32 t2 = t1 & ~PORT_WAKE_BITS;
/* If we are suspending the controller, clear the flags.
* If we are resuming the controller, set the wakeup flags.
*/
if (!suspending) {
if (t1 & PORT_CONNECT)
t2 |= PORT_WKOC_E | PORT_WKDISC_E;
else
t2 |= PORT_WKOC_E | PORT_WKCONN_E;
}
ehci_vdbg(ehci, "port %d, %08x -> %08x\n",
port + 1, t1, t2);
ehci_writel(ehci, t2, reg);
}
/* enter phy low-power mode again */
if (ehci->has_hostpc) {
port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
u32 __iomem *hostpc_reg;
hostpc_reg = (u32 __iomem *)((u8 *) ehci->regs
+ HOSTPC0 + 4 * port);
temp = ehci_readl(ehci, hostpc_reg);
ehci_writel(ehci, temp | HOSTPC_PHCD, hostpc_reg);
}
}
/* Does the root hub have a port wakeup pending? */
if (!suspending && ehci_port_change(ehci))
usb_hcd_resume_root_hub(ehci_to_hcd(ehci));
spin_unlock_irqrestore(&ehci->lock, flags);
}
static int ehci_bus_suspend (struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
int port;
int mask;
int changed;
ehci_dbg(ehci, "suspend root hub\n");
if (time_before (jiffies, ehci->next_statechange))
msleep(5);
del_timer_sync(&ehci->watchdog);
del_timer_sync(&ehci->iaa_watchdog);
spin_lock_irq (&ehci->lock);
/* Once the controller is stopped, port resumes that are already
* in progress won't complete. Hence if remote wakeup is enabled
* for the root hub and any ports are in the middle of a resume or
* remote wakeup, we must fail the suspend.
*/
if (hcd->self.root_hub->do_remote_wakeup) {
port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
if (ehci->reset_done[port] != 0) {
spin_unlock_irq(&ehci->lock);
ehci_dbg(ehci, "suspend failed because "
"port %d is resuming\n",
port + 1);
return -EBUSY;
}
}
}
/* stop schedules, clean any completed work */
if (HC_IS_RUNNING(hcd->state)) {
ehci_quiesce (ehci);
hcd->state = HC_STATE_QUIESCING;
}
ehci->command = ehci_readl(ehci, &ehci->regs->command);
ehci_work(ehci);
/* Unlike other USB host controller types, EHCI doesn't have
* any notion of "global" or bus-wide suspend. The driver has
* to manually suspend all the active unsuspended ports, and
* then manually resume them in the bus_resume() routine.
*/
ehci->bus_suspended = 0;
ehci->owned_ports = 0;
changed = 0;
port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
u32 __iomem *reg = &ehci->regs->port_status [port];
u32 t1 = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
u32 t2 = t1 & ~PORT_WAKE_BITS;
/* keep track of which ports we suspend */
if (t1 & PORT_OWNER)
set_bit(port, &ehci->owned_ports);
else if ((t1 & PORT_PE) && !(t1 & PORT_SUSPEND)) {
t2 |= PORT_SUSPEND;
set_bit(port, &ehci->bus_suspended);
}
/* enable remote wakeup on all ports, if told to do so */
if (hcd->self.root_hub->do_remote_wakeup) {
/* only enable appropriate wake bits, otherwise the
* hardware can not go phy low power mode. If a race
* condition happens here(connection change during bits
* set), the port change detection will finally fix it.
*/
if (t1 & PORT_CONNECT)
t2 |= PORT_WKOC_E | PORT_WKDISC_E;
else
t2 |= PORT_WKOC_E | PORT_WKCONN_E;
}
if (t1 != t2) {
ehci_vdbg (ehci, "port %d, %08x -> %08x\n",
port + 1, t1, t2);
ehci_writel(ehci, t2, reg);
changed = 1;
}
}
if (changed && ehci->has_hostpc) {
spin_unlock_irq(&ehci->lock);
msleep(5); /* 5 ms for HCD to enter low-power mode */
spin_lock_irq(&ehci->lock);
port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
u32 __iomem *hostpc_reg;
u32 t3;
hostpc_reg = (u32 __iomem *)((u8 *) ehci->regs
+ HOSTPC0 + 4 * port);
t3 = ehci_readl(ehci, hostpc_reg);
ehci_writel(ehci, t3 | HOSTPC_PHCD, hostpc_reg);
t3 = ehci_readl(ehci, hostpc_reg);
ehci_dbg(ehci, "Port %d phy low-power mode %s\n",
port, (t3 & HOSTPC_PHCD) ?
"succeeded" : "failed");
}
}
/* Apparently some devices need a >= 1-uframe delay here */
if (ehci->bus_suspended)
udelay(150);
/* turn off now-idle HC */
ehci_halt (ehci);
hcd->state = HC_STATE_SUSPENDED;
if (ehci->reclaim)
end_unlink_async(ehci);
/* allow remote wakeup */
mask = INTR_MASK;
if (!hcd->self.root_hub->do_remote_wakeup)
mask &= ~STS_PCD;
ehci_writel(ehci, mask, &ehci->regs->intr_enable);
ehci_readl(ehci, &ehci->regs->intr_enable);
ehci->next_statechange = jiffies + msecs_to_jiffies(10);
spin_unlock_irq (&ehci->lock);
/* ehci_work() may have re-enabled the watchdog timer, which we do not
* want, and so we must delete any pending watchdog timer events.
*/
del_timer_sync(&ehci->watchdog);
return 0;
}
/* caller has locked the root hub, and should reset/reinit on error */
static int ehci_bus_resume (struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 temp;
u32 power_okay;
int i;
unsigned long resume_needed = 0;
if (time_before (jiffies, ehci->next_statechange))
msleep(5);
spin_lock_irq (&ehci->lock);
if (!HCD_HW_ACCESSIBLE(hcd)) {
spin_unlock_irq(&ehci->lock);
return -ESHUTDOWN;
}
if (unlikely(ehci->debug)) {
if (!dbgp_reset_prep())
ehci->debug = NULL;
else
dbgp_external_startup();
}
/* Ideally and we've got a real resume here, and no port's power
* was lost. (For PCI, that means Vaux was maintained.) But we
* could instead be restoring a swsusp snapshot -- so that BIOS was
* the last user of the controller, not reset/pm hardware keeping
* state we gave to it.
*/
power_okay = ehci_readl(ehci, &ehci->regs->intr_enable);
ehci_dbg(ehci, "resume root hub%s\n",
power_okay ? "" : " after power loss");
/* at least some APM implementations will try to deliver
* IRQs right away, so delay them until we're ready.
*/
ehci_writel(ehci, 0, &ehci->regs->intr_enable);
/* re-init operational registers */
ehci_writel(ehci, 0, &ehci->regs->segment);
ehci_writel(ehci, ehci->periodic_dma, &ehci->regs->frame_list);
ehci_writel(ehci, (u32) ehci->async->qh_dma, &ehci->regs->async_next);
/* restore CMD_RUN, framelist size, and irq threshold */
ehci_writel(ehci, ehci->command, &ehci->regs->command);
/* Some controller/firmware combinations need a delay during which
* they set up the port statuses. See Bugzilla #8190. */
spin_unlock_irq(&ehci->lock);
msleep(8);
spin_lock_irq(&ehci->lock);
/* clear phy low-power mode before resume */
if (ehci->bus_suspended && ehci->has_hostpc) {
i = HCS_N_PORTS(ehci->hcs_params);
while (i--) {
if (test_bit(i, &ehci->bus_suspended)) {
u32 __iomem *hostpc_reg;
hostpc_reg = (u32 __iomem *)((u8 *) ehci->regs
+ HOSTPC0 + 4 * i);
temp = ehci_readl(ehci, hostpc_reg);
ehci_writel(ehci, temp & ~HOSTPC_PHCD,
hostpc_reg);
}
}
spin_unlock_irq(&ehci->lock);
msleep(5);
spin_lock_irq(&ehci->lock);
}
/* manually resume the ports we suspended during bus_suspend() */
i = HCS_N_PORTS (ehci->hcs_params);
while (i--) {
temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
if (test_bit(i, &ehci->bus_suspended) &&
(temp & PORT_SUSPEND)) {
temp |= PORT_RESUME;
set_bit(i, &resume_needed);
}
ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
}
/* msleep for 20ms only if code is trying to resume port */
if (resume_needed) {
spin_unlock_irq(&ehci->lock);
msleep(20);
spin_lock_irq(&ehci->lock);
}
i = HCS_N_PORTS (ehci->hcs_params);
while (i--) {
temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
if (test_bit(i, &resume_needed)) {
temp &= ~(PORT_RWC_BITS | PORT_RESUME);
ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
ehci_vdbg (ehci, "resumed port %d\n", i + 1);
}
}
(void) ehci_readl(ehci, &ehci->regs->command);
/* maybe re-activate the schedule(s) */
temp = 0;
if (ehci->async->qh_next.qh)
temp |= CMD_ASE;
if (ehci->periodic_sched)
temp |= CMD_PSE;
if (temp) {
ehci->command |= temp;
ehci_writel(ehci, ehci->command, &ehci->regs->command);
}
ehci->next_statechange = jiffies + msecs_to_jiffies(5);
hcd->state = HC_STATE_RUNNING;
/* Now we can safely re-enable irqs */
ehci_writel(ehci, INTR_MASK, &ehci->regs->intr_enable);
spin_unlock_irq (&ehci->lock);
ehci_handover_companion_ports(ehci);
return 0;
}
#else
#define ehci_bus_suspend NULL
#define ehci_bus_resume NULL
#endif /* CONFIG_PM */
/*-------------------------------------------------------------------------*/
/* Display the ports dedicated to the companion controller */
static ssize_t show_companion(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct ehci_hcd *ehci;
int nports, index, n;
int count = PAGE_SIZE;
char *ptr = buf;
ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
nports = HCS_N_PORTS(ehci->hcs_params);
for (index = 0; index < nports; ++index) {
if (test_bit(index, &ehci->companion_ports)) {
n = scnprintf(ptr, count, "%d\n", index + 1);
ptr += n;
count -= n;
}
}
return ptr - buf;
}
/*
* Sets the owner of a port
*/
static void set_owner(struct ehci_hcd *ehci, int portnum, int new_owner)
{
u32 __iomem *status_reg;
u32 port_status;
int try;
status_reg = &ehci->regs->port_status[portnum];
/*
* The controller won't set the OWNER bit if the port is
* enabled, so this loop will sometimes require at least two
* iterations: one to disable the port and one to set OWNER.
*/
for (try = 4; try > 0; --try) {
spin_lock_irq(&ehci->lock);
port_status = ehci_readl(ehci, status_reg);
if ((port_status & PORT_OWNER) == new_owner
|| (port_status & (PORT_OWNER | PORT_CONNECT))
== 0)
try = 0;
else {
port_status ^= PORT_OWNER;
port_status &= ~(PORT_PE | PORT_RWC_BITS);
ehci_writel(ehci, port_status, status_reg);
}
spin_unlock_irq(&ehci->lock);
if (try > 1)
msleep(5);
}
}
/*
* Dedicate or undedicate a port to the companion controller.
* Syntax is "[-]portnum", where a leading '-' sign means
* return control of the port to the EHCI controller.
*/
static ssize_t store_companion(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct ehci_hcd *ehci;
int portnum, new_owner;
ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev)));
new_owner = PORT_OWNER; /* Owned by companion */
if (sscanf(buf, "%d", &portnum) != 1)
return -EINVAL;
if (portnum < 0) {
portnum = - portnum;
new_owner = 0; /* Owned by EHCI */
}
if (portnum <= 0 || portnum > HCS_N_PORTS(ehci->hcs_params))
return -ENOENT;
portnum--;
if (new_owner)
set_bit(portnum, &ehci->companion_ports);
else
clear_bit(portnum, &ehci->companion_ports);
set_owner(ehci, portnum, new_owner);
return count;
}
static DEVICE_ATTR(companion, 0644, show_companion, store_companion);
static inline int create_companion_file(struct ehci_hcd *ehci)
{
int i = 0;
/* with integrated TT there is no companion! */
if (!ehci_is_TDI(ehci))
i = device_create_file(ehci_to_hcd(ehci)->self.controller,
&dev_attr_companion);
return i;
}
static inline void remove_companion_file(struct ehci_hcd *ehci)
{
/* with integrated TT there is no companion! */
if (!ehci_is_TDI(ehci))
device_remove_file(ehci_to_hcd(ehci)->self.controller,
&dev_attr_companion);
}
/*-------------------------------------------------------------------------*/
static int check_reset_complete (
struct ehci_hcd *ehci,
int index,
u32 __iomem *status_reg,
int port_status
) {
if (!(port_status & PORT_CONNECT))
return port_status;
/* if reset finished and it's still not enabled -- handoff */
if (!(port_status & PORT_PE)) {
/* with integrated TT, there's nobody to hand it to! */
if (ehci_is_TDI(ehci)) {
ehci_dbg (ehci,
"Failed to enable port %d on root hub TT\n",
index+1);
return port_status;
}
ehci_dbg (ehci, "port %d full speed --> companion\n",
index + 1);
// what happens if HCS_N_CC(params) == 0 ?
port_status |= PORT_OWNER;
port_status &= ~PORT_RWC_BITS;
ehci_writel(ehci, port_status, status_reg);
/* ensure 440EPX ohci controller state is operational */
if (ehci->has_amcc_usb23)
set_ohci_hcfs(ehci, 1);
} else {
ehci_dbg (ehci, "port %d high speed\n", index + 1);
/* ensure 440EPx ohci controller state is suspended */
if (ehci->has_amcc_usb23)
set_ohci_hcfs(ehci, 0);
}
return port_status;
}
/*-------------------------------------------------------------------------*/
/* build "status change" packet (one or two bytes) from HC registers */
static int
ehci_hub_status_data (struct usb_hcd *hcd, char *buf)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 temp, status = 0;
u32 mask;
int ports, i, retval = 1;
unsigned long flags;
u32 ppcd = 0;
/* if !USB_SUSPEND, root hub timers won't get shut down ... */
if (!HC_IS_RUNNING(hcd->state))
return 0;
/* init status to no-changes */
buf [0] = 0;
ports = HCS_N_PORTS (ehci->hcs_params);
if (ports > 7) {
buf [1] = 0;
retval++;
}
/* Some boards (mostly VIA?) report bogus overcurrent indications,
* causing massive log spam unless we completely ignore them. It
* may be relevant that VIA VT8235 controllers, where PORT_POWER is
* always set, seem to clear PORT_OCC and PORT_CSC when writing to
* PORT_POWER; that's surprising, but maybe within-spec.
*/
if (!ignore_oc)
mask = PORT_CSC | PORT_PEC | PORT_OCC;
else
mask = PORT_CSC | PORT_PEC;
// PORT_RESUME from hardware ~= PORT_STAT_C_SUSPEND
/* no hub change reports (bit 0) for now (power, ...) */
/* port N changes (bit N)? */
spin_lock_irqsave (&ehci->lock, flags);
/* get per-port change detect bits */
if (ehci->has_ppcd)
ppcd = ehci_readl(ehci, &ehci->regs->status) >> 16;
for (i = 0; i < ports; i++) {
/* leverage per-port change bits feature */
if (ehci->has_ppcd && !(ppcd & (1 << i)))
continue;
temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
/*
* Return status information even for ports with OWNER set.
* Otherwise khubd wouldn't see the disconnect event when a
* high-speed device is switched over to the companion
* controller by the user.
*/
if ((temp & mask) != 0 || test_bit(i, &ehci->port_c_suspend)
|| (ehci->reset_done[i] && time_after_eq(
jiffies, ehci->reset_done[i]))) {
if (i < 7)
buf [0] |= 1 << (i + 1);
else
buf [1] |= 1 << (i - 7);
status = STS_PCD;
}
}
/* FIXME autosuspend idle root hubs */
spin_unlock_irqrestore (&ehci->lock, flags);
return status ? retval : 0;
}
/*-------------------------------------------------------------------------*/
static void
ehci_hub_descriptor (
struct ehci_hcd *ehci,
struct usb_hub_descriptor *desc
) {
int ports = HCS_N_PORTS (ehci->hcs_params);
u16 temp;
desc->bDescriptorType = 0x29;
desc->bPwrOn2PwrGood = 10; /* ehci 1.0, 2.3.9 says 20ms max */
desc->bHubContrCurrent = 0;
desc->bNbrPorts = ports;
temp = 1 + (ports / 8);
desc->bDescLength = 7 + 2 * temp;
/* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */
memset(&desc->u.hs.DeviceRemovable[0], 0, temp);
memset(&desc->u.hs.DeviceRemovable[temp], 0xff, temp);
temp = 0x0008; /* per-port overcurrent reporting */
if (HCS_PPC (ehci->hcs_params))
temp |= 0x0001; /* per-port power control */
else
temp |= 0x0002; /* no power switching */
#if 0
// re-enable when we support USB_PORT_FEAT_INDICATOR below.
if (HCS_INDICATOR (ehci->hcs_params))
temp |= 0x0080; /* per-port indicators (LEDs) */
#endif
desc->wHubCharacteristics = cpu_to_le16(temp);
}
/*-------------------------------------------------------------------------*/
static int ehci_hub_control (
struct usb_hcd *hcd,
u16 typeReq,
u16 wValue,
u16 wIndex,
char *buf,
u16 wLength
) {
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
int ports = HCS_N_PORTS (ehci->hcs_params);
u32 __iomem *status_reg = &ehci->regs->port_status[
(wIndex & 0xff) - 1];
u32 __iomem *hostpc_reg = NULL;
u32 temp, temp1, status;
unsigned long flags;
int retval = 0;
unsigned selector;
/*
* FIXME: support SetPortFeatures USB_PORT_FEAT_INDICATOR.
* HCS_INDICATOR may say we can change LEDs to off/amber/green.
* (track current state ourselves) ... blink for diagnostics,
* power, "this is the one", etc. EHCI spec supports this.
*/
if (ehci->has_hostpc)
hostpc_reg = (u32 __iomem *)((u8 *)ehci->regs
+ HOSTPC0 + 4 * ((wIndex & 0xff) - 1));
spin_lock_irqsave (&ehci->lock, flags);
switch (typeReq) {
case ClearHubFeature:
switch (wValue) {
case C_HUB_LOCAL_POWER:
case C_HUB_OVER_CURRENT:
/* no hub-wide feature/status flags */
break;
default:
goto error;
}
break;
case ClearPortFeature:
if (!wIndex || wIndex > ports)
goto error;
wIndex--;
temp = ehci_readl(ehci, status_reg);
/*
* Even if OWNER is set, so the port is owned by the
* companion controller, khubd needs to be able to clear
* the port-change status bits (especially
* USB_PORT_STAT_C_CONNECTION).
*/
switch (wValue) {
case USB_PORT_FEAT_ENABLE:
ehci_writel(ehci, temp & ~PORT_PE, status_reg);
break;
case USB_PORT_FEAT_C_ENABLE:
ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_PEC,
status_reg);
break;
case USB_PORT_FEAT_SUSPEND:
if (temp & PORT_RESET)
goto error;
if (ehci->no_selective_suspend)
break;
#ifdef CONFIG_USB_OTG
if ((hcd->self.otg_port == (wIndex + 1))
&& hcd->self.b_hnp_enable) {
otg_start_hnp(ehci->transceiver);
break;
}
#endif
if (!(temp & PORT_SUSPEND))
break;
if ((temp & PORT_PE) == 0)
goto error;
/* clear phy low-power mode before resume */
if (hostpc_reg) {
temp1 = ehci_readl(ehci, hostpc_reg);
ehci_writel(ehci, temp1 & ~HOSTPC_PHCD,
hostpc_reg);
spin_unlock_irqrestore(&ehci->lock, flags);
msleep(5);/* wait to leave low-power mode */
spin_lock_irqsave(&ehci->lock, flags);
}
#ifdef MX6_USB_HOST_HACK
{
struct fsl_usb2_platform_data *pdata;
pdata = hcd->self.controller->platform_data;
if (pdata->platform_resume)
pdata->platform_resume(pdata);
}
#endif
/* resume signaling for 20 msec */
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
ehci_writel(ehci, temp | PORT_RESUME, status_reg);
ehci->reset_done[wIndex] = jiffies
+ msecs_to_jiffies(20);
break;
case USB_PORT_FEAT_C_SUSPEND:
clear_bit(wIndex, &ehci->port_c_suspend);
break;
case USB_PORT_FEAT_POWER:
if (HCS_PPC (ehci->hcs_params))
ehci_writel(ehci,
temp & ~(PORT_RWC_BITS | PORT_POWER),
status_reg);
break;
case USB_PORT_FEAT_C_CONNECTION:
if (ehci->has_lpm) {
/* clear PORTSC bits on disconnect */
temp &= ~PORT_LPM;
temp &= ~PORT_DEV_ADDR;
}
ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_CSC,
status_reg);
break;
case USB_PORT_FEAT_C_OVER_CURRENT:
ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_OCC,
status_reg);
break;
case USB_PORT_FEAT_C_RESET:
/* GetPortStatus clears reset */
break;
default:
goto error;
}
ehci_readl(ehci, &ehci->regs->command); /* unblock posted write */
break;
case GetHubDescriptor:
ehci_hub_descriptor (ehci, (struct usb_hub_descriptor *)
buf);
break;
case GetHubStatus:
/* no hub-wide feature/status flags */
memset (buf, 0, 4);
//cpu_to_le32s ((u32 *) buf);
break;
case GetPortStatus:
if (!wIndex || wIndex > ports)
goto error;
wIndex--;
status = 0;
temp = ehci_readl(ehci, status_reg);
// wPortChange bits
if (temp & PORT_CSC)
status |= USB_PORT_STAT_C_CONNECTION << 16;
if (temp & PORT_PEC)
status |= USB_PORT_STAT_C_ENABLE << 16;
if ((temp & PORT_OCC) && !ignore_oc){
status |= USB_PORT_STAT_C_OVERCURRENT << 16;
/*
* Hubs should disable port power on over-current.
* However, not all EHCI implementations do this
* automatically, even if they _do_ support per-port
* power switching; they're allowed to just limit the
* current. khubd will turn the power back on.
*/
if ((temp & PORT_OC) && HCS_PPC(ehci->hcs_params)) {
ehci_writel(ehci,
temp & ~(PORT_RWC_BITS | PORT_POWER),
status_reg);
temp = ehci_readl(ehci, status_reg);
}
}
/* whoever resumes must GetPortStatus to complete it!! */
if (temp & PORT_RESUME) {
/* Remote Wakeup received? */
if (!ehci->reset_done[wIndex]) {
/* resume signaling for 20 msec */
ehci->reset_done[wIndex] = jiffies
+ msecs_to_jiffies(20);
/* check the port again */
mod_timer(&ehci_to_hcd(ehci)->rh_timer,
ehci->reset_done[wIndex]);
}
/* resume completed? */
else if (time_after_eq(jiffies,
ehci->reset_done[wIndex])) {
clear_bit(wIndex, &ehci->suspended_ports);
set_bit(wIndex, &ehci->port_c_suspend);
ehci->reset_done[wIndex] = 0;
/* stop resume signaling */
temp = ehci_readl(ehci, status_reg);
ehci_writel(ehci,
temp & ~(PORT_RWC_BITS | PORT_RESUME),
status_reg);
retval = handshake(ehci, status_reg,
PORT_RESUME, 0, 2000 /* 2msec */);
if (retval != 0) {
ehci_err(ehci,
"port %d resume error %d\n",
wIndex + 1, retval);
goto error;
}
temp &= ~(PORT_SUSPEND|PORT_RESUME|(3<<10));
}
}
/* whoever resets must GetPortStatus to complete it!! */
if ((temp & PORT_RESET)
&& time_after_eq(jiffies,
ehci->reset_done[wIndex])) {
status |= USB_PORT_STAT_C_RESET << 16;
ehci->reset_done [wIndex] = 0;
/* force reset to complete */
ehci_writel(ehci, temp & ~(PORT_RWC_BITS | PORT_RESET),
status_reg);
/* REVISIT: some hardware needs 550+ usec to clear
* this bit; seems too long to spin routinely...
*/
retval = handshake(ehci, status_reg,
PORT_RESET, 0, 1000);
if (retval != 0) {
ehci_err (ehci, "port %d reset error %d\n",
wIndex + 1, retval);
goto error;
}
/* see what we found out */
temp = check_reset_complete (ehci, wIndex, status_reg,
ehci_readl(ehci, status_reg));
}
if (!(temp & (PORT_RESUME|PORT_RESET)))
ehci->reset_done[wIndex] = 0;
/* transfer dedicated ports to the companion hc */
if ((temp & PORT_CONNECT) &&
test_bit(wIndex, &ehci->companion_ports)) {
temp &= ~PORT_RWC_BITS;
temp |= PORT_OWNER;
ehci_writel(ehci, temp, status_reg);
ehci_dbg(ehci, "port %d --> companion\n", wIndex + 1);
temp = ehci_readl(ehci, status_reg);
}
/*
* Even if OWNER is set, there's no harm letting khubd
* see the wPortStatus values (they should all be 0 except
* for PORT_POWER anyway).
*/
if (temp & PORT_CONNECT) {
status |= USB_PORT_STAT_CONNECTION;
// status may be from integrated TT
if (ehci->has_hostpc) {
temp1 = ehci_readl(ehci, hostpc_reg);
status |= ehci_port_speed(ehci, temp1);
} else
status |= ehci_port_speed(ehci, temp);
}
if (temp & PORT_PE)
status |= USB_PORT_STAT_ENABLE;
/* maybe the port was unsuspended without our knowledge */
if (temp & (PORT_SUSPEND|PORT_RESUME)) {
status |= USB_PORT_STAT_SUSPEND;
} else if (test_bit(wIndex, &ehci->suspended_ports)) {
clear_bit(wIndex, &ehci->suspended_ports);
ehci->reset_done[wIndex] = 0;
if (temp & PORT_PE)
set_bit(wIndex, &ehci->port_c_suspend);
}
if (temp & PORT_OC)
status |= USB_PORT_STAT_OVERCURRENT;
if (temp & PORT_RESET)
status |= USB_PORT_STAT_RESET;
if (temp & PORT_POWER)
status |= USB_PORT_STAT_POWER;
if (test_bit(wIndex, &ehci->port_c_suspend))
status |= USB_PORT_STAT_C_SUSPEND << 16;
#ifndef VERBOSE_DEBUG
if (status & ~0xffff) /* only if wPortChange is interesting */
#endif
dbg_port (ehci, "GetStatus", wIndex + 1, temp);
put_unaligned_le32(status, buf);
break;
case SetHubFeature:
switch (wValue) {
case C_HUB_LOCAL_POWER:
case C_HUB_OVER_CURRENT:
/* no hub-wide feature/status flags */
break;
default:
goto error;
}
break;
case SetPortFeature:
selector = wIndex >> 8;
wIndex &= 0xff;
if (unlikely(ehci->debug)) {
/* If the debug port is active any port
* feature requests should get denied */
if (wIndex == HCS_DEBUG_PORT(ehci->hcs_params) &&
(readl(&ehci->debug->control) & DBGP_ENABLED)) {
retval = -ENODEV;
goto error_exit;
}
}
if (!wIndex || wIndex > ports)
goto error;
wIndex--;
temp = ehci_readl(ehci, status_reg);
if (temp & PORT_OWNER)
break;
temp &= ~PORT_RWC_BITS;
switch (wValue) {
case USB_PORT_FEAT_SUSPEND:
if (ehci->no_selective_suspend)
break;
if ((temp & PORT_PE) == 0
|| (temp & PORT_RESET) != 0)
goto error;
/* After above check the port must be connected.
* Set appropriate bit thus could put phy into low power
* mode if we have hostpc feature
*/
temp &= ~PORT_WKCONN_E;
temp |= PORT_WKDISC_E | PORT_WKOC_E;
ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
#ifdef MX6_USB_HOST_HACK
{
struct fsl_usb2_platform_data *pdata;
pdata = hcd->self.controller->platform_data;
if (pdata->platform_suspend)
pdata->platform_suspend(pdata);
#ifdef MVF_USB_HOST_HACK
/* workaround:
* Toggle HW_USBPHY_PWD to flag controller
* generating LS-SE0/LS-EOP after resume
*/
if (pdata->platform_resume)
pdata->platform_resume(pdata);
#endif
}
#endif
if (hostpc_reg) {
spin_unlock_irqrestore(&ehci->lock, flags);
msleep(5);/* 5ms for HCD enter low pwr mode */
spin_lock_irqsave(&ehci->lock, flags);
temp1 = ehci_readl(ehci, hostpc_reg);
ehci_writel(ehci, temp1 | HOSTPC_PHCD,
hostpc_reg);
temp1 = ehci_readl(ehci, hostpc_reg);
ehci_dbg(ehci, "Port%d phy low pwr mode %s\n",
wIndex, (temp1 & HOSTPC_PHCD) ?
"succeeded" : "failed");
}
set_bit(wIndex, &ehci->suspended_ports);
break;
case USB_PORT_FEAT_POWER:
if (HCS_PPC (ehci->hcs_params))
ehci_writel(ehci, temp | PORT_POWER,
status_reg);
break;
case USB_PORT_FEAT_RESET:
if (temp & PORT_RESUME)
goto error;
/* line status bits may report this as low speed,
* which can be fine if this root hub has a
* transaction translator built in.
*/
if ((temp & (PORT_PE|PORT_CONNECT)) == PORT_CONNECT
&& !ehci_is_TDI(ehci)
&& PORT_USB11 (temp)) {
ehci_dbg (ehci,
"port %d low speed --> companion\n",
wIndex + 1);
temp |= PORT_OWNER;
} else {
ehci_vdbg (ehci, "port %d reset\n", wIndex + 1);
temp |= PORT_RESET;
temp &= ~PORT_PE;
/*
* caller must wait, then call GetPortStatus
* usb 2.0 spec says 50 ms resets on root
*/
ehci->reset_done [wIndex] = jiffies
+ msecs_to_jiffies (50);
}
ehci_writel(ehci, temp, status_reg);
break;
/* For downstream facing ports (these): one hub port is put
* into test mode according to USB2 11.24.2.13, then the hub
* must be reset (which for root hub now means rmmod+modprobe,
* or else system reboot). See EHCI 2.3.9 and 4.14 for info
* about the EHCI-specific stuff.
*/
case USB_PORT_FEAT_TEST:
if (!selector || selector > 5)
goto error;
ehci_quiesce(ehci);
/* Put all enabled ports into suspend */
while (ports--) {
u32 __iomem *sreg =
&ehci->regs->port_status[ports];
temp = ehci_readl(ehci, sreg) & ~PORT_RWC_BITS;
if (temp & PORT_PE)
ehci_writel(ehci, temp | PORT_SUSPEND,
sreg);
}
ehci_halt(ehci);
temp = ehci_readl(ehci, status_reg);
temp |= selector << 16;
ehci_writel(ehci, temp, status_reg);
break;
default:
goto error;
}
ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
break;
default:
error:
/* "stall" on error */
retval = -EPIPE;
}
error_exit:
spin_unlock_irqrestore (&ehci->lock, flags);
return retval;
}
static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
if (ehci_is_TDI(ehci))
return;
set_owner(ehci, --portnum, PORT_OWNER);
}
static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
u32 __iomem *reg;
if (ehci_is_TDI(ehci))
return 0;
reg = &ehci->regs->port_status[portnum - 1];
return ehci_readl(ehci, reg) & PORT_OWNER;
}
| avoltz/linux-vybrid | drivers/usb/host/ehci-hub.c | C | gpl-2.0 | 32,944 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2541,
1011,
2432,
2011,
2585,
15005,
3363,
1008,
1008,
2023,
2565,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
1008,
2104,
1996,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' lang='he' dir='rtl'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1255' />
<meta http-equiv='Content-Script-Type' content='text/javascript' />
<meta http-equiv='revisit-after' content='15 days' />
<title>à</title>
<link rel='stylesheet' type='text/css' href='../../../_script/klli.css' />
<link rel='stylesheet' type='text/css' href='../../../tnk1/_themes/klli.css' />
<meta name='author' content="" />
<meta name='receiver' content="" />
<meta name='jmQovc' content="tnk1/ljon/jorj/a" />
<meta name='tvnit' content="tnk_jorj" />
<meta name='description' lang='he' content="à" />
<meta name='description' lang='en' content="this page is in Hebrew" />
<meta name='keywords' lang='he' content="à áúð"ê,à" />
</head>
<!--
PHP Programming by Erel Segal - Rent a Brain http://tora.us.fm/rentabrain
-->
<body lang='he' dir='rtl' id = 'tnk1_ljon_jorj_a' class='awt tnk_jorj'>
<div class='pnim'>
<script type='text/javascript' src='../../../_script/vars.js'></script>
<!--NiwutElyon0-->
<div class='NiwutElyon'>
<div class='NiwutElyon'><a class='link_to_homepage' href='../../../tnk1/index.html'>øàùé</a>><a href='../../../tnk1/ljon/index.html'>ìùåï äî÷øà</a>><a href='../../../tnk1/ljon/jorj/index.html'>ùåøùéí</a>></div>
</div>
<!--NiwutElyon1-->
<h1 id='h1'>à</h1>
<div id='idfields'>
<p>÷åã: à áúð"ê</p>
<p>ñåâ: àåú</p>
<p>îàú: </p>
<p>àì: </p>
</div>
<script type='text/javascript'>kotrt()</script>
<ul id='ulbnim'>
<li>îàîø: <a href='../../../tnk1/messages/prqim_t0301_0.html' class='mamr dor1'>"åìà äáééùï ìîã" - åé÷øà áà' ÷èðä<small> / äøá îùä ìéôùéõ (pini @ macam.ac.il) -> äàúø</small></a></li>
<li>îàîø: <a href='../../../tnk1/ktuv/thlim/th-119a.html' class='mamr dor1'>à = àì äàåùø - äúçìú äîñò<small> / àøàì</small></a></li>
<li>îàîø: <a href='http://he.wikisource.org/wiki/áéàåø:áøàùéú_îá_ëà' class='mamr dor1' target='_blank'>àéù àì àçéå àáì àùîéí àðçðå<small> / àåøé -> åé÷éè÷ñè</small> <small>(÷éùåø çéöåðé)</small></a></li>
<li>úåëï1: <a href='../../../tnk1/tora/jmot/jm-10-01.html' class='twkn1 dor1'>áà àì ôøòä, ëé àðåëé äëáãúé àú ìéáå... ìîòï ùéúé àåúåúé àìä á÷øáå<small> / îçáøéí ùåðéí -> ôéøåùéí åñéîðéí îëåú îöøéí</small></a></li>
<li>äâãøä: <a href='../../../tnk1/messages/prqim_t1009_2.html' class='hgdrh dor1'>çéìåôé ò-à<small> / çâé äåôø</small></a></li>
<li>øáùåøù: <a href='../../../tnk1/ljon/jorj/a=h.html' class='rbjwrj dor1'>ùåøùéí òí îùîòåú ãåîä, áçéìåó áéï àåúéåú à=ä</a></li>
<li>øáùåøù: <a href='../../../tnk1/ljon/jorj/a=y.html' class='rbjwrj dor1'>ùåøùéí ùáäí äàåú é îúçìôú ìôòîéí áàåú à</a></li>
</ul><!--end-->
<script type='text/javascript'>
AnalyzeBnim();
ktov_bnim_jorj();
</script>
<h2 id='tguvot'>úåñôåú åúâåáåú</h2>
<script type='text/javascript'>ktov_bnim_axrim("<"+"ul>","</"+"ul>")</script>
<script type='text/javascript'>tguva(); txtit()</script>
</div><!--pnim-->
</body>
</html>
| erelsgl/erel-sites | tnk1/ljon/jorj/a.html | HTML | lgpl-3.0 | 3,060 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
1060,
11039,
19968,
1015,
30524,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
1060,
11039,
19968,
2487,
1013,
26718,
2094,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
require 'spec_helper'
require 'puppet/pops'
require 'puppet/loaders'
describe 'the static loader' do
it 'has no parent' do
expect(Puppet::Pops::Loader::StaticLoader.new.parent).to be(nil)
end
it 'identifies itself in string form' do
expect(Puppet::Pops::Loader::StaticLoader.new.to_s).to be_eql('(StaticLoader)')
end
it 'support the Loader API' do
# it may produce things later, this is just to test that calls work as they should - now all lookups are nil.
loader = Puppet::Pops::Loader::StaticLoader.new()
a_typed_name = typed_name(:function, 'foo')
expect(loader[a_typed_name]).to be(nil)
expect(loader.load_typed(a_typed_name)).to be(nil)
expect(loader.find(a_typed_name)).to be(nil)
end
context 'provides access to logging functions' do
let(:loader) { loader = Puppet::Pops::Loader::StaticLoader.new() }
# Ensure all logging functions produce output
before(:each) { Puppet::Util::Log.level = :debug }
Puppet::Util::Log.levels.each do |level|
it "defines the function #{level.to_s}" do
expect(loader.load(:function, level).class.name).to eql(level.to_s)
end
it 'and #{level.to_s} can be called' do
expect(loader.load(:function, level).call({}, 'yay').to_s).to eql('yay')
end
it "uses the evaluator to format output" do
expect(loader.load(:function, level).call({}, ['yay', 'surprise']).to_s).to eql('[yay, surprise]')
end
end
end
def typed_name(type, name)
Puppet::Pops::Loader::Loader::TypedName.new(type, name)
end
end | jorgemancheno/boxen | vendor/bundle/ruby/2.0.0/gems/puppet-3.6.1/spec/unit/pops/loaders/static_loader_spec.rb | Ruby | mit | 1,568 | [
30522,
5478,
1005,
28699,
1035,
2393,
2121,
1005,
5478,
1005,
13997,
1013,
16949,
1005,
5478,
1005,
13997,
1013,
7170,
2545,
1005,
6235,
1005,
1996,
10763,
7170,
2121,
1005,
2079,
2009,
1005,
2038,
2053,
6687,
1005,
2079,
5987,
1006,
13997,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package error;
public class ErrorInMetaobjectException extends RuntimeException {
public ErrorInMetaobjectException(String message) {
this.message = message;
}
@Override
public String getMessage() {
return message;
}
/**
*
*/
private static final long serialVersionUID = 1L;
private String message;
}
| joseoliv/Cyan | error/ErrorInMetaobjectException.java | Java | gpl-3.0 | 322 | [
30522,
7427,
7561,
1025,
2270,
2465,
7561,
2378,
11368,
7113,
2497,
20614,
10288,
24422,
8908,
2448,
7292,
10288,
24422,
1063,
2270,
7561,
2378,
11368,
7113,
2497,
20614,
10288,
24422,
1006,
5164,
4471,
1007,
1063,
2023,
1012,
4471,
1027,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package vault
import "time"
type dynamicSystemView struct {
core *Core
mountEntry *MountEntry
}
func (d dynamicSystemView) DefaultLeaseTTL() time.Duration {
def, _ := d.fetchTTLs()
return def
}
func (d dynamicSystemView) MaxLeaseTTL() time.Duration {
_, max := d.fetchTTLs()
return max
}
// TTLsByPath returns the default and max TTLs corresponding to a particular
// mount point, or the system default
func (d dynamicSystemView) fetchTTLs() (def, max time.Duration) {
def = d.core.defaultLeaseTTL
max = d.core.maxLeaseTTL
if d.mountEntry.Config.DefaultLeaseTTL != 0 {
def = d.mountEntry.Config.DefaultLeaseTTL
}
if d.mountEntry.Config.MaxLeaseTTL != 0 {
max = d.mountEntry.Config.MaxLeaseTTL
}
return
}
| jklein/vault | vault/dynamic_system_view.go | GO | mpl-2.0 | 734 | [
30522,
7427,
11632,
12324,
1000,
2051,
1000,
2828,
10949,
27268,
6633,
30524,
12398,
19738,
21678,
2140,
1006,
1007,
2051,
1012,
9367,
1063,
13366,
1010,
1035,
1024,
1027,
1040,
1012,
18584,
4779,
4877,
1006,
1007,
2709,
13366,
1065,
4569,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html>
<head>
<title>Энтони Тистудио</title>
<meta charset="utf-8" />
<link rel="stylesheet" media="all" href="/styles/style.css" type="text/css" />
</head>
<body>
<a name="top"></a>
<div class="at-wrap0">
<div class="at-left">
<img src="/img/suit.png" alt="YOBA"/>
</div>
<div class="at-wrap1">
<div class="at-header">
<h1>Энтони Тистудио</h1>
<div class="at-menu">
<div>
<a href="/">
<div class="at-menu-element">
Главная
</div>
</a>
</div>
<div>
<a href="/tags/код/1">
<div class="at-menu-element">
Код
</div>
</a>
</div>
<div>
<a href="/portfolio">
<div class="at-menu-element">
Портфолио
</div>
</a>
</div>
<div>
<a href="/contact">
<div class="at-menu-element">
Контакты
</div>
</a>
</div>
</div>
</div>
<div class="at-content">
<div class="at-stats">
<h3>
2 записи
по тегу «statique» </h3>
</div>
<div class="at-articles">
<article class="at-shortened">
<a href="/entries/statique1st"><h1><span>Statique в деле</span></h1></a>
<div class="at-stats-panel">
<h4 class="at-inline">26 июля 2015 в 21:30</h4> <h4 class="at-inline at-taglist at-tag-stats">
Теги:
<a href="/tags/statique/1">statique</a>, <a href="/tags/код/1">код</a>, <a href="/tags/инструкция/1">инструкция</a> </h4>
</div>
<div class="at-article-content">
<p>Statique - система, которая создавалась с расчетом на максимальную простоту. Думаю, что никому не составит большого труда сделать свой собственный статический блог, используя богатый инструмантарий системы для обработки данных.</p>
</div>
<a href="/entries/statique1st"><div class="at-read-more"><span class="at-read-more-inner">Читать дальше</span></div></a>
</article>
<article class="at-shortened">
<a href="/entries/hello"><h1><span>Привет, Statique!</span></h1></a>
<div class="at-stats-panel">
<h4 class="at-inline">26 июля 2015 в 21:29</h4> <h4 class="at-inline at-taglist at-tag-stats">
Теги:
<a href="/tags/мемы/1">мемы</a>, <a href="/tags/statique/1">statique</a>, <a href="/tags/привет/1">привет</a>, <a href="/tags/история/1">история</a> </h4>
</div>
<div class="at-article-content">
<p><img src="/img/yoba.png" alt="Ехидная пышечка"/></p>
<p>Привет!</p>
<p>Если Вы видите данный текст, значит, система <em>Statique</em> работает просто отлично, как и следует работать любому продукту от Teestudio™. Собственно, что же это такое и зачем мы это впиливали?</p>
<p>Нажмите на "Читать далее", чтобы узнать.</p>
</div>
<a href="/entries/hello"><div class="at-read-more"><span class="at-read-more-inner">Читать дальше</span></div></a>
</article>
<div>
</div>
</div>
</div>
</div>
<div class="at-clear"></div>
<div class="at-footer">
<a href="#top">↑ Наверх</a>
<div>
<div>© 2015 Teestudio Foundation, Russia</div>
<div>© 2015 Anthony Teestudio</div>
</div>
</div>
</div>
</body>
</html>
| teestudio/anthony | tags/statique/1/index.html | HTML | mit | 4,734 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
2516,
1028,
1208,
18947,
22919,
14150,
18947,
10325,
1197,
10325,
29747,
22919,
29748,
29742,
10325,
14150,
1026,
1013,
2516,
1028,
1026,
18804,
25869,
134... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/usr/bin/python3
import sys
from gi.repository import GExiv2
phototags = {
'Exif.Photo.ExposureTime': "Belichtung:\t",
'Exif.Photo.FNumber': "Blende:\t\tF",
# 'Exif.Photo.ExposureProgram',
'Exif.Photo.ISOSpeedRatings': "ISO:\t\t",
# 'Exif.Photo.SensitivityType',
# 'Exif.Photo.ExifVersion',
# 'Exif.Photo.DateTimeOriginal',
# 'Exif.Photo.DateTimeDigitized',
# 'Exif.Photo.ComponentsConfiguration',
# 'Exif.Photo.CompressedBitsPerPixel',
# 'Exif.Photo.ExposureBiasValue',
# 'Exif.Photo.MaxApertureValue',
# 'Exif.Photo.MeteringMode',
# 'Exif.Photo.LightSource',
# 'Exif.Photo.Flash',
'Exif.Photo.FocalLength': "Brennweite:\t"
# 'Exif.Photo.MakerNote'
}
for i in range(1, len(sys.argv)):
metadata = GExiv2.Metadata(sys.argv[i])
print("file: {}".format(sys.argv[i]))
for key in phototags:
try:
print("{}: {}".format(phototags[key], metadata[key]))
except KeyError:
continue
| pseyfert/pyexiv2-scripts | dumpPHOTO.py | Python | gpl-2.0 | 997 | [
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
18750,
2509,
12324,
25353,
2015,
2013,
21025,
1012,
22409,
12324,
16216,
9048,
2615,
2475,
6302,
15900,
2015,
1027,
1063,
1005,
4654,
10128,
1012,
6302,
1012,
7524,
7292,
1005,
1024,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
---
title: COPLESTONE
is_name: true
---
COPLESTONE RADCLIFFE see RADCLIFFE
| stokeclimsland/stokeclimsland | _cards/COPLESTONE.md | Markdown | mit | 80 | [
30522,
1011,
1011,
1011,
2516,
1024,
8872,
4244,
5524,
2003,
1035,
2171,
1024,
2995,
1011,
1011,
1011,
8872,
4244,
5524,
22603,
2156,
22603,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_51) on Thu Jun 19 22:03:32 EEST 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Package org.java_websocket.client (Java WebSocket 1.3.1-SNAPSHOT API)</title>
<meta name="date" content="2014-06-19">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package org.java_websocket.client (Java WebSocket 1.3.1-SNAPSHOT API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/java_websocket/client/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Uses of Package org.java_websocket.client" class="title">Uses of Package<br>org.java_websocket.client</h1>
</div>
<div class="contentContainer">No usage of org.java_websocket.client</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/java_websocket/client/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2014. All Rights Reserved.</small></p>
</body>
</html>
| BurgasFMI/PresentationSystem | target/apidocs/org/java_websocket/client/package-use.html | HTML | mit | 3,965 | [
30522,
1026,
999,
9986,
13874,
16129,
30524,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
16129,
2549... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
vectorectus
=========== | wtdilab/vectorectus | README.md | Markdown | mit | 23 | [
30522,
9207,
22471,
2271,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using Microsoft.Languages.Editor.Completions;
using Microsoft.R.Editor.Completions;
using Microsoft.VisualStudio.Text.Editor;
namespace Microsoft.R.Editor.Commands {
/// <summary>
/// Completion controller in R code editor
/// </summary>
internal sealed class RCompletionCommandHandler : CompletionCommandHandler {
public RCompletionCommandHandler(ITextView textView) : base(textView) { }
public override CompletionController CompletionController
=> CompletionController.FromTextView<RCompletionController>(TextView);
}
}
| AlexanderSher/RTVS | src/Windows/R/Editor/Impl/Commands/RCompletionCommandHandler.cs | C# | mit | 729 | [
30522,
1013,
1013,
9385,
1006,
1039,
1007,
7513,
3840,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
7000,
2104,
1996,
10210,
6105,
1012,
2156,
6105,
1999,
1996,
2622,
7117,
2005,
6105,
2592,
1012,
2478,
7513,
1012,
4155,
1012,
3559,
1012,
65... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html data-context="Build Apps" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>Create and Install Bundles - Legato Docs</title>
<meta content="legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development" name="description"/>
<meta content="legato, iot" name="keywords"/>
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
<meta content="19.11.6" name="legato-version"/>
<link href="resources/images/legato.ico" rel="shortcut icon"/>
<link href="resources/images/legato.ico" rel="icon" type="image/x-icon"/>
<link href="resources/images/legato.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="resources/images/legato.ico" rel="apple-touch-icon" type="image/x-icon"/>
<link href="resources/css/style.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="resources/css/font-awesome.css" rel="stylesheet" type="text/css"/>
<!--[if IE]>
<script src="resources/js/html5shiv.js"></script>
<script src="resources/js/respond.js"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script>
<script src="resources/js/main.js"></script>
<script src="tocs/Build_Apps_API_Guides.json"></script>
</head>
<body>
<noscript>
<input class="modal-closing-trick" id="modal-closing-trick" type="checkbox"/>
<div id="nojs">
<label for="modal-closing-trick">
<span>You seem to not have Javascript <a href="http://enable-javascript.com">enabled</a>, so site functionality like the search and navigation tree won't work.</span>
</label>
</div>
</noscript>
<div class="wrapper">
<div class="fa fa-bars documentation" id="menu-trigger"></div>
<div id="top">
<header>
<nav>
<a class="navlink" href="/">Introduction</a><a class="navlink selected" href="buildAppsMain.html">Build Apps</a><a class="navlink" href="buildPlatformMain.html">Build Platform</a><a class="navlink" href="aboutMain.html">About</a>
</nav>
</header>
</div>
<div class="white" id="menudocumentation">
<header>
<a href="/"> <img alt="Back to Legato Homepage" id="logo" src="resources/images/legato_logo.png"/></a>
<h2>/ Build Apps</h2>
<nav class="secondary">
<a href="getStarted.html">Get Started</a><a href="concepts.html">Concepts</a><a class="link-selected" href="apiGuidesMain.html">API Guides</a><a href="tools.html">Tools</a><a href="howToMain.html">How To</a><a href="experimentalMain.html">Experimental Features</a>
</nav>
<nav class="ui-front">
<i class="fa fa-search" id="search-icon"></i>
<input id="searchbox" placeholder="Search"/>
</nav>
</header>
</div>
<div id="resizable">
<div id="left">
<div id="tree1"></div>
</div>
</div>
<div class="content">
<div class="header">
<div class="headertitle">
<h1 class="title">Create and Install Bundles </h1> </div>
</div><div class="contents">
<div class="textblock"><p>Build and update system and App or System bundles and upload them to AirVantage to deploy on your target.</p>
<h1><a class="anchor" id="avInstall"></a>
Create App or System Bundle</h1>
<p>AirVantage supports installing App or System bundles over the air to remote targets. The bundle must be created and then packaged by the <a class="el" href="toolsHost_av-pack.html">av-pack</a> tool.</p>
<p><code>Av-pack</code> creates a manifest xml file for AirVantage with the binary image ready to upload to the AirVantage server.</p>
<p>Example of building an application for deployment through AirVantage: </p><pre class="fragment">$ mkapp -t wp85 helloWorld.adef
$ av-pack -u helloWorld.wp85.update -b _build_helloWorld/wp85 -t abcCo.jsmith.helloWorld
</pre><p><a class="el" href="buildToolsmkapp.html">mkapp</a> builds the <code>helloWorld</code> app for the <code>wp85</code> target. The update pack file <code>helloWorld.wp85.update</code> and the AirVantage manifest file <code>manifest.app</code> are generated.</p>
<p>The <code>manifest.app</code> file is generated under the builds working directory (e.g., <code></code>./_build_helloWorld/wp85 ).</p>
<p><a class="el" href="toolsHost_av-pack.html">av-pack</a> packs these two files together and sets the apps <b>type</b> to <code>abcCo.jsmith.helloWorld</code>.</p>
<p>Example of building a system for deployment through AirVantage:</p>
<pre class="fragment">$ mksys -t wp85 mySystem.sdef
$ av-pack -u mySystem.wp85.update -b build/wp85 -t abcCo.jsmith.mySystem
</pre><p><a class="el" href="buildToolsmksys.html">mksys</a> builds the <code>mySystem</code> system for the <code>wp85</code> target. The update pack file <code>mySystem.wp85.update</code> and the AirVantage manifest file <code>manifest.sys</code> are generated.</p>
<h2><a class="anchor" id="avInstallAppType"></a>
Setting an App Type</h2>
<p>The App's type must be a globally-unique app type identifier, <b>unique</b> among <b>all</b> <b>Apps</b> in <b>all</b> <b>companies</b> <b>anywhere</b> on AirVantage.</p>
<p>Best Practices in uniquely naming type identifiers:</p><ul>
<li>Include a unique identifier for your company name to prevent naming conflicts with other companies in the world.</li>
<li>For developers Apps, include the developer's name to prevent conflicts with other developers in the same company.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>If no type is specified the type defaults to: <code>appName-legato-application</code>.</dd></dl>
<p>The output for this sample is <code>helloWorld.zip</code>. and is located in the build root.</p>
<h2><a class="anchor" id="avInstallAppSigs"></a>
App Signature Checks</h2>
<p>If your target device has been configured for App signature checks or to accept only encrypted Apps, you must use your signing/encryption tool to sign the <code></code>.update file and then pack it with <code>av-pack</code>. Don't sign or encrypt the <code>manifest.app</code> file, or the final <code></code>.zip file, as AirVantage won't be able to read them.</p>
<pre class="fragment">$ mkapp -t wp85 helloWorld.adef
$ cat helloWorld.wp85.update | myAppSigner > helloWorld.wp85.signed
$ av-pack -f helloWorld.wp85.signed abcCo.jsmith.helloWorld _build_helloWorld/wp85
</pre><h1><a class="anchor" id="avInstallCreateInstJob"></a>
Create Installation job</h1>
<p>To install your App on a remote target, you must first upload your app to AirVantage and then Create an App install job to install the App on the remote target.</p>
<p>Upload your App:</p><ul>
<li>Click "Develop"</li>
<li>Choose "My Apps"</li>
<li>Click on the "Release" Button, this will guide you through uploading the zip file you made with <code>av-pack</code>.</li>
<li>Once the zip file has been uploaded click "Publish"</li>
</ul>
<p>Create the App install job:</p><ul>
<li>In your system 'Monitor' view</li>
<li>"More" menu</li>
<li>Choose "Install Application" and select the zip file created in the previous step.</li>
</ul>
<p>AirVantage will then queue the App to be installed on your Target.</p>
<h1><a class="anchor" id="avInstallRcvAgent"></a>
Receive App on AirVantage Agent</h1>
<p>This requires either:</p><ul>
<li>creating an <code>avc</code> control App using the LWM2M AVC API that accepts the download and installation. See <a class="el" href="c_le_avc.html">AirVantage Connector API</a> API for details.</li>
<li>using AT commands to download and install the update. For information on AT Commands download the AT Command Reference from your module provider. (e.g., <a href="https://source.sierrawireless.com/resources/airprime/software/airprime_wpx5xx_wp76xx_wp77xx_at_command_reference/">AirPrime WPX5XX/WP76XX AT Command Reference</a> ).</li>
</ul>
<h2><a class="anchor" id="avInstallUploadStatus"></a>
Check Success Status on AirVantage</h2>
<p>If the installation was successful, you should find <code>helloWorld</code> in the installed Apps and on the targets' "Monitor" view App list in the AirVantage UI.</p>
<h2><a class="anchor" id="avInstallUpload_CustomSystem"></a>
Uploading a 17.05 Legato System Bundle</h2>
<p>If you have upgraded to 17.05 and wish to sync your Legato System with AirVantage, the target and revision number need to be updated in the App model before it is uploaded to the AirVantage Server.</p>
<p>Once you've built your legato system, you need to extract the model.app from the zip file and update name="<target>_<legatoVersion>" and revision="<legatoVersion>" with the target and version that matches your Legato System. (e.g., if version = "abc" then update model.app to name="WP8548_17.05.0_abc" and revision="17.05.0_abc")</p>
<pre class="fragment">$ cat build/<target>/system/staging/version # displays the version number
</pre><p>In the legato_model.zip, extract model.app; modify the name="<target>_<legatoVersion>" and revision="<legatoVersion>" to match the version number in the build.</p>
<pre class="fragment">$ unzip -d . legato_model.zip model.app
$ vi model.app # edit the two fields
$ zip -ur legato_model.zip model.app
</pre><p>Once legato_model.zip has been updated, upload to the AirVantage server and publish the model.</p>
<p>Sync the AirVantage Server with your target and this will link to your new App model.</p>
<p class="copyright">Copyright (C) Sierra Wireless Inc. </p>
</div></div>
<br clear="left"/>
</div>
</div>
<link href="resources/css/jqtree.css" rel="stylesheet" type="text/css"/>
<script src="resources/js/tree.jquery.js" type="text/javascript"></script>
<script src="resources/js/jquery.cookie.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<link href="resources/css/perfect-scrollbar.min.css" rel="stylesheet"/>
<script src="resources/js/perfect-scrollbar.jquery.min.js"></script>
</body>
</html>
| legatoproject/legato-docs | 19_11_6/avInstallUpload.html | HTML | mpl-2.0 | 9,902 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
1060,
11039,
19968,
1015,
1012,
1014,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/usr/bin/env bash
set -e
base_name="dcma_build_base_arch"
commit_id=$(git rev-parse HEAD)
clean_dirty="clean"
sstat=$(git diff --shortstat)
if [ ! -z "${sstat}" ] ; then
clean_dirty="dirty"
fi
build_datetime=$(date '+%Y%m%_0d-%_0H%_0M%_0S')
reporoot=$(git rev-parse --show-toplevel)
cd "${reporoot}"
time sudo docker build \
--network=host \
--no-cache=true \
-t "${base_name}":"built_${build_datetime}" \
-t "${base_name}":"commit_${commit_id}_${clean_dirty}" \
-t "${base_name}":latest \
-f docker/build_bases/arch/Dockerfile \
.
| hdclark/DICOMautomaton | docker/build_bases/arch/build.sh | Shell | gpl-3.0 | 575 | [
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
4372,
2615,
24234,
2275,
1011,
1041,
2918,
1035,
2171,
1027,
1000,
5887,
2863,
1035,
3857,
1035,
2918,
1035,
7905,
1000,
10797,
1035,
8909,
1027,
1002,
1006,
21025,
2102,
7065,
1011,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* @file
* Contains \Drupal\Tests\user\Unit\Plugin\Core\Entity\UserTest.
*/
namespace Drupal\Tests\user\Unit\Plugin\Core\Entity;
use Drupal\Tests\Core\Session\UserSessionTest;
use Drupal\user\RoleInterface;
/**
* @coversDefaultClass \Drupal\user\Entity\User
* @group user
*/
class UserTest extends UserSessionTest {
/**
* {@inheritdoc}
*/
protected function createUserSession(array $rids = array(), $authenticated = FALSE) {
$user = $this->getMockBuilder('Drupal\user\Entity\User')
->disableOriginalConstructor()
->setMethods(array('get', 'id'))
->getMock();
$user->expects($this->any())
->method('id')
// @todo Also test the uid = 1 handling.
->will($this->returnValue($authenticated ? 2 : 0));
$roles = array();
foreach ($rids as $rid) {
$roles[] = (object) array(
'target_id' => $rid,
);
}
$user->expects($this->any())
->method('get')
->with('roles')
->will($this->returnValue($roles));
return $user;
}
/**
* Tests the method getRoles exclude or include locked roles based in param.
*
* @see \Drupal\user\Entity\User::getRoles()
* @covers ::getRoles
*/
public function testUserGetRoles() {
// Anonymous user.
$user = $this->createUserSession(array());
$this->assertEquals(array(RoleInterface::ANONYMOUS_ID), $user->getRoles());
$this->assertEquals(array(), $user->getRoles(TRUE));
// Authenticated user.
$user = $this->createUserSession(array(), TRUE);
$this->assertEquals(array(RoleInterface::AUTHENTICATED_ID), $user->getRoles());
$this->assertEquals(array(), $user->getRoles(TRUE));
}
}
| papillon-cendre/d8 | core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php | PHP | gpl-2.0 | 1,683 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
1030,
5371,
1008,
3397,
1032,
2852,
6279,
2389,
1032,
5852,
1032,
5310,
1032,
3131,
1032,
13354,
2378,
1032,
4563,
1032,
9178,
1032,
5310,
22199,
1012,
1008,
1013,
3415,
15327,
2852,
6279,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.Search
{
using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using Microsoft.Rest.Azure;
using Models;
/// <summary>
/// Client that can be used to manage Azure Search services and API keys.
/// </summary>
public partial class SearchManagementClient : ServiceClient<SearchManagementClient>, ISearchManagementClient, IAzureClient
{
/// <summary>
/// The base URI of the service.
/// </summary>
public Uri BaseUri { get; set; }
/// <summary>
/// Gets or sets json serialization settings.
/// </summary>
public JsonSerializerSettings SerializationSettings { get; private set; }
/// <summary>
/// Gets or sets json deserialization settings.
/// </summary>
public JsonSerializerSettings DeserializationSettings { get; private set; }
/// <summary>
/// Gets Azure subscription credentials.
/// </summary>
public ServiceClientCredentials Credentials { get; private set; }
/// <summary>
/// Gets subscription credentials which uniquely identify Microsoft Azure
/// subscription. The subscription ID forms part of the URI for every service
/// call.
/// </summary>
public string SubscriptionId { get; set; }
/// <summary>
/// Client Api Version.
/// </summary>
public string ApiVersion { get; private set; }
/// <summary>
/// Gets or sets the preferred language for the response.
/// </summary>
public string AcceptLanguage { get; set; }
/// <summary>
/// Gets or sets the retry timeout in seconds for Long Running Operations.
/// Default value is 30.
/// </summary>
public int? LongRunningOperationRetryTimeout { get; set; }
/// <summary>
/// When set to true a unique x-ms-client-request-id value is generated and
/// included in each request. Default is true.
/// </summary>
public bool? GenerateClientRequestId { get; set; }
/// <summary>
/// Gets the IAdminKeysOperations.
/// </summary>
public virtual IAdminKeysOperations AdminKeys { get; private set; }
/// <summary>
/// Gets the IQueryKeysOperations.
/// </summary>
public virtual IQueryKeysOperations QueryKeys { get; private set; }
/// <summary>
/// Gets the IServicesOperations.
/// </summary>
public virtual IServicesOperations Services { get; private set; }
/// <summary>
/// Initializes a new instance of the SearchManagementClient class.
/// </summary>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
protected SearchManagementClient(params DelegatingHandler[] handlers) : base(handlers)
{
this.Initialize();
}
/// <summary>
/// Initializes a new instance of the SearchManagementClient class.
/// </summary>
/// <param name='rootHandler'>
/// Optional. The http client handler used to handle http transport.
/// </param>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
protected SearchManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
{
this.Initialize();
}
/// <summary>
/// Initializes a new instance of the SearchManagementClient class.
/// </summary>
/// <param name='baseUri'>
/// Optional. The base URI of the service.
/// </param>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
protected SearchManagementClient(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
{
if (baseUri == null)
{
throw new ArgumentNullException("baseUri");
}
this.BaseUri = baseUri;
}
/// <summary>
/// Initializes a new instance of the SearchManagementClient class.
/// </summary>
/// <param name='baseUri'>
/// Optional. The base URI of the service.
/// </param>
/// <param name='rootHandler'>
/// Optional. The http client handler used to handle http transport.
/// </param>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
protected SearchManagementClient(Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (baseUri == null)
{
throw new ArgumentNullException("baseUri");
}
this.BaseUri = baseUri;
}
/// <summary>
/// Initializes a new instance of the SearchManagementClient class.
/// </summary>
/// <param name='credentials'>
/// Required. Gets Azure subscription credentials.
/// </param>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
public SearchManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
{
if (credentials == null)
{
throw new ArgumentNullException("credentials");
}
this.Credentials = credentials;
if (this.Credentials != null)
{
this.Credentials.InitializeServiceClient(this);
}
}
/// <summary>
/// Initializes a new instance of the SearchManagementClient class.
/// </summary>
/// <param name='credentials'>
/// Required. Gets Azure subscription credentials.
/// </param>
/// <param name='rootHandler'>
/// Optional. The http client handler used to handle http transport.
/// </param>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
public SearchManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (credentials == null)
{
throw new ArgumentNullException("credentials");
}
this.Credentials = credentials;
if (this.Credentials != null)
{
this.Credentials.InitializeServiceClient(this);
}
}
/// <summary>
/// Initializes a new instance of the SearchManagementClient class.
/// </summary>
/// <param name='baseUri'>
/// Optional. The base URI of the service.
/// </param>
/// <param name='credentials'>
/// Required. Gets Azure subscription credentials.
/// </param>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
public SearchManagementClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
{
if (baseUri == null)
{
throw new ArgumentNullException("baseUri");
}
if (credentials == null)
{
throw new ArgumentNullException("credentials");
}
this.BaseUri = baseUri;
this.Credentials = credentials;
if (this.Credentials != null)
{
this.Credentials.InitializeServiceClient(this);
}
}
/// <summary>
/// Initializes a new instance of the SearchManagementClient class.
/// </summary>
/// <param name='baseUri'>
/// Optional. The base URI of the service.
/// </param>
/// <param name='credentials'>
/// Required. Gets Azure subscription credentials.
/// </param>
/// <param name='rootHandler'>
/// Optional. The http client handler used to handle http transport.
/// </param>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
public SearchManagementClient(Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (baseUri == null)
{
throw new ArgumentNullException("baseUri");
}
if (credentials == null)
{
throw new ArgumentNullException("credentials");
}
this.BaseUri = baseUri;
this.Credentials = credentials;
if (this.Credentials != null)
{
this.Credentials.InitializeServiceClient(this);
}
}
/// <summary>
/// Initializes client properties.
/// </summary>
private void Initialize()
{
this.AdminKeys = new AdminKeysOperations(this);
this.QueryKeys = new QueryKeysOperations(this);
this.Services = new ServicesOperations(this);
this.BaseUri = new Uri("https://management.azure.com");
this.ApiVersion = "2015-02-28";
this.AcceptLanguage = "en-US";
this.LongRunningOperationRetryTimeout = 30;
this.GenerateClientRequestId = true;
SerializationSettings = new JsonSerializerSettings
{
Formatting = Formatting.Indented,
DateFormatHandling = DateFormatHandling.IsoDateFormat,
DateTimeZoneHandling = DateTimeZoneHandling.Utc,
NullValueHandling = NullValueHandling.Ignore,
ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
ContractResolver = new ReadOnlyJsonContractResolver(),
Converters = new List<JsonConverter>
{
new Iso8601TimeSpanConverter()
}
};
DeserializationSettings = new JsonSerializerSettings
{
DateFormatHandling = DateFormatHandling.IsoDateFormat,
DateTimeZoneHandling = DateTimeZoneHandling.Utc,
NullValueHandling = NullValueHandling.Ignore,
ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
ContractResolver = new ReadOnlyJsonContractResolver(),
Converters = new List<JsonConverter>
{
new Iso8601TimeSpanConverter()
}
};
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
}
}
}
| yoavrubin/azure-sdk-for-net | src/Search/Microsoft.Azure.Management.Search/Generated/SearchManagementClient.cs | C# | apache-2.0 | 11,934 | [
30522,
1013,
1013,
9385,
1006,
1039,
1007,
7513,
3840,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
7000,
2104,
1996,
10210,
6105,
1012,
2156,
6105,
1012,
19067,
2102,
1999,
1996,
2622,
7117,
2005,
1013,
1013,
6105,
2592,
1012,
1013,
1013,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// Generated by CoffeeScript 1.7.1
(function() {
var M, TRM, TYPES, alert, badge, debug, echo, help, info, log, njs_fs, options, rainbow, rpr, urge, warn, whisper,
__slice = [].slice;
njs_fs = require('fs');
TYPES = require('coffeenode-types');
TRM = require('coffeenode-trm');
rpr = TRM.rpr.bind(TRM);
badge = 'HOLLERITH/KEY';
log = TRM.get_logger('plain', badge);
info = TRM.get_logger('info', badge);
whisper = TRM.get_logger('whisper', badge);
alert = TRM.get_logger('alert', badge);
debug = TRM.get_logger('debug', badge);
warn = TRM.get_logger('warn', badge);
help = TRM.get_logger('help', badge);
urge = TRM.get_logger('urge', badge);
echo = TRM.echo.bind(TRM);
rainbow = TRM.rainbow.bind(TRM);
options = require('../../options');
M = options['marks'];
/*
*===========================================================================================================
888b 888 8888888888 888 888
8888b 888 888 888 o 888
88888b 888 888 888 d8b 888
888Y88b 888 8888888 888 d888b 888
888 Y88b888 888 888d88888b888
888 Y88888 888 88888P Y88888
888 Y8888 888 8888P Y8888
888 Y888 8888888888 888P Y888
*===========================================================================================================
*/
this.new_key = function() {
var complement, complement_esc, datatype, idx, idxs, index_count, pad, predicate, predicate_esc, schema, theme, theme_esc, topic, topic_esc, type;
schema = arguments[0], theme = arguments[1], topic = arguments[2], predicate = arguments[3], complement = arguments[4], idx = 6 <= arguments.length ? __slice.call(arguments, 5) : [];
/* TAINT should go to `hollerith/KEY` */
if ((datatype = schema[predicate]) == null) {
throw new Error("unknown datatype " + (rpr(predicate)));
}
index_count = datatype['index-count'], type = datatype.type, pad = datatype.pad;
if (index_count !== idx.length) {
throw new Error("need " + index_count + " indices for predicate " + (rpr(predicate)) + ", got " + idx.length);
}
theme_esc = KEY.esc(theme);
topic_esc = KEY.esc(topic);
predicate_esc = KEY.esc(predicate);
complement_esc = KEY.esc(complement);
/* TAINT parametrize */
idxs = index_count === 0 ? '' : idxs.join(',');
return 's' + '|' + theme_esc + '|' + topic_esc + '|' + predicate_esc + '|' + complement_esc + '|' + idxs;
};
/*
*===========================================================================================================
.d88888b. 888 8888888b.
d88P" "Y88b 888 888 "Y88b
888 888 888 888 888
888 888 888 888 888
888 888 888 888 888
888 888 888 888 888
Y88b. .d88P 888 888 .d88P
"Y88888P" 88888888 8888888P"
*===========================================================================================================
*/
this.new_route = function(realm, type, name) {
var R, part;
R = [realm, type];
if (name != null) {
R.push(name);
}
return ((function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = R.length; _i < _len; _i++) {
part = R[_i];
_results.push(this.esc(part));
}
return _results;
}).call(this)).join(M['slash']);
};
this.new_id = function(realm, type, idn) {
var slash;
slash = M['slash'];
return (this.new_route(realm, type)) + slash + (this.esc(idn));
};
this.new_node = function() {
var R, crumb, idn, joiner, realm, tail, type;
realm = arguments[0], type = arguments[1], idn = arguments[2], tail = 4 <= arguments.length ? __slice.call(arguments, 3) : [];
joiner = M['joiner'];
R = M['primary'] + M['node'] + joiner + (this.new_id(realm, type, idn));
if (tail.length > 0) {
R += M['slash'] + (((function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = tail.length; _i < _len; _i++) {
crumb = tail[_i];
_results.push(this.esc(crumb));
}
return _results;
}).call(this)).join(M['slash']));
}
R += joiner;
return R;
};
this.new_secondary_node = function() {
var R, crumb, idn, joiner, realm, slash, tail, type;
realm = arguments[0], type = arguments[1], idn = arguments[2], tail = 4 <= arguments.length ? __slice.call(arguments, 3) : [];
joiner = M['joiner'];
slash = M['slash'];
R = M['secondary'] + M['node'] + slash + (this.esc(realm)) + (this.esc(type));
if (tail.length > 0) {
R += joiner + (((function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = tail.length; _i < _len; _i++) {
crumb = tail[_i];
_results.push(this.esc(crumb));
}
return _results;
}).call(this)).join(slash));
}
R += joiner + (this.esc(idn)) + joiner;
return R;
};
this.new_facet_pair = function(realm, type, idn, name, value, distance) {
if (distance == null) {
distance = 0;
}
return [this.new_facet(realm, type, idn, name, value, distance), this.new_secondary_facet(realm, type, idn, name, value, distance)];
};
this.new_facet = function(realm, type, idn, name, value, distance) {
var joiner;
if (distance == null) {
distance = 0;
}
joiner = M['joiner'];
return M['primary'] + M['facet'] + joiner + (this.new_id(realm, type, idn)) + joiner + (this.esc(name)) + joiner + (this.esc(value)) + joiner + distance + joiner;
};
this.new_secondary_facet = function(realm, type, idn, name, value, distance) {
var joiner;
if (distance == null) {
distance = 0;
}
joiner = M['joiner'];
return M['secondary'] + M['facet'] + joiner + (this.new_route(realm, type)) + joiner + (this.esc(name)) + joiner + (this.esc(value)) + joiner + (this.esc(idn)) + joiner + distance + joiner;
};
this.new_link_pair = function(realm_0, type_0, idn_0, realm_1, type_1, idn_1, distance) {
if (distance == null) {
distance = 0;
}
return [this.new_link(realm_0, type_0, idn_0, realm_1, type_1, idn_1, distance), this.new_secondary_link(realm_0, type_0, idn_0, realm_1, type_1, idn_1, distance)];
};
this.new_link = function(realm_0, type_0, idn_0, realm_1, type_1, idn_1, distance) {
var joiner;
if (distance == null) {
distance = 0;
}
joiner = M['joiner'];
return M['primary'] + M['link'] + joiner + (this.new_id(realm_0, type_0, idn_0)) + joiner + (this.new_id(realm_1, type_1, idn_1)) + joiner + distance + joiner;
};
this.new_secondary_link = function(realm_0, type_0, idn_0, realm_1, type_1, idn_1, distance) {
var joiner;
if (distance == null) {
distance = 0;
}
joiner = M['joiner'];
return M['secondary'] + M['link'] + joiner + (this.new_route(realm_0, type_0)) + joiner + (this.new_id(realm_1, type_1, idn_1)) + joiner + (this.esc(idn_0)) + joiner + distance + joiner;
};
this.read = function(key) {
var R, fields, layer, type, _ref, _ref1;
_ref = key.split(M['joiner']), (_ref1 = _ref[0], layer = _ref1[0], type = _ref1[1]), fields = 2 <= _ref.length ? __slice.call(_ref, 1) : [];
switch (layer) {
case M['primary']:
switch (type) {
case M['node']:
R = this._read_primary_node.apply(this, fields);
break;
case M['facet']:
R = this._read_primary_facet.apply(this, fields);
break;
case M['link']:
R = this._read_primary_link.apply(this, fields);
break;
default:
throw new Error("unknown type mark " + (rpr(type)));
}
break;
case M['secondary']:
switch (type) {
case M['facet']:
R = this._read_secondary_facet.apply(this, fields);
break;
case M['link']:
R = this._read_secondary_link.apply(this, fields);
break;
default:
throw new Error("unknown type mark " + (rpr(type)));
}
break;
default:
throw new Error("unknown layer mark " + (rpr(layer)));
}
R['key'] = key;
return R;
};
this._read_primary_node = function(id) {
var R;
R = {
level: 'primary',
type: 'node',
id: id
};
return R;
};
this._read_primary_facet = function(id, name, value, distance) {
var R;
R = {
level: 'primary',
type: 'facet',
id: id,
name: name,
value: value,
distance: parseInt(distance, 10)
};
return R;
};
this._read_primary_link = function(id_0, id_1, distance) {
var R;
R = {
level: 'primary',
type: 'link',
id: id_0,
target: id_1,
distance: parseInt(distance, 10)
};
return R;
};
this._read_secondary_facet = function(route, name, value, idn, distance) {
var R;
R = {
level: 'secondary',
type: 'facet',
id: route + M['slash'] + idn,
name: name,
value: value,
distance: parseInt(distance, 10)
};
return R;
};
this._read_secondary_link = function(route_0, id_1, idn_0, distance) {
var R, id_0;
id_0 = route_0 + M['slash'] + idn_0;
R = {
level: 'secondary',
type: 'link',
id: id_0,
target: id_1,
distance: parseInt(distance, 10)
};
return R;
};
this.infer = function(key_0, key_1) {
return this._infer(key_0, key_1, 'primary');
};
this.infer_secondary = function(key_0, key_1) {
return this._infer(key_0, key_1, 'secondary');
};
this.infer_pair = function(key_0, key_1) {
return this._infer(key_0, key_1, 'pair');
};
this._infer = function(key_0, key_1, mode) {
var id_1, id_2, info_0, info_1, type_0, type_1;
info_0 = TYPES.isa_text(key_0) ? this.read(key_0) : key_0;
info_1 = TYPES.isa_text(key_1) ? this.read(key_1) : key_1;
if ((type_0 = info_0['type']) === 'link') {
if ((id_1 = info_0['target']) !== (id_2 = info_1['id'])) {
throw new Error("unable to infer link from " + (rpr(info_0['key'])) + " and " + (rpr(info_1['key'])));
}
switch (type_1 = info_1['type']) {
case 'link':
return this._infer_link(info_0, info_1, mode);
case 'facet':
return this._infer_facet(info_0, info_1, mode);
}
}
throw new Error("expected a link plus a link or a facet, got a " + type_0 + " and a " + type_1);
};
this._infer_facet = function(link, facet, mode) {
var distance, facet_idn, facet_realm, facet_type, link_idn, link_realm, link_type, name, slash, value, _ref, _ref1;
_ref = this.split_id(link['id']), link_realm = _ref[0], link_type = _ref[1], link_idn = _ref[2];
_ref1 = this.split_id(link['id']), facet_realm = _ref1[0], facet_type = _ref1[1], facet_idn = _ref1[2];
/* TAINT route not distinct from ID? */
/* TAINT should slashes in name be escaped? */
/* TAINT what happens when we infer from an inferred facet? do all the escapes get re-escaped? */
/* TAINT use module method */
slash = M['slash'];
/* TAINT make use of dash configurable */
name = (this.esc(facet_realm)) + '-' + (this.esc(facet_type)) + '-' + (this.esc(facet['name']));
value = facet['value'];
distance = link['distance'] + facet['distance'] + 1;
switch (mode) {
case 'primary':
return this.new_facet(link_realm, link_type, link_idn, name, value, distance);
case 'secondary':
return this.new_secondary_facet(link_realm, link_type, link_idn, name, value, distance);
case 'pair':
return this.new_facet_pair(link_realm, link_type, link_idn, name, value, distance);
default:
throw new Error("unknown mode " + (rpr(mode)));
}
};
this._infer_link = function(link_0, link_1, mode) {
/*
$^|gtfs/stoptime/876|0|gtfs/trip/456
+ $^|gtfs/trip/456|0|gtfs/route/777
----------------------------------------------------------------
= $^|gtfs/stoptime/876|1|gtfs/route/777
= %^|gtfs/stoptime|1|gtfs/route/777|876
*/
var distance, idn_0, idn_2, realm_0, realm_2, type_0, type_2, _ref, _ref1;
_ref = this.split_id(link_0['id']), realm_0 = _ref[0], type_0 = _ref[1], idn_0 = _ref[2];
_ref1 = this.split_id(link_1['target']), realm_2 = _ref1[0], type_2 = _ref1[1], idn_2 = _ref1[2];
distance = link_0['distance'] + link_1['distance'] + 1;
switch (mode) {
case 'primary':
return this.new_link(realm_0, type_0, idn_0, realm_2, type_2, idn_2, distance);
case 'secondary':
return this.new_secondary_link(realm_0, type_0, idn_0, realm_2, type_2, idn_2, distance);
case 'pair':
return this.new_link_pair(realm_0, type_0, idn_0, realm_2, type_2, idn_2, distance);
default:
throw new Error("unknown mode " + (rpr(mode)));
}
};
this.esc = (function() {
/* TAINT too complected */
var d, escape, joiner_matcher, joiner_replacer;
escape = function(text) {
var R;
R = text;
R = R.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1');
R = R.replace(/\x08/g, '\\x08');
return R;
};
joiner_matcher = new RegExp(escape(M['joiner']), 'g');
/* TAINT not correct, could be single digit if byte value < 0x10 */
joiner_replacer = ((function() {
var _i, _len, _ref, _results;
_ref = new Buffer(M['joiner']);
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
d = _ref[_i];
_results.push('µ' + d.toString(16));
}
return _results;
})()).join('');
return function(x) {
var R;
if (x === void 0) {
throw new Error("value cannot be undefined");
}
R = TYPES.isa_text(x) ? x : rpr(x);
R = R.replace(/µ/g, 'µb5');
R = R.replace(joiner_matcher, joiner_replacer);
return R;
};
})();
this.unescape = function(text_esc) {
var matcher;
matcher = /µ([0-9a-f]{2})/g;
return text_esc.replace(matcher, function(_, cid_hex) {
return String.fromCharCode(parseInt(cid_hex, 16));
});
};
this.split_id = function(id) {
/* TAINT must unescape */
var R, slash;
R = id.split(slash = M['slash']);
if (R.length !== 3) {
throw new Error("expected three parts separated by " + (rpr(slash)) + ", got " + (rpr(id)));
}
if (!(R[0].length > 0)) {
throw new Error("realm cannot be empty in " + (rpr(id)));
}
if (!(R[1].length > 0)) {
throw new Error("type cannot be empty in " + (rpr(id)));
}
if (!(R[2].length > 0)) {
throw new Error("IDN cannot be empty in " + (rpr(id)));
}
return R;
};
this.split = function(x) {
return x.split(M['joiner']);
};
this.split_compound_selector = function(compound_selector) {
/* TAINT must unescape */
return compound_selector.split(M['loop']);
};
this._idn_from_id = function(id) {
var match;
match = id.replace(/^.+?([^\/]+)$/);
if (match == null) {
throw new Error("not a valid ID: " + (rpr(id)));
}
return match[1];
};
this.lte_from_gte = function(gte) {
var R, length;
length = Buffer.byteLength(gte);
R = new Buffer(1 + length);
R.write(gte);
R[length] = 0xff;
return R;
};
if (module.parent == null) {
help(this.new_id('gtfs', 'stop', '123'));
help(this.new_facet('gtfs', 'stop', '123', 'name', 1234));
help(this.new_facet('gtfs', 'stop', '123', 'name', 'foo/bar|baz'));
help(this.new_facet('gtfs', 'stop', '123', 'name', 'Bayerischer Platz'));
help(this.new_secondary_facet('gtfs', 'stop', '123', 'name', 'Bayerischer Platz'));
help(this.new_facet_pair('gtfs', 'stop', '123', 'name', 'Bayerischer Platz'));
help(this.new_link('gtfs', 'stoptime', '456', 'gtfs', 'stop', '123'));
help(this.new_secondary_link('gtfs', 'stoptime', '456', 'gtfs', 'stop', '123'));
help(this.new_link_pair('gtfs', 'stoptime', '456', 'gtfs', 'stop', '123'));
help(this.read(this.new_facet('gtfs', 'stop', '123', 'name', 'Bayerischer Platz')));
help(this.read(this.new_secondary_facet('gtfs', 'stop', '123', 'name', 'Bayerischer Platz')));
help(this.read(this.new_link('gtfs', 'stoptime', '456', 'gtfs', 'stop', '123')));
help(this.read(this.new_secondary_link('gtfs', 'stoptime', '456', 'gtfs', 'stop', '123')));
help(this.infer('$^|gtfs/stoptime/876|0|gtfs/trip/456', '$^|gtfs/trip/456|0|gtfs/route/777'));
help(this.infer('$^|gtfs/stoptime/876|0|gtfs/trip/456', '%^|gtfs/trip|0|gtfs/route/777|456'));
help(this.infer('$^|gtfs/trip/456|0|gtfs/stop/123', '$:|gtfs/stop/123|0|name|Bayerischer Platz'));
help(this.infer('$^|gtfs/stoptime/876|1|gtfs/stop/123', '$:|gtfs/stop/123|0|name|Bayerischer Platz'));
}
}).call(this);
| loveencounterflow/hollerith1 | lib/scratch/KEY.js | JavaScript | mit | 16,912 | [
30522,
1013,
1013,
7013,
2011,
4157,
22483,
1015,
1012,
1021,
1012,
1015,
1006,
3853,
1006,
1007,
1063,
13075,
1049,
1010,
19817,
2213,
1010,
4127,
1010,
9499,
1010,
10780,
1010,
2139,
8569,
2290,
1010,
9052,
1010,
2393,
1010,
18558,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (c) 2008-2017, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hazelcast.cluster.impl;
import com.hazelcast.config.Config;
import com.hazelcast.config.InterfacesConfig;
import com.hazelcast.config.NetworkConfig;
import com.hazelcast.config.TcpIpConfig;
import com.hazelcast.instance.Node;
import com.hazelcast.internal.cluster.impl.AbstractJoiner;
import com.hazelcast.internal.cluster.impl.ClusterServiceImpl;
import com.hazelcast.internal.cluster.impl.SplitBrainJoinMessage;
import com.hazelcast.internal.cluster.impl.operations.JoinMastershipClaimOp;
import com.hazelcast.nio.Address;
import com.hazelcast.nio.Connection;
import com.hazelcast.spi.properties.GroupProperty;
import com.hazelcast.util.AddressUtil;
import com.hazelcast.util.AddressUtil.AddressMatcher;
import com.hazelcast.util.AddressUtil.InvalidAddressException;
import com.hazelcast.util.Clock;
import com.hazelcast.util.EmptyStatement;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import static com.hazelcast.util.AddressUtil.AddressHolder;
public class TcpIpJoiner extends AbstractJoiner {
private static final long JOIN_RETRY_WAIT_TIME = 1000L;
private static final int LOOK_FOR_MASTER_MAX_TRY_COUNT = 20;
private final int maxPortTryCount;
private volatile boolean claimingMaster;
public TcpIpJoiner(Node node) {
super(node);
int tryCount = node.getProperties().getInteger(GroupProperty.TCP_JOIN_PORT_TRY_COUNT);
if (tryCount <= 0) {
throw new IllegalArgumentException(String.format("%s should be greater than zero! Current value: %d",
GroupProperty.TCP_JOIN_PORT_TRY_COUNT, tryCount));
}
maxPortTryCount = tryCount;
}
public boolean isClaimingMaster() {
return claimingMaster;
}
protected int getConnTimeoutSeconds() {
return config.getNetworkConfig().getJoin().getTcpIpConfig().getConnectionTimeoutSeconds();
}
@Override
public void doJoin() {
final Address targetAddress = getTargetAddress();
if (targetAddress != null) {
long maxJoinMergeTargetMillis = node.getProperties().getMillis(GroupProperty.MAX_JOIN_MERGE_TARGET_SECONDS);
joinViaTargetMember(targetAddress, maxJoinMergeTargetMillis);
if (!clusterService.isJoined()) {
joinViaPossibleMembers();
}
} else if (config.getNetworkConfig().getJoin().getTcpIpConfig().getRequiredMember() != null) {
Address requiredMember = getRequiredMemberAddress();
long maxJoinMillis = getMaxJoinMillis();
joinViaTargetMember(requiredMember, maxJoinMillis);
} else {
joinViaPossibleMembers();
}
}
private void joinViaTargetMember(Address targetAddress, long maxJoinMillis) {
try {
if (targetAddress == null) {
throw new IllegalArgumentException("Invalid target address -> NULL");
}
if (logger.isFineEnabled()) {
logger.fine("Joining over target member " + targetAddress);
}
if (targetAddress.equals(node.getThisAddress()) || isLocalAddress(targetAddress)) {
clusterJoinManager.setThisMemberAsMaster();
return;
}
long joinStartTime = Clock.currentTimeMillis();
Connection connection;
while (shouldRetry() && (Clock.currentTimeMillis() - joinStartTime < maxJoinMillis)) {
connection = node.connectionManager.getOrConnect(targetAddress);
if (connection == null) {
//noinspection BusyWait
Thread.sleep(JOIN_RETRY_WAIT_TIME);
continue;
}
if (logger.isFineEnabled()) {
logger.fine("Sending joinRequest " + targetAddress);
}
clusterJoinManager.sendJoinRequest(targetAddress, true);
//noinspection BusyWait
Thread.sleep(JOIN_RETRY_WAIT_TIME);
}
} catch (final Exception e) {
logger.warning(e);
}
}
private void joinViaPossibleMembers() {
try {
blacklistedAddresses.clear();
Collection<Address> possibleAddresses = getPossibleAddresses();
boolean foundConnection = tryInitialConnection(possibleAddresses);
if (!foundConnection) {
logger.fine("This node will assume master role since no possible member where connected to.");
clusterJoinManager.setThisMemberAsMaster();
return;
}
long maxJoinMillis = getMaxJoinMillis();
long startTime = Clock.currentTimeMillis();
while (shouldRetry() && (Clock.currentTimeMillis() - startTime < maxJoinMillis)) {
tryToJoinPossibleAddresses(possibleAddresses);
if (clusterService.isJoined()) {
return;
}
if (isAllBlacklisted(possibleAddresses)) {
logger.fine(
"This node will assume master role since none of the possible members accepted join request.");
clusterJoinManager.setThisMemberAsMaster();
return;
}
boolean masterCandidate = isThisNodeMasterCandidate(possibleAddresses);
if (masterCandidate) {
boolean consensus = claimMastership(possibleAddresses);
if (consensus) {
if (logger.isFineEnabled()) {
Set<Address> votingEndpoints = new HashSet<Address>(possibleAddresses);
votingEndpoints.removeAll(blacklistedAddresses.keySet());
logger.fine("Setting myself as master after consensus!"
+ " Voting endpoints: " + votingEndpoints);
}
clusterJoinManager.setThisMemberAsMaster();
claimingMaster = false;
return;
}
} else {
if (logger.isFineEnabled()) {
logger.fine("Cannot claim myself as master! Will try to connect a possible master...");
}
}
claimingMaster = false;
lookForMaster(possibleAddresses);
}
} catch (Throwable t) {
logger.severe(t);
}
}
@SuppressWarnings("checkstyle:npathcomplexity")
private boolean claimMastership(Collection<Address> possibleAddresses) {
if (logger.isFineEnabled()) {
Set<Address> votingEndpoints = new HashSet<Address>(possibleAddresses);
votingEndpoints.removeAll(blacklistedAddresses.keySet());
logger.fine("Claiming myself as master node! Asking to endpoints: " + votingEndpoints);
}
claimingMaster = true;
Collection<Future<Boolean>> responses = new LinkedList<Future<Boolean>>();
for (Address address : possibleAddresses) {
if (isBlacklisted(address)) {
continue;
}
if (node.getConnectionManager().getConnection(address) != null) {
Future<Boolean> future = node.nodeEngine.getOperationService()
.createInvocationBuilder(ClusterServiceImpl.SERVICE_NAME,
new JoinMastershipClaimOp(), address).setTryCount(1).invoke();
responses.add(future);
}
}
final long maxWait = TimeUnit.SECONDS.toMillis(10);
long waitTime = 0L;
boolean consensus = true;
for (Future<Boolean> response : responses) {
long t = Clock.currentTimeMillis();
try {
consensus = response.get(1, TimeUnit.SECONDS);
} catch (Exception e) {
logger.finest(e);
consensus = false;
} finally {
waitTime += (Clock.currentTimeMillis() - t);
}
if (!consensus) {
break;
}
if (waitTime > maxWait) {
consensus = false;
break;
}
}
return consensus;
}
private boolean isThisNodeMasterCandidate(Collection<Address> possibleAddresses) {
int thisHashCode = node.getThisAddress().hashCode();
for (Address address : possibleAddresses) {
if (isBlacklisted(address)) {
continue;
}
if (node.connectionManager.getConnection(address) != null) {
if (thisHashCode > address.hashCode()) {
return false;
}
}
}
return true;
}
private void tryToJoinPossibleAddresses(Collection<Address> possibleAddresses) throws InterruptedException {
long connectionTimeoutMillis = TimeUnit.SECONDS.toMillis(getConnTimeoutSeconds());
long start = Clock.currentTimeMillis();
while (!clusterService.isJoined() && Clock.currentTimeMillis() - start < connectionTimeoutMillis) {
Address masterAddress = clusterService.getMasterAddress();
if (isAllBlacklisted(possibleAddresses) && masterAddress == null) {
return;
}
if (masterAddress != null) {
if (logger.isFineEnabled()) {
logger.fine("Sending join request to " + masterAddress);
}
clusterJoinManager.sendJoinRequest(masterAddress, true);
} else {
sendMasterQuestion(possibleAddresses);
}
if (!clusterService.isJoined()) {
Thread.sleep(JOIN_RETRY_WAIT_TIME);
}
}
}
private boolean tryInitialConnection(Collection<Address> possibleAddresses) throws InterruptedException {
long connectionTimeoutMillis = TimeUnit.SECONDS.toMillis(getConnTimeoutSeconds());
long start = Clock.currentTimeMillis();
while (Clock.currentTimeMillis() - start < connectionTimeoutMillis) {
if (isAllBlacklisted(possibleAddresses)) {
return false;
}
if (logger.isFineEnabled()) {
logger.fine("Will send master question to each address in: " + possibleAddresses);
}
if (sendMasterQuestion(possibleAddresses)) {
return true;
}
Thread.sleep(JOIN_RETRY_WAIT_TIME);
}
return false;
}
private boolean isAllBlacklisted(Collection<Address> possibleAddresses) {
return blacklistedAddresses.keySet().containsAll(possibleAddresses);
}
@SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"})
private void lookForMaster(Collection<Address> possibleAddresses) throws InterruptedException {
int tryCount = 0;
while (clusterService.getMasterAddress() == null && tryCount++ < LOOK_FOR_MASTER_MAX_TRY_COUNT) {
sendMasterQuestion(possibleAddresses);
//noinspection BusyWait
Thread.sleep(JOIN_RETRY_WAIT_TIME);
if (isAllBlacklisted(possibleAddresses)) {
break;
}
}
if (clusterService.isJoined()) {
return;
}
if (isAllBlacklisted(possibleAddresses) && clusterService.getMasterAddress() == null) {
if (logger.isFineEnabled()) {
logger.fine("Setting myself as master! No possible addresses remaining to connect...");
}
clusterJoinManager.setThisMemberAsMaster();
return;
}
long maxMasterJoinTime = getMaxJoinTimeToMasterNode();
long start = Clock.currentTimeMillis();
while (shouldRetry() && Clock.currentTimeMillis() - start < maxMasterJoinTime) {
Address master = clusterService.getMasterAddress();
if (master != null) {
if (logger.isFineEnabled()) {
logger.fine("Joining to master " + master);
}
clusterJoinManager.sendJoinRequest(master, true);
} else {
break;
}
//noinspection BusyWait
Thread.sleep(JOIN_RETRY_WAIT_TIME);
}
if (!clusterService.isJoined()) {
Address master = clusterService.getMasterAddress();
if (master != null) {
logger.warning("Couldn't join to the master: " + master);
} else {
if (logger.isFineEnabled()) {
logger.fine("Couldn't find a master! But there was connections available: " + possibleAddresses);
}
}
}
}
private boolean sendMasterQuestion(Collection<Address> possibleAddresses) {
if (logger.isFineEnabled()) {
logger.fine("NOT sending master question to blacklisted endpoints: " + blacklistedAddresses);
}
boolean sent = false;
for (Address address : possibleAddresses) {
if (isBlacklisted(address)) {
continue;
}
if (logger.isFineEnabled()) {
logger.fine("Sending master question to " + address);
}
if (clusterJoinManager.sendMasterQuestion(address)) {
sent = true;
}
}
return sent;
}
private Address getRequiredMemberAddress() {
TcpIpConfig tcpIpConfig = config.getNetworkConfig().getJoin().getTcpIpConfig();
String host = tcpIpConfig.getRequiredMember();
try {
AddressHolder addressHolder = AddressUtil.getAddressHolder(host, config.getNetworkConfig().getPort());
if (AddressUtil.isIpAddress(addressHolder.getAddress())) {
return new Address(addressHolder.getAddress(), addressHolder.getPort());
}
InterfacesConfig interfaces = config.getNetworkConfig().getInterfaces();
if (interfaces.isEnabled()) {
InetAddress[] inetAddresses = InetAddress.getAllByName(addressHolder.getAddress());
if (inetAddresses.length > 1) {
for (InetAddress inetAddress : inetAddresses) {
if (AddressUtil.matchAnyInterface(inetAddress.getHostAddress(), interfaces.getInterfaces())) {
return new Address(inetAddress, addressHolder.getPort());
}
}
} else if (AddressUtil.matchAnyInterface(inetAddresses[0].getHostAddress(), interfaces.getInterfaces())) {
return new Address(addressHolder.getAddress(), addressHolder.getPort());
}
} else {
return new Address(addressHolder.getAddress(), addressHolder.getPort());
}
} catch (final Exception e) {
logger.warning(e);
}
return null;
}
@SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"})
protected Collection<Address> getPossibleAddresses() {
final Collection<String> possibleMembers = getMembers();
final Set<Address> possibleAddresses = new HashSet<Address>();
final NetworkConfig networkConfig = config.getNetworkConfig();
for (String possibleMember : possibleMembers) {
AddressHolder addressHolder = AddressUtil.getAddressHolder(possibleMember);
try {
boolean portIsDefined = addressHolder.getPort() != -1 || !networkConfig.isPortAutoIncrement();
int count = portIsDefined ? 1 : maxPortTryCount;
int port = addressHolder.getPort() != -1 ? addressHolder.getPort() : networkConfig.getPort();
AddressMatcher addressMatcher = null;
try {
addressMatcher = AddressUtil.getAddressMatcher(addressHolder.getAddress());
} catch (InvalidAddressException ignore) {
EmptyStatement.ignore(ignore);
}
if (addressMatcher != null) {
final Collection<String> matchedAddresses;
if (addressMatcher.isIPv4()) {
matchedAddresses = AddressUtil.getMatchingIpv4Addresses(addressMatcher);
} else {
// for IPv6 we are not doing wildcard matching
matchedAddresses = Collections.singleton(addressHolder.getAddress());
}
for (String matchedAddress : matchedAddresses) {
addPossibleAddresses(possibleAddresses, null, InetAddress.getByName(matchedAddress), port, count);
}
} else {
final String host = addressHolder.getAddress();
final InterfacesConfig interfaces = networkConfig.getInterfaces();
if (interfaces.isEnabled()) {
final InetAddress[] inetAddresses = InetAddress.getAllByName(host);
for (InetAddress inetAddress : inetAddresses) {
if (AddressUtil.matchAnyInterface(inetAddress.getHostAddress(),
interfaces.getInterfaces())) {
addPossibleAddresses(possibleAddresses, host, inetAddress, port, count);
}
}
} else {
addPossibleAddresses(possibleAddresses, host, null, port, count);
}
}
} catch (UnknownHostException e) {
logger.warning("Cannot resolve hostname '" + addressHolder.getAddress()
+ "'. Please make sure host is valid and reachable.");
if (logger.isFineEnabled()) {
logger.fine("Error during resolving possible target!", e);
}
}
}
possibleAddresses.remove(node.getThisAddress());
return possibleAddresses;
}
private void addPossibleAddresses(final Set<Address> possibleAddresses,
final String host, final InetAddress inetAddress,
final int port, final int count) throws UnknownHostException {
for (int i = 0; i < count; i++) {
int currentPort = port + i;
Address address;
if (host != null && inetAddress != null) {
address = new Address(host, inetAddress, currentPort);
} else if (host != null) {
address = new Address(host, currentPort);
} else {
address = new Address(inetAddress, currentPort);
}
if (!isLocalAddress(address)) {
possibleAddresses.add(address);
}
}
}
private boolean isLocalAddress(final Address address) throws UnknownHostException {
final Address thisAddress = node.getThisAddress();
final boolean local = thisAddress.getInetSocketAddress().equals(address.getInetSocketAddress());
if (logger.isFineEnabled()) {
logger.fine(address + " is local? " + local);
}
return local;
}
protected Collection<String> getMembers() {
return getConfigurationMembers(config);
}
public static Collection<String> getConfigurationMembers(Config config) {
final TcpIpConfig tcpIpConfig = config.getNetworkConfig().getJoin().getTcpIpConfig();
final Collection<String> configMembers = tcpIpConfig.getMembers();
final Set<String> possibleMembers = new HashSet<String>();
for (String member : configMembers) {
// split members defined in tcp-ip configuration by comma(,) semi-colon(;) space( ).
String[] members = member.split("[,; ]");
Collections.addAll(possibleMembers, members);
}
return possibleMembers;
}
@Override
public void searchForOtherClusters() {
final Collection<Address> possibleAddresses;
try {
possibleAddresses = getPossibleAddresses();
} catch (Throwable e) {
logger.severe(e);
return;
}
possibleAddresses.remove(node.getThisAddress());
possibleAddresses.removeAll(node.getClusterService().getMemberAddresses());
if (possibleAddresses.isEmpty()) {
return;
}
for (Address address : possibleAddresses) {
SplitBrainJoinMessage response = sendSplitBrainJoinMessage(address);
if (shouldMerge(response)) {
logger.warning(node.getThisAddress() + " is merging [tcp/ip] to " + address);
setTargetAddress(address);
startClusterMerge(address);
return;
}
}
}
@Override
public String getType() {
return "tcp-ip";
}
}
| tombujok/hazelcast | hazelcast/src/main/java/com/hazelcast/cluster/impl/TcpIpJoiner.java | Java | apache-2.0 | 22,055 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2263,
1011,
2418,
1010,
14015,
10526,
1010,
4297,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
7000,
30524,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.yangtools.sal.binding.generator.impl;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import org.opendaylight.yangtools.sal.binding.generator.api.BindingGenerator;
import org.opendaylight.yangtools.sal.binding.model.api.Type;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl;
public class ControllerTest {
@Test
public void controllerAugmentationTest() throws Exception {
File cn = new File(getClass().getResource("/controller-models/controller-network.yang").toURI());
File co = new File(getClass().getResource("/controller-models/controller-openflow.yang").toURI());
File ietfInetTypes = new File(getClass().getResource("/ietf/ietf-inet-types.yang").toURI());
final SchemaContext context = new YangParserImpl().parseFiles(Arrays.asList(cn, co, ietfInetTypes));
assertNotNull("Schema Context is null", context);
final BindingGenerator bindingGen = new BindingGeneratorImpl(true);
final List<Type> genTypes = bindingGen.generateTypes(context);
assertNotNull(genTypes);
assertTrue(!genTypes.isEmpty());
}
}
| 522986491/yangtools | code-generator/binding-generator-impl/src/test/java/org/opendaylight/yangtools/sal/binding/generator/impl/ControllerTest.java | Java | epl-1.0 | 1,645 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2286,
26408,
3001,
1010,
4297,
1012,
1998,
2500,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
2023,
2565,
1998,
1996,
10860,
4475,
2024,
2081,
2800,
2104,
1996,
1008,
3408,
1997,
1996,
13232,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
LumX v1.5.14
(c) 2014-2017 LumApps http://ui.lumapps.com
License: MIT
*/
(function()
{
'use strict';
angular.module('lumx.utils.depth', []);
angular.module('lumx.utils.event-scheduler', []);
angular.module('lumx.utils.transclude-replace', []);
angular.module('lumx.utils.utils', []);
angular.module('lumx.utils', [
'lumx.utils.depth',
'lumx.utils.event-scheduler',
'lumx.utils.transclude-replace',
'lumx.utils.utils'
]);
angular.module('lumx.button', []);
angular.module('lumx.checkbox', []);
angular.module('lumx.data-table', []);
angular.module('lumx.date-picker', []);
angular.module('lumx.dialog', ['lumx.utils.event-scheduler']);
angular.module('lumx.dropdown', ['lumx.utils.event-scheduler']);
angular.module('lumx.fab', []);
angular.module('lumx.file-input', []);
angular.module('lumx.icon', []);
angular.module('lumx.notification', ['lumx.utils.event-scheduler']);
angular.module('lumx.progress', []);
angular.module('lumx.radio-button', []);
angular.module('lumx.ripple', []);
angular.module('lumx.search-filter', []);
angular.module('lumx.select', []);
angular.module('lumx.stepper', []);
angular.module('lumx.switch', []);
angular.module('lumx.tabs', []);
angular.module('lumx.text-field', []);
angular.module('lumx.tooltip', []);
angular.module('lumx', [
'lumx.button',
'lumx.checkbox',
'lumx.data-table',
'lumx.date-picker',
'lumx.dialog',
'lumx.dropdown',
'lumx.fab',
'lumx.file-input',
'lumx.icon',
'lumx.notification',
'lumx.progress',
'lumx.radio-button',
'lumx.ripple',
'lumx.search-filter',
'lumx.select',
'lumx.stepper',
'lumx.switch',
'lumx.tabs',
'lumx.text-field',
'lumx.tooltip',
'lumx.utils'
]);
})();
(function()
{
'use strict';
angular
.module('lumx.utils.depth')
.service('LxDepthService', LxDepthService);
function LxDepthService()
{
var service = this;
var depth = 1000;
service.getDepth = getDepth;
service.register = register;
////////////
function getDepth()
{
return depth;
}
function register()
{
depth++;
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.utils.event-scheduler')
.service('LxEventSchedulerService', LxEventSchedulerService);
LxEventSchedulerService.$inject = ['$document', 'LxUtils'];
function LxEventSchedulerService($document, LxUtils)
{
var service = this;
var handlers = {};
var schedule = {};
service.register = register;
service.unregister = unregister;
////////////
function handle(event)
{
var scheduler = schedule[event.type];
if (angular.isDefined(scheduler))
{
for (var i = 0, length = scheduler.length; i < length; i++)
{
var handler = scheduler[i];
if (angular.isDefined(handler) && angular.isDefined(handler.callback) && angular.isFunction(handler.callback))
{
handler.callback(event);
if (event.isPropagationStopped())
{
break;
}
}
}
}
}
function register(eventName, callback)
{
var handler = {
eventName: eventName,
callback: callback
};
var id = LxUtils.generateUUID();
handlers[id] = handler;
if (angular.isUndefined(schedule[eventName]))
{
schedule[eventName] = [];
$document.on(eventName, handle);
}
schedule[eventName].unshift(handlers[id]);
return id;
}
function unregister(id)
{
var found = false;
var handler = handlers[id];
if (angular.isDefined(handler) && angular.isDefined(schedule[handler.eventName]))
{
var index = schedule[handler.eventName].indexOf(handler);
if (angular.isDefined(index) && index > -1)
{
schedule[handler.eventName].splice(index, 1);
delete handlers[id];
found = true;
}
if (schedule[handler.eventName].length === 0)
{
delete schedule[handler.eventName];
$document.off(handler.eventName, handle);
}
}
return found;
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.utils.transclude-replace')
.directive('ngTranscludeReplace', ngTranscludeReplace);
ngTranscludeReplace.$inject = ['$log'];
function ngTranscludeReplace($log)
{
return {
terminal: true,
restrict: 'EA',
link: link
};
function link(scope, element, attrs, ctrl, transclude)
{
if (!transclude)
{
$log.error('orphan',
'Illegal use of ngTranscludeReplace directive in the template! ' +
'No parent directive that requires a transclusion found. ');
return;
}
transclude(function(clone)
{
if (clone.length)
{
element.replaceWith(clone);
}
else
{
element.remove();
}
});
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.utils.utils')
.service('LxUtils', LxUtils);
function LxUtils()
{
var service = this;
service.debounce = debounce;
service.generateUUID = generateUUID;
service.disableBodyScroll = disableBodyScroll;
////////////
// http://underscorejs.org/#debounce (1.8.3)
function debounce(func, wait, immediate)
{
var timeout, args, context, timestamp, result;
wait = wait || 500;
var later = function()
{
var last = Date.now() - timestamp;
if (last < wait && last >= 0)
{
timeout = setTimeout(later, wait - last);
}
else
{
timeout = null;
if (!immediate)
{
result = func.apply(context, args);
if (!timeout)
{
context = args = null;
}
}
}
};
var debounced = function()
{
context = this;
args = arguments;
timestamp = Date.now();
var callNow = immediate && !timeout;
if (!timeout)
{
timeout = setTimeout(later, wait);
}
if (callNow)
{
result = func.apply(context, args);
context = args = null;
}
return result;
};
debounced.clear = function()
{
clearTimeout(timeout);
timeout = context = args = null;
};
return debounced;
}
function generateUUID()
{
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c)
{
var r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
return (c == 'x' ? r : (r & 0x3 | 0x8))
.toString(16);
});
return uuid.toUpperCase();
}
function disableBodyScroll()
{
var body = document.body;
var documentElement = document.documentElement;
var prevDocumentStyle = documentElement.style.cssText || '';
var prevBodyStyle = body.style.cssText || '';
var viewportTop = window.scrollY || window.pageYOffset || 0;
var clientWidth = body.clientWidth;
var hasVerticalScrollbar = body.scrollHeight > window.innerHeight + 1;
if (hasVerticalScrollbar)
{
angular.element('body').css({
position: 'fixed',
width: '100%',
top: -viewportTop + 'px'
});
}
if (body.clientWidth < clientWidth)
{
body.style.overflow = 'hidden';
}
// This should be applied after the manipulation to the body, because
// adding a scrollbar can potentially resize it, causing the measurement
// to change.
if (hasVerticalScrollbar)
{
documentElement.style.overflowY = 'scroll';
}
return function restoreScroll()
{
// Reset the inline style CSS to the previous.
body.style.cssText = prevBodyStyle;
documentElement.style.cssText = prevDocumentStyle;
// The body loses its scroll position while being fixed.
body.scrollTop = viewportTop;
};
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.button')
.directive('lxButton', lxButton);
function lxButton()
{
var buttonClass;
return {
restrict: 'E',
templateUrl: getTemplateUrl,
compile: compile,
replace: true,
transclude: true
};
function compile(element, attrs)
{
setButtonStyle(element, attrs.lxSize, attrs.lxColor, attrs.lxType);
return function(scope, element, attrs)
{
attrs.$observe('lxSize', function(lxSize)
{
setButtonStyle(element, lxSize, attrs.lxColor, attrs.lxType);
});
attrs.$observe('lxColor', function(lxColor)
{
setButtonStyle(element, attrs.lxSize, lxColor, attrs.lxType);
});
attrs.$observe('lxType', function(lxType)
{
setButtonStyle(element, attrs.lxSize, attrs.lxColor, lxType);
});
element.on('click', function(event)
{
if (attrs.disabled === true)
{
event.preventDefault();
event.stopImmediatePropagation();
}
});
};
}
function getTemplateUrl(element, attrs)
{
return isAnchor(attrs) ? 'link.html' : 'button.html';
}
function isAnchor(attrs)
{
return angular.isDefined(attrs.href) || angular.isDefined(attrs.ngHref) || angular.isDefined(attrs.ngLink) || angular.isDefined(attrs.uiSref);
}
function setButtonStyle(element, size, color, type)
{
var buttonBase = 'btn';
var buttonSize = angular.isDefined(size) ? size : 'm';
var buttonColor = angular.isDefined(color) ? color : 'primary';
var buttonType = angular.isDefined(type) ? type : 'raised';
element.removeClass(buttonClass);
buttonClass = buttonBase + ' btn--' + buttonSize + ' btn--' + buttonColor + ' btn--' + buttonType;
element.addClass(buttonClass);
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.checkbox')
.directive('lxCheckbox', lxCheckbox)
.directive('lxCheckboxLabel', lxCheckboxLabel)
.directive('lxCheckboxHelp', lxCheckboxHelp);
function lxCheckbox()
{
return {
restrict: 'E',
templateUrl: 'checkbox.html',
scope:
{
lxColor: '@?',
name: '@?',
ngChange: '&?',
ngDisabled: '=?',
ngFalseValue: '@?',
ngModel: '=',
ngTrueValue: '@?',
theme: '@?lxTheme'
},
controller: LxCheckboxController,
controllerAs: 'lxCheckbox',
bindToController: true,
transclude: true,
replace: true
};
}
LxCheckboxController.$inject = ['$scope', '$timeout', 'LxUtils'];
function LxCheckboxController($scope, $timeout, LxUtils)
{
var lxCheckbox = this;
var checkboxId;
var checkboxHasChildren;
var timer;
lxCheckbox.getCheckboxId = getCheckboxId;
lxCheckbox.getCheckboxHasChildren = getCheckboxHasChildren;
lxCheckbox.setCheckboxId = setCheckboxId;
lxCheckbox.setCheckboxHasChildren = setCheckboxHasChildren;
lxCheckbox.triggerNgChange = triggerNgChange;
$scope.$on('$destroy', function()
{
$timeout.cancel(timer);
});
init();
////////////
function getCheckboxId()
{
return checkboxId;
}
function getCheckboxHasChildren()
{
return checkboxHasChildren;
}
function init()
{
setCheckboxId(LxUtils.generateUUID());
setCheckboxHasChildren(false);
lxCheckbox.ngTrueValue = angular.isUndefined(lxCheckbox.ngTrueValue) ? true : lxCheckbox.ngTrueValue;
lxCheckbox.ngFalseValue = angular.isUndefined(lxCheckbox.ngFalseValue) ? false : lxCheckbox.ngFalseValue;
lxCheckbox.lxColor = angular.isUndefined(lxCheckbox.lxColor) ? 'accent' : lxCheckbox.lxColor;
}
function setCheckboxId(_checkboxId)
{
checkboxId = _checkboxId;
}
function setCheckboxHasChildren(_checkboxHasChildren)
{
checkboxHasChildren = _checkboxHasChildren;
}
function triggerNgChange()
{
timer = $timeout(lxCheckbox.ngChange);
}
}
function lxCheckboxLabel()
{
return {
restrict: 'AE',
require: ['^lxCheckbox', '^lxCheckboxLabel'],
templateUrl: 'checkbox-label.html',
link: link,
controller: LxCheckboxLabelController,
controllerAs: 'lxCheckboxLabel',
bindToController: true,
transclude: true,
replace: true
};
function link(scope, element, attrs, ctrls)
{
ctrls[0].setCheckboxHasChildren(true);
ctrls[1].setCheckboxId(ctrls[0].getCheckboxId());
}
}
function LxCheckboxLabelController()
{
var lxCheckboxLabel = this;
var checkboxId;
lxCheckboxLabel.getCheckboxId = getCheckboxId;
lxCheckboxLabel.setCheckboxId = setCheckboxId;
////////////
function getCheckboxId()
{
return checkboxId;
}
function setCheckboxId(_checkboxId)
{
checkboxId = _checkboxId;
}
}
function lxCheckboxHelp()
{
return {
restrict: 'AE',
require: '^lxCheckbox',
templateUrl: 'checkbox-help.html',
transclude: true,
replace: true
};
}
})();
(function()
{
'use strict';
angular
.module('lumx.data-table')
.directive('lxDataTable', lxDataTable);
function lxDataTable()
{
return {
restrict: 'E',
templateUrl: 'data-table.html',
scope:
{
border: '=?lxBorder',
selectable: '=?lxSelectable',
thumbnail: '=?lxThumbnail',
tbody: '=lxTbody',
thead: '=lxThead'
},
link: link,
controller: LxDataTableController,
controllerAs: 'lxDataTable',
bindToController: true,
transclude: true,
replace: true
};
function link(scope, element, attrs, ctrl)
{
attrs.$observe('id', function(_newId)
{
ctrl.id = _newId;
});
}
}
LxDataTableController.$inject = ['$rootScope', '$sce', '$scope'];
function LxDataTableController($rootScope, $sce, $scope)
{
var lxDataTable = this;
lxDataTable.areAllRowsSelected = areAllRowsSelected;
lxDataTable.border = angular.isUndefined(lxDataTable.border) ? true : lxDataTable.border;
lxDataTable.sort = sort;
lxDataTable.toggle = toggle;
lxDataTable.toggleAllSelected = toggleAllSelected;
lxDataTable.$sce = $sce;
lxDataTable.allRowsSelected = false;
lxDataTable.selectedRows = [];
$scope.$on('lx-data-table__select', function(event, id, row)
{
if (id === lxDataTable.id && angular.isDefined(row))
{
if (angular.isArray(row) && row.length > 0)
{
row = row[0];
}
_select(row);
}
});
$scope.$on('lx-data-table__select-all', function(event, id)
{
if (id === lxDataTable.id)
{
_selectAll();
}
});
$scope.$on('lx-data-table__unselect', function(event, id, row)
{
if (id === lxDataTable.id && angular.isDefined(row))
{
if (angular.isArray(row) && row.length > 0)
{
row = row[0];
}
_unselect(row);
}
});
$scope.$on('lx-data-table__unselect-all', function(event, id)
{
if (id === lxDataTable.id)
{
_unselectAll();
}
});
////////////
function _selectAll()
{
lxDataTable.selectedRows.length = 0;
for (var i = 0, len = lxDataTable.tbody.length; i < len; i++)
{
if (!lxDataTable.tbody[i].lxDataTableDisabled)
{
lxDataTable.tbody[i].lxDataTableSelected = true;
lxDataTable.selectedRows.push(lxDataTable.tbody[i]);
}
}
lxDataTable.allRowsSelected = true;
$rootScope.$broadcast('lx-data-table__unselected', lxDataTable.id, lxDataTable.selectedRows);
}
function _select(row)
{
toggle(row, true);
}
function _unselectAll()
{
for (var i = 0, len = lxDataTable.tbody.length; i < len; i++)
{
if (!lxDataTable.tbody[i].lxDataTableDisabled)
{
lxDataTable.tbody[i].lxDataTableSelected = false;
}
}
lxDataTable.allRowsSelected = false;
lxDataTable.selectedRows.length = 0;
$rootScope.$broadcast('lx-data-table__selected', lxDataTable.id, lxDataTable.selectedRows);
}
function _unselect(row)
{
toggle(row, false);
}
////////////
function areAllRowsSelected()
{
var displayedRows = 0;
for (var i = 0, len = lxDataTable.tbody.length; i < len; i++)
{
if (!lxDataTable.tbody[i].lxDataTableDisabled)
{
displayedRows++;
}
}
if (displayedRows === lxDataTable.selectedRows.length)
{
lxDataTable.allRowsSelected = true;
}
else
{
lxDataTable.allRowsSelected = false;
}
}
function sort(_column)
{
if (!_column.sortable)
{
return;
}
for (var i = 0, len = lxDataTable.thead.length; i < len; i++)
{
if (lxDataTable.thead[i].sortable && lxDataTable.thead[i].name !== _column.name)
{
lxDataTable.thead[i].sort = undefined;
}
}
if (!_column.sort || _column.sort === 'desc')
{
_column.sort = 'asc';
}
else
{
_column.sort = 'desc';
}
$rootScope.$broadcast('lx-data-table__sorted', lxDataTable.id, _column);
}
function toggle(_row, _newSelectedStatus)
{
if (_row.lxDataTableDisabled || !lxDataTable.selectable)
{
return;
}
_row.lxDataTableSelected = angular.isDefined(_newSelectedStatus) ? _newSelectedStatus : !_row.lxDataTableSelected;
if (_row.lxDataTableSelected)
{
// Make sure it's not already in.
if (lxDataTable.selectedRows.length === 0 || (lxDataTable.selectedRows.length && lxDataTable.selectedRows.indexOf(_row) === -1))
{
lxDataTable.selectedRows.push(_row);
lxDataTable.areAllRowsSelected();
$rootScope.$broadcast('lx-data-table__selected', lxDataTable.id, lxDataTable.selectedRows);
}
}
else
{
if (lxDataTable.selectedRows.length && lxDataTable.selectedRows.indexOf(_row) > -1)
{
lxDataTable.selectedRows.splice(lxDataTable.selectedRows.indexOf(_row), 1);
lxDataTable.allRowsSelected = false;
$rootScope.$broadcast('lx-data-table__unselected', lxDataTable.id, lxDataTable.selectedRows);
}
}
}
function toggleAllSelected()
{
if (lxDataTable.allRowsSelected)
{
_unselectAll();
}
else
{
_selectAll();
}
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.data-table')
.service('LxDataTableService', LxDataTableService);
LxDataTableService.$inject = ['$rootScope'];
function LxDataTableService($rootScope)
{
var service = this;
service.select = select;
service.selectAll = selectAll;
service.unselect = unselect;
service.unselectAll = unselectAll;
////////////
function select(_dataTableId, row)
{
$rootScope.$broadcast('lx-data-table__select', _dataTableId, row);
}
function selectAll(_dataTableId)
{
$rootScope.$broadcast('lx-data-table__select-all', _dataTableId);
}
function unselect(_dataTableId, row)
{
$rootScope.$broadcast('lx-data-table__unselect', _dataTableId, row);
}
function unselectAll(_dataTableId)
{
$rootScope.$broadcast('lx-data-table__unselect-all', _dataTableId);
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.date-picker')
.directive('lxDatePicker', lxDatePicker);
lxDatePicker.$inject = ['LxDatePickerService', 'LxUtils'];
function lxDatePicker(LxDatePickerService, LxUtils)
{
return {
restrict: 'AE',
templateUrl: 'date-picker.html',
scope:
{
autoClose: '=?lxAutoClose',
callback: '&?lxCallback',
color: '@?lxColor',
escapeClose: '=?lxEscapeClose',
inputFormat: '@?lxInputFormat',
maxDate: '=?lxMaxDate',
ngModel: '=',
minDate: '=?lxMinDate',
locale: '@lxLocale'
},
link: link,
controller: LxDatePickerController,
controllerAs: 'lxDatePicker',
bindToController: true,
replace: true,
transclude: true
};
function link(scope, element, attrs)
{
if (angular.isDefined(attrs.id))
{
attrs.$observe('id', function(_newId)
{
scope.lxDatePicker.pickerId = _newId;
LxDatePickerService.registerScope(scope.lxDatePicker.pickerId, scope);
});
}
else
{
scope.lxDatePicker.pickerId = LxUtils.generateUUID();
LxDatePickerService.registerScope(scope.lxDatePicker.pickerId, scope);
}
}
}
LxDatePickerController.$inject = ['$element', '$scope', '$timeout', '$transclude', 'LxDatePickerService', 'LxUtils'];
function LxDatePickerController($element, $scope, $timeout, $transclude, LxDatePickerService, LxUtils)
{
var lxDatePicker = this;
var input;
var modelController;
var timer1;
var timer2;
var watcher1;
var watcher2;
lxDatePicker.closeDatePicker = closeDatePicker;
lxDatePicker.displayYearSelection = displayYearSelection;
lxDatePicker.hideYearSelection = hideYearSelection;
lxDatePicker.getDateFormatted = getDateFormatted;
lxDatePicker.nextMonth = nextMonth;
lxDatePicker.openDatePicker = openDatePicker;
lxDatePicker.previousMonth = previousMonth;
lxDatePicker.select = select;
lxDatePicker.selectYear = selectYear;
lxDatePicker.autoClose = angular.isDefined(lxDatePicker.autoClose) ? lxDatePicker.autoClose : true;
lxDatePicker.color = angular.isDefined(lxDatePicker.color) ? lxDatePicker.color : 'primary';
lxDatePicker.element = $element.find('.lx-date-picker');
lxDatePicker.escapeClose = angular.isDefined(lxDatePicker.escapeClose) ? lxDatePicker.escapeClose : true;
lxDatePicker.isOpen = false;
lxDatePicker.moment = moment;
lxDatePicker.yearSelection = false;
lxDatePicker.uuid = LxUtils.generateUUID();
$transclude(function(clone)
{
if (clone.length)
{
lxDatePicker.hasInput = true;
timer1 = $timeout(function()
{
input = $element.find('.lx-date-input input');
modelController = input.data('$ngModelController');
watcher2 = $scope.$watch(function()
{
return modelController.$viewValue;
}, function(newValue, oldValue)
{
if (angular.isUndefined(newValue))
{
lxDatePicker.ngModel = undefined;
}
});
});
}
});
watcher1 = $scope.$watch(function()
{
return lxDatePicker.ngModel;
}, init);
$scope.$on('$destroy', function()
{
$timeout.cancel(timer1);
$timeout.cancel(timer2);
if (angular.isFunction(watcher1))
{
watcher1();
}
if (angular.isFunction(watcher2))
{
watcher2();
}
});
////////////
function closeDatePicker()
{
LxDatePickerService.close(lxDatePicker.pickerId);
}
function displayYearSelection()
{
lxDatePicker.yearSelection = true;
timer2 = $timeout(function()
{
var yearSelector = angular.element('.lx-date-picker__year-selector');
var activeYear = yearSelector.find('.lx-date-picker__year--is-active');
yearSelector.scrollTop(yearSelector.scrollTop() + activeYear.position().top - yearSelector.height() / 2 + activeYear.height() / 2);
});
}
function hideYearSelection()
{
lxDatePicker.yearSelection = false;
}
function generateCalendar()
{
lxDatePicker.days = [];
var previousDay = angular.copy(lxDatePicker.ngModelMoment).date(0);
var firstDayOfMonth = angular.copy(lxDatePicker.ngModelMoment).date(1);
var lastDayOfMonth = firstDayOfMonth.clone().endOf('month');
var maxDays = lastDayOfMonth.date();
lxDatePicker.emptyFirstDays = [];
for (var i = firstDayOfMonth.day() === 0 ? 6 : firstDayOfMonth.day() - 1; i > 0; i--)
{
lxDatePicker.emptyFirstDays.push(
{});
}
for (var j = 0; j < maxDays; j++)
{
var date = angular.copy(previousDay.add(1, 'days'));
date.selected = angular.isDefined(lxDatePicker.ngModel) && date.isSame(lxDatePicker.ngModel, 'day');
date.today = date.isSame(moment(), 'day');
if (angular.isDefined(lxDatePicker.minDate) && date.toDate() < lxDatePicker.minDate)
{
date.disabled = true;
}
if (angular.isDefined(lxDatePicker.maxDate) && date.toDate() > lxDatePicker.maxDate)
{
date.disabled = true;
}
lxDatePicker.days.push(date);
}
lxDatePicker.emptyLastDays = [];
for (var k = 7 - (lastDayOfMonth.day() === 0 ? 7 : lastDayOfMonth.day()); k > 0; k--)
{
lxDatePicker.emptyLastDays.push(
{});
}
}
function getDateFormatted()
{
var dateFormatted = lxDatePicker.ngModelMoment.format('llll').replace(lxDatePicker.ngModelMoment.format('LT'), '').trim().replace(lxDatePicker.ngModelMoment.format('YYYY'), '').trim();
var dateFormattedLastChar = dateFormatted.slice(-1);
if (dateFormattedLastChar === ',')
{
dateFormatted = dateFormatted.slice(0, -1);
}
return dateFormatted;
}
function init()
{
moment.locale(lxDatePicker.locale);
lxDatePicker.ngModelMoment = angular.isDefined(lxDatePicker.ngModel) ? moment(angular.copy(lxDatePicker.ngModel)) : moment();
lxDatePicker.days = [];
lxDatePicker.daysOfWeek = [moment.weekdaysMin(1), moment.weekdaysMin(2), moment.weekdaysMin(3), moment.weekdaysMin(4), moment.weekdaysMin(5), moment.weekdaysMin(6), moment.weekdaysMin(0)];
lxDatePicker.years = [];
for (var y = moment().year() - 100; y <= moment().year() + 100; y++)
{
lxDatePicker.years.push(y);
}
generateCalendar();
}
function nextMonth()
{
lxDatePicker.ngModelMoment = lxDatePicker.ngModelMoment.add(1, 'month');
generateCalendar();
}
function openDatePicker()
{
LxDatePickerService.open(lxDatePicker.pickerId);
}
function previousMonth()
{
lxDatePicker.ngModelMoment = lxDatePicker.ngModelMoment.subtract(1, 'month');
generateCalendar();
}
function select(_day)
{
if (!_day.disabled)
{
lxDatePicker.ngModel = _day.toDate();
lxDatePicker.ngModelMoment = angular.copy(_day);
if (angular.isDefined(lxDatePicker.callback))
{
lxDatePicker.callback(
{
newDate: lxDatePicker.ngModel
});
}
if (angular.isDefined(modelController) && lxDatePicker.inputFormat)
{
modelController.$setViewValue(angular.copy(_day).format(lxDatePicker.inputFormat));
modelController.$render();
}
generateCalendar();
}
}
function selectYear(_year)
{
lxDatePicker.yearSelection = false;
lxDatePicker.ngModelMoment = lxDatePicker.ngModelMoment.year(_year);
generateCalendar();
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.date-picker')
.service('LxDatePickerService', LxDatePickerService);
LxDatePickerService.$inject = ['$rootScope', '$timeout', 'LxDepthService', 'LxEventSchedulerService'];
function LxDatePickerService($rootScope, $timeout, LxDepthService, LxEventSchedulerService)
{
var service = this;
var activeDatePickerId;
var datePickerFilter;
var idEventScheduler;
var scopeMap = {};
service.close = closeDatePicker;
service.open = openDatePicker;
service.registerScope = registerScope;
////////////
function closeDatePicker(_datePickerId)
{
if (angular.isDefined(idEventScheduler))
{
LxEventSchedulerService.unregister(idEventScheduler);
idEventScheduler = undefined;
}
activeDatePickerId = undefined;
$rootScope.$broadcast('lx-date-picker__close-start', _datePickerId);
datePickerFilter.removeClass('lx-date-picker-filter--is-shown');
scopeMap[_datePickerId].element.removeClass('lx-date-picker--is-shown');
$timeout(function()
{
angular.element('body').removeClass('no-scroll-date-picker-' + scopeMap[_datePickerId].uuid);
datePickerFilter.remove();
scopeMap[_datePickerId].element
.hide()
.appendTo(scopeMap[_datePickerId].elementParent);
scopeMap[_datePickerId].isOpen = false;
$rootScope.$broadcast('lx-date-picker__close-end', _datePickerId);
}, 600);
}
function onKeyUp(_event)
{
if (_event.keyCode == 27 && angular.isDefined(activeDatePickerId))
{
closeDatePicker(activeDatePickerId);
}
_event.stopPropagation();
}
function openDatePicker(_datePickerId)
{
LxDepthService.register();
activeDatePickerId = _datePickerId;
angular.element('body').addClass('no-scroll-date-picker-' + scopeMap[_datePickerId].uuid);
datePickerFilter = angular.element('<div/>',
{
class: 'lx-date-picker-filter'
});
datePickerFilter
.css('z-index', LxDepthService.getDepth())
.appendTo('body');
if (scopeMap[activeDatePickerId].autoClose)
{
datePickerFilter.on('click', function()
{
closeDatePicker(activeDatePickerId);
});
}
if (scopeMap[activeDatePickerId].escapeClose)
{
idEventScheduler = LxEventSchedulerService.register('keyup', onKeyUp);
}
scopeMap[activeDatePickerId].element
.css('z-index', LxDepthService.getDepth() + 1)
.appendTo('body')
.show();
$timeout(function()
{
$rootScope.$broadcast('lx-date-picker__open-start', activeDatePickerId);
scopeMap[activeDatePickerId].isOpen = true;
datePickerFilter.addClass('lx-date-picker-filter--is-shown');
scopeMap[activeDatePickerId].element.addClass('lx-date-picker--is-shown');
}, 100);
$timeout(function()
{
$rootScope.$broadcast('lx-date-picker__open-end', activeDatePickerId);
}, 700);
}
function registerScope(_datePickerId, _datePickerScope)
{
scopeMap[_datePickerId] = _datePickerScope.lxDatePicker;
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.dialog')
.directive('lxDialog', lxDialog)
.directive('lxDialogHeader', lxDialogHeader)
.directive('lxDialogContent', lxDialogContent)
.directive('lxDialogFooter', lxDialogFooter)
.directive('lxDialogClose', lxDialogClose);
function lxDialog()
{
return {
restrict: 'E',
template: '<div class="dialog" ng-class="{ \'dialog--l\': !lxDialog.size || lxDialog.size === \'l\', \'dialog--s\': lxDialog.size === \'s\', \'dialog--m\': lxDialog.size === \'m\' }"><div ng-if="lxDialog.isOpen" ng-transclude></div></div>',
scope:
{
autoClose: '=?lxAutoClose',
escapeClose: '=?lxEscapeClose',
size: '@?lxSize'
},
link: link,
controller: LxDialogController,
controllerAs: 'lxDialog',
bindToController: true,
replace: true,
transclude: true
};
function link(scope, element, attrs, ctrl)
{
attrs.$observe('id', function(_newId)
{
ctrl.id = _newId;
});
}
}
LxDialogController.$inject = ['$element', '$interval', '$rootScope', '$scope', '$timeout', '$window', 'LxDepthService', 'LxEventSchedulerService', 'LxUtils'];
function LxDialogController($element, $interval, $rootScope, $scope, $timeout, $window, LxDepthService, LxEventSchedulerService, LxUtils)
{
var lxDialog = this;
var dialogFilter = angular.element('<div/>',
{
class: 'dialog-filter'
});
var dialogHeight;
var dialogInterval;
var dialogScrollable;
var elementParent = $element.parent();
var idEventScheduler;
var resizeDebounce;
var windowHeight;
lxDialog.autoClose = angular.isDefined(lxDialog.autoClose) ? lxDialog.autoClose : true;
lxDialog.escapeClose = angular.isDefined(lxDialog.escapeClose) ? lxDialog.escapeClose : true;
lxDialog.isOpen = false;
lxDialog.uuid = LxUtils.generateUUID();
$scope.$on('lx-dialog__open', function(event, id)
{
if (id === lxDialog.id)
{
open();
}
});
$scope.$on('lx-dialog__close', function(event, id)
{
if (id === lxDialog.id)
{
close();
}
});
$scope.$on('$destroy', function()
{
close();
});
////////////
function checkDialogHeight()
{
var dialog = $element;
var dialogHeader = dialog.find('.dialog__header');
var dialogContent = dialog.find('.dialog__content');
var dialogFooter = dialog.find('.dialog__footer');
if (!dialogFooter.length)
{
dialogFooter = dialog.find('.dialog__actions');
}
if (angular.isUndefined(dialogHeader))
{
return;
}
var heightToCheck = 60 + dialogHeader.outerHeight() + dialogContent.outerHeight() + dialogFooter.outerHeight();
if (dialogHeight === heightToCheck && windowHeight === $window.innerHeight)
{
return;
}
dialogHeight = heightToCheck;
windowHeight = $window.innerHeight;
if (heightToCheck >= $window.innerHeight)
{
dialog.addClass('dialog--is-fixed');
dialogScrollable
.css(
{
top: dialogHeader.outerHeight(),
bottom: dialogFooter.outerHeight()
})
.off('scroll', checkScrollEnd)
.on('scroll', checkScrollEnd);
}
else
{
dialog.removeClass('dialog--is-fixed');
dialogScrollable
.removeAttr('style')
.off('scroll', checkScrollEnd);
}
}
function checkDialogHeightOnResize()
{
if (resizeDebounce)
{
$timeout.cancel(resizeDebounce);
}
resizeDebounce = $timeout(function()
{
checkDialogHeight();
}, 200);
}
function checkScrollEnd()
{
if (dialogScrollable.scrollTop() + dialogScrollable.innerHeight() >= dialogScrollable[0].scrollHeight)
{
$rootScope.$broadcast('lx-dialog__scroll-end', lxDialog.id);
dialogScrollable.off('scroll', checkScrollEnd);
$timeout(function()
{
dialogScrollable.on('scroll', checkScrollEnd);
}, 500);
}
}
function onKeyUp(_event)
{
if (_event.keyCode == 27)
{
close();
}
_event.stopPropagation();
}
function open()
{
if (lxDialog.isOpen)
{
return;
}
LxDepthService.register();
angular.element('body').addClass('no-scroll-dialog-' + lxDialog.uuid);
dialogFilter
.css('z-index', LxDepthService.getDepth())
.appendTo('body');
if (lxDialog.autoClose)
{
dialogFilter.on('click', function()
{
close();
});
}
if (lxDialog.escapeClose)
{
idEventScheduler = LxEventSchedulerService.register('keyup', onKeyUp);
}
$element
.css('z-index', LxDepthService.getDepth() + 1)
.appendTo('body')
.show();
$timeout(function()
{
$rootScope.$broadcast('lx-dialog__open-start', lxDialog.id);
lxDialog.isOpen = true;
dialogFilter.addClass('dialog-filter--is-shown');
$element.addClass('dialog--is-shown');
}, 100);
$timeout(function()
{
if ($element.find('.dialog__scrollable').length === 0)
{
$element.find('.dialog__content').wrap(angular.element('<div/>',
{
class: 'dialog__scrollable'
}));
}
dialogScrollable = $element.find('.dialog__scrollable');
}, 200);
$timeout(function()
{
$rootScope.$broadcast('lx-dialog__open-end', lxDialog.id);
}, 700);
dialogInterval = $interval(function()
{
checkDialogHeight();
}, 500);
angular.element($window).on('resize', checkDialogHeightOnResize);
}
function close()
{
if (!lxDialog.isOpen)
{
return;
}
if (angular.isDefined(idEventScheduler))
{
LxEventSchedulerService.unregister(idEventScheduler);
idEventScheduler = undefined;
}
angular.element($window).off('resize', checkDialogHeightOnResize);
$element.find('.dialog__scrollable').off('scroll', checkScrollEnd);
$rootScope.$broadcast('lx-dialog__close-start', lxDialog.id);
if (resizeDebounce)
{
$timeout.cancel(resizeDebounce);
}
$interval.cancel(dialogInterval);
dialogFilter.removeClass('dialog-filter--is-shown');
$element.removeClass('dialog--is-shown');
$timeout(function()
{
angular.element('body').removeClass('no-scroll-dialog-' + lxDialog.uuid);
dialogFilter.remove();
$element
.hide()
.removeClass('dialog--is-fixed')
.appendTo(elementParent);
lxDialog.isOpen = false;
dialogHeight = undefined;
$rootScope.$broadcast('lx-dialog__close-end', lxDialog.id);
}, 600);
}
}
function lxDialogHeader()
{
return {
restrict: 'E',
template: '<div class="dialog__header" ng-transclude></div>',
replace: true,
transclude: true
};
}
function lxDialogContent()
{
return {
restrict: 'E',
template: '<div class="dialog__scrollable"><div class="dialog__content" ng-transclude></div></div>',
replace: true,
transclude: true
};
}
function lxDialogFooter()
{
return {
restrict: 'E',
template: '<div class="dialog__footer" ng-transclude></div>',
replace: true,
transclude: true
};
}
lxDialogClose.$inject = ['LxDialogService'];
function lxDialogClose(LxDialogService)
{
return {
restrict: 'A',
link: function(scope, element)
{
element.on('click', function()
{
LxDialogService.close(element.parents('.dialog').attr('id'));
});
scope.$on('$destroy', function()
{
element.off();
});
}
};
}
})();
(function()
{
'use strict';
angular
.module('lumx.dialog')
.service('LxDialogService', LxDialogService);
LxDialogService.$inject = ['$rootScope'];
function LxDialogService($rootScope)
{
var service = this;
service.open = open;
service.close = close;
////////////
function open(_dialogId)
{
$rootScope.$broadcast('lx-dialog__open', _dialogId);
}
function close(_dialogId)
{
$rootScope.$broadcast('lx-dialog__close', _dialogId);
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.dropdown')
.directive('lxDropdown', lxDropdown)
.directive('lxDropdownToggle', lxDropdownToggle)
.directive('lxDropdownMenu', lxDropdownMenu)
.directive('lxDropdownFilter', lxDropdownFilter);
function lxDropdown()
{
return {
restrict: 'E',
templateUrl: 'dropdown.html',
scope:
{
depth: '@?lxDepth',
effect: '@?lxEffect',
escapeClose: '=?lxEscapeClose',
hover: '=?lxHover',
hoverDelay: '=?lxHoverDelay',
offset: '@?lxOffset',
overToggle: '=?lxOverToggle',
position: '@?lxPosition',
width: '@?lxWidth'
},
link: link,
controller: LxDropdownController,
controllerAs: 'lxDropdown',
bindToController: true,
transclude: true
};
function link(scope, element, attrs, ctrl)
{
var backwardOneWay = ['position', 'width'];
var backwardTwoWay = ['escapeClose', 'overToggle'];
angular.forEach(backwardOneWay, function(attribute)
{
if (angular.isDefined(attrs[attribute]))
{
attrs.$observe(attribute, function(newValue)
{
scope.lxDropdown[attribute] = newValue;
});
}
});
angular.forEach(backwardTwoWay, function(attribute)
{
if (angular.isDefined(attrs[attribute]))
{
scope.$watch(function()
{
return scope.$parent.$eval(attrs[attribute]);
}, function(newValue)
{
scope.lxDropdown[attribute] = newValue;
});
}
});
attrs.$observe('id', function(_newId)
{
ctrl.uuid = _newId;
});
scope.$on('$destroy', function()
{
if (ctrl.isOpen)
{
ctrl.closeDropdownMenu();
}
});
}
}
LxDropdownController.$inject = ['$element', '$interval', '$scope', '$timeout', '$window', 'LxDepthService',
'LxDropdownService', 'LxEventSchedulerService', 'LxUtils'
];
function LxDropdownController($element, $interval, $scope, $timeout, $window, LxDepthService,
LxDropdownService, LxEventSchedulerService, LxUtils)
{
var lxDropdown = this;
var dropdownInterval;
var dropdownMenu;
var dropdownToggle;
var idEventScheduler;
var openTimeout;
var positionTarget;
var scrollMask = angular.element('<div/>',
{
class: 'scroll-mask'
});
var enableBodyScroll;
lxDropdown.closeDropdownMenu = closeDropdownMenu;
lxDropdown.openDropdownMenu = openDropdownMenu;
lxDropdown.registerDropdownMenu = registerDropdownMenu;
lxDropdown.registerDropdownToggle = registerDropdownToggle;
lxDropdown.toggle = toggle;
lxDropdown.uuid = LxUtils.generateUUID();
lxDropdown.effect = angular.isDefined(lxDropdown.effect) ? lxDropdown.effect : 'expand';
lxDropdown.escapeClose = angular.isDefined(lxDropdown.escapeClose) ? lxDropdown.escapeClose : true;
lxDropdown.hasToggle = false;
lxDropdown.isOpen = false;
lxDropdown.overToggle = angular.isDefined(lxDropdown.overToggle) ? lxDropdown.overToggle : false;
lxDropdown.position = angular.isDefined(lxDropdown.position) ? lxDropdown.position : 'left';
$scope.$on('lx-dropdown__open', function(_event, _params)
{
if (_params.uuid === lxDropdown.uuid && !lxDropdown.isOpen)
{
LxDropdownService.closeActiveDropdown();
LxDropdownService.registerActiveDropdownUuid(lxDropdown.uuid);
positionTarget = _params.target;
registerDropdownToggle(angular.element(positionTarget));
openDropdownMenu();
}
});
$scope.$on('lx-dropdown__close', function(_event, _params)
{
if (_params.uuid === lxDropdown.uuid && lxDropdown.isOpen)
{
closeDropdownMenu();
}
});
$scope.$on('$destroy', function()
{
$timeout.cancel(openTimeout);
});
////////////
function closeDropdownMenu()
{
$interval.cancel(dropdownInterval);
LxDropdownService.resetActiveDropdownUuid();
var velocityProperties;
var velocityEasing;
scrollMask.remove();
if (angular.isFunction(enableBodyScroll)) {
enableBodyScroll();
}
enableBodyScroll = undefined;
if (lxDropdown.hasToggle)
{
dropdownToggle
.off('wheel')
.css('z-index', '');
}
dropdownMenu
.off('wheel')
.css(
{
overflow: 'hidden'
});
if (lxDropdown.effect === 'expand')
{
velocityProperties = {
width: 0,
height: 0
};
velocityEasing = 'easeOutQuint';
}
else if (lxDropdown.effect === 'fade')
{
velocityProperties = {
opacity: 0
};
velocityEasing = 'linear';
}
if (lxDropdown.effect === 'expand' || lxDropdown.effect === 'fade')
{
dropdownMenu.velocity(velocityProperties,
{
duration: 200,
easing: velocityEasing,
complete: function()
{
dropdownMenu
.removeAttr('style')
.removeClass('dropdown-menu--is-open')
.appendTo($element.find('.dropdown'));
$scope.$apply(function()
{
lxDropdown.isOpen = false;
if (lxDropdown.escapeClose)
{
LxEventSchedulerService.unregister(idEventScheduler);
idEventScheduler = undefined;
}
});
}
});
}
else if (lxDropdown.effect === 'none')
{
dropdownMenu
.removeAttr('style')
.removeClass('dropdown-menu--is-open')
.appendTo($element.find('.dropdown'));
lxDropdown.isOpen = false;
if (lxDropdown.escapeClose)
{
LxEventSchedulerService.unregister(idEventScheduler);
idEventScheduler = undefined;
}
}
}
function getAvailableHeight()
{
var availableHeightOnTop;
var availableHeightOnBottom;
var direction;
var dropdownToggleHeight = dropdownToggle.outerHeight();
var dropdownToggleTop = dropdownToggle.offset().top - angular.element($window).scrollTop();
var windowHeight = $window.innerHeight;
if (lxDropdown.overToggle)
{
availableHeightOnTop = dropdownToggleTop + dropdownToggleHeight;
availableHeightOnBottom = windowHeight - dropdownToggleTop;
}
else
{
availableHeightOnTop = dropdownToggleTop;
availableHeightOnBottom = windowHeight - (dropdownToggleTop + dropdownToggleHeight);
}
if (availableHeightOnTop > availableHeightOnBottom)
{
direction = 'top';
}
else
{
direction = 'bottom';
}
return {
top: availableHeightOnTop,
bottom: availableHeightOnBottom,
direction: direction
};
}
function initDropdownPosition()
{
var availableHeight = getAvailableHeight();
var dropdownMenuWidth;
var dropdownMenuLeft;
var dropdownMenuRight;
var dropdownToggleWidth = dropdownToggle.outerWidth();
var dropdownToggleHeight = dropdownToggle.outerHeight();
var dropdownToggleTop = dropdownToggle.offset().top - angular.element($window).scrollTop();
var windowWidth = $window.innerWidth;
var windowHeight = $window.innerHeight;
if (angular.isDefined(lxDropdown.width))
{
if (lxDropdown.width.indexOf('%') > -1)
{
dropdownMenuWidth = dropdownToggleWidth * (lxDropdown.width.slice(0, -1) / 100);
}
else
{
dropdownMenuWidth = lxDropdown.width;
}
}
else
{
dropdownMenuWidth = 'auto';
}
if (lxDropdown.position === 'left')
{
dropdownMenuLeft = dropdownToggle.offset().left;
dropdownMenuRight = 'auto';
}
else if (lxDropdown.position === 'right')
{
dropdownMenuLeft = 'auto';
dropdownMenuRight = windowWidth - dropdownToggle.offset().left - dropdownToggleWidth;
}
else if (lxDropdown.position === 'center')
{
dropdownMenuLeft = (dropdownToggle.offset().left + (dropdownToggleWidth / 2)) - (dropdownMenuWidth / 2);
dropdownMenuRight = 'auto';
}
dropdownMenu.css(
{
left: dropdownMenuLeft,
right: dropdownMenuRight,
width: dropdownMenuWidth
});
if (availableHeight.direction === 'top')
{
dropdownMenu.css(
{
bottom: lxDropdown.overToggle ? (windowHeight - dropdownToggleTop - dropdownToggleHeight) : (windowHeight - dropdownToggleTop + ~~lxDropdown.offset)
});
return availableHeight.top;
}
else if (availableHeight.direction === 'bottom')
{
dropdownMenu.css(
{
top: lxDropdown.overToggle ? dropdownToggleTop : (dropdownToggleTop + dropdownToggleHeight + ~~lxDropdown.offset)
});
return availableHeight.bottom;
}
}
function openDropdownMenu()
{
lxDropdown.isOpen = true;
LxDepthService.register();
scrollMask
.css('z-index', LxDepthService.getDepth())
.appendTo('body');
scrollMask.on('wheel', function preventDefault(e) {
e.preventDefault();
});
enableBodyScroll = LxUtils.disableBodyScroll();
if (lxDropdown.hasToggle)
{
dropdownToggle
.css('z-index', LxDepthService.getDepth() + 1)
.on('wheel', function preventDefault(e) {
e.preventDefault();
});
}
dropdownMenu
.addClass('dropdown-menu--is-open')
.css('z-index', LxDepthService.getDepth() + 1)
.appendTo('body');
dropdownMenu.on('wheel', function preventDefault(e) {
var d = e.originalEvent.deltaY;
if (d < 0 && dropdownMenu.scrollTop() === 0) {
e.preventDefault();
}
else {
if (d > 0 && (dropdownMenu.scrollTop() == dropdownMenu.get(0).scrollHeight - dropdownMenu.innerHeight())) {
e.preventDefault();
}
}
});
if (lxDropdown.escapeClose)
{
idEventScheduler = LxEventSchedulerService.register('keyup', onKeyUp);
}
openTimeout = $timeout(function()
{
var availableHeight = initDropdownPosition() - ~~lxDropdown.offset;
var dropdownMenuHeight = dropdownMenu.outerHeight();
var dropdownMenuWidth = dropdownMenu.outerWidth();
var enoughHeight = true;
if (availableHeight < dropdownMenuHeight)
{
enoughHeight = false;
dropdownMenuHeight = availableHeight;
}
if (lxDropdown.effect === 'expand')
{
dropdownMenu.css(
{
width: 0,
height: 0,
opacity: 1,
overflow: 'hidden'
});
dropdownMenu.find('.dropdown-menu__content').css(
{
width: dropdownMenuWidth,
height: dropdownMenuHeight
});
dropdownMenu.velocity(
{
width: dropdownMenuWidth
},
{
duration: 200,
easing: 'easeOutQuint',
queue: false
});
dropdownMenu.velocity(
{
height: dropdownMenuHeight
},
{
duration: 500,
easing: 'easeOutQuint',
queue: false,
complete: function()
{
dropdownMenu.css(
{
overflow: 'auto'
});
if (angular.isUndefined(lxDropdown.width))
{
dropdownMenu.css(
{
width: 'auto'
});
}
$timeout(updateDropdownMenuHeight);
dropdownMenu.find('.dropdown-menu__content').removeAttr('style');
dropdownInterval = $interval(updateDropdownMenuHeight, 500);
}
});
}
else if (lxDropdown.effect === 'fade')
{
dropdownMenu.css(
{
height: dropdownMenuHeight
});
dropdownMenu.velocity(
{
opacity: 1,
},
{
duration: 200,
easing: 'linear',
queue: false,
complete: function()
{
$timeout(updateDropdownMenuHeight);
dropdownInterval = $interval(updateDropdownMenuHeight, 500);
}
});
}
else if (lxDropdown.effect === 'none')
{
dropdownMenu.css(
{
opacity: 1
});
$timeout(updateDropdownMenuHeight);
dropdownInterval = $interval(updateDropdownMenuHeight, 500);
}
});
}
function onKeyUp(_event)
{
if (_event.keyCode == 27)
{
closeDropdownMenu();
}
_event.stopPropagation();
}
function registerDropdownMenu(_dropdownMenu)
{
dropdownMenu = _dropdownMenu;
}
function registerDropdownToggle(_dropdownToggle)
{
if (!positionTarget)
{
lxDropdown.hasToggle = true;
}
dropdownToggle = _dropdownToggle;
}
function toggle()
{
if (!lxDropdown.isOpen)
{
openDropdownMenu();
}
else
{
closeDropdownMenu();
}
}
function updateDropdownMenuHeight()
{
if (positionTarget)
{
registerDropdownToggle(angular.element(positionTarget));
}
var availableHeight = getAvailableHeight();
var dropdownMenuHeight = dropdownMenu.find('.dropdown-menu__content').outerHeight();
dropdownMenu.css(
{
height: 'auto'
});
if ((availableHeight[availableHeight.direction] - ~~lxDropdown.offset) < dropdownMenuHeight)
{
if (availableHeight.direction === 'top')
{
dropdownMenu.css(
{
top: 0
});
}
else if (availableHeight.direction === 'bottom')
{
dropdownMenu.css(
{
bottom: 0
});
}
}
else
{
if (availableHeight.direction === 'top')
{
dropdownMenu.css(
{
top: 'auto'
});
}
else if (availableHeight.direction === 'bottom')
{
dropdownMenu.css(
{
bottom: 'auto'
});
}
}
}
}
lxDropdownToggle.$inject = ['$timeout', 'LxDropdownService'];
function lxDropdownToggle($timeout, LxDropdownService)
{
return {
restrict: 'AE',
templateUrl: 'dropdown-toggle.html',
require: '^lxDropdown',
scope: true,
link: link,
replace: true,
transclude: true
};
function link(scope, element, attrs, ctrl)
{
var hoverTimeout = [];
var mouseEvent = ctrl.hover ? 'mouseenter' : 'click';
ctrl.registerDropdownToggle(element);
element.on(mouseEvent, function(_event)
{
if (mouseEvent === 'mouseenter' && 'ontouchstart' in window) {
return;
}
if (!ctrl.hover)
{
_event.stopPropagation();
}
LxDropdownService.closeActiveDropdown();
LxDropdownService.registerActiveDropdownUuid(ctrl.uuid);
if (ctrl.hover)
{
ctrl.mouseOnToggle = true;
if (!ctrl.isOpen)
{
hoverTimeout[0] = $timeout(function()
{
scope.$apply(function()
{
ctrl.openDropdownMenu();
});
}, ctrl.hoverDelay);
}
}
else
{
scope.$apply(function()
{
ctrl.toggle();
});
}
});
if (ctrl.hover)
{
element.on('mouseleave', function()
{
ctrl.mouseOnToggle = false;
$timeout.cancel(hoverTimeout[0]);
hoverTimeout[1] = $timeout(function()
{
if (!ctrl.mouseOnMenu)
{
scope.$apply(function()
{
ctrl.closeDropdownMenu();
});
}
}, ctrl.hoverDelay);
});
}
scope.$on('$destroy', function()
{
element.off();
if (ctrl.hover)
{
$timeout.cancel(hoverTimeout[0]);
$timeout.cancel(hoverTimeout[1]);
}
});
}
}
lxDropdownMenu.$inject = ['$timeout'];
function lxDropdownMenu($timeout)
{
return {
restrict: 'E',
templateUrl: 'dropdown-menu.html',
require: ['lxDropdownMenu', '^lxDropdown'],
scope: true,
link: link,
controller: LxDropdownMenuController,
controllerAs: 'lxDropdownMenu',
bindToController: true,
replace: true,
transclude: true
};
function link(scope, element, attrs, ctrls)
{
var hoverTimeout;
ctrls[1].registerDropdownMenu(element);
ctrls[0].setParentController(ctrls[1]);
if (ctrls[1].hover)
{
element.on('mouseenter', function()
{
ctrls[1].mouseOnMenu = true;
});
element.on('mouseleave', function()
{
ctrls[1].mouseOnMenu = false;
hoverTimeout = $timeout(function()
{
if (!ctrls[1].mouseOnToggle)
{
scope.$apply(function()
{
ctrls[1].closeDropdownMenu();
});
}
}, ctrls[1].hoverDelay);
});
}
scope.$on('$destroy', function()
{
if (ctrls[1].hover)
{
element.off();
$timeout.cancel(hoverTimeout);
}
});
}
}
LxDropdownMenuController.$inject = ['$element'];
function LxDropdownMenuController($element)
{
var lxDropdownMenu = this;
lxDropdownMenu.setParentController = setParentController;
////////////
function addDropdownDepth()
{
if (lxDropdownMenu.parentCtrl.depth)
{
$element.addClass('dropdown-menu--depth-' + lxDropdownMenu.parentCtrl.depth);
}
else
{
$element.addClass('dropdown-menu--depth-1');
}
}
function setParentController(_parentCtrl)
{
lxDropdownMenu.parentCtrl = _parentCtrl;
addDropdownDepth();
}
}
lxDropdownFilter.$inject = ['$timeout'];
function lxDropdownFilter($timeout)
{
return {
restrict: 'A',
link: link
};
function link(scope, element)
{
var focusTimeout;
element.on('click', function(_event)
{
_event.stopPropagation();
});
focusTimeout = $timeout(function()
{
element.find('input').focus();
}, 200);
scope.$on('$destroy', function()
{
$timeout.cancel(focusTimeout);
element.off();
});
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.dropdown')
.service('LxDropdownService', LxDropdownService);
LxDropdownService.$inject = ['$document', '$rootScope', '$timeout'];
function LxDropdownService($document, $rootScope, $timeout)
{
var service = this;
var activeDropdownUuid;
service.close = close;
service.closeActiveDropdown = closeActiveDropdown;
service.open = open;
service.isOpen = isOpen;
service.registerActiveDropdownUuid = registerActiveDropdownUuid;
service.resetActiveDropdownUuid = resetActiveDropdownUuid;
$document.on('click', closeActiveDropdown);
////////////
function close(_uuid)
{
$rootScope.$broadcast('lx-dropdown__close',
{
uuid: _uuid
});
}
function closeActiveDropdown()
{
$rootScope.$broadcast('lx-dropdown__close',
{
uuid: activeDropdownUuid
});
}
function open(_uuid, _target)
{
$rootScope.$broadcast('lx-dropdown__open',
{
uuid: _uuid,
target: _target
});
}
function isOpen(_uuid)
{
return activeDropdownUuid === _uuid;
}
function registerActiveDropdownUuid(_uuid)
{
activeDropdownUuid = _uuid;
}
function resetActiveDropdownUuid()
{
activeDropdownUuid = undefined;
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.fab')
.directive('lxFab', lxFab)
.directive('lxFabTrigger', lxFabTrigger)
.directive('lxFabActions', lxFabActions);
function lxFab()
{
return {
restrict: 'E',
templateUrl: 'fab.html',
scope: true,
link: link,
controller: LxFabController,
controllerAs: 'lxFab',
bindToController: true,
transclude: true,
replace: true
};
function link(scope, element, attrs, ctrl)
{
attrs.$observe('lxDirection', function(newDirection)
{
ctrl.setFabDirection(newDirection);
});
}
}
function LxFabController()
{
var lxFab = this;
lxFab.setFabDirection = setFabDirection;
////////////
function setFabDirection(_direction)
{
lxFab.lxDirection = _direction;
}
}
function lxFabTrigger()
{
return {
restrict: 'E',
require: '^lxFab',
templateUrl: 'fab-trigger.html',
transclude: true,
replace: true
};
}
function lxFabActions()
{
return {
restrict: 'E',
require: '^lxFab',
templateUrl: 'fab-actions.html',
link: link,
transclude: true,
replace: true
};
function link(scope, element, attrs, ctrl)
{
scope.parentCtrl = ctrl;
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.file-input')
.directive('lxFileInput', lxFileInput);
function lxFileInput()
{
return {
restrict: 'E',
templateUrl: 'file-input.html',
scope:
{
label: '@lxLabel',
callback: '&?lxCallback'
},
link: link,
controller: LxFileInputController,
controllerAs: 'lxFileInput',
bindToController: true,
replace: true
};
function link(scope, element, attrs, ctrl)
{
var input = element.find('input');
input
.on('change', ctrl.updateModel)
.on('blur', function()
{
element.removeClass('input-file--is-focus');
});
scope.$on('$destroy', function()
{
input.off();
});
}
}
LxFileInputController.$inject = ['$element', '$scope', '$timeout'];
function LxFileInputController($element, $scope, $timeout)
{
var lxFileInput = this;
var input = $element.find('input');
var timer;
lxFileInput.updateModel = updateModel;
$scope.$on('$destroy', function()
{
$timeout.cancel(timer);
});
////////////
function setFileName()
{
if (input.val())
{
lxFileInput.fileName = input.val().replace(/C:\\fakepath\\/i, '');
$element.addClass('input-file--is-focus');
$element.addClass('input-file--is-active');
}
else
{
lxFileInput.fileName = undefined;
$element.removeClass('input-file--is-active');
}
input.val(undefined);
}
function updateModel()
{
if (angular.isDefined(lxFileInput.callback))
{
lxFileInput.callback(
{
newFile: input[0].files[0]
});
}
timer = $timeout(setFileName);
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.icon')
.directive('lxIcon', lxIcon);
function lxIcon()
{
return {
restrict: 'E',
templateUrl: 'icon.html',
scope:
{
color: '@?lxColor',
id: '@lxId',
size: '@?lxSize',
type: '@?lxType'
},
controller: LxIconController,
controllerAs: 'lxIcon',
bindToController: true,
replace: true
};
}
function LxIconController()
{
var lxIcon = this;
lxIcon.getClass = getClass;
////////////
function getClass()
{
var iconClass = [];
iconClass.push('mdi-' + lxIcon.id);
if (angular.isDefined(lxIcon.size))
{
iconClass.push('icon--' + lxIcon.size);
}
if (angular.isDefined(lxIcon.color))
{
iconClass.push('icon--' + lxIcon.color);
}
if (angular.isDefined(lxIcon.type))
{
iconClass.push('icon--' + lxIcon.type);
}
return iconClass;
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.notification')
.service('LxNotificationService', LxNotificationService);
LxNotificationService.$inject = ['$injector', '$rootScope', '$timeout', 'LxDepthService', 'LxEventSchedulerService'];
function LxNotificationService($injector, $rootScope, $timeout, LxDepthService, LxEventSchedulerService)
{
var service = this;
var dialogFilter;
var dialog;
var idEventScheduler;
var notificationList = [];
var actionClicked = false;
service.alert = showAlertDialog;
service.confirm = showConfirmDialog;
service.error = notifyError;
service.info = notifyInfo;
service.notify = notify;
service.success = notifySuccess;
service.warning = notifyWarning;
////////////
//
// NOTIFICATION
//
function deleteNotification(_notification, _callback)
{
_callback = (!angular.isFunction(_callback)) ? angular.noop : _callback;
var notifIndex = notificationList.indexOf(_notification);
var dnOffset = angular.isDefined(notificationList[notifIndex]) ? 24 + notificationList[notifIndex].height : 24;
for (var idx = 0; idx < notifIndex; idx++)
{
if (notificationList.length > 1)
{
notificationList[idx].margin -= dnOffset;
notificationList[idx].elem.css('marginBottom', notificationList[idx].margin + 'px');
}
}
_notification.elem.removeClass('notification--is-shown');
$timeout(function()
{
_notification.elem.remove();
// Find index again because notificationList may have changed
notifIndex = notificationList.indexOf(_notification);
if (notifIndex != -1)
{
notificationList.splice(notifIndex, 1);
}
_callback(actionClicked);
actionClicked = false
}, 400);
}
function getElementHeight(_elem)
{
return parseFloat(window.getComputedStyle(_elem, null).height);
}
function moveNotificationUp()
{
var newNotifIndex = notificationList.length - 1;
notificationList[newNotifIndex].height = getElementHeight(notificationList[newNotifIndex].elem[0]);
var upOffset = 0;
for (var idx = newNotifIndex; idx >= 0; idx--)
{
if (notificationList.length > 1 && idx !== newNotifIndex)
{
upOffset = 24 + notificationList[newNotifIndex].height;
notificationList[idx].margin += upOffset;
notificationList[idx].elem.css('marginBottom', notificationList[idx].margin + 'px');
}
}
}
function notify(_text, _icon, _sticky, _color, _action, _callback, _delay)
{
var $compile = $injector.get('$compile');
LxDepthService.register();
var notification = angular.element('<div/>',
{
class: 'notification'
});
var notificationText = angular.element('<span/>',
{
class: 'notification__content',
html: _text
});
var notificationTimeout;
var notificationDelay = _delay || 6000;
if (angular.isDefined(_icon))
{
var notificationIcon = angular.element('<i/>',
{
class: 'notification__icon mdi mdi-' + _icon
});
notification
.addClass('notification--has-icon')
.append(notificationIcon);
}
if (angular.isDefined(_color))
{
notification.addClass('notification--' + _color);
}
notification.append(notificationText);
if (angular.isDefined(_action))
{
var notificationAction = angular.element('<button/>',
{
class: 'notification__action btn btn--m btn--flat',
html: _action
});
if (angular.isDefined(_color))
{
notificationAction.addClass('btn--' + _color);
}
else
{
notificationAction.addClass('btn--white');
}
notificationAction.attr('lx-ripple', '');
$compile(notificationAction)($rootScope);
notificationAction.bind('click', function()
{
actionClicked = true;
});
notification
.addClass('notification--has-action')
.append(notificationAction);
}
notification
.css('z-index', LxDepthService.getDepth())
.appendTo('body');
$timeout(function()
{
notification.addClass('notification--is-shown');
}, 100);
var data = {
elem: notification,
margin: 0
};
notificationList.push(data);
moveNotificationUp();
notification.bind('click', function()
{
deleteNotification(data, _callback);
if (angular.isDefined(notificationTimeout))
{
$timeout.cancel(notificationTimeout);
}
});
if (angular.isUndefined(_sticky) || !_sticky)
{
notificationTimeout = $timeout(function()
{
deleteNotification(data, _callback);
}, notificationDelay);
}
}
function notifyError(_text, _sticky)
{
notify(_text, 'alert-circle', _sticky, 'red');
}
function notifyInfo(_text, _sticky)
{
notify(_text, 'information-outline', _sticky, 'blue');
}
function notifySuccess(_text, _sticky)
{
notify(_text, 'check', _sticky, 'green');
}
function notifyWarning(_text, _sticky)
{
notify(_text, 'alert', _sticky, 'orange');
}
//
// ALERT & CONFIRM
//
function buildDialogActions(_buttons, _callback, _unbind)
{
var $compile = $injector.get('$compile');
var dialogActions = angular.element('<div/>',
{
class: 'dialog__actions'
});
var dialogLastBtn = angular.element('<button/>',
{
class: 'btn btn--m btn--blue btn--flat',
text: _buttons.ok
});
if (angular.isDefined(_buttons.cancel))
{
var dialogFirstBtn = angular.element('<button/>',
{
class: 'btn btn--m btn--red btn--flat',
text: _buttons.cancel
});
dialogFirstBtn.attr('lx-ripple', '');
$compile(dialogFirstBtn)($rootScope);
dialogActions.append(dialogFirstBtn);
dialogFirstBtn.bind('click', function()
{
_callback(false);
closeDialog();
});
}
dialogLastBtn.attr('lx-ripple', '');
$compile(dialogLastBtn)($rootScope);
dialogActions.append(dialogLastBtn);
dialogLastBtn.bind('click', function()
{
_callback(true);
closeDialog();
});
if (!_unbind)
{
idEventScheduler = LxEventSchedulerService.register('keyup', function(event)
{
if (event.keyCode == 13)
{
_callback(true);
closeDialog();
}
else if (event.keyCode == 27)
{
_callback(angular.isUndefined(_buttons.cancel));
closeDialog();
}
event.stopPropagation();
});
}
return dialogActions;
}
function buildDialogContent(_text)
{
var dialogContent = angular.element('<div/>',
{
class: 'dialog__content p++ pt0 tc-black-2',
text: _text
});
return dialogContent;
}
function buildDialogHeader(_title)
{
var dialogHeader = angular.element('<div/>',
{
class: 'dialog__header p++ fs-title',
text: _title
});
return dialogHeader;
}
function closeDialog()
{
if (angular.isDefined(idEventScheduler))
{
$timeout(function()
{
LxEventSchedulerService.unregister(idEventScheduler);
idEventScheduler = undefined;
}, 1);
}
dialogFilter.removeClass('dialog-filter--is-shown');
dialog.removeClass('dialog--is-shown');
$timeout(function()
{
dialogFilter.remove();
dialog.remove();
}, 600);
}
function showAlertDialog(_title, _text, _button, _callback, _unbind)
{
LxDepthService.register();
dialogFilter = angular.element('<div/>',
{
class: 'dialog-filter'
});
dialog = angular.element('<div/>',
{
class: 'dialog dialog--alert'
});
var dialogHeader = buildDialogHeader(_title);
var dialogContent = buildDialogContent(_text);
var dialogActions = buildDialogActions(
{
ok: _button
}, _callback, _unbind);
dialogFilter
.css('z-index', LxDepthService.getDepth())
.appendTo('body');
dialog
.append(dialogHeader)
.append(dialogContent)
.append(dialogActions)
.css('z-index', LxDepthService.getDepth() + 1)
.appendTo('body')
.show()
.focus();
$timeout(function()
{
angular.element(document.activeElement).blur();
dialogFilter.addClass('dialog-filter--is-shown');
dialog.addClass('dialog--is-shown');
}, 100);
}
function showConfirmDialog(_title, _text, _buttons, _callback, _unbind)
{
LxDepthService.register();
dialogFilter = angular.element('<div/>',
{
class: 'dialog-filter'
});
dialog = angular.element('<div/>',
{
class: 'dialog dialog--alert'
});
var dialogHeader = buildDialogHeader(_title);
var dialogContent = buildDialogContent(_text);
var dialogActions = buildDialogActions(_buttons, _callback, _unbind);
dialogFilter
.css('z-index', LxDepthService.getDepth())
.appendTo('body');
dialog
.append(dialogHeader)
.append(dialogContent)
.append(dialogActions)
.css('z-index', LxDepthService.getDepth() + 1)
.appendTo('body')
.show()
.focus();
$timeout(function()
{
angular.element(document.activeElement).blur();
dialogFilter.addClass('dialog-filter--is-shown');
dialog.addClass('dialog--is-shown');
}, 100);
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.progress')
.directive('lxProgress', lxProgress);
function lxProgress()
{
return {
restrict: 'E',
templateUrl: 'progress.html',
scope:
{
lxColor: '@?',
lxDiameter: '@?',
lxType: '@',
lxValue: '@'
},
controller: LxProgressController,
controllerAs: 'lxProgress',
bindToController: true,
replace: true
};
}
function LxProgressController()
{
var lxProgress = this;
lxProgress.getCircularProgressValue = getCircularProgressValue;
lxProgress.getLinearProgressValue = getLinearProgressValue;
lxProgress.getProgressDiameter = getProgressDiameter;
init();
////////////
function getCircularProgressValue()
{
if (angular.isDefined(lxProgress.lxValue))
{
return {
'stroke-dasharray': lxProgress.lxValue * 1.26 + ',200'
};
}
}
function getLinearProgressValue()
{
if (angular.isDefined(lxProgress.lxValue))
{
return {
'transform': 'scale(' + lxProgress.lxValue / 100 + ', 1)'
};
}
}
function getProgressDiameter()
{
if (lxProgress.lxType === 'circular')
{
return {
'transform': 'scale(' + parseInt(lxProgress.lxDiameter) / 100 + ')'
};
}
return;
}
function init()
{
lxProgress.lxDiameter = angular.isDefined(lxProgress.lxDiameter) ? lxProgress.lxDiameter : 100;
lxProgress.lxColor = angular.isDefined(lxProgress.lxColor) ? lxProgress.lxColor : 'primary';
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.radio-button')
.directive('lxRadioGroup', lxRadioGroup)
.directive('lxRadioButton', lxRadioButton)
.directive('lxRadioButtonLabel', lxRadioButtonLabel)
.directive('lxRadioButtonHelp', lxRadioButtonHelp);
function lxRadioGroup()
{
return {
restrict: 'E',
templateUrl: 'radio-group.html',
transclude: true,
replace: true
};
}
function lxRadioButton()
{
return {
restrict: 'E',
templateUrl: 'radio-button.html',
scope:
{
lxColor: '@?',
name: '@',
ngChange: '&?',
ngDisabled: '=?',
ngModel: '=',
ngValue: '=?',
value: '@?'
},
controller: LxRadioButtonController,
controllerAs: 'lxRadioButton',
bindToController: true,
transclude: true,
replace: true
};
}
LxRadioButtonController.$inject = ['$scope', '$timeout', 'LxUtils'];
function LxRadioButtonController($scope, $timeout, LxUtils)
{
var lxRadioButton = this;
var radioButtonId;
var radioButtonHasChildren;
var timer;
lxRadioButton.getRadioButtonId = getRadioButtonId;
lxRadioButton.getRadioButtonHasChildren = getRadioButtonHasChildren;
lxRadioButton.setRadioButtonId = setRadioButtonId;
lxRadioButton.setRadioButtonHasChildren = setRadioButtonHasChildren;
lxRadioButton.triggerNgChange = triggerNgChange;
$scope.$on('$destroy', function()
{
$timeout.cancel(timer);
});
init();
////////////
function getRadioButtonId()
{
return radioButtonId;
}
function getRadioButtonHasChildren()
{
return radioButtonHasChildren;
}
function init()
{
setRadioButtonId(LxUtils.generateUUID());
setRadioButtonHasChildren(false);
if (angular.isDefined(lxRadioButton.value) && angular.isUndefined(lxRadioButton.ngValue))
{
lxRadioButton.ngValue = lxRadioButton.value;
}
lxRadioButton.lxColor = angular.isUndefined(lxRadioButton.lxColor) ? 'accent' : lxRadioButton.lxColor;
}
function setRadioButtonId(_radioButtonId)
{
radioButtonId = _radioButtonId;
}
function setRadioButtonHasChildren(_radioButtonHasChildren)
{
radioButtonHasChildren = _radioButtonHasChildren;
}
function triggerNgChange()
{
timer = $timeout(lxRadioButton.ngChange);
}
}
function lxRadioButtonLabel()
{
return {
restrict: 'AE',
require: ['^lxRadioButton', '^lxRadioButtonLabel'],
templateUrl: 'radio-button-label.html',
link: link,
controller: LxRadioButtonLabelController,
controllerAs: 'lxRadioButtonLabel',
bindToController: true,
transclude: true,
replace: true
};
function link(scope, element, attrs, ctrls)
{
ctrls[0].setRadioButtonHasChildren(true);
ctrls[1].setRadioButtonId(ctrls[0].getRadioButtonId());
}
}
function LxRadioButtonLabelController()
{
var lxRadioButtonLabel = this;
var radioButtonId;
lxRadioButtonLabel.getRadioButtonId = getRadioButtonId;
lxRadioButtonLabel.setRadioButtonId = setRadioButtonId;
////////////
function getRadioButtonId()
{
return radioButtonId;
}
function setRadioButtonId(_radioButtonId)
{
radioButtonId = _radioButtonId;
}
}
function lxRadioButtonHelp()
{
return {
restrict: 'AE',
require: '^lxRadioButton',
templateUrl: 'radio-button-help.html',
transclude: true,
replace: true
};
}
})();
(function()
{
'use strict';
angular
.module('lumx.ripple')
.directive('lxRipple', lxRipple);
lxRipple.$inject = ['$timeout'];
function lxRipple($timeout)
{
return {
restrict: 'A',
link: link,
};
function link(scope, element, attrs)
{
var timer;
element
.css(
{
position: 'relative',
overflow: 'hidden'
})
.on('mousedown', function(e)
{
var ripple;
if (element.find('.ripple').length === 0)
{
ripple = angular.element('<span/>',
{
class: 'ripple'
});
if (attrs.lxRipple)
{
ripple.addClass('bgc-' + attrs.lxRipple);
}
element.prepend(ripple);
}
else
{
ripple = element.find('.ripple');
}
ripple.removeClass('ripple--is-animated');
if (!ripple.height() && !ripple.width())
{
var diameter = Math.max(element.outerWidth(), element.outerHeight());
ripple.css(
{
height: diameter,
width: diameter
});
}
var x = e.pageX - element.offset().left - ripple.width() / 2;
var y = e.pageY - element.offset().top - ripple.height() / 2;
ripple.css(
{
top: y + 'px',
left: x + 'px'
}).addClass('ripple--is-animated');
timer = $timeout(function()
{
ripple.removeClass('ripple--is-animated');
}, 651);
});
scope.$on('$destroy', function()
{
$timeout.cancel(timer);
element.off();
});
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.search-filter')
.filter('lxSearchHighlight', lxSearchHighlight)
.directive('lxSearchFilter', lxSearchFilter);
lxSearchHighlight.$inject = ['$sce'];
function lxSearchHighlight($sce)
{
function escapeRegexp(queryToEscape)
{
return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
}
return function (matchItem, query, icon)
{
var string = '';
if (icon)
{
string += '<i class="mdi mdi-' + icon + '"></i>';
}
string += query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '<strong>$&</strong>') : matchItem;
return $sce.trustAsHtml(string);
};
}
function lxSearchFilter()
{
return {
restrict: 'E',
templateUrl: 'search-filter.html',
scope:
{
autocomplete: '&?lxAutocomplete',
closed: '=?lxClosed',
color: '@?lxColor',
icon: '@?lxIcon',
onSelect: '=?lxOnSelect',
searchOnFocus: '=?lxSearchOnFocus',
theme: '@?lxTheme',
width: '@?lxWidth'
},
link: link,
controller: LxSearchFilterController,
controllerAs: 'lxSearchFilter',
bindToController: true,
replace: true,
transclude: true
};
function link(scope, element, attrs, ctrl, transclude)
{
var input;
attrs.$observe('lxWidth', function(newWidth)
{
if (angular.isDefined(scope.lxSearchFilter.closed) && scope.lxSearchFilter.closed)
{
element.find('.search-filter__container').css('width', newWidth);
}
});
transclude(function()
{
input = element.find('input');
ctrl.setInput(input);
ctrl.setModel(input.data('$ngModelController'));
input.on('focus', ctrl.focusInput);
input.on('blur', ctrl.blurInput);
input.on('keydown', ctrl.keyEvent);
});
scope.$on('$destroy', function()
{
input.off();
});
}
}
LxSearchFilterController.$inject = ['$element', '$scope', 'LxDropdownService', 'LxNotificationService', 'LxUtils'];
function LxSearchFilterController($element, $scope, LxDropdownService, LxNotificationService, LxUtils)
{
var lxSearchFilter = this;
var debouncedAutocomplete;
var input;
var itemSelected = false;
lxSearchFilter.blurInput = blurInput;
lxSearchFilter.clearInput = clearInput;
lxSearchFilter.focusInput = focusInput;
lxSearchFilter.getClass = getClass;
lxSearchFilter.keyEvent = keyEvent;
lxSearchFilter.openInput = openInput;
lxSearchFilter.selectItem = selectItem;
lxSearchFilter.setInput = setInput;
lxSearchFilter.setModel = setModel;
lxSearchFilter.activeChoiceIndex = -1;
lxSearchFilter.color = angular.isDefined(lxSearchFilter.color) ? lxSearchFilter.color : 'black';
lxSearchFilter.dropdownId = LxUtils.generateUUID();
lxSearchFilter.theme = angular.isDefined(lxSearchFilter.theme) ? lxSearchFilter.theme : 'light';
////////////
function blurInput()
{
if (angular.isDefined(lxSearchFilter.closed) && lxSearchFilter.closed && !input.val())
{
$element.velocity(
{
width: 40
},
{
duration: 400,
easing: 'easeOutQuint',
queue: false
});
}
if (!input.val())
{
lxSearchFilter.modelController.$setViewValue(undefined);
}
}
function clearInput()
{
lxSearchFilter.modelController.$setViewValue(undefined);
lxSearchFilter.modelController.$render();
// Temporarily disabling search on focus since we never want to trigger it when clearing the input.
var searchOnFocus = lxSearchFilter.searchOnFocus;
lxSearchFilter.searchOnFocus = false;
input.focus();
lxSearchFilter.searchOnFocus = searchOnFocus;
}
function focusInput()
{
if (!lxSearchFilter.searchOnFocus)
{
return;
}
updateAutocomplete(lxSearchFilter.modelController.$viewValue, true);
}
function getClass()
{
var searchFilterClass = [];
if (angular.isUndefined(lxSearchFilter.closed) || !lxSearchFilter.closed)
{
searchFilterClass.push('search-filter--opened-mode');
}
if (angular.isDefined(lxSearchFilter.closed) && lxSearchFilter.closed)
{
searchFilterClass.push('search-filter--closed-mode');
}
if (input.val())
{
searchFilterClass.push('search-filter--has-clear-button');
}
if (angular.isDefined(lxSearchFilter.color))
{
searchFilterClass.push('search-filter--' + lxSearchFilter.color);
}
if (angular.isDefined(lxSearchFilter.theme))
{
searchFilterClass.push('search-filter--theme-' + lxSearchFilter.theme);
}
if (angular.isFunction(lxSearchFilter.autocomplete))
{
searchFilterClass.push('search-filter--autocomplete');
}
if (LxDropdownService.isOpen(lxSearchFilter.dropdownId))
{
searchFilterClass.push('search-filter--is-open');
}
return searchFilterClass;
}
function keyEvent(_event)
{
if (!angular.isFunction(lxSearchFilter.autocomplete))
{
return;
}
if (!LxDropdownService.isOpen(lxSearchFilter.dropdownId))
{
lxSearchFilter.activeChoiceIndex = -1;
}
switch (_event.keyCode) {
case 13:
keySelect();
if (lxSearchFilter.activeChoiceIndex > -1)
{
_event.preventDefault();
}
break;
case 38:
keyUp();
_event.preventDefault();
break;
case 40:
keyDown();
_event.preventDefault();
break;
}
$scope.$apply();
}
function keyDown()
{
if (lxSearchFilter.autocompleteList.length)
{
lxSearchFilter.activeChoiceIndex += 1;
if (lxSearchFilter.activeChoiceIndex >= lxSearchFilter.autocompleteList.length)
{
lxSearchFilter.activeChoiceIndex = 0;
}
}
}
function keySelect()
{
if (!lxSearchFilter.autocompleteList || lxSearchFilter.activeChoiceIndex === -1)
{
return;
}
selectItem(lxSearchFilter.autocompleteList[lxSearchFilter.activeChoiceIndex]);
}
function keyUp()
{
if (lxSearchFilter.autocompleteList.length)
{
lxSearchFilter.activeChoiceIndex -= 1;
if (lxSearchFilter.activeChoiceIndex < 0)
{
lxSearchFilter.activeChoiceIndex = lxSearchFilter.autocompleteList.length - 1;
}
}
}
function onAutocompleteSuccess(autocompleteList)
{
lxSearchFilter.autocompleteList = autocompleteList;
if (lxSearchFilter.autocompleteList.length)
{
LxDropdownService.open(lxSearchFilter.dropdownId, $element);
}
else
{
LxDropdownService.close(lxSearchFilter.dropdownId);
}
lxSearchFilter.isLoading = false;
}
function onAutocompleteError(error)
{
LxNotificationService.error(error);
lxSearchFilter.isLoading = false;
}
function openInput()
{
if (angular.isDefined(lxSearchFilter.closed) && lxSearchFilter.closed)
{
$element.velocity(
{
width: angular.isDefined(lxSearchFilter.width) ? parseInt(lxSearchFilter.width) : 240
},
{
duration: 400,
easing: 'easeOutQuint',
queue: false,
complete: function()
{
input.focus();
}
});
}
else
{
input.focus();
}
}
function selectItem(_item)
{
itemSelected = true;
LxDropdownService.close(lxSearchFilter.dropdownId);
lxSearchFilter.modelController.$setViewValue(_item);
lxSearchFilter.modelController.$render();
if (angular.isFunction(lxSearchFilter.onSelect))
{
lxSearchFilter.onSelect(_item);
}
}
function setInput(_input)
{
input = _input;
}
function setModel(_modelController)
{
lxSearchFilter.modelController = _modelController;
if (angular.isFunction(lxSearchFilter.autocomplete) && angular.isFunction(lxSearchFilter.autocomplete()))
{
debouncedAutocomplete = LxUtils.debounce(function()
{
lxSearchFilter.isLoading = true;
(lxSearchFilter.autocomplete()).apply(this, arguments);
}, 500);
lxSearchFilter.modelController.$parsers.push(updateAutocomplete);
}
}
function updateAutocomplete(_newValue, _immediate)
{
if ((_newValue || (angular.isUndefined(_newValue) && lxSearchFilter.searchOnFocus)) && !itemSelected)
{
if (_immediate)
{
lxSearchFilter.isLoading = true;
(lxSearchFilter.autocomplete())(_newValue, onAutocompleteSuccess, onAutocompleteError);
}
else
{
debouncedAutocomplete(_newValue, onAutocompleteSuccess, onAutocompleteError);
}
}
else
{
debouncedAutocomplete.clear();
LxDropdownService.close(lxSearchFilter.dropdownId);
}
itemSelected = false;
return _newValue;
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.select')
.filter('filterChoices', filterChoices)
.directive('lxSelect', lxSelect)
.directive('lxSelectSelected', lxSelectSelected)
.directive('lxSelectChoices', lxSelectChoices);
filterChoices.$inject = ['$filter'];
function filterChoices($filter)
{
return function(choices, externalFilter, textFilter)
{
if (externalFilter)
{
return choices;
}
var toFilter = [];
if (!angular.isArray(choices))
{
if (angular.isObject(choices))
{
for (var idx in choices)
{
if (angular.isArray(choices[idx]))
{
toFilter = toFilter.concat(choices[idx]);
}
}
}
}
else
{
toFilter = choices;
}
return $filter('filter')(toFilter, textFilter);
};
}
function lxSelect()
{
return {
restrict: 'E',
templateUrl: 'select.html',
scope:
{
allowClear: '=?lxAllowClear',
allowNewValue: '=?lxAllowNewValue',
autocomplete: '=?lxAutocomplete',
newValueTransform: '=?lxNewValueTransform',
choices: '=?lxChoices',
choicesCustomStyle: '=?lxChoicesCustomStyle',
customStyle: '=?lxCustomStyle',
displayFilter: '=?lxDisplayFilter',
error: '=?lxError',
filter: '&?lxFilter',
fixedLabel: '=?lxFixedLabel',
helper: '=?lxHelper',
helperMessage: '@?lxHelperMessage',
label: '@?lxLabel',
loading: '=?lxLoading',
modelToSelection: '&?lxModelToSelection',
multiple: '=?lxMultiple',
ngChange: '&?',
ngDisabled: '=?',
ngModel: '=',
selectionToModel: '&?lxSelectionToModel',
theme: '@?lxTheme',
valid: '=?lxValid',
viewMode: '@?lxViewMode'
},
link: link,
controller: LxSelectController,
controllerAs: 'lxSelect',
bindToController: true,
replace: true,
transclude: true
};
function link(scope, element, attrs)
{
var backwardOneWay = ['customStyle'];
var backwardTwoWay = ['allowClear', 'choices', 'error', 'loading', 'multiple', 'valid'];
angular.forEach(backwardOneWay, function(attribute)
{
if (angular.isDefined(attrs[attribute]))
{
attrs.$observe(attribute, function(newValue)
{
scope.lxSelect[attribute] = newValue;
});
}
});
angular.forEach(backwardTwoWay, function(attribute)
{
if (angular.isDefined(attrs[attribute]))
{
scope.$watch(function()
{
return scope.$parent.$eval(attrs[attribute]);
}, function(newValue)
{
if (attribute === 'multiple' && angular.isUndefined(newValue))
{
scope.lxSelect[attribute] = true;
}
else
{
scope.lxSelect[attribute] = newValue;
}
});
}
});
attrs.$observe('placeholder', function(newValue)
{
scope.lxSelect.label = newValue;
});
attrs.$observe('change', function(newValue)
{
scope.lxSelect.ngChange = function(data)
{
return scope.$parent.$eval(newValue, data);
};
});
attrs.$observe('filter', function(newValue)
{
scope.lxSelect.filter = function(data)
{
return scope.$parent.$eval(newValue, data);
};
scope.lxSelect.displayFilter = true;
});
attrs.$observe('modelToSelection', function(newValue)
{
scope.lxSelect.modelToSelection = function(data)
{
return scope.$parent.$eval(newValue, data);
};
});
attrs.$observe('selectionToModel', function(newValue)
{
scope.lxSelect.selectionToModel = function(data)
{
return scope.$parent.$eval(newValue, data);
};
});
}
}
LxSelectController.$inject = ['$interpolate', '$element', '$filter', '$sce', 'LxDropdownService', 'LxUtils'];
function LxSelectController($interpolate, $element, $filter, $sce, LxDropdownService, LxUtils)
{
var lxSelect = this;
var choiceTemplate;
var selectedTemplate;
lxSelect.displayChoice = displayChoice;
lxSelect.displaySelected = displaySelected;
lxSelect.displaySubheader = displaySubheader;
lxSelect.getFilteredChoices = getFilteredChoices;
lxSelect.getSelectedModel = getSelectedModel;
lxSelect.isSelected = isSelected;
lxSelect.keyEvent = keyEvent;
lxSelect.registerChoiceTemplate = registerChoiceTemplate;
lxSelect.registerSelectedTemplate = registerSelectedTemplate;
lxSelect.select = select;
lxSelect.toggleChoice = toggleChoice;
lxSelect.unselect = unselect;
lxSelect.updateFilter = updateFilter;
lxSelect.helperDisplayable = helperDisplayable;
lxSelect.activeChoiceIndex = -1;
lxSelect.activeSelectedIndex = -1;
lxSelect.uuid = LxUtils.generateUUID();
lxSelect.filterModel = undefined;
lxSelect.ngModel = angular.isUndefined(lxSelect.ngModel) && lxSelect.multiple ? [] : lxSelect.ngModel;
lxSelect.unconvertedModel = lxSelect.multiple ? [] : undefined;
lxSelect.viewMode = angular.isUndefined(lxSelect.viewMode) ? 'field' : 'chips';
////////////
function arrayObjectIndexOf(arr, obj)
{
for (var i = 0; i < arr.length; i++)
{
if (angular.equals(arr[i], obj))
{
return i;
}
}
return -1;
}
function displayChoice(_choice)
{
var choiceScope = {
$choice: _choice
};
return $sce.trustAsHtml($interpolate(choiceTemplate)(choiceScope));
}
function displaySelected(_selected)
{
var selectedScope = {};
if (!angular.isArray(lxSelect.choices))
{
var found = false;
for (var header in lxSelect.choices)
{
if (found)
{
break;
}
if (lxSelect.choices.hasOwnProperty(header))
{
for (var idx = 0, len = lxSelect.choices[header].length; idx < len; idx++)
{
if (angular.equals(_selected, lxSelect.choices[header][idx]))
{
selectedScope.$selectedSubheader = header;
found = true;
break;
}
}
}
}
}
if (angular.isDefined(_selected))
{
selectedScope.$selected = _selected;
}
else
{
selectedScope.$selected = getSelectedModel();
}
return $sce.trustAsHtml($interpolate(selectedTemplate)(selectedScope));
}
function displaySubheader(_subheader)
{
return $sce.trustAsHtml(_subheader);
}
function getFilteredChoices()
{
return $filter('filterChoices')(lxSelect.choices, lxSelect.filter, lxSelect.filterModel);
}
function getSelectedModel()
{
if (angular.isDefined(lxSelect.modelToSelection) || angular.isDefined(lxSelect.selectionToModel))
{
return lxSelect.unconvertedModel;
}
else
{
return lxSelect.ngModel;
}
}
function isSelected(_choice)
{
if (lxSelect.multiple && angular.isDefined(getSelectedModel()))
{
return arrayObjectIndexOf(getSelectedModel(), _choice) !== -1;
}
else if (angular.isDefined(getSelectedModel()))
{
return angular.equals(getSelectedModel(), _choice);
}
}
function keyEvent(_event)
{
if (_event.keyCode !== 8)
{
lxSelect.activeSelectedIndex = -1;
}
if (!LxDropdownService.isOpen('dropdown-' + lxSelect.uuid))
{
lxSelect.activeChoiceIndex = -1;
}
switch (_event.keyCode) {
case 8:
keyRemove();
break;
case 13:
keySelect();
_event.preventDefault();
break;
case 38:
keyUp();
_event.preventDefault();
break;
case 40:
keyDown();
_event.preventDefault();
break;
}
}
function keyDown()
{
var filteredChoices = $filter('filterChoices')(lxSelect.choices, lxSelect.filter, lxSelect.filterModel);
if (filteredChoices.length)
{
lxSelect.activeChoiceIndex += 1;
if (lxSelect.activeChoiceIndex >= filteredChoices.length)
{
lxSelect.activeChoiceIndex = 0;
}
}
if (lxSelect.autocomplete)
{
LxDropdownService.open('dropdown-' + lxSelect.uuid, '#lx-select-selected-wrapper-' + lxSelect.uuid);
}
}
function keyRemove()
{
if (lxSelect.filterModel || !lxSelect.getSelectedModel().length)
{
return;
}
if (lxSelect.activeSelectedIndex === -1)
{
lxSelect.activeSelectedIndex = lxSelect.getSelectedModel().length - 1;
}
else
{
unselect(lxSelect.getSelectedModel()[lxSelect.activeSelectedIndex]);
}
}
function keySelect()
{
var filteredChoices = $filter('filterChoices')(lxSelect.choices, lxSelect.filter, lxSelect.filterModel);
if (filteredChoices.length && filteredChoices[lxSelect.activeChoiceIndex])
{
toggleChoice(filteredChoices[lxSelect.activeChoiceIndex]);
}
else if (lxSelect.filterModel && lxSelect.allowNewValue)
{
if (angular.isArray(getSelectedModel()))
{
var value = angular.isFunction(lxSelect.newValueTransform) ? lxSelect.newValueTransform(lxSelect.filterModel) : lxSelect.filterModel;
var identical = getSelectedModel().some(function (item) {
return angular.equals(item, value);
});
if (!identical)
{
getSelectedModel().push(value);
}
}
lxSelect.filterModel = undefined;
LxDropdownService.close('dropdown-' + lxSelect.uuid);
}
}
function keyUp()
{
var filteredChoices = $filter('filterChoices')(lxSelect.choices, lxSelect.filter, lxSelect.filterModel);
if (filteredChoices.length)
{
lxSelect.activeChoiceIndex -= 1;
if (lxSelect.activeChoiceIndex < 0)
{
lxSelect.activeChoiceIndex = filteredChoices.length - 1;
}
}
if (lxSelect.autocomplete)
{
LxDropdownService.open('dropdown-' + lxSelect.uuid, '#lx-select-selected-wrapper-' + lxSelect.uuid);
}
}
function registerChoiceTemplate(_choiceTemplate)
{
choiceTemplate = _choiceTemplate;
}
function registerSelectedTemplate(_selectedTemplate)
{
selectedTemplate = _selectedTemplate;
}
function select(_choice)
{
if (lxSelect.multiple && angular.isUndefined(lxSelect.ngModel))
{
lxSelect.ngModel = [];
}
if (angular.isDefined(lxSelect.selectionToModel))
{
lxSelect.selectionToModel(
{
data: _choice,
callback: function(resp)
{
if (lxSelect.multiple)
{
lxSelect.ngModel.push(resp);
}
else
{
lxSelect.ngModel = resp;
}
if (lxSelect.autocomplete)
{
$element.find('.lx-select-selected__filter').focus();
}
}
});
}
else
{
if (lxSelect.multiple)
{
lxSelect.ngModel.push(_choice);
}
else
{
lxSelect.ngModel = _choice;
}
if (lxSelect.autocomplete)
{
$element.find('.lx-select-selected__filter').focus();
}
}
}
function toggleChoice(_choice, _event)
{
if (lxSelect.multiple && !lxSelect.autocomplete)
{
_event.stopPropagation();
}
if (lxSelect.multiple && isSelected(_choice))
{
unselect(_choice);
}
else
{
select(_choice);
}
if (lxSelect.autocomplete)
{
lxSelect.activeChoiceIndex = -1;
lxSelect.filterModel = undefined;
LxDropdownService.close('dropdown-' + lxSelect.uuid);
}
}
function unselect(_choice)
{
if (angular.isDefined(lxSelect.selectionToModel))
{
lxSelect.selectionToModel(
{
data: _choice,
callback: function(resp)
{
removeElement(lxSelect.ngModel, resp);
if (lxSelect.autocomplete)
{
$element.find('.lx-select-selected__filter').focus();
lxSelect.activeSelectedIndex = -1;
}
}
});
removeElement(lxSelect.unconvertedModel, _choice);
}
else
{
removeElement(lxSelect.ngModel, _choice);
if (lxSelect.autocomplete)
{
$element.find('.lx-select-selected__filter').focus();
lxSelect.activeSelectedIndex = -1;
}
}
}
function updateFilter()
{
if (angular.isDefined(lxSelect.filter))
{
lxSelect.filter(
{
newValue: lxSelect.filterModel
});
}
if (lxSelect.autocomplete)
{
lxSelect.activeChoiceIndex = -1;
if (lxSelect.filterModel)
{
LxDropdownService.open('dropdown-' + lxSelect.uuid, '#lx-select-selected-wrapper-' + lxSelect.uuid);
}
else
{
LxDropdownService.close('dropdown-' + lxSelect.uuid);
}
}
}
function helperDisplayable() {
// If helper message is not defined, message is not displayed...
if (angular.isUndefined(lxSelect.helperMessage))
{
return false;
}
// If helper is defined return it's state.
if (angular.isDefined(lxSelect.helper))
{
return lxSelect.helper;
}
// Else check if there's choices.
var choices = lxSelect.getFilteredChoices();
if (angular.isArray(choices))
{
return !choices.length;
}
else if (angular.isObject(choices))
{
return !Object.keys(choices).length;
}
return true;
}
function removeElement(model, element)
{
var index = -1;
for (var i = 0, len = model.length; i < len; i++)
{
if (angular.equals(element, model[i]))
{
index = i;
break;
}
}
if (index > -1)
{
model.splice(index, 1);
}
}
}
function lxSelectSelected()
{
return {
restrict: 'E',
require: ['lxSelectSelected', '^lxSelect'],
templateUrl: 'select-selected.html',
link: link,
controller: LxSelectSelectedController,
controllerAs: 'lxSelectSelected',
bindToController: true,
transclude: true
};
function link(scope, element, attrs, ctrls, transclude)
{
ctrls[0].setParentController(ctrls[1]);
transclude(scope, function(clone)
{
var template = '';
for (var i = 0; i < clone.length; i++)
{
template += clone[i].data || clone[i].outerHTML || '';
}
ctrls[1].registerSelectedTemplate(template);
});
}
}
function LxSelectSelectedController()
{
var lxSelectSelected = this;
lxSelectSelected.clearModel = clearModel;
lxSelectSelected.setParentController = setParentController;
lxSelectSelected.removeSelected = removeSelected;
////////////
function clearModel(_event)
{
_event.stopPropagation();
lxSelectSelected.parentCtrl.ngModel = undefined;
lxSelectSelected.parentCtrl.unconvertedModel = undefined;
}
function setParentController(_parentCtrl)
{
lxSelectSelected.parentCtrl = _parentCtrl;
}
function removeSelected(_selected, _event)
{
_event.stopPropagation();
lxSelectSelected.parentCtrl.unselect(_selected);
}
}
function lxSelectChoices()
{
return {
restrict: 'E',
require: ['lxSelectChoices', '^lxSelect'],
templateUrl: 'select-choices.html',
link: link,
controller: LxSelectChoicesController,
controllerAs: 'lxSelectChoices',
bindToController: true,
transclude: true
};
function link(scope, element, attrs, ctrls, transclude)
{
ctrls[0].setParentController(ctrls[1]);
transclude(scope, function(clone)
{
var template = '';
for (var i = 0; i < clone.length; i++)
{
template += clone[i].data || clone[i].outerHTML || '';
}
ctrls[1].registerChoiceTemplate(template);
});
}
}
LxSelectChoicesController.$inject = ['$scope', '$timeout'];
function LxSelectChoicesController($scope, $timeout)
{
var lxSelectChoices = this;
var timer;
lxSelectChoices.isArray = isArray;
lxSelectChoices.setParentController = setParentController;
$scope.$on('$destroy', function()
{
$timeout.cancel(timer);
});
////////////
function isArray()
{
return angular.isArray(lxSelectChoices.parentCtrl.choices);
}
function setParentController(_parentCtrl)
{
lxSelectChoices.parentCtrl = _parentCtrl;
$scope.$watch(function()
{
return lxSelectChoices.parentCtrl.ngModel;
}, function(newModel, oldModel)
{
timer = $timeout(function()
{
if (newModel !== oldModel && angular.isDefined(lxSelectChoices.parentCtrl.ngChange))
{
lxSelectChoices.parentCtrl.ngChange(
{
newValue: newModel,
oldValue: oldModel
});
}
if (angular.isDefined(lxSelectChoices.parentCtrl.modelToSelection) || angular.isDefined(lxSelectChoices.parentCtrl.selectionToModel))
{
toSelection();
}
});
}, true);
}
function toSelection()
{
if (lxSelectChoices.parentCtrl.multiple)
{
lxSelectChoices.parentCtrl.unconvertedModel = [];
angular.forEach(lxSelectChoices.parentCtrl.ngModel, function(item)
{
lxSelectChoices.parentCtrl.modelToSelection(
{
data: item,
callback: function(resp)
{
lxSelectChoices.parentCtrl.unconvertedModel.push(resp);
}
});
});
}
else
{
lxSelectChoices.parentCtrl.modelToSelection(
{
data: lxSelectChoices.parentCtrl.ngModel,
callback: function(resp)
{
lxSelectChoices.parentCtrl.unconvertedModel = resp;
}
});
}
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.stepper')
.directive('lxStepper', lxStepper)
.directive('lxStep', lxStep)
.directive('lxStepNav', lxStepNav);
/* Stepper */
function lxStepper()
{
return {
restrict: 'E',
templateUrl: 'stepper.html',
scope: {
cancel: '&?lxCancel',
complete: '&lxComplete',
isLinear: '=?lxIsLinear',
labels: '=?lxLabels',
layout: '@?lxLayout'
},
controller: LxStepperController,
controllerAs: 'lxStepper',
bindToController: true,
transclude: true
};
}
function LxStepperController()
{
var lxStepper = this;
var _classes = [];
var _defaultValues = {
isLinear: true,
labels: {
'back': 'Back',
'cancel': 'Cancel',
'continue': 'Continue',
'optional': 'Optional'
},
layout: 'horizontal'
};
lxStepper.addStep = addStep;
lxStepper.getClasses = getClasses;
lxStepper.goToStep = goToStep;
lxStepper.isComplete = isComplete;
lxStepper.updateStep = updateStep;
lxStepper.activeIndex = 0;
lxStepper.isLinear = angular.isDefined(lxStepper.isLinear) ? lxStepper.isLinear : _defaultValues.isLinear;
lxStepper.labels = angular.isDefined(lxStepper.labels) ? lxStepper.labels : _defaultValues.labels;
lxStepper.layout = angular.isDefined(lxStepper.layout) ? lxStepper.layout : _defaultValues.layout;
lxStepper.steps = [];
////////////
function addStep(step)
{
lxStepper.steps.push(step);
}
function getClasses()
{
_classes.length = 0;
_classes.push('lx-stepper--layout-' + lxStepper.layout);
if (lxStepper.isLinear)
{
_classes.push('lx-stepper--is-linear');
}
if (lxStepper.steps[lxStepper.activeIndex].feedback)
{
_classes.push('lx-stepper--step-has-feedback');
}
if (lxStepper.steps[lxStepper.activeIndex].isLoading)
{
_classes.push('lx-stepper--step-is-loading');
}
return _classes;
}
function goToStep(index, bypass)
{
// Check if the the wanted step previous steps are optionals. If so, check if the step before the last optional step is valid to allow going to the wanted step from the nav (only if linear stepper).
var stepBeforeLastOptionalStep;
if (!bypass && lxStepper.isLinear)
{
for (var i = index - 1; i >= 0; i--)
{
if (angular.isDefined(lxStepper.steps[i]) && !lxStepper.steps[i].isOptional)
{
stepBeforeLastOptionalStep = lxStepper.steps[i];
break;
}
}
if (angular.isDefined(stepBeforeLastOptionalStep) && stepBeforeLastOptionalStep.isValid === true)
{
bypass = true;
}
}
// Check if the wanted step previous step is not valid to disallow going to the wanted step from the nav (only if linear stepper).
if (!bypass && lxStepper.isLinear && angular.isDefined(lxStepper.steps[index - 1]) && (angular.isUndefined(lxStepper.steps[index - 1].isValid) || lxStepper.steps[index - 1].isValid === false))
{
return;
}
if (index < lxStepper.steps.length)
{
lxStepper.activeIndex = parseInt(index);
}
}
function isComplete()
{
var countMandatory = 0;
var countValid = 0;
for (var i = 0, len = lxStepper.steps.length; i < len; i++)
{
if (!lxStepper.steps[i].isOptional)
{
countMandatory++;
if (lxStepper.steps[i].isValid === true) {
countValid++;
}
}
}
if (countValid === countMandatory)
{
lxStepper.complete();
return true;
}
}
function updateStep(step)
{
for (var i = 0, len = lxStepper.steps.length; i < len; i++)
{
if (lxStepper.steps[i].uuid === step.uuid)
{
lxStepper.steps[i].index = step.index;
lxStepper.steps[i].label = step.label;
return;
}
}
}
}
/* Step */
function lxStep()
{
return {
restrict: 'E',
require: ['lxStep', '^lxStepper'],
templateUrl: 'step.html',
scope: {
feedback: '@?lxFeedback',
isEditable: '=?lxIsEditable',
isOptional: '=?lxIsOptional',
label: '@lxLabel',
submit: '&?lxSubmit',
validate: '&?lxValidate'
},
link: link,
controller: LxStepController,
controllerAs: 'lxStep',
bindToController: true,
replace: true,
transclude: true
};
function link(scope, element, attrs, ctrls)
{
ctrls[0].init(ctrls[1], element.index());
attrs.$observe('lxFeedback', function(feedback)
{
ctrls[0].setFeedback(feedback);
});
attrs.$observe('lxLabel', function(label)
{
ctrls[0].setLabel(label);
});
attrs.$observe('lxIsEditable', function(isEditable)
{
ctrls[0].setIsEditable(isEditable);
});
attrs.$observe('lxIsOptional', function(isOptional)
{
ctrls[0].setIsOptional(isOptional);
});
}
}
LxStepController.$inject = ['$q', 'LxNotificationService', 'LxUtils'];
function LxStepController($q, LxNotificationService, LxUtils)
{
var lxStep = this;
var _classes = [];
var _nextStepIndex;
lxStep.getClasses = getClasses;
lxStep.init = init;
lxStep.previousStep = previousStep;
lxStep.setFeedback = setFeedback;
lxStep.setLabel = setLabel;
lxStep.setIsEditable = setIsEditable;
lxStep.setIsOptional = setIsOptional;
lxStep.submitStep = submitStep;
lxStep.step = {
errorMessage: undefined,
feedback: undefined,
index: undefined,
isEditable: false,
isLoading: false,
isOptional: false,
isValid: undefined,
label: undefined,
uuid: LxUtils.generateUUID()
};
////////////
function getClasses()
{
_classes.length = 0;
if (lxStep.step.index === lxStep.parent.activeIndex)
{
_classes.push('lx-step--is-active');
}
return _classes;
}
function init(parent, index)
{
lxStep.parent = parent;
lxStep.step.index = index;
lxStep.parent.addStep(lxStep.step);
}
function previousStep()
{
if (lxStep.step.index > 0)
{
lxStep.parent.goToStep(lxStep.step.index - 1);
}
}
function setFeedback(feedback)
{
lxStep.step.feedback = feedback;
updateParentStep();
}
function setLabel(label)
{
lxStep.step.label = label;
updateParentStep();
}
function setIsEditable(isEditable)
{
lxStep.step.isEditable = isEditable;
updateParentStep();
}
function setIsOptional(isOptional)
{
lxStep.step.isOptional = isOptional;
updateParentStep();
}
function submitStep()
{
if (lxStep.step.isValid === true && !lxStep.step.isEditable)
{
lxStep.parent.goToStep(_nextStepIndex, true);
return;
}
var validateFunction = lxStep.validate;
var validity = true;
if (angular.isFunction(validateFunction))
{
validity = validateFunction();
}
if (validity === true)
{
lxStep.step.isLoading = true;
updateParentStep();
var submitFunction = lxStep.submit;
if (!angular.isFunction(submitFunction))
{
submitFunction = function()
{
return $q(function(resolve)
{
resolve();
});
};
}
var promise = submitFunction();
promise.then(function(nextStepIndex)
{
lxStep.step.isValid = true;
updateParentStep();
var isComplete = lxStep.parent.isComplete();
if (!isComplete)
{
_nextStepIndex = angular.isDefined(nextStepIndex) && nextStepIndex > lxStep.parent.activeIndex && (!lxStep.parent.isLinear || (lxStep.parent.isLinear && lxStep.parent.steps[nextStepIndex - 1].isOptional)) ? nextStepIndex : lxStep.step.index + 1;
lxStep.parent.goToStep(_nextStepIndex, true);
}
}).catch(function(error)
{
LxNotificationService.error(error);
}).finally(function()
{
lxStep.step.isLoading = false;
updateParentStep();
});
}
else
{
lxStep.step.isValid = false;
lxStep.step.errorMessage = validity;
updateParentStep();
}
}
function updateParentStep()
{
lxStep.parent.updateStep(lxStep.step);
}
}
/* Step nav */
function lxStepNav()
{
return {
restrict: 'E',
require: ['lxStepNav', '^lxStepper'],
templateUrl: 'step-nav.html',
scope: {
activeIndex: '@lxActiveIndex',
step: '=lxStep'
},
link: link,
controller: LxStepNavController,
controllerAs: 'lxStepNav',
bindToController: true,
replace: true,
transclude: false
};
function link(scope, element, attrs, ctrls)
{
ctrls[0].init(ctrls[1]);
}
}
function LxStepNavController()
{
var lxStepNav = this;
var _classes = [];
lxStepNav.getClasses = getClasses;
lxStepNav.init = init;
////////////
function getClasses()
{
_classes.length = 0;
if (parseInt(lxStepNav.step.index) === parseInt(lxStepNav.activeIndex))
{
_classes.push('lx-step-nav--is-active');
}
if (lxStepNav.step.isValid === true)
{
_classes.push('lx-step-nav--is-valid');
}
else if (lxStepNav.step.isValid === false)
{
_classes.push('lx-step-nav--has-error');
}
if (lxStepNav.step.isEditable)
{
_classes.push('lx-step-nav--is-editable');
}
if (lxStepNav.step.isOptional)
{
_classes.push('lx-step-nav--is-optional');
}
return _classes;
}
function init(parent, index)
{
lxStepNav.parent = parent;
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.switch')
.directive('lxSwitch', lxSwitch)
.directive('lxSwitchLabel', lxSwitchLabel)
.directive('lxSwitchHelp', lxSwitchHelp);
function lxSwitch()
{
return {
restrict: 'E',
templateUrl: 'switch.html',
scope:
{
ngModel: '=',
name: '@?',
ngTrueValue: '@?',
ngFalseValue: '@?',
ngChange: '&?',
ngDisabled: '=?',
lxColor: '@?',
lxPosition: '@?'
},
controller: LxSwitchController,
controllerAs: 'lxSwitch',
bindToController: true,
transclude: true,
replace: true
};
}
LxSwitchController.$inject = ['$scope', '$timeout', 'LxUtils'];
function LxSwitchController($scope, $timeout, LxUtils)
{
var lxSwitch = this;
var switchId;
var switchHasChildren;
var timer;
lxSwitch.getSwitchId = getSwitchId;
lxSwitch.getSwitchHasChildren = getSwitchHasChildren;
lxSwitch.setSwitchId = setSwitchId;
lxSwitch.setSwitchHasChildren = setSwitchHasChildren;
lxSwitch.triggerNgChange = triggerNgChange;
$scope.$on('$destroy', function()
{
$timeout.cancel(timer);
});
init();
////////////
function getSwitchId()
{
return switchId;
}
function getSwitchHasChildren()
{
return switchHasChildren;
}
function init()
{
setSwitchId(LxUtils.generateUUID());
setSwitchHasChildren(false);
lxSwitch.ngTrueValue = angular.isUndefined(lxSwitch.ngTrueValue) ? true : lxSwitch.ngTrueValue;
lxSwitch.ngFalseValue = angular.isUndefined(lxSwitch.ngFalseValue) ? false : lxSwitch.ngFalseValue;
lxSwitch.lxColor = angular.isUndefined(lxSwitch.lxColor) ? 'accent' : lxSwitch.lxColor;
lxSwitch.lxPosition = angular.isUndefined(lxSwitch.lxPosition) ? 'left' : lxSwitch.lxPosition;
}
function setSwitchId(_switchId)
{
switchId = _switchId;
}
function setSwitchHasChildren(_switchHasChildren)
{
switchHasChildren = _switchHasChildren;
}
function triggerNgChange()
{
timer = $timeout(lxSwitch.ngChange);
}
}
function lxSwitchLabel()
{
return {
restrict: 'AE',
require: ['^lxSwitch', '^lxSwitchLabel'],
templateUrl: 'switch-label.html',
link: link,
controller: LxSwitchLabelController,
controllerAs: 'lxSwitchLabel',
bindToController: true,
transclude: true,
replace: true
};
function link(scope, element, attrs, ctrls)
{
ctrls[0].setSwitchHasChildren(true);
ctrls[1].setSwitchId(ctrls[0].getSwitchId());
}
}
function LxSwitchLabelController()
{
var lxSwitchLabel = this;
var switchId;
lxSwitchLabel.getSwitchId = getSwitchId;
lxSwitchLabel.setSwitchId = setSwitchId;
////////////
function getSwitchId()
{
return switchId;
}
function setSwitchId(_switchId)
{
switchId = _switchId;
}
}
function lxSwitchHelp()
{
return {
restrict: 'AE',
require: '^lxSwitch',
templateUrl: 'switch-help.html',
transclude: true,
replace: true
};
}
})();
(function()
{
'use strict';
angular
.module('lumx.tabs')
.directive('lxTabs', lxTabs)
.directive('lxTab', lxTab)
.directive('lxTabsPanes', lxTabsPanes)
.directive('lxTabPane', lxTabPane);
function lxTabs()
{
return {
restrict: 'E',
templateUrl: 'tabs.html',
scope:
{
layout: '@?lxLayout',
theme: '@?lxTheme',
color: '@?lxColor',
indicator: '@?lxIndicator',
activeTab: '=?lxActiveTab',
panesId: '@?lxPanesId',
links: '=?lxLinks'
},
controller: LxTabsController,
controllerAs: 'lxTabs',
bindToController: true,
replace: true,
transclude: true
};
}
LxTabsController.$inject = ['LxUtils', '$element', '$scope', '$timeout'];
function LxTabsController(LxUtils, $element, $scope, $timeout)
{
var lxTabs = this;
var tabsLength;
var timer1;
var timer2;
var timer3;
var timer4;
lxTabs.removeTab = removeTab;
lxTabs.setActiveTab = setActiveTab;
lxTabs.setViewMode = setViewMode;
lxTabs.tabIsActive = tabIsActive;
lxTabs.updateTabs = updateTabs;
lxTabs.activeTab = angular.isDefined(lxTabs.activeTab) ? lxTabs.activeTab : 0;
lxTabs.color = angular.isDefined(lxTabs.color) ? lxTabs.color : 'primary';
lxTabs.indicator = angular.isDefined(lxTabs.indicator) ? lxTabs.indicator : 'accent';
lxTabs.layout = angular.isDefined(lxTabs.layout) ? lxTabs.layout : 'full';
lxTabs.tabs = [];
lxTabs.theme = angular.isDefined(lxTabs.theme) ? lxTabs.theme : 'light';
lxTabs.viewMode = angular.isDefined(lxTabs.links) ? 'separate' : 'gather';
$scope.$watch(function()
{
return lxTabs.activeTab;
}, function(_newActiveTab, _oldActiveTab)
{
timer1 = $timeout(function()
{
setIndicatorPosition(_oldActiveTab);
if (lxTabs.viewMode === 'separate')
{
angular.element('#' + lxTabs.panesId).find('.tabs__pane').hide();
angular.element('#' + lxTabs.panesId).find('.tabs__pane').eq(lxTabs.activeTab).show();
}
});
});
$scope.$watch(function()
{
return lxTabs.links;
}, function(_newLinks)
{
lxTabs.viewMode = angular.isDefined(_newLinks) ? 'separate' : 'gather';
angular.forEach(_newLinks, function(link, index)
{
var tab = {
uuid: (angular.isUndefined(link.uuid) || link.uuid.length === 0) ? LxUtils.generateUUID() : link.uuid,
index: index,
label: link.label,
icon: link.icon,
disabled: link.disabled
};
updateTabs(tab);
});
});
timer2 = $timeout(function()
{
tabsLength = lxTabs.tabs.length;
});
$scope.$on('$destroy', function()
{
$timeout.cancel(timer1);
$timeout.cancel(timer2);
$timeout.cancel(timer3);
$timeout.cancel(timer4);
});
////////////
function removeTab(_tab)
{
lxTabs.tabs.splice(_tab.index, 1);
angular.forEach(lxTabs.tabs, function(tab, index)
{
tab.index = index;
});
if (lxTabs.activeTab === 0)
{
timer3 = $timeout(function()
{
setIndicatorPosition();
});
}
else
{
setActiveTab(lxTabs.tabs[0]);
}
}
function setActiveTab(_tab)
{
if (!_tab.disabled)
{
lxTabs.activeTab = _tab.index;
}
}
function setIndicatorPosition(_previousActiveTab)
{
var direction = lxTabs.activeTab > _previousActiveTab ? 'right' : 'left';
var indicator = $element.find('.tabs__indicator');
var activeTab = $element.find('.tabs__link').eq(lxTabs.activeTab);
var indicatorLeft = activeTab.position().left;
var indicatorRight = $element.outerWidth() - (indicatorLeft + activeTab.outerWidth());
if (angular.isUndefined(_previousActiveTab))
{
indicator.css(
{
left: indicatorLeft,
right: indicatorRight
});
}
else
{
var animationProperties = {
duration: 200,
easing: 'easeOutQuint'
};
if (direction === 'left')
{
indicator.velocity(
{
left: indicatorLeft
}, animationProperties);
indicator.velocity(
{
right: indicatorRight
}, animationProperties);
}
else
{
indicator.velocity(
{
right: indicatorRight
}, animationProperties);
indicator.velocity(
{
left: indicatorLeft
}, animationProperties);
}
}
}
function setViewMode(_viewMode)
{
lxTabs.viewMode = _viewMode;
}
function tabIsActive(_index)
{
return lxTabs.activeTab === _index;
}
function updateTabs(_tab)
{
var newTab = true;
angular.forEach(lxTabs.tabs, function(tab)
{
if (tab.index === _tab.index)
{
newTab = false;
tab.uuid = _tab.uuid;
tab.icon = _tab.icon;
tab.label = _tab.label;
}
});
if (newTab)
{
lxTabs.tabs.push(_tab);
if (angular.isDefined(tabsLength))
{
timer4 = $timeout(function()
{
setIndicatorPosition();
});
}
}
}
}
function lxTab()
{
return {
restrict: 'E',
require: ['lxTab', '^lxTabs'],
templateUrl: 'tab.html',
scope:
{
ngDisabled: '=?'
},
link: link,
controller: LxTabController,
controllerAs: 'lxTab',
bindToController: true,
replace: true,
transclude: true
};
function link(scope, element, attrs, ctrls)
{
ctrls[0].init(ctrls[1], element.index());
attrs.$observe('lxLabel', function(_newLabel)
{
ctrls[0].setLabel(_newLabel);
});
attrs.$observe('lxIcon', function(_newIcon)
{
ctrls[0].setIcon(_newIcon);
});
}
}
LxTabController.$inject = ['$scope', 'LxUtils'];
function LxTabController($scope, LxUtils)
{
var lxTab = this;
var parentCtrl;
var tab = {
uuid: LxUtils.generateUUID(),
index: undefined,
label: undefined,
icon: undefined,
disabled: false
};
lxTab.init = init;
lxTab.setIcon = setIcon;
lxTab.setLabel = setLabel;
lxTab.tabIsActive = tabIsActive;
$scope.$watch(function()
{
return lxTab.ngDisabled;
}, function(_isDisabled)
{
if (_isDisabled)
{
tab.disabled = true;
}
else
{
tab.disabled = false;
}
parentCtrl.updateTabs(tab);
});
$scope.$on('$destroy', function()
{
parentCtrl.removeTab(tab);
});
////////////
function init(_parentCtrl, _index)
{
parentCtrl = _parentCtrl;
tab.index = _index;
parentCtrl.updateTabs(tab);
}
function setIcon(_icon)
{
tab.icon = _icon;
parentCtrl.updateTabs(tab);
}
function setLabel(_label)
{
tab.label = _label;
parentCtrl.updateTabs(tab);
}
function tabIsActive()
{
return parentCtrl.tabIsActive(tab.index);
}
}
function lxTabsPanes()
{
return {
restrict: 'E',
templateUrl: 'tabs-panes.html',
scope: true,
replace: true,
transclude: true
};
}
function lxTabPane()
{
return {
restrict: 'E',
templateUrl: 'tab-pane.html',
scope: true,
replace: true,
transclude: true
};
}
})();
(function()
{
'use strict';
angular
.module('lumx.text-field')
.directive('lxTextField', lxTextField);
lxTextField.$inject = ['$timeout'];
function lxTextField($timeout)
{
return {
restrict: 'E',
templateUrl: 'text-field.html',
scope:
{
allowClear: '=?lxAllowClear',
error: '=?lxError',
fixedLabel: '=?lxFixedLabel',
focus: '=?lxFocus',
icon: '@?lxIcon',
label: '@lxLabel',
ngDisabled: '=?',
theme: '@?lxTheme',
valid: '=?lxValid'
},
link: link,
controller: LxTextFieldController,
controllerAs: 'lxTextField',
bindToController: true,
replace: true,
transclude: true
};
function link(scope, element, attrs, ctrl, transclude)
{
var backwardOneWay = ['icon', 'label', 'theme'];
var backwardTwoWay = ['error', 'fixedLabel', 'valid'];
var input;
var timer;
angular.forEach(backwardOneWay, function(attribute)
{
if (angular.isDefined(attrs[attribute]))
{
attrs.$observe(attribute, function(newValue)
{
scope.lxTextField[attribute] = newValue;
});
}
});
angular.forEach(backwardTwoWay, function(attribute)
{
if (angular.isDefined(attrs[attribute]))
{
scope.$watch(function()
{
return scope.$parent.$eval(attrs[attribute]);
}, function(newValue)
{
scope.lxTextField[attribute] = newValue;
});
}
});
transclude(function()
{
input = element.find('textarea');
if (input[0])
{
input.on('cut paste drop keydown', function()
{
timer = $timeout(ctrl.updateTextareaHeight);
});
}
else
{
input = element.find('input');
}
input.addClass('text-field__input');
ctrl.setInput(input);
ctrl.setModel(input.data('$ngModelController'));
input.on('focus', function()
{
var phase = scope.$root.$$phase;
if (phase === '$apply' || phase === '$digest')
{
ctrl.focusInput();
}
else
{
scope.$apply(ctrl.focusInput);
}
});
input.on('blur', ctrl.blurInput);
});
scope.$on('$destroy', function()
{
$timeout.cancel(timer);
input.off();
});
}
}
LxTextFieldController.$inject = ['$scope', '$timeout'];
function LxTextFieldController($scope, $timeout)
{
var lxTextField = this;
var input;
var modelController;
var timer1;
var timer2;
lxTextField.blurInput = blurInput;
lxTextField.clearInput = clearInput;
lxTextField.focusInput = focusInput;
lxTextField.hasValue = hasValue;
lxTextField.setInput = setInput;
lxTextField.setModel = setModel;
lxTextField.updateTextareaHeight = updateTextareaHeight;
$scope.$watch(function()
{
return modelController.$viewValue;
}, function(newValue, oldValue)
{
if (angular.isDefined(newValue) && newValue)
{
lxTextField.isActive = true;
}
else
{
lxTextField.isActive = false;
}
});
$scope.$watch(function()
{
return lxTextField.focus;
}, function(newValue, oldValue)
{
if (angular.isDefined(newValue) && newValue)
{
$timeout(function()
{
input.focus();
// Reset the value so we can re-focus the field later on if we want to.
lxTextField.focus = false;
});
}
});
$scope.$on('$destroy', function()
{
$timeout.cancel(timer1);
$timeout.cancel(timer2);
});
////////////
function blurInput()
{
if (!hasValue())
{
$scope.$apply(function()
{
lxTextField.isActive = false;
});
}
$scope.$apply(function()
{
lxTextField.isFocus = false;
});
}
function clearInput(_event)
{
_event.stopPropagation();
modelController.$setViewValue(undefined);
modelController.$render();
}
function focusInput()
{
lxTextField.isActive = true;
lxTextField.isFocus = true;
}
function hasValue()
{
return angular.isDefined(input.val()) && input.val().length > 0;
}
function init()
{
lxTextField.isActive = hasValue();
lxTextField.focus = angular.isDefined(lxTextField.focus) ? lxTextField.focus : false;
lxTextField.isFocus = lxTextField.focus;
}
function setInput(_input)
{
input = _input;
timer1 = $timeout(init);
if (input.selector === 'textarea')
{
timer2 = $timeout(updateTextareaHeight);
}
}
function setModel(_modelControler)
{
modelController = _modelControler;
}
function updateTextareaHeight()
{
var tmpTextArea = angular.element('<textarea class="text-field__input" style="width: ' + input.width() + 'px;">' + input.val() + '</textarea>');
tmpTextArea.appendTo('body');
input.css(
{
height: tmpTextArea[0].scrollHeight + 'px'
});
tmpTextArea.remove();
}
}
})();
(function()
{
'use strict';
angular
.module('lumx.tooltip')
.directive('lxTooltip', lxTooltip);
function lxTooltip()
{
return {
restrict: 'A',
scope:
{
tooltip: '@lxTooltip',
position: '@?lxTooltipPosition'
},
link: link,
controller: LxTooltipController,
controllerAs: 'lxTooltip',
bindToController: true
};
function link(scope, element, attrs, ctrl)
{
if (angular.isDefined(attrs.lxTooltip))
{
attrs.$observe('lxTooltip', function(newValue)
{
ctrl.updateTooltipText(newValue);
});
}
if (angular.isDefined(attrs.lxTooltipPosition))
{
attrs.$observe('lxTooltipPosition', function(newValue)
{
scope.lxTooltip.position = newValue;
});
}
element.on('mouseenter', ctrl.showTooltip);
element.on('mouseleave', ctrl.hideTooltip);
scope.$on('$destroy', function()
{
element.off();
});
}
}
LxTooltipController.$inject = ['$element', '$scope', '$timeout', 'LxDepthService'];
function LxTooltipController($element, $scope, $timeout, LxDepthService)
{
var lxTooltip = this;
var timer1;
var timer2;
var tooltip;
var tooltipBackground;
var tooltipLabel;
lxTooltip.hideTooltip = hideTooltip;
lxTooltip.showTooltip = showTooltip;
lxTooltip.updateTooltipText = updateTooltipText;
lxTooltip.position = angular.isDefined(lxTooltip.position) ? lxTooltip.position : 'top';
$scope.$on('$destroy', function()
{
if (angular.isDefined(tooltip))
{
tooltip.remove();
tooltip = undefined;
}
$timeout.cancel(timer1);
$timeout.cancel(timer2);
});
////////////
function hideTooltip()
{
if (angular.isDefined(tooltip))
{
tooltip.removeClass('tooltip--is-active');
timer1 = $timeout(function()
{
if (angular.isDefined(tooltip))
{
tooltip.remove();
tooltip = undefined;
}
}, 200);
}
}
function setTooltipPosition()
{
var width = $element.outerWidth(),
height = $element.outerHeight(),
top = $element.offset().top,
left = $element.offset().left;
tooltip
.append(tooltipBackground)
.append(tooltipLabel)
.appendTo('body');
if (lxTooltip.position === 'top')
{
tooltip.css(
{
left: left - (tooltip.outerWidth() / 2) + (width / 2),
top: top - tooltip.outerHeight()
});
}
else if (lxTooltip.position === 'bottom')
{
tooltip.css(
{
left: left - (tooltip.outerWidth() / 2) + (width / 2),
top: top + height
});
}
else if (lxTooltip.position === 'left')
{
tooltip.css(
{
left: left - tooltip.outerWidth(),
top: top + (height / 2) - (tooltip.outerHeight() / 2)
});
}
else if (lxTooltip.position === 'right')
{
tooltip.css(
{
left: left + width,
top: top + (height / 2) - (tooltip.outerHeight() / 2)
});
}
}
function showTooltip()
{
if (angular.isUndefined(tooltip))
{
LxDepthService.register();
tooltip = angular.element('<div/>',
{
class: 'tooltip tooltip--' + lxTooltip.position
});
tooltipBackground = angular.element('<div/>',
{
class: 'tooltip__background'
});
tooltipLabel = angular.element('<span/>',
{
class: 'tooltip__label',
text: lxTooltip.tooltip
});
setTooltipPosition();
tooltip
.append(tooltipBackground)
.append(tooltipLabel)
.css('z-index', LxDepthService.getDepth())
.appendTo('body');
timer2 = $timeout(function()
{
tooltip.addClass('tooltip--is-active');
});
}
}
function updateTooltipText(_newValue)
{
if (angular.isDefined(tooltipLabel))
{
tooltipLabel.text(_newValue);
}
}
}
})();
angular.module("lumx.dropdown").run(['$templateCache', function(a) { a.put('dropdown.html', '<div class="dropdown"\n' +
' ng-class="{ \'dropdown--has-toggle\': lxDropdown.hasToggle,\n' +
' \'dropdown--is-open\': lxDropdown.isOpen }"\n' +
' ng-transclude></div>\n' +
'');
a.put('dropdown-toggle.html', '<div class="dropdown-toggle" ng-transclude></div>\n' +
'');
a.put('dropdown-menu.html', '<div class="dropdown-menu">\n' +
' <div class="dropdown-menu__content" ng-transclude ng-if="lxDropdownMenu.parentCtrl.isOpen"></div>\n' +
'</div>\n' +
'');
}]);
angular.module("lumx.file-input").run(['$templateCache', function(a) { a.put('file-input.html', '<div class="input-file">\n' +
' <span class="input-file__label">{{ lxFileInput.label }}</span>\n' +
' <span class="input-file__filename">{{ lxFileInput.fileName }}</span>\n' +
' <input type="file" class="input-file__input">\n' +
'</div>\n' +
'');
}]);
angular.module("lumx.text-field").run(['$templateCache', function(a) { a.put('text-field.html', '<div class="text-field"\n' +
' ng-class="{ \'text-field--error\': lxTextField.error,\n' +
' \'text-field--fixed-label\': lxTextField.fixedLabel,\n' +
' \'text-field--has-icon\': lxTextField.icon,\n' +
' \'text-field--has-value\': lxTextField.hasValue(),\n' +
' \'text-field--is-active\': lxTextField.isActive,\n' +
' \'text-field--is-disabled\': lxTextField.ngDisabled,\n' +
' \'text-field--is-focus\': lxTextField.isFocus,\n' +
' \'text-field--theme-light\': !lxTextField.theme || lxTextField.theme === \'light\',\n' +
' \'text-field--theme-dark\': lxTextField.theme === \'dark\',\n' +
' \'text-field--valid\': lxTextField.valid }">\n' +
' <div class="text-field__icon" ng-if="lxTextField.icon">\n' +
' <i class="mdi mdi-{{ lxTextField.icon }}"></i>\n' +
' </div>\n' +
'\n' +
' <label class="text-field__label">\n' +
' {{ lxTextField.label }}\n' +
' </label>\n' +
'\n' +
' <div ng-transclude></div>\n' +
'\n' +
' <span class="text-field__clear" ng-click="lxTextField.clearInput($event)" ng-if="lxTextField.allowClear">\n' +
' <i class="mdi mdi-close-circle"></i>\n' +
' </span>\n' +
'</div>\n' +
'');
}]);
angular.module("lumx.search-filter").run(['$templateCache', function(a) { a.put('search-filter.html', '<div class="search-filter" ng-class="lxSearchFilter.getClass()">\n' +
' <div class="search-filter__container">\n' +
' <div class="search-filter__button">\n' +
' <lx-button type="submit" lx-size="l" lx-color="{{ lxSearchFilter.color }}" lx-type="icon" ng-click="lxSearchFilter.openInput()">\n' +
' <i class="mdi mdi-magnify"></i>\n' +
' </lx-button>\n' +
' </div>\n' +
'\n' +
' <div class="search-filter__input" ng-transclude></div>\n' +
'\n' +
' <div class="search-filter__clear">\n' +
' <lx-button type="button" lx-size="l" lx-color="{{ lxSearchFilter.color }}" lx-type="icon" ng-click="lxSearchFilter.clearInput()">\n' +
' <i class="mdi mdi-close"></i>\n' +
' </lx-button>\n' +
' </div>\n' +
' </div>\n' +
'\n' +
' <div class="search-filter__loader" ng-if="lxSearchFilter.isLoading">\n' +
' <lx-progress lx-type="linear"></lx-progress>\n' +
' </div>\n' +
'\n' +
' <lx-dropdown id="{{ lxSearchFilter.dropdownId }}" lx-effect="none" lx-width="100%" ng-if="lxSearchFilter.autocomplete">\n' +
' <lx-dropdown-menu class="search-filter__autocomplete-list">\n' +
' <ul>\n' +
' <li ng-repeat="item in lxSearchFilter.autocompleteList track by $index">\n' +
' <a class="search-filter__autocomplete-item"\n' +
' ng-class="{ \'search-filter__autocomplete-item--is-active\': lxSearchFilter.activeChoiceIndex === $index }"\n' +
' ng-click="lxSearchFilter.selectItem(item)"\n' +
' ng-bind-html="item | lxSearchHighlight:lxSearchFilter.modelController.$viewValue:lxSearchFilter.icon"></a>\n' +
' </li>\n' +
' </ul>\n' +
' </lx-dropdown-menu>\n' +
' </lx-dropdown>\n' +
'</div>');
}]);
angular.module("lumx.select").run(['$templateCache', function(a) { a.put('select.html', '<div class="lx-select"\n' +
' ng-class="{ \'lx-select--error\': lxSelect.error,\n' +
' \'lx-select--fixed-label\': lxSelect.fixedLabel && lxSelect.viewMode === \'field\',\n' +
' \'lx-select--is-active\': (!lxSelect.multiple && lxSelect.getSelectedModel()) || (lxSelect.multiple && lxSelect.getSelectedModel().length),\n' +
' \'lx-select--is-disabled\': lxSelect.ngDisabled,\n' +
' \'lx-select--is-multiple\': lxSelect.multiple,\n' +
' \'lx-select--is-unique\': !lxSelect.multiple,\n' +
' \'lx-select--theme-light\': !lxSelect.theme || lxSelect.theme === \'light\',\n' +
' \'lx-select--theme-dark\': lxSelect.theme === \'dark\',\n' +
' \'lx-select--valid\': lxSelect.valid,\n' +
' \'lx-select--custom-style\': lxSelect.customStyle,\n' +
' \'lx-select--default-style\': !lxSelect.customStyle,\n' +
' \'lx-select--view-mode-field\': !lxSelect.multiple || (lxSelect.multiple && lxSelect.viewMode === \'field\'),\n' +
' \'lx-select--view-mode-chips\': lxSelect.multiple && lxSelect.viewMode === \'chips\',\n' +
' \'lx-select--autocomplete\': lxSelect.autocomplete }">\n' +
' <span class="lx-select-label" ng-if="!lxSelect.autocomplete">\n' +
' {{ ::lxSelect.label }}\n' +
' </span>\n' +
'\n' +
' <lx-dropdown id="dropdown-{{ lxSelect.uuid }}" lx-width="100%" lx-effect="{{ lxSelect.autocomplete ? \'none\' : \'expand\' }}">\n' +
' <ng-transclude></ng-transclude>\n' +
' </lx-dropdown>\n' +
'</div>\n' +
'');
a.put('select-selected.html', '<div>\n' +
' <lx-dropdown-toggle ng-if="::!lxSelectSelected.parentCtrl.autocomplete">\n' +
' <ng-include src="\'select-selected-content.html\'"></ng-include>\n' +
' </lx-dropdown-toggle>\n' +
'\n' +
' <ng-include src="\'select-selected-content.html\'" ng-if="::lxSelectSelected.parentCtrl.autocomplete"></ng-include>\n' +
'</div>\n' +
'');
a.put('select-selected-content.html', '<div class="lx-select-selected-wrapper" id="lx-select-selected-wrapper-{{ lxSelectSelected.parentCtrl.uuid }}">\n' +
' <div class="lx-select-selected" ng-if="!lxSelectSelected.parentCtrl.multiple && lxSelectSelected.parentCtrl.getSelectedModel()">\n' +
' <span class="lx-select-selected__value"\n' +
' ng-bind-html="lxSelectSelected.parentCtrl.displaySelected()"></span>\n' +
'\n' +
' <a class="lx-select-selected__clear"\n' +
' ng-click="lxSelectSelected.clearModel($event)"\n' +
' ng-if="::lxSelectSelected.parentCtrl.allowClear">\n' +
' <i class="mdi mdi-close-circle"></i>\n' +
' </a>\n' +
' </div>\n' +
'\n' +
' <div class="lx-select-selected" ng-if="lxSelectSelected.parentCtrl.multiple">\n' +
' <span class="lx-select-selected__tag"\n' +
' ng-class="{ \'lx-select-selected__tag--is-active\': lxSelectSelected.parentCtrl.activeSelectedIndex === $index }"\n' +
' ng-click="lxSelectSelected.removeSelected(selected, $event)"\n' +
' ng-repeat="selected in lxSelectSelected.parentCtrl.getSelectedModel()"\n' +
' ng-bind-html="lxSelectSelected.parentCtrl.displaySelected(selected)"></span>\n' +
'\n' +
' <input type="text"\n' +
' placeholder="{{ ::lxSelectSelected.parentCtrl.label }}"\n' +
' class="lx-select-selected__filter"\n' +
' ng-model="lxSelectSelected.parentCtrl.filterModel"\n' +
' ng-change="lxSelectSelected.parentCtrl.updateFilter()"\n' +
' ng-keydown="lxSelectSelected.parentCtrl.keyEvent($event)"\n' +
' ng-if="::lxSelectSelected.parentCtrl.autocomplete && !lxSelectSelected.parentCtrl.ngDisabled">\n' +
' </div>\n' +
'</div>');
a.put('select-choices.html', '<lx-dropdown-menu class="lx-select-choices"\n' +
' ng-class="{ \'lx-select-choices--custom-style\': lxSelectChoices.parentCtrl.choicesCustomStyle,\n' +
' \'lx-select-choices--default-style\': !lxSelectChoices.parentCtrl.choicesCustomStyle,\n' +
' \'lx-select-choices--is-multiple\': lxSelectChoices.parentCtrl.multiple,\n' +
' \'lx-select-choices--is-unique\': !lxSelectChoices.parentCtrl.multiple, }">\n' +
' <ul>\n' +
' <li class="lx-select-choices__filter" ng-if="::lxSelectChoices.parentCtrl.displayFilter && !lxSelectChoices.parentCtrl.autocomplete">\n' +
' <lx-search-filter lx-dropdown-filter>\n' +
' <input type="text" ng-model="lxSelectChoices.parentCtrl.filterModel" ng-change="lxSelectChoices.parentCtrl.updateFilter()">\n' +
' </lx-search-filter>\n' +
' </li>\n' +
' \n' +
' <div ng-if="::lxSelectChoices.isArray()">\n' +
' <li class="lx-select-choices__choice"\n' +
' ng-class="{ \'lx-select-choices__choice--is-selected\': lxSelectChoices.parentCtrl.isSelected(choice),\n' +
' \'lx-select-choices__choice--is-focus\': lxSelectChoices.parentCtrl.activeChoiceIndex === $index }"\n' +
' ng-repeat="choice in lxSelectChoices.parentCtrl.choices | filterChoices:lxSelectChoices.parentCtrl.filter:lxSelectChoices.parentCtrl.filterModel"\n' +
' ng-bind-html="::lxSelectChoices.parentCtrl.displayChoice(choice)"\n' +
' ng-click="lxSelectChoices.parentCtrl.toggleChoice(choice, $event)"></li>\n' +
' </div>\n' +
'\n' +
' <div ng-if="::!lxSelectChoices.isArray()">\n' +
' <li class="lx-select-choices__subheader"\n' +
' ng-repeat-start="(subheader, children) in lxSelectChoices.parentCtrl.choices"\n' +
' ng-bind-html="::lxSelectChoices.parentCtrl.displaySubheader(subheader)"></li>\n' +
'\n' +
' <li class="lx-select-choices__choice"\n' +
' ng-class="{ \'lx-select-choices__choice--is-selected\': lxSelectChoices.parentCtrl.isSelected(choice),\n' +
' \'lx-select-choices__choice--is-focus\': lxSelectChoices.parentCtrl.activeChoiceIndex === $index }"\n' +
' ng-repeat-end\n' +
' ng-repeat="choice in children | filterChoices:lxSelectChoices.parentCtrl.filter:lxSelectChoices.parentCtrl.filterModel"\n' +
' ng-bind-html="::lxSelectChoices.parentCtrl.displayChoice(choice)"\n' +
' ng-click="lxSelectChoices.parentCtrl.toggleChoice(choice, $event)"></li>\n' +
' </div>\n' +
'\n' +
' <li class="lx-select-choices__subheader" ng-if="lxSelectChoices.parentCtrl.helperDisplayable()">\n' +
' {{ lxSelectChoices.parentCtrl.helperMessage }}\n' +
' </li>\n' +
'\n' +
' <li class="lx-select-choices__loader" ng-if="lxSelectChoices.parentCtrl.loading">\n' +
' <lx-progress lx-type="circular" lx-color="primary" lx-diameter="20"></lx-progress>\n' +
' </li>\n' +
' </ul>\n' +
'</lx-dropdown-menu>\n' +
'');
}]);
angular.module("lumx.tabs").run(['$templateCache', function(a) { a.put('tabs.html', '<div class="tabs tabs--layout-{{ lxTabs.layout }} tabs--theme-{{ lxTabs.theme }} tabs--color-{{ lxTabs.color }} tabs--indicator-{{ lxTabs.indicator }}">\n' +
' <div class="tabs__links">\n' +
' <a class="tabs__link"\n' +
' ng-class="{ \'tabs__link--is-active\': lxTabs.tabIsActive(tab.index),\n' +
' \'tabs__link--is-disabled\': tab.disabled }"\n' +
' ng-repeat="tab in lxTabs.tabs"\n' +
' ng-click="lxTabs.setActiveTab(tab)"\n' +
' lx-ripple>\n' +
' <i class="mdi mdi-{{ tab.icon }}" ng-if="tab.icon"></i>\n' +
' <span ng-if="tab.label">{{ tab.label }}</span>\n' +
' </a>\n' +
' </div>\n' +
' \n' +
' <div class="tabs__panes" ng-if="lxTabs.viewMode === \'gather\'" ng-transclude></div>\n' +
' <div class="tabs__indicator"></div>\n' +
'</div>\n' +
'');
a.put('tabs-panes.html', '<div class="tabs">\n' +
' <div class="tabs__panes" ng-transclude></div>\n' +
'</div>');
a.put('tab.html', '<div class="tabs__pane" ng-class="{ \'tabs__pane--is-disabled\': lxTab.ngDisabled }">\n' +
' <div ng-if="lxTab.tabIsActive()" ng-transclude></div>\n' +
'</div>\n' +
'');
a.put('tab-pane.html', '<div class="tabs__pane" ng-transclude></div>\n' +
'');
}]);
angular.module("lumx.date-picker").run(['$templateCache', function(a) { a.put('date-picker.html', '<div class="lx-date">\n' +
' <!-- Date picker input -->\n' +
' <div class="lx-date-input" ng-click="lxDatePicker.openDatePicker()" ng-if="lxDatePicker.hasInput">\n' +
' <ng-transclude></ng-transclude>\n' +
' </div>\n' +
' \n' +
' <!-- Date picker -->\n' +
' <div class="lx-date-picker lx-date-picker--{{ lxDatePicker.color }}">\n' +
' <div ng-if="lxDatePicker.isOpen">\n' +
' <!-- Date picker: header -->\n' +
' <div class="lx-date-picker__header">\n' +
' <a class="lx-date-picker__current-year"\n' +
' ng-class="{ \'lx-date-picker__current-year--is-active\': lxDatePicker.yearSelection }"\n' +
' ng-click="lxDatePicker.displayYearSelection()">\n' +
' {{ lxDatePicker.moment(lxDatePicker.ngModel).format(\'YYYY\') }}\n' +
' </a>\n' +
'\n' +
' <a class="lx-date-picker__current-date"\n' +
' ng-class="{ \'lx-date-picker__current-date--is-active\': !lxDatePicker.yearSelection }"\n' +
' ng-click="lxDatePicker.hideYearSelection()">\n' +
' {{ lxDatePicker.getDateFormatted() }}\n' +
' </a>\n' +
' </div>\n' +
' \n' +
' <!-- Date picker: content -->\n' +
' <div class="lx-date-picker__content">\n' +
' <!-- Calendar -->\n' +
' <div class="lx-date-picker__calendar" ng-if="!lxDatePicker.yearSelection">\n' +
' <div class="lx-date-picker__nav">\n' +
' <lx-button lx-size="l" lx-color="black" lx-type="icon" ng-click="lxDatePicker.previousMonth()">\n' +
' <i class="mdi mdi-chevron-left"></i>\n' +
' </lx-button>\n' +
'\n' +
' <span>{{ lxDatePicker.ngModelMoment.format(\'MMMM YYYY\') }}</span>\n' +
' \n' +
' <lx-button lx-size="l" lx-color="black" lx-type="icon" ng-click="lxDatePicker.nextMonth()">\n' +
' <i class="mdi mdi-chevron-right"></i>\n' +
' </lx-button>\n' +
' </div>\n' +
'\n' +
' <div class="lx-date-picker__days-of-week">\n' +
' <span ng-repeat="day in lxDatePicker.daysOfWeek">{{ day }}</span>\n' +
' </div>\n' +
'\n' +
' <div class="lx-date-picker__days">\n' +
' <span class="lx-date-picker__day lx-date-picker__day--is-empty"\n' +
' ng-repeat="x in lxDatePicker.emptyFirstDays"> </span>\n' +
'\n' +
' <div class="lx-date-picker__day"\n' +
' ng-class="{ \'lx-date-picker__day--is-selected\': day.selected,\n' +
' \'lx-date-picker__day--is-today\': day.today && !day.selected,\n' +
' \'lx-date-picker__day--is-disabled\': day.disabled }"\n' +
' ng-repeat="day in lxDatePicker.days">\n' +
' <a ng-click="lxDatePicker.select(day)">{{ day ? day.format(\'D\') : \'\' }}</a>\n' +
' </div>\n' +
'\n' +
' <span class="lx-date-picker__day lx-date-picker__day--is-empty"\n' +
' ng-repeat="x in lxDatePicker.emptyLastDays"> </span>\n' +
' </div>\n' +
' </div>\n' +
'\n' +
' <!-- Year selection -->\n' +
' <div class="lx-date-picker__year-selector" ng-if="lxDatePicker.yearSelection">\n' +
' <a class="lx-date-picker__year"\n' +
' ng-class="{ \'lx-date-picker__year--is-active\': year == lxDatePicker.moment(lxDatePicker.ngModel).format(\'YYYY\') }"\n' +
' ng-repeat="year in lxDatePicker.years"\n' +
' ng-click="lxDatePicker.selectYear(year)"\n' +
' ng-if="lxDatePicker.yearSelection">\n' +
' {{ year }}\n' +
' </a>\n' +
' </div>\n' +
' </div>\n' +
'\n' +
' <!-- Actions -->\n' +
' <div class="lx-date-picker__actions">\n' +
' <lx-button lx-color="{{ lxDatePicker.color }}" lx-type="flat" ng-click="lxDatePicker.closeDatePicker()">\n' +
' Ok\n' +
' </lx-button>\n' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
'</div>');
}]);
angular.module("lumx.progress").run(['$templateCache', function(a) { a.put('progress.html', '<div class="progress-container progress-container--{{ lxProgress.lxType }} progress-container--{{ lxProgress.lxColor }}"\n' +
' ng-class="{ \'progress-container--determinate\': lxProgress.lxValue,\n' +
' \'progress-container--indeterminate\': !lxProgress.lxValue }">\n' +
' <div class="progress-circular"\n' +
' ng-if="lxProgress.lxType === \'circular\'"\n' +
' ng-style="lxProgress.getProgressDiameter()">\n' +
' <svg class="progress-circular__svg">\n' +
' <circle class="progress-circular__path" cx="50" cy="50" r="20" fill="none" stroke-width="4" stroke-miterlimit="10" ng-style="lxProgress.getCircularProgressValue()">\n' +
' </svg>\n' +
' </div>\n' +
'\n' +
' <div class="progress-linear" ng-if="lxProgress.lxType === \'linear\'">\n' +
' <div class="progress-linear__background"></div>\n' +
' <div class="progress-linear__bar progress-linear__bar--first" ng-style="lxProgress.getLinearProgressValue()"></div>\n' +
' <div class="progress-linear__bar progress-linear__bar--second"></div>\n' +
' </div>\n' +
'</div>\n' +
'');
}]);
angular.module("lumx.button").run(['$templateCache', function(a) { a.put('link.html', '<a ng-transclude lx-ripple></a>\n' +
'');
a.put('button.html', '<button ng-transclude lx-ripple></button>\n' +
'');
}]);
angular.module("lumx.checkbox").run(['$templateCache', function(a) { a.put('checkbox.html', '<div class="checkbox checkbox--{{ lxCheckbox.lxColor }}"\n' +
' ng-class="{ \'checkbox--theme-light\': !lxCheckbox.theme || lxCheckbox.theme === \'light\',\n' +
' \'checkbox--theme-dark\': lxCheckbox.theme === \'dark\' }" >\n' +
' <input id="{{ lxCheckbox.getCheckboxId() }}"\n' +
' type="checkbox"\n' +
' class="checkbox__input"\n' +
' name="{{ lxCheckbox.name }}"\n' +
' ng-model="lxCheckbox.ngModel"\n' +
' ng-true-value="{{ lxCheckbox.ngTrueValue }}"\n' +
' ng-false-value="{{ lxCheckbox.ngFalseValue }}"\n' +
' ng-change="lxCheckbox.triggerNgChange()"\n' +
' ng-disabled="lxCheckbox.ngDisabled">\n' +
'\n' +
' <label for="{{ lxCheckbox.getCheckboxId() }}" class="checkbox__label" ng-transclude ng-if="!lxCheckbox.getCheckboxHasChildren()"></label>\n' +
' <ng-transclude-replace ng-if="lxCheckbox.getCheckboxHasChildren()"></ng-transclude-replace>\n' +
'</div>\n' +
'');
a.put('checkbox-label.html', '<label for="{{ lxCheckboxLabel.getCheckboxId() }}" class="checkbox__label" ng-transclude></label>\n' +
'');
a.put('checkbox-help.html', '<span class="checkbox__help" ng-transclude></span>\n' +
'');
}]);
angular.module("lumx.radio-button").run(['$templateCache', function(a) { a.put('radio-group.html', '<div class="radio-group" ng-transclude></div>\n' +
'');
a.put('radio-button.html', '<div class="radio-button radio-button--{{ lxRadioButton.lxColor }}">\n' +
' <input id="{{ lxRadioButton.getRadioButtonId() }}"\n' +
' type="radio"\n' +
' class="radio-button__input"\n' +
' name="{{ lxRadioButton.name }}"\n' +
' ng-model="lxRadioButton.ngModel"\n' +
' ng-value="lxRadioButton.ngValue"\n' +
' ng-change="lxRadioButton.triggerNgChange()"\n' +
' ng-disabled="lxRadioButton.ngDisabled">\n' +
'\n' +
' <label for="{{ lxRadioButton.getRadioButtonId() }}" class="radio-button__label" ng-transclude ng-if="!lxRadioButton.getRadioButtonHasChildren()"></label>\n' +
' <ng-transclude-replace ng-if="lxRadioButton.getRadioButtonHasChildren()"></ng-transclude-replace>\n' +
'</div>\n' +
'');
a.put('radio-button-label.html', '<label for="{{ lxRadioButtonLabel.getRadioButtonId() }}" class="radio-button__label" ng-transclude></label>\n' +
'');
a.put('radio-button-help.html', '<span class="radio-button__help" ng-transclude></span>\n' +
'');
}]);
angular.module("lumx.stepper").run(['$templateCache', function(a) { a.put('stepper.html', '<div class="lx-stepper" ng-class="lxStepper.getClasses()">\n' +
' <div class="lx-stepper__header" ng-if="lxStepper.layout === \'horizontal\'">\n' +
' <div class="lx-stepper__nav">\n' +
' <lx-step-nav lx-active-index="{{ lxStepper.activeIndex }}" lx-step="step" ng-repeat="step in lxStepper.steps"></lx-step-nav>\n' +
' </div>\n' +
'\n' +
' <div class="lx-stepper__feedback" ng-if="lxStepper.steps[lxStepper.activeIndex].feedback">\n' +
' <span>{{ lxStepper.steps[lxStepper.activeIndex].feedback }}</span>\n' +
' </div>\n' +
' </div>\n' +
'\n' +
' <div class="lx-stepper__steps" ng-transclude></div>\n' +
'</div>');
a.put('step.html', '<div class="lx-step" ng-class="lxStep.getClasses()">\n' +
' <div class="lx-step__nav" ng-if="lxStep.parent.layout === \'vertical\'">\n' +
' <lx-step-nav lx-active-index="{{ lxStep.parent.activeIndex }}" lx-step="lxStep.step"></lx-step-nav>\n' +
' </div>\n' +
'\n' +
' <div class="lx-step__wrapper" ng-if="lxStep.parent.activeIndex === lxStep.step.index">\n' +
' <div class="lx-step__content">\n' +
' <ng-transclude></ng-transclude>\n' +
'\n' +
' <div class="lx-step__progress" ng-if="lxStep.step.isLoading">\n' +
' <lx-progress lx-type="circular"></lx-progress>\n' +
' </div>\n' +
' </div>\n' +
'\n' +
' <div class="lx-step__actions" ng-if="lxStep.parent.activeIndex === lxStep.step.index">\n' +
' <div class="lx-step__action lx-step__action--continue">\n' +
' <lx-button ng-click="lxStep.submitStep()" ng-disabled="lxStep.isLoading">{{ lxStep.parent.labels.continue }}</lx-button>\n' +
' </div>\n' +
'\n' +
' <div class="lx-step__action lx-step__action--cancel" ng-if="lxStep.parent.cancel">\n' +
' <lx-button lx-color="black" lx-type="flat" ng-click="lxStep.parent.cancel()" ng-disabled="lxStep.isLoading">{{ lxStep.parent.labels.cancel }}</lx-button>\n' +
' </div>\n' +
'\n' +
' <div class="lx-step__action lx-step__action--back" ng-if="lxStep.parent.isLinear">\n' +
' <lx-button lx-color="black" lx-type="flat" ng-click="lxStep.previousStep()" ng-disabled="lxStep.isLoading || lxStep.step.index === 0">{{ lxStep.parent.labels.back }}</lx-button>\n' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
'</div>');
a.put('step-nav.html', '<div class="lx-step-nav" ng-click="lxStepNav.parent.goToStep(lxStepNav.step.index)" ng-class="lxStepNav.getClasses()" lx-ripple>\n' +
' <div class="lx-step-nav__indicator lx-step-nav__indicator--index" ng-if="lxStepNav.step.isValid === undefined">\n' +
' <span>{{ lxStepNav.step.index + 1 }}</span>\n' +
' </div>\n' +
'\n' +
' <div class="lx-step-nav__indicator lx-step-nav__indicator--icon" ng-if="lxStepNav.step.isValid === true">\n' +
' <lx-icon lx-id="check" ng-if="!lxStepNav.step.isEditable"></lx-icon>\n' +
' <lx-icon lx-id="pencil" ng-if="lxStepNav.step.isEditable"></lx-icon>\n' +
' </div>\n' +
'\n' +
' <div class="lx-step-nav__indicator lx-step-nav__indicator--error" ng-if="lxStepNav.step.isValid === false">\n' +
' <lx-icon lx-id="alert"></lx-icon>\n' +
' </div>\n' +
'\n' +
' <div class="lx-step-nav__wrapper">\n' +
' <div class="lx-step-nav__label">\n' +
' <span>{{ lxStepNav.step.label }}</span>\n' +
' </div>\n' +
'\n' +
' <div class="lx-step-nav__state">\n' +
' <span ng-if="(lxStepNav.step.isValid === undefined || lxStepNav.step.isValid === true) && lxStepNav.step.isOptional">{{ lxStepNav.parent.labels.optional }}</span>\n' +
' <span ng-if="lxStepNav.step.isValid === false">{{ lxStepNav.step.errorMessage }}</span>\n' +
' </div>\n' +
' </div>\n' +
'</div>');
}]);
angular.module("lumx.switch").run(['$templateCache', function(a) { a.put('switch.html', '<div class="switch switch--{{ lxSwitch.lxColor }} switch--{{ lxSwitch.lxPosition }}">\n' +
' <input id="{{ lxSwitch.getSwitchId() }}"\n' +
' type="checkbox"\n' +
' class="switch__input"\n' +
' name="{{ lxSwitch.name }}"\n' +
' ng-model="lxSwitch.ngModel"\n' +
' ng-true-value="{{ lxSwitch.ngTrueValue }}"\n' +
' ng-false-value="{{ lxSwitch.ngFalseValue }}"\n' +
' ng-change="lxSwitch.triggerNgChange()"\n' +
' ng-disabled="lxSwitch.ngDisabled">\n' +
'\n' +
' <label for="{{ lxSwitch.getSwitchId() }}" class="switch__label" ng-transclude ng-if="!lxSwitch.getSwitchHasChildren()"></label>\n' +
' <ng-transclude-replace ng-if="lxSwitch.getSwitchHasChildren()"></ng-transclude-replace>\n' +
'</div>\n' +
'');
a.put('switch-label.html', '<label for="{{ lxSwitchLabel.getSwitchId() }}" class="switch__label" ng-transclude></label>\n' +
'');
a.put('switch-help.html', '<span class="switch__help" ng-transclude></span>\n' +
'');
}]);
angular.module("lumx.fab").run(['$templateCache', function(a) { a.put('fab.html', '<div class="fab">\n' +
' <ng-transclude-replace></ng-transclude-replace>\n' +
'</div>\n' +
'');
a.put('fab-trigger.html', '<div class="fab__primary" ng-transclude></div>\n' +
'');
a.put('fab-actions.html', '<div class="fab__actions fab__actions--{{ parentCtrl.lxDirection }}" ng-transclude></div>\n' +
'');
}]);
angular.module("lumx.icon").run(['$templateCache', function(a) { a.put('icon.html', '<i class="icon mdi" ng-class="lxIcon.getClass()"></i>');
}]);
angular.module("lumx.data-table").run(['$templateCache', function(a) { a.put('data-table.html', '<div class="data-table-container">\n' +
' <table class="data-table"\n' +
' ng-class="{ \'data-table--no-border\': !lxDataTable.border,\n' +
' \'data-table--thumbnail\': lxDataTable.thumbnail }">\n' +
' <thead>\n' +
' <tr ng-class="{ \'data-table__selectable-row\': lxDataTable.selectable,\n' +
' \'data-table__selectable-row--is-selected\': lxDataTable.selectable && lxDataTable.allRowsSelected }">\n' +
' <th ng-if="lxDataTable.thumbnail"></th>\n' +
' <th ng-click="lxDataTable.toggleAllSelected()"\n' +
' ng-if="lxDataTable.selectable"></th>\n' +
' <th ng-class=" { \'data-table__sortable-cell\': th.sortable,\n' +
' \'data-table__sortable-cell--asc\': th.sortable && th.sort === \'asc\',\n' +
' \'data-table__sortable-cell--desc\': th.sortable && th.sort === \'desc\' }"\n' +
' ng-click="lxDataTable.sort(th)"\n' +
' ng-repeat="th in lxDataTable.thead track by $index"\n' +
' ng-if="!lxDataTable.thumbnail || (lxDataTable.thumbnail && $index != 0)">\n' +
' <lx-icon lx-id="{{ th.icon }}" ng-if="th.icon"></lx-icon>\n' +
' <span>{{ th.label }}</span>\n' +
' </th>\n' +
' </tr>\n' +
' </thead>\n' +
'\n' +
' <tbody>\n' +
' <tr ng-class="{ \'data-table__selectable-row\': lxDataTable.selectable,\n' +
' \'data-table__selectable-row--is-disabled\': lxDataTable.selectable && tr.lxDataTableDisabled,\n' +
' \'data-table__selectable-row--is-selected\': lxDataTable.selectable && tr.lxDataTableSelected }"\n' +
' ng-repeat="tr in lxDataTable.tbody"\n' +
' ng-click="lxDataTable.toggle(tr)">\n' +
' <td ng-if="lxDataTable.thumbnail">\n' +
' <div ng-if="lxDataTable.thead[0].format" ng-bind-html="lxDataTable.$sce.trustAsHtml(lxDataTable.thead[0].format(tr))"></div>\n' +
' </td>\n' +
' <td ng-if="lxDataTable.selectable"></td>\n' +
' <td ng-repeat="th in lxDataTable.thead track by $index"\n' +
' ng-if="!lxDataTable.thumbnail || (lxDataTable.thumbnail && $index != 0)">\n' +
' <span ng-if="!th.format">{{ tr[th.name] }}</span>\n' +
' <div ng-if="th.format" ng-bind-html="lxDataTable.$sce.trustAsHtml(th.format(tr))"></div>\n' +
' </td>\n' +
' </tr>\n' +
' </tbody>\n' +
' </table>\n' +
'</div>');
}]); | tholu/cdnjs | ajax/libs/lumx/1.5.14/lumx.js | JavaScript | mit | 203,404 | [
30522,
1013,
1008,
11320,
22984,
1058,
2487,
1012,
1019,
1012,
2403,
1006,
1039,
1007,
2297,
1011,
2418,
11320,
2863,
28281,
8299,
1024,
1013,
1013,
21318,
1012,
11320,
2863,
28281,
1012,
4012,
6105,
1024,
10210,
1008,
1013,
1006,
3853,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
import { get } from "ember-metal/property_get";
import { set } from "ember-metal/property_set";
import Ember from "ember-metal/core"; // Ember.assert
import EmberError from "ember-metal/error";
import {
Descriptor,
defineProperty
} from "ember-metal/properties";
import { ComputedProperty } from "ember-metal/computed";
import create from "ember-metal/platform/create";
import {
meta,
inspect
} from "ember-metal/utils";
import {
addDependentKeys,
removeDependentKeys
} from "ember-metal/dependent_keys";
export default function alias(altKey) {
return new AliasedProperty(altKey);
}
export function AliasedProperty(altKey) {
this.altKey = altKey;
this._dependentKeys = [altKey];
}
AliasedProperty.prototype = create(Descriptor.prototype);
AliasedProperty.prototype.get = function AliasedProperty_get(obj, keyName) {
return get(obj, this.altKey);
};
AliasedProperty.prototype.set = function AliasedProperty_set(obj, keyName, value) {
return set(obj, this.altKey, value);
};
AliasedProperty.prototype.willWatch = function(obj, keyName) {
addDependentKeys(this, obj, keyName, meta(obj));
};
AliasedProperty.prototype.didUnwatch = function(obj, keyName) {
removeDependentKeys(this, obj, keyName, meta(obj));
};
AliasedProperty.prototype.setup = function(obj, keyName) {
Ember.assert("Setting alias '" + keyName + "' on self", this.altKey !== keyName);
var m = meta(obj);
if (m.watching[keyName]) {
addDependentKeys(this, obj, keyName, m);
}
};
AliasedProperty.prototype.teardown = function(obj, keyName) {
var m = meta(obj);
if (m.watching[keyName]) {
removeDependentKeys(this, obj, keyName, m);
}
};
AliasedProperty.prototype.readOnly = function() {
this.set = AliasedProperty_readOnlySet;
return this;
};
function AliasedProperty_readOnlySet(obj, keyName, value) {
throw new EmberError('Cannot set read-only property "' + keyName + '" on object: ' + inspect(obj));
}
AliasedProperty.prototype.oneWay = function() {
this.set = AliasedProperty_oneWaySet;
return this;
};
function AliasedProperty_oneWaySet(obj, keyName, value) {
defineProperty(obj, keyName, null);
return set(obj, keyName, value);
}
// Backwards compatibility with Ember Data
AliasedProperty.prototype._meta = undefined;
AliasedProperty.prototype.meta = ComputedProperty.prototype.meta;
| gdi2290/ember.js | packages/ember-metal/lib/alias.js | JavaScript | mit | 2,326 | [
30522,
12324,
1063,
2131,
1065,
2013,
1000,
7861,
5677,
1011,
3384,
1013,
3200,
1035,
2131,
1000,
1025,
12324,
1063,
2275,
1065,
2013,
1000,
7861,
5677,
1011,
3384,
1013,
3200,
1035,
2275,
1000,
1025,
12324,
7861,
5677,
2013,
1000,
7861,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
---
id: oss-introduction
title: Introducing Flowable Open Source
sidebar_label: Open Source Details
---
## License
Flowable is distributed under [the Apache V2 license](http://www.apache.org/licenses/LICENSE-2.0.html).
## Download
[<http://www.flowable.org/downloads.html>](http://www.flowable.org/downloads.html)
## Sources
The distribution contains most of the sources as JAR files. The source code for Flowable can be found on
[<https://github.com/flowable/flowable-engine>](https://github.com/flowable/flowable-engine)
## Required software
### JDK 8+
Flowable runs on a JDK higher than or equal to version 8. Go to [Oracle Java SE downloads](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and click on button "Download JDK". There are installation instructions on that page as well. To verify that your installation was successful, run java -version on the command line. That should print the installed version of your JDK.
### IDE
Flowable development can be done with the IDE of your choice. If you would like to use the Flowable Designer then you need Eclipse Mars or Neon.
Download the Eclipse distribution of your choice from [the Eclipse download page](http://www.eclipse.org/downloads/). Unzip the downloaded file and then you should be able to start it with the Eclipse file in the directory eclipse.
Further on in this guide, there is a section on [installing our eclipse designer plugin](bpmn/ch13-Designer.md#installation).
## Reporting problems
We expect developers to have read [How to ask questions the smart way](http://www.catb.org/~esr/faqs/smart-questions.html) before reporting or asking anything.
After you’ve done that you can post questions, comments or suggestions for enhancements on [the User forum](https://forum.flowable.org) and create issues for bugs in [our Github issue tracker](https://github.com/flowable/flowable-engine/issues).
## Experimental features
Sections marked with **\[EXPERIMENTAL\]** should not be considered stable.
All classes that have .impl. in the package name are internal implementation classes and cannot be considered stable or guaranteed in any way. However, if the User Guide mentions any classes as configuration values, they are supported and can be considered stable.
## Internal implementation classes
In the JAR files, all classes in packages that have .impl. (e.g. org.flowable.engine.impl.db) in their name are implementation classes and should be considered internal use only. No stability guarantees are given on classes or interfaces that are in implementation classes.
## Versioning Strategy
Versions are denoted using a standard triplet of integers: **MAJOR.MINOR.MICRO**. The intention is that **MAJOR** versions are for evolutions of the core engines. **MINOR** versions are for new features and new APIs. **MICRO** versions are for bug fixes and improvements.
In general, Flowable attempts to remain "source compatible" in **MINOR** and **MICRO** releases for all non internal implementation classes. We define "source compatible" to mean an application will continue to build without error and the semantics have remained unchanged. Flowable also attempts to remain "binary compatible" in **MINOR** and **MICRO** releases. We define "binary compatible" to mean that this new version of Flowable can be dropped as a jar replacement into a compiled application and continue to function properly.
In case an API change is introduced in a **MINOR** release, the strategy is that a backwards compatible version is kept in it, annotated with *@Deprecated*. Such deprecated APIs will then be removed two **MINOR** versions later.
| dbmalkovsky/flowable-engine | docs/docusaurus/docs/oss-introduction.md | Markdown | apache-2.0 | 3,646 | [
30522,
1011,
1011,
1011,
8909,
1024,
9808,
2015,
1011,
4955,
2516,
1024,
10449,
4834,
3085,
2330,
3120,
2217,
8237,
1035,
3830,
1024,
2330,
3120,
4751,
1011,
1011,
1011,
1001,
1001,
6105,
4834,
3085,
2003,
5500,
2104,
1031,
1996,
15895,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
\hypertarget{classtesting_1_1internal_1_1_return_null_action}{}\section{testing\+:\+:internal\+:\+:Return\+Null\+Action Class Reference}
\label{classtesting_1_1internal_1_1_return_null_action}\index{testing\+::internal\+::\+Return\+Null\+Action@{testing\+::internal\+::\+Return\+Null\+Action}}
{\ttfamily \#include $<$gmock-\/actions.\+h$>$}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item
{\footnotesize template$<$typename Result , typename Argument\+Tuple $>$ }\\static \hyperlink{typedefs__d_8js_a28287671eaf7406afd604bd055ba4066}{Result} \hyperlink{classtesting_1_1internal_1_1_return_null_action_a6ce1fba236686df93070320b399e4f32}{Perform} (const \hyperlink{typedefs__d_8js_a396b2bdc7ef45f482a7e9254b15c3c01}{Argument\+Tuple} \&)
\end{DoxyCompactItemize}
\subsection{Detailed Description}
Definition at line 623 of file gmock-\/actions.\+h.
\subsection{Member Function Documentation}
\index{testing\+::internal\+::\+Return\+Null\+Action@{testing\+::internal\+::\+Return\+Null\+Action}!Perform@{Perform}}
\index{Perform@{Perform}!testing\+::internal\+::\+Return\+Null\+Action@{testing\+::internal\+::\+Return\+Null\+Action}}
\subsubsection[{\texorpdfstring{Perform(const Argument\+Tuple \&)}{Perform(const ArgumentTuple &)}}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Result , typename Argument\+Tuple $>$ static {\bf Result} testing\+::internal\+::\+Return\+Null\+Action\+::\+Perform (
\begin{DoxyParamCaption}
\item[{const {\bf Argument\+Tuple} \&}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}\hypertarget{classtesting_1_1internal_1_1_return_null_action_a6ce1fba236686df93070320b399e4f32}{}\label{classtesting_1_1internal_1_1_return_null_action_a6ce1fba236686df93070320b399e4f32}
Definition at line 629 of file gmock-\/actions.\+h.
The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item
/home/bhargavi/\+Documents/\+S\+D\+R/\+Copy\+\_\+\+Exam\+\_\+808\+X/vendor/googletest/googlemock/include/gmock/\hyperlink{gmock-actions_8h}{gmock-\/actions.\+h}\end{DoxyCompactItemize}
| bhargavipatel/808X_VO | docs/latex/classtesting_1_1internal_1_1_return_null_action.tex | TeX | mit | 2,131 | [
30522,
1032,
23760,
7559,
18150,
1063,
2465,
22199,
2075,
1035,
1015,
1035,
1015,
18447,
11795,
2389,
1035,
1015,
1035,
1015,
1035,
2709,
1035,
19701,
1035,
2895,
1065,
1063,
1065,
1032,
2930,
1063,
5604,
1032,
1009,
1024,
1032,
1009,
1024,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Change log for StorageDsc
The format is based on and uses the types of changes according to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed
- Renamed `master` branch to `main` - Fixes [Issue #250](https://github.com/dsccommunity/StorageDsc/issues/250).
- Added support for publishing code coverage to `CodeCov.io` and
Azure Pipelines - Fixes [Issue #255](https://github.com/dsccommunity/StorageDsc/issues/255).
- Updated build to use `Sampler.GitHubTasks` - Fixes [Issue #254](https://github.com/dsccommunity/StorageDsc/issues/254).
- Updated pipeline tasks to latest pattern.
### Fixed
- MountImage:
- Corrected example `1-MountImage_DismountISO.ps1` for dismounting
ISO - Fixes [Issue #221](https://github.com/dsccommunity/StorageDsc/issues/221).
- Updated `GitVersion.yml` to latest pattern - Fixes [Issue #252](https://github.com/dsccommunity/StorageDsc/issues/252).
## [5.0.1] - 2020-08-03
### Changed
- Fixed build failures caused by changes in `ModuleBuilder` module v1.7.0
by changing `CopyDirectories` to `CopyPaths` - Fixes [Issue #237](https://github.com/dsccommunity/StorageDsc/issues/237).
- Updated to use the common module _DscResource.Common_ - Fixes [Issue #234](https://github.com/dsccommunity/StorageDsc/issues/234).
- Pin `Pester` module to 4.10.1 because Pester 5.0 is missing code
coverage - Fixes [Issue #238](https://github.com/dsccommunity/StorageDsc/issues/238).
- OpticalDiskDriveLetter:
- Removed integration test that tests when a disk is not in the
system as it is not a useful test, does not work correctly
and is covered by unit tests - Fixes [Issue #240](https://github.com/dsccommunity/StorageDsc/issues/240).
- StorageDsc
- Automatically publish documentation to GitHub Wiki - Fixes [Issue #241](https://github.com/dsccommunity/StorageDsc/issues/241).
### Fixed
- Disk:
- Fix bug when multiple partitions with the same drive letter are
reported by the disk subsystem - Fixes [Issue #210](https://github.com/dsccommunity/StorageDsc/issues/210).
## [5.0.0] - 2020-05-05
### Changed
- Fixed hash table style violations - fixes [Issue #219](https://github.com/dsccommunity/StorageDsc/issues/219).
- Disk:
- Updated example with size as a number in bytes and without unit of measurement
like GB or MB - fixes [Issue #214](https://github.com/dsccommunity/StorageDsc/pull/214).
- BREAKING CHANGE: Changed resource prefix from MSFT to DSC.
- BREAKING CHANGE: Changed Disk resource prefix from MSFTDSC to DSC as there
would no longer be a conflict with the built in MSFT_Disk CIM class.
- Updated to use continuous delivery pattern using Azure DevOps - fixes
[Issue #225](https://github.com/dsccommunity/StorageDsc/issues/225).
- Updated Examples and Module Manifest to be DSC Community from Microsoft.
- Added Integration tests on Windows Server 2019.
- WaitForVolume:
- Improved unit tests to use virtual disk instead of physical disk.
- Disk:
- Added `Invalid Parameter` exception being reported when ReFS volumes are
used with Windows Server 2019 as a known issue to README.MD - fixes
[Issue #227](https://github.com/dsccommunity/StorageDsc/issues/227).
- Updated build badges in README.md.
- Change Azure DevOps Pipeline definition to include `source/*` - Fixes [Issue #231](https://github.com/dsccommunity/StorageDsc/issues/231).
- Updated pipeline to use `latest` version of `ModuleBuilder` - Fixes [Issue #231](https://github.com/dsccommunity/StorageDsc/issues/231).
- Merge `HISTORIC_CHANGELOG.md` into `CHANGELOG.md` - Fixes [Issue #232](https://github.com/dsccommunity/StorageDsc/issues/232).
- OpticalDiskDriveLetter:
- Suppress exception when requested optical disk drive does not exist
and Ensure is set to `Absent` - Fixes [Issue #194](https://github.com/dsccommunity/StorageDsc/issues/194).
## [4.9.0.0] - 2019-10-30
### Changed
- Disk:
- Added `Location` as a possible value for `DiskIdType`. This will select the
disk based on the `Location` property returned by `Get-Disk`
- Maximum size calculation now uses workaround so that
Test-TargetResource works properly - workaround for
[Issue #181](https://github.com/dsccommunity/StorageDsc/issues/181).
- DiskAccessPath:
- Added `Location` as a possible value for `DiskIdType`. This will select the
disk based on the `Location` property returned by `Get-Disk`
- WaitForDisk:
- Added `Location` as a possible value for `DiskIdType`. This will select the
disk based on the `Location` property returned by `Get-Disk`
## [4.8.0.0] - 2019-08-08
### Changed
- Removed suppression of `PSUseShouldProcessForStateChangingFunctions` PSSA rule
because it is no longer required.
- Combined all `StorageDsc.ResourceHelper` module functions into
`StorageDsc.Common` module and removed `StorageDsc.ResourceHelper`.
- Opted into Common Tests 'Common Tests - Validate Localization' -
fixes [Issue #206](https://github.com/dsccommunity/StorageDsc/issues/206).
- Refactored tests for `StorageDsc.Common` to meet latest standards.
- Minor style corrections.
- Removed unused localization strings from resources.
- DiskAccessPath:
- Added function to force refresh of disk subsystem at the start of
Set-TargetResource to prevent errors occuring when the disk access
path is already assigned - See [Issue 121](https://github.com/dsccommunity/StorageDsc/issues/121)
## [4.7.0.0] - 2019-05-15
### Changed
- DiskAccessPath:
- Added a Get-Partition to properly handle setting the NoDefaultDriveLetter
parameter - fixes [Issue #198](https://github.com/dsccommunity/StorageDsc/pull/198).
## [4.6.0.0] - 2019-04-03
### Changed
- Fix example publish to PowerShell Gallery by adding `gallery_api`
environment variable to `AppVeyor.yml` - fixes [Issue #202](https://github.com/dsccommunity/StorageDsc/issues/202).
- Added 'DscResourcesToExport' to manifest to improve information in
PowerShell Gallery and removed wildcards from 'FunctionsToExport',
'CmdletsToExport', 'VariablesToExport' and 'AliasesToExport' - fixes
[Issue #192](https://github.com/dsccommunity/StorageDsc/issues/192).
- Clean up module manifest to correct Author and Company - fixes
[Issue #191](https://github.com/dsccommunity/StorageDsc/issues/191).
- Correct unit tests for DiskAccessPath to test exact number of
mocks called - fixes [Issue #199](https://github.com/dsccommunity/StorageDsc/issues/199).
- Disk:
- Added minimum timetowate of 3s after new-partition using the while loop.
The problem occurs when the partition is created and the format-volume
is attempted before the volume has completed.
There appears to be no property to determine if the partition is
sufficiently ready to format and it will often format as a raw volume when
the error occurs - fixes [Issue #85](https://github.com/dsccommunity/StorageDsc/issues/85).
## [4.5.0.0] - 2019-02-20
### Changed
- Opt-in to Example publishing to PowerShell Gallery - fixes [Issue #186](https://github.com/dsccommunity/StorageDsc/issues/186).
- DiskAccessPath:
- Updated the resource to not assign a drive letter by default when adding
a disk access path. Adding a Set-Partition -NoDefaultDriveLetter
$NoDefaultDriveLetter block defaulting to true.
When adding access paths the disks will no longer have
drive letters automatically assigned on next reboot which is the desired
behavior - Fixes [Issue #145](https://github.com/dsccommunity/StorageDsc/issues/145).
## [4.4.0.0] - 2019-01-10
### Changed
- Refactored module folder structure to move resource to root folder of
repository and remove test harness - fixes [Issue #169](https://github.com/dsccommunity/StorageDsc/issues/169).
- Updated Examples to support deployment to PowerShell Gallery scripts.
- Removed limitation on using Pester 4.0.8 during AppVeyor CI.
- Moved the Code of Conduct text out of the README.md and into a
CODE\_OF\_CONDUCT.md file.
- Explicitly removed extra hidden files from release package
## [4.3.0.0] - 2018-11-29
### Changed
- WaitForDisk:
- Added readonly-property isAvailable which shows the current state
of the disk as a boolean - fixes [Issue #158](https://github.com/dsccommunity/StorageDsc/issues/158).
## [4.2.0.0] - 2018-10-25
### Changed
- Disk:
- Added `PartitionStyle` parameter - Fixes [Issue #137](https://github.com/dsccommunity/StorageDsc/issues/37).
- Changed MOF name from `MSFT_Disk` to `MSFTDSC_Disk` to remove conflict
with Windows built-in CIM class - Fixes [Issue #167](https://github.com/dsccommunity/StorageDsc/issues/167).
- Opt-in to Common Tests:
- Common Tests - Validate Example Files To Be Published
- Common Tests - Validate Markdown Links
- Common Tests - Relative Path Length
- Added .VSCode settings for applying DSC PSSA rules - fixes [Issue #168](https://github.com/dsccommunity/StorageDsc/issues/168).
- Disk:
- Added 'defragsvc' service conflict known issue to README.MD - fixes
[Issue #172](https://github.com/dsccommunity/StorageDsc/issues/172).
- Corrected style violations in StorageDsc.Common module - fixes [Issue #153](https://github.com/dsccommunity/StorageDsc/issues/153).
- Corrected style violations in StorageDsc.ResourceHelper module.
## [4.1.0.0] - 2018-09-05
### Changed
- Enabled PSSA rule violations to fail build - Fixes [Issue #149](https://github.com/dsccommunity/StorageDsc/issues/149).
- Fixed markdown rule violations in CHANGELOG.MD.
- Disk:
- Corrected message strings.
- Added message when partition resize required but `AllowDestructive`
parameter is not enabled.
- Fix error when `Size` not specified and `AllowDestructive` is `$true`
and partition can be expanded - Fixes [Issue #162](https://github.com/dsccommunity/StorageDsc/issues/162).
- Fix incorrect error displaying when newly created partition is not
made Read/Write.
- Change verbose messages to show warnings when a partition resize would
have occured but the `AllowDestructive` flag is set to `$false`.
## [4.0.0.0] - 2018-02-08
### Changed
- BREAKING CHANGE:
- Renamed xStorage to StorageDsc
- Renamed MSFT_xDisk to MSFT_Disk
- Renamed MSFT_xDiskAccessPath to MSFT_DiskAccessPath
- Renamed MSFT_xMountImage to MSFT_MountImage
- Renamed MSFT_xOpticalDiskDriveLetter to MSFT_OpticalDiskDriveLetter
- Renamed MSFT_xWaitForDisk to MSFT_WaitForDisk
- Renamed MSFT_xWaitForVolume to MSFT_WaitforVolume
- Deleted xStorage folder under StorageDsc/Modules
- See [Issue 129](https://github.com/dsccommunity/xStorage/issues/129)
## [3.4.0.0] - 2017-12-20
### Changed
- xDisk:
- Removed duplicate integration tests for Guid Disk Id type.
- Added new contexts to integration tests improve clarity.
- Fix bug when size not specified and disk partitioned and
formatted but not assigned drive letter - See [Issue 103](https://github.com/dsccommunity/xStorage/issues/103).
- xDiskAccessPath:
- Added new contexts to integration tests improve clarity.
- Fix bug when size not specified and disk partitioned and
formatted but not assigned to path - See [Issue 103](https://github.com/dsccommunity/xStorage/issues/103).
## [3.3.0.0] - 2017-11-15
### Changed
- Opted into common tests for Module and Script files - See [Issue 115](https://github.com/dsccommunity/xStorage/issues/115).
- xDisk:
- Added support for Guid Disk Id type - See [Issue 104](https://github.com/dsccommunity/xStorage/issues/104).
- Added parameter AllowDestructive - See [Issue 11](https://github.com/dsccommunity/xStorage/issues/11).
- Added parameter ClearDisk - See [Issue 50](https://github.com/dsccommunity/xStorage/issues/50).
- xDiskAccessPath:
- Added support for Guid Disk Id type - See [Issue 104](https://github.com/dsccommunity/xStorage/issues/104).
- xWaitForDisk:
- Added support for Guid Disk Id type - See [Issue 104](https://github.com/dsccommunity/xStorage/issues/104).
- Added .markdownlint.json file to configure markdown rules to validate.
- Clean up Badge area in README.MD - See [Issue 110](https://github.com/dsccommunity/xStorage/issues/110).
- Disabled MD013 rule checking to enable badge table.
- Added .github support files:
- CONTRIBUTING.md
- ISSUE_TEMPLATE.md
- PULL_REQUEST_TEMPLATE.md
- Changed license year to 2017 and set company name to Microsoft
Corporation in LICENSE.MD and module manifest - See [Issue 111](https://github.com/dsccommunity/xStorage/issues/111).
- Set Visual Studio Code setting "powershell.codeFormatting.preset" to
"custom" - See [Issue 108](https://github.com/dsccommunity/xStorage/issues/108)
- Added `Documentation and Examples` section to Readme.md file - see
[issue #116](https://github.com/dsccommunity/xStorage/issues/116).
- Prevent unit tests from DSCResource.Tests from running during test
execution - fixes [Issue #118](https://github.com/dsccommunity/xStorage/issues/118).
- Updated tests to meet Pester V4 guidelines - fixes [Issue #120](https://github.com/dsccommunity/xStorage/issues/120).
## [3.2.0.0] - 2017-07-12
### Changed
- xDisk:
- Fix error message when new partition does not become writable before timeout.
- Removed unneeded timeout initialization code.
- xDiskAccessPath:
- Fix error message when new partition does not become writable before timeout.
- Removed unneeded timeout initialization code.
- Fix error when used on Windows Server 2012 R2 - See [Issue 102](https://github.com/dsccommunity/xStorage/issues/102).
- Added the VS Code PowerShell extension formatting settings that cause PowerShell
files to be formatted as per the DSC Resource kit style guidelines.
- Removed requirement on Hyper-V PowerShell module to execute integration tests.
- xMountImage:
- Fix error when mounting VHD on Windows Server 2012 R2 - See [Issue 105](https://github.com/dsccommunity/xStorage/issues/105)
## [3.1.0.0] - 2017-06-01
### Changed
- Added integration test to test for conflicts with other common resource kit modules.
- Prevented ResourceHelper and Common module cmdlets from being exported to resolve
conflicts with other resource modules.
## [3.0.0.0] - 2017-05-31
### Changed
- Converted AppVeyor build process to use AppVeyor.psm1.
- Added support for auto generating wiki, help files, markdown linting
and checking examples.
- Correct name of MSFT_xDiskAccessPath.tests.ps1.
- Move shared modules into Modules folder.
- Fixed unit tests.
- Removed support for WMI cmdlets.
- Opted in to Markdown and Example tests.
- Added CodeCov.io support.
- Removed requirement on using Pester 3.4.6 because Pester bug fixed in 4.0.3.
- Fixed unit tests for MSFT_xDiskAccessPath resource to be compatible with
Pester 4.0.3.
- xDisk:
- BREAKING CHANGE: Renamed parameter DiskNumber to DiskId to enable it to
contain either DiskNumber or UniqueId - See [Issue 81](https://github.com/dsccommunity/xStorage/issues/81).
- Added DiskIdType parameter to enable specifying the type of identifer
the DiskId parameter contains - See [Issue 81](https://github.com/dsccommunity/xStorage/issues/81).
- Changed to use xDiskAccessPath pattern to fix issue with Windows Server
2016 - See [Issue 80](https://github.com/dsccommunity/xStorage/issues/80).
- Fixed style violations in xDisk.
- Fixed issue when creating multiple partitions on a single disk with no size
specified - See [Issue 86](https://github.com/dsccommunity/xStorage/issues/86).
- xDiskAccessPath:
- BREAKING CHANGE: Renamed parameter DiskNumber to DiskId to
enable it to contain either DiskNumber or UniqueId - See [Issue 81](https://github.com/dsccommunity/xStorage/issues/81).
- Added DiskIdType parameter to enable specifying the type
of identifer the DiskId parameter contains - See [Issue 81](https://github.com/dsccommunity/xStorage/issues/81).
- Fixed incorrect logging messages when changing volume label.
- Fixed issue when creating multiple partitions on a single disk with no size
specified - See [Issue 86](https://github.com/dsccommunity/xStorage/issues/86).
- xWaitForDisk:
- BREAKING CHANGE: Renamed parameter DiskNumber to DiskId to
enable it to contain either DiskNumber or UniqueId - See [Issue 81](https://github.com/dsccommunity/xStorage/issues/81).
- Added DiskIdType parameter to enable specifying the type
of identifer the DiskId parameter contains - See [Issue 81](https://github.com/dsccommunity/xStorage/issues/81).
## [2.9.0.0] - 2016-12-14
### Changed
- Updated readme.md to remove markdown best practice rule violations.
- Updated readme.md to match DSCResources/DscResource.Template/README.md.
- xDiskAccessPath:
- Fix bug when re-attaching disk after mount point removed or detatched.
- Additional log entries added for improved diagnostics.
- Additional integration tests added.
- Improve timeout loop.
- Converted integration tests to use ```$TestDrive``` as working folder
or ```temp``` folder when persistence across tests is required.
- Suppress ```PSUseShouldProcessForStateChangingFunctions``` rule violations in resources.
- Rename ```Test-AccessPath``` function to ```Assert-AccessPathValid```.
- Rename ```Test-DriveLetter``` function to ```Assert-DriveLetterValid```.
- Added ```CommonResourceHelper.psm1``` module (based on PSDscResources).
- Added ```CommonTestsHelper.psm1``` module (based on PSDscResources).
- Converted all modules to load localization data using ```Get-LocalizedData```
from CommonResourceHelper.
- Converted all exception calls and tests to use functions
in ```CommonResourceHelper.psm1``` and ```CommonTestsHelper.psm1``` respectively.
- Fixed examples:
- Sample_InitializeDataDisk.ps1
- Sample_InitializeDataDiskWithAccessPath.ps1
- Sample_xMountImage_DismountISO.ps1
- xDisk:
- Improve timeout loop.
## [2.8.0.0] - 2016-11-02
### Changed
- added test for existing file system and no drive letter assignment to allow
simple drive letter assignment in MSFT_xDisk.psm1
- added unit test for volume with existing partition and no drive letter
assigned for MSFT_xDisk.psm1
- xMountImage: Fixed mounting disk images on Windows 10 Anniversary Edition
- Updated to meet HQRM guidelines.
- Moved all strings into localization files.
- Fixed examples to import xStorage module.
- Fixed Readme.md layout issues.
- xWaitForDisk:
- Added support for setting DriveLetter parameter with or without colon.
- MOF Class version updated to 1.0.0.0.
- xWaitForVolume:
- Added new resource.
- StorageCommon:
- Added helper function module.
- Corrected name of unit tests file.
- xDisk:
- Added validation of DriveLetter parameter.
- Added support for setting DriveLetter parameter with or without colon.
- Removed obfuscation of drive/partition errors by eliminating try/catch block.
- Improved code commenting.
- Reordered tests so they are in same order as module functions to ease creation.
- Added FSFormat parameter to allow disk format to be specified.
- Size or AllocationUnitSize mismatches no longer trigger Set-TargetResource
because these values can't be changed (yet).
- MOF Class version updated to 1.0.0.0.
- Unit tests changed to match xDiskAccessPath methods.
- Added additional unit tests to Get-TargetResource.
- Fixed bug in Get-TargetResource when disk did not contain any partitions.
- Added missing cmdletbinding() to functions.
- xMountImage (Breaking Change):
- Removed Name parameter (Breaking Change)
- Added validation of DriveLetter parameter.
- Added support for setting DriveLetter parameter with or without colon.
- MOF Class version updated to 1.0.0.0.
- Enabled mounting of VHD/VHDx/VHDSet disk images.
- Added StorageType and Access parameters to allow mounting VHD and VHDx disks
as read/write.
- xDiskAccessPath:
- Added new resource.
- Added support for changing/setting volume label.
## [2.7.0.0] - 2016-09-21
### Changed
- Converted appveyor.yml to install Pester from PSGallery instead of from Chocolatey.
## [2.6.0.0] - 2016-05-18
### Changed
- MSFT_xDisk: Replaced Get-WmiObject with Get-CimInstance
## [2.5.0.0] - 2016-03-31
### Changed
- added test for existing file system to allow simple drive letter assignment in
MSFT_xDisk.psm1
- modified Test verbose message to correctly reflect blocksize value in
MSFT_xDisk.psm1 line 217
- added unit test for new volume with out existing partition for MSFT_xDisk.psm1
- Fixed error propagation
## [2.4.0.0] - 2016-02-03
### Changed
- Fixed bug where AllocationUnitSize was not used
## [2.3.0.0] - 2015-12-03
### Changed
- Added support for `AllocationUnitSize` in `xDisk`.
## [2.2.0.0] - 2015-10-22
### Changed
- Updated documentation: changed parameter name Count to RetryCount in
xWaitForDisk resource
## [2.1.0.0] - 2015-09-11
### Changed
- Fixed encoding
## [2.0.0.0] - 2015-07-24
### Changed
- Breaking change: Added support for following properties: DriveLetter, Size,
FSLabel. DriveLetter is a new key property.
## [1.0.0.0] - 2015-06-17
### Changed
This module was previously named **xDisk**, the version is regressing to a
"1.0.0.0" release with the addition of xMountImage.
- Initial release of xStorage module with following resources (contains
resources from deprecated xDisk module):
- xDisk (from xDisk)
- xMountImage
- xWaitForDisk (from xDisk)
| PowerShell/xStorage | CHANGELOG.md | Markdown | mit | 21,359 | [
30522,
1001,
2689,
8833,
2005,
5527,
5104,
2278,
1996,
4289,
2003,
2241,
2006,
1998,
3594,
1996,
4127,
1997,
3431,
2429,
2000,
1031,
2562,
1037,
2689,
21197,
1033,
1006,
16770,
1024,
1013,
1013,
2562,
6776,
22043,
21197,
1012,
4012,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
![HackerRank]
#Sherlock and Queries
[HackerRank \ Algorithms \ Summations and Algebra \ Sherlock and Queries](https://www.hackerrank.com/challenges/sherlock-and-queries)
Help Sherlock in answering Queries
##Problem Statement
Watson gives Sherlock an array $A$ of $N$ elements and two arrays $B$ and $C$, of $M$ elements each. Then he asks Sherlock to perform the following program:
for i = 1 to M do
for j = 1 to N do
if j % B[i] == 0 then
A[j] = A[j] * C[i]
endif
end do
end do
This code needs to be optimized. Can you help Sherlock and tell him the resulting array $A$? You should print all the array elements modulo $(10^9 + 7)$.
**Input Format**
The first line contains two integer, $N$ and $M$. The next line contains $N$ integers, the elements of array $A$. The last two lines contain $M$ integers each, the elements of array $B$ and $C$, respectively.
**Output Format**
Print $N$ space-separated integers, the elements of array $A$ after performing the program modulo $(10^9 + 7)$.
**Constraints**
$1 \le N, M \le 10^5$
$1 \le B[i] \le N$
$1 \le A[i], C[i] \le 10^5$
**Sample Input**
4 3
1 2 3 4
1 2 3
13 29 71
**Sample Output**
13 754 2769 1508
[HackerRank]:https://www.hackerrank.com/assets/brand/typemark_60x200.png | bionikspoon/HackerRankSetup | tests/test_assets/readme_source.md | Markdown | mit | 1,320 | [
30522,
999,
1031,
23307,
26763,
1033,
1001,
20052,
1998,
10861,
5134,
1031,
23307,
26763,
1032,
13792,
1032,
7680,
28649,
2015,
1998,
11208,
1032,
20052,
1998,
10861,
5134,
1033,
1006,
16770,
1024,
1013,
1013,
7479,
1012,
23307,
26763,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular.module('Eintrag').service('editarService', ['$http', function ($http) {
this.editarUsuario = function (data) {
return $http.post('http://localhost/Eintrag/www/server.php/editarUsuario', $.param(data));
};
}]);
| Jorge-CR/Eintrag | www/app/service/service.editar.js | JavaScript | mit | 254 | [
30522,
16108,
1012,
11336,
1006,
1005,
16417,
6494,
2290,
1005,
1007,
1012,
2326,
1006,
1005,
10086,
11650,
2121,
7903,
2063,
1005,
1010,
1031,
1005,
1002,
8299,
1005,
1010,
3853,
1006,
1002,
8299,
1007,
1063,
2023,
1012,
10086,
29133,
6692... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2016 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __Ogre_PagedWorldSection_H__
#define __Ogre_PagedWorldSection_H__
#include "OgrePagingPrerequisites.h"
#include "OgreAxisAlignedBox.h"
namespace Ogre
{
/** \addtogroup Optional Components
* @{
*/
/** \addtogroup Paging
* Some details on paging component
* @{
*/
/** Represents a section of the PagedWorld which uses a given PageStrategy, and
which is made up of a generally localised set of Page instances.
@remarks
The reason for PagedWorldSection is that you may wish to cater for multiple
sections of your world which use a different approach to paging (ie a
different PageStrategy), or which are significantly far apart or separate
that the parameters you want to pass to the PageStrategy are different.
@par
PagedWorldSection instances are fully contained within the PagedWorld and
their definitions are loaded in their entirety when the PagedWorld is
loaded. However, no Page instances are initially loaded - those are the
responsibility of the PageStrategy.
@par
PagedWorldSection can be subclassed and derived types provided by a
PagedWorldSectionFactory. These subclasses might come preconfigured
with a strategy for example, or with additional metadata used only for
that particular type of section.
@par
A PagedWorldSection targets a specific SceneManager. When you create one
in code via PagedWorld::createSection, you pass that SceneManager in manually.
When loading from a saved world file however, the SceneManager type and
instance name are saved and that SceneManager is looked up on loading, or
created if it didn't exist.
*/
class _OgrePagingExport PagedWorldSection : public PageAlloc
{
public:
typedef map<PageID, Page*>::type PageMap;
protected:
String mName;
AxisAlignedBox mAABB;
PagedWorld* mParent;
PageStrategy* mStrategy;
PageStrategyData* mStrategyData;
PageMap mPages;
PageProvider* mPageProvider;
SceneManager* mSceneMgr;
/// Load data specific to a subtype of this class (if any)
virtual void loadSubtypeData(StreamSerialiser& ser) {}
virtual void saveSubtypeData(StreamSerialiser& ser) {}
public:
static const uint32 CHUNK_ID;
static const uint16 CHUNK_VERSION;
/** Construct a new instance, specifying the parent and scene manager. */
PagedWorldSection(const String& name, PagedWorld* parent, SceneManager* sm);
virtual ~PagedWorldSection();
PageManager* getManager() const;
/// Get the name of this section
virtual const String& getName() const { return mName; }
/// Get the page strategy which this section is using
virtual PageStrategy* getStrategy() const { return mStrategy; }
/** Change the page strategy.
@remarks
Doing this will invalidate any pages attached to this world section, and
require the PageStrategyData to be repopulated.
*/
virtual void setStrategy(PageStrategy* strat);
/** Change the page strategy.
@remarks
Doing this will invalidate any pages attached to this world section, and
require the PageStrategyData to be repopulated.
*/
virtual void setStrategy(const String& stratName);
/** Change the SceneManager.
@remarks
Doing this will invalidate any pages attached to this world section, and
require the pages to be reloaded.
*/
virtual void setSceneManager(SceneManager* sm);
/** Change the SceneManager.
@remarks
Doing this will invalidate any pages attached to this world section, and
require the pages to be reloaded.
@param smName The instance name of the SceneManager
*/
virtual void setSceneManager(const String& smName);
/// Get the current SceneManager
virtual SceneManager* getSceneManager() const { return mSceneMgr; }
/// Get the parent world
virtual PagedWorld* getWorld() const { return mParent; }
/// Get the data required by the PageStrategy which is specific to this world section
virtual PageStrategyData* getStrategyData() const { return mStrategyData; }
/// Set the bounds of this section
virtual void setBoundingBox(const AxisAlignedBox& box);
/// Get the bounds of this section
virtual const AxisAlignedBox& getBoundingBox() const;
/// Load this section from a stream (returns true if successful)
virtual bool load(StreamSerialiser& stream);
/// Save this section to a stream
virtual void save(StreamSerialiser& stream);
/// Called when the frame starts
virtual void frameStart(Real timeSinceLastFrame);
/// Called when the frame ends
virtual void frameEnd(Real timeElapsed);
/// Notify a section of the current camera
virtual void notifyCamera(Camera* cam);
/** Load or create a page against this section covering the given world
space position.
@remarks
This method is designed mainly for editors - it will try to load
an existing page if there is one, otherwise it will create a new one
synchronously.
*/
virtual Page* loadOrCreatePage(const Vector3& worldPos);
/** Get the page ID for a given world position. */
virtual PageID getPageID(const Vector3& worldPos);
/** Ask for a page to be loaded with the given (section-relative) PageID
@remarks
You would not normally call this manually, the PageStrategy is in
charge of it usually.
If this page is already loaded, this request will not load it again.
If the page needs loading, then it may be an asynchronous process depending
on whether threading is enabled.
@param pageID The page ID to load
@param forceSynchronous If true, the page will always be loaded synchronously
*/
virtual void loadPage(PageID pageID, bool forceSynchronous = false);
/** Ask for a page to be unloaded with the given (section-relative) PageID
@remarks
You would not normally call this manually, the PageStrategy is in
charge of it usually.
@param pageID The page ID to unload
@param forceSynchronous If true, the page will always be unloaded synchronously
*/
virtual void unloadPage(PageID pageID, bool forceSynchronous = false);
/** Ask for a page to be unloaded with the given (section-relative) PageID
@remarks
You would not normally call this manually, the PageStrategy is in
charge of it usually.
@param p The Page to unload
@param forceSynchronous If true, the page will always be unloaded synchronously
*/
virtual void unloadPage(Page* p, bool forceSynchronous = false);
/** Give a section the opportunity to prepare page content procedurally.
@remarks
You should not call this method directly. This call may well happen in
a separate thread so it should not access GPU resources, use _loadProceduralPage
for that
@return true if the page was populated, false otherwise
*/
virtual bool _prepareProceduralPage(Page* page);
/** Give a section the opportunity to prepare page content procedurally.
@remarks
You should not call this method directly. This call will happen in
the main render thread so it can access GPU resources. Use _prepareProceduralPage
for background preparation.
@return true if the page was populated, false otherwise
*/
virtual bool _loadProceduralPage(Page* page);
/** Give a section the opportunity to unload page content procedurally.
@remarks
You should not call this method directly. This call will happen in
the main render thread so it can access GPU resources. Use _unprepareProceduralPage
for background preparation.
@return true if the page was populated, false otherwise
*/
virtual bool _unloadProceduralPage(Page* page);
/** Give a section the opportunity to unprepare page content procedurally.
@remarks
You should not call this method directly. This call may well happen in
a separate thread so it should not access GPU resources, use _unloadProceduralPage
for that
@return true if the page was unpopulated, false otherwise
*/
virtual bool _unprepareProceduralPage(Page* page);
/** Ask for a page to be kept in memory if it's loaded.
@remarks
This method indicates that a page should be retained if it's already
in memory, but if it's not then it won't trigger a load. This is useful
for retaining pages that have just gone out of range, but which you
don't want to unload just yet because it's quite possible they may come
back into the active set again very quickly / easily. But at the same
time, if they've already been purged you don't want to force them to load.
This is the 'maybe' region of pages.
@par
Any Page that is neither requested nor held in a frame will be
deemed a candidate for unloading.
*/
virtual void holdPage(PageID pageID);
/** Retrieves a Page.
@remarks
This method will only return Page instances that are already loaded. It
will return null if a page is not loaded.
*/
virtual Page* getPage(PageID pageID);
/** Remove all pages immediately.
@remarks
Effectively 'resets' this section by deleting all pages.
*/
virtual void removeAllPages();
/** Set the PageProvider which can provide streams Pages in this section.
@remarks
This is the top-level way that you can direct how Page data is loaded.
When data for a Page is requested for a PagedWorldSection, the following
sequence of classes will be checked to see if they have a provider willing
to supply the stream: PagedWorldSection, PagedWorld, PageManager.
If none of these do, then the default behaviour is to look for a file
called worldname_sectionname_pageID.page.
@note
The caller remains responsible for the destruction of the provider.
*/
virtual void setPageProvider(PageProvider* provider) { mPageProvider = provider; }
/** Get the PageProvider which can provide streams for Pages in this section. */
virtual PageProvider* getPageProvider() const { return mPageProvider; }
/** Get a serialiser set up to read Page data for the given PageID.
@param pageID The ID of the page being requested
@remarks
The StreamSerialiser returned is the responsibility of the caller to
delete.
*/
virtual StreamSerialiser* _readPageStream(PageID pageID);
/** Get a serialiser set up to write Page data for the given PageID.
@param pageID The ID of the page being requested
@remarks
The StreamSerialiser returned is the responsibility of the caller to
delete.
*/
virtual StreamSerialiser* _writePageStream(PageID pageID);
/** Function for writing to a stream.
*/
_OgrePagingExport friend std::ostream& operator <<( std::ostream& o, const PagedWorldSection& p );
/** Get the type name of this section. */
virtual const String& getType();
};
/** A factory class for creating types of world section.
*/
class _OgrePagingExport PagedWorldSectionFactory : public PageAlloc
{
public:
virtual ~PagedWorldSectionFactory() {}
virtual const String& getName() const = 0;
virtual PagedWorldSection* createInstance(const String& name, PagedWorld* parent, SceneManager* sm) = 0;
virtual void destroyInstance(PagedWorldSection*) = 0;
};
/** @} */
/** @} */
}
#endif
| MTASZTAKI/ApertusVR | plugins/render/ogreRender/3rdParty/ogre/Components/Paging/include/OgrePagedWorldSection.h | C | mit | 13,800 | [
30522,
1013,
1008,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hive.beeline;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hive.common.util.HiveTestUtils;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
/**
* Unit test for Beeline arg parser.
*/
@RunWith(Parameterized.class)
public class TestBeelineArgParsing {
private static final Logger LOG = LoggerFactory.getLogger(TestBeelineArgParsing.class.getName());
private static final String dummyDriverClazzName = "DummyDriver";
private String connectionString;
private String driverClazzName;
private String driverJarFileName;
private boolean defaultSupported;
public TestBeelineArgParsing(String connectionString, String driverClazzName, String driverJarFileName,
boolean defaultSupported) {
this.connectionString = connectionString;
this.driverClazzName = driverClazzName;
this.driverJarFileName = driverJarFileName;
this.defaultSupported = defaultSupported;
}
public class TestBeeline extends BeeLine {
String connectArgs = null;
List<String> properties = new ArrayList<String>();
List<String> queries = new ArrayList<String>();
@Override
boolean dispatch(String command) {
String connectCommand = "!connect";
String propertyCommand = "!properties";
if (command.startsWith(connectCommand)) {
this.connectArgs = command.substring(connectCommand.length() + 1, command.length());
} else if (command.startsWith(propertyCommand)) {
this.properties.add(command.substring(propertyCommand.length() + 1, command.length()));
} else {
this.queries.add(command);
}
return true;
}
public boolean addlocaldrivername(String driverName) {
String line = "addlocaldrivername " + driverName;
return getCommands().addlocaldrivername(line);
}
public boolean addLocalJar(String url){
String line = "addlocaldriverjar " + url;
return getCommands().addlocaldriverjar(line);
}
}
@Parameters(name="{1}")
public static Collection<Object[]> data() throws IOException, InterruptedException {
// generate the dummy driver by using txt file
String u = HiveTestUtils.getFileFromClasspath("DummyDriver.txt");
Map<File, String> extraContent=new HashMap<>();
extraContent.put(new File("META-INF/services/java.sql.Driver"), dummyDriverClazzName);
File jarFile = HiveTestUtils.genLocalJarForTest(u, dummyDriverClazzName, extraContent);
String pathToDummyDriver = jarFile.getAbsolutePath();
return Arrays.asList(new Object[][] {
{ "jdbc:postgresql://host:5432/testdb", "org.postgresql.Driver",
System.getProperty("maven.local.repository") + File.separator + "postgresql"
+ File.separator + "postgresql" + File.separator + "9.1-901.jdbc4" + File.separator
+ "postgresql-9.1-901.jdbc4.jar", true },
{ "jdbc:dummy://host:5432/testdb", dummyDriverClazzName, pathToDummyDriver, false } });
}
@Test
public void testSimpleArgs() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"-u", "url", "-n", "name",
"-p", "password", "-d", "driver", "-a", "authType"};
org.junit.Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.connectArgs.equals("url name password driver"));
Assert.assertTrue(bl.getOpts().getAuthType().equals("authType"));
}
@Test
public void testPasswordFileArgs() throws Exception {
TestBeeline bl = new TestBeeline();
File passFile = new File("file.password");
passFile.deleteOnExit();
FileOutputStream passFileOut = new FileOutputStream(passFile);
passFileOut.write("mypass\n".getBytes());
passFileOut.close();
String args[] = new String[] {"-u", "url", "-n", "name",
"-w", "file.password", "-p", "not-taken-if-w-is-present",
"-d", "driver", "-a", "authType"};
bl.initArgs(args);
System.out.println(bl.connectArgs);
// Password file contents are trimmed of trailing whitespaces and newlines
Assert.assertTrue(bl.connectArgs.equals("url name mypass driver"));
Assert.assertTrue(bl.getOpts().getAuthType().equals("authType"));
passFile.delete();
}
/**
* The first flag is taken by the parser.
*/
@Test
public void testDuplicateArgs() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"-u", "url", "-u", "url2", "-n", "name",
"-p", "password", "-d", "driver"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.connectArgs.equals("url name password driver"));
}
@Test
public void testQueryScripts() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"-u", "url", "-n", "name",
"-p", "password", "-d", "driver", "-e", "select1", "-e", "select2"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.connectArgs.equals("url name password driver"));
Assert.assertTrue(bl.queries.contains("select1"));
Assert.assertTrue(bl.queries.contains("select2"));
}
/**
* Test setting hive conf and hive vars with --hiveconf and --hivevar
*/
@Test
public void testHiveConfAndVars() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"-u", "url", "-n", "name",
"-p", "password", "-d", "driver", "--hiveconf", "a=avalue", "--hiveconf", "b=bvalue",
"--hivevar", "c=cvalue", "--hivevar", "d=dvalue"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.connectArgs.equals("url name password driver"));
Assert.assertTrue(bl.getOpts().getHiveConfVariables().get("a").equals("avalue"));
Assert.assertTrue(bl.getOpts().getHiveConfVariables().get("b").equals("bvalue"));
Assert.assertTrue(bl.getOpts().getHiveVariables().get("c").equals("cvalue"));
Assert.assertTrue(bl.getOpts().getHiveVariables().get("d").equals("dvalue"));
}
@Test
public void testBeelineOpts() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] =
new String[] { "-u", "url", "-n", "name", "-p", "password", "-d", "driver",
"--autoCommit=true", "--verbose", "--truncateTable" };
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.connectArgs.equals("url name password driver"));
Assert.assertTrue(bl.getOpts().getAutoCommit());
Assert.assertTrue(bl.getOpts().getVerbose());
Assert.assertTrue(bl.getOpts().getTruncateTable());
}
@Test
public void testBeelineAutoCommit() throws Exception {
TestBeeline bl = new TestBeeline();
String[] args = {};
bl.initArgs(args);
Assert.assertTrue(bl.getOpts().getAutoCommit());
args = new String[] {"--autoCommit=false"};
bl.initArgs(args);
Assert.assertFalse(bl.getOpts().getAutoCommit());
args = new String[] {"--autoCommit=true"};
bl.initArgs(args);
Assert.assertTrue(bl.getOpts().getAutoCommit());
bl.close();
}
@Test
public void testBeelineShowDbInPromptOptsDefault() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] { "-u", "url" };
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertFalse(bl.getOpts().getShowDbInPrompt());
Assert.assertEquals("", bl.getFormattedDb());
}
@Test
public void testBeelineShowDbInPromptOptsTrue() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] { "-u", "url", "--showDbInPrompt=true" };
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.getOpts().getShowDbInPrompt());
Assert.assertEquals(" (default)", bl.getFormattedDb());
}
/**
* Test setting script file with -f option.
*/
@Test
public void testScriptFile() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"-u", "url", "-n", "name",
"-p", "password", "-d", "driver", "-f", "myscript"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.connectArgs.equals("url name password driver"));
Assert.assertTrue(bl.getOpts().getScriptFile().equals("myscript"));
}
/**
* Test beeline with -f and -e simultaneously
*/
@Test
public void testCommandAndFileSimultaneously() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"-e", "myselect", "-f", "myscript"};
Assert.assertEquals(1, bl.initArgs(args));
}
/**
* Test beeline with multiple initfiles in -i.
*/
@Test
public void testMultipleInitFiles() {
TestBeeline bl = new TestBeeline();
String[] args = new String[] {"-i", "/url/to/file1", "-i", "/url/to/file2"};
Assert.assertEquals(0, bl.initArgs(args));
String[] files = bl.getOpts().getInitFiles();
Assert.assertEquals("/url/to/file1", files[0]);
Assert.assertEquals("/url/to/file2", files[1]);
}
/**
* Displays the usage.
*/
@Test
public void testHelp() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"--help"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertEquals(true, bl.getOpts().isHelpAsked());
}
/**
* Displays the usage.
*/
@Test
public void testUnmatchedArgs() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"-u", "url", "-n"};
Assert.assertEquals(-1, bl.initArgs(args));
}
@Test
public void testAddLocalJar() throws Exception {
TestBeeline bl = new TestBeeline();
Assert.assertNull(bl.findLocalDriver(connectionString));
LOG.info("Add " + driverJarFileName + " for the driver class " + driverClazzName);
bl.addLocalJar(driverJarFileName);
bl.addlocaldrivername(driverClazzName);
Assert.assertEquals(bl.findLocalDriver(connectionString).getClass().getName(), driverClazzName);
}
@Test
public void testAddLocalJarWithoutAddDriverClazz() throws Exception {
TestBeeline bl = new TestBeeline();
LOG.info("Add " + driverJarFileName + " for the driver class " + driverClazzName);
assertTrue("expected to exists: "+driverJarFileName,new File(driverJarFileName).exists());
bl.addLocalJar(driverJarFileName);
if (!defaultSupported) {
Assert.assertNull(bl.findLocalDriver(connectionString));
} else {
// no need to add for the default supported local jar driver
Assert.assertNotNull(bl.findLocalDriver(connectionString));
Assert.assertEquals(bl.findLocalDriver(connectionString).getClass().getName(), driverClazzName);
}
}
@Test
public void testBeelinePasswordMask() throws Exception {
TestBeeline bl = new TestBeeline();
File errFile = File.createTempFile("test", "tmp");
bl.setErrorStream(new PrintStream(new FileOutputStream(errFile)));
String args[] =
new String[] { "-u", "url", "-n", "name", "-p", "password", "-d", "driver",
"--autoCommit=true", "--verbose", "--truncateTable" };
bl.initArgs(args);
bl.close();
String errContents = new String(Files.readAllBytes(Paths.get(errFile.toString())));
Assert.assertTrue(errContents.contains(BeeLine.PASSWD_MASK));
}
/**
* Test property file parameter option.
*/
@Test
public void testPropertyFile() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"--property-file", "props"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.properties.get(0).equals("props"));
bl.close();
}
/**
* Test maxHistoryRows parameter option.
*/
@Test
public void testMaxHistoryRows() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"--maxHistoryRows=100"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.getOpts().getMaxHistoryRows() == 100);
bl.close();
}
/**
* Test the file parameter option
* @throws Exception
*/
@Test
public void testFileParam() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"-u", "url", "-n", "name",
"-p", "password", "-d", "driver", "-f", "hdfs://myscript"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.connectArgs.equals("url name password driver"));
Assert.assertTrue(bl.getOpts().getScriptFile().equals("hdfs://myscript"));
}
/**
* Test the report parameter option.
* @throws Exception
*/
@Test
public void testReport() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] {"--report=true"};
Assert.assertEquals(0, bl.initArgs(args));
Assert.assertTrue(bl.getOpts().isReport());
bl.close();
}
}
| b-slim/hive | beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java | Java | apache-2.0 | 13,992 | [
30522,
1013,
1008,
1008,
7000,
2000,
1996,
15895,
4007,
3192,
1006,
2004,
2546,
1007,
2104,
2028,
1008,
2030,
2062,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
1008,
5500,
2007,
2023,
2147,
2005,
3176,
2592,
1008,
4953,
9385,
6095,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# pyramid_sms documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
# Insert the project root dir as the first element in the PYTHONPATH.
# This lets us ensure that the source package is imported, and that its
# version is used.
sys.path.insert(0, project_root)
import pyramid_sms
# -- General configuration ---------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'SMS for Pyramid'
copyright = u'2016, Mikko Ohtamaa'
# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
# the built documents.
#
# The short X.Y version.
version = "0.1"
# The full version, including alpha/beta/rc tags.
release = "0.1"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to
# some non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built
# documents.
#keep_warnings = False
# -- Options for HTML output -------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as
# html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the
# top of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon
# of the docs. This file should be a Windows icon file (.ico) being
# 16x16 or 32x32 pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets)
# here, relative to this directory. They are copied after the builtin
# static files, so a file named "default.css" will overwrite the builtin
# "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names
# to template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer.
# Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer.
# Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages
# will contain a <link> tag referring to it. The value of this option
# must be the base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'pyramid_smsdoc'
# -- Options for LaTeX output ------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'pyramid_sms.tex',
u'SMS for Pyramid Documentation',
u'Mikko Ohtamaa', 'manual'),
]
# The name of an image file (relative to this directory) to place at
# the top of the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings
# are parts, not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'pyramid_sms',
u'SMS for Pyramid Documentation',
[u'Mikko Ohtamaa'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ----------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'pyramid_sms',
u'SMS for Pyramid Documentation',
u'Mikko Ohtamaa',
'pyramid_sms',
'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
autoclass_content = "both"
| websauna/pyramid_sms | docs/conf.py | Python | isc | 8,451 | [
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
4372,
2615,
18750,
1001,
1011,
1008,
1011,
16861,
1024,
21183,
2546,
1011,
1022,
1011,
1008,
1011,
1001,
1001,
11918,
1035,
22434,
12653,
3857,
9563,
5371,
1010,
2580,
2011,
1001,
27311,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php namespace JetMinds\Job\Updates;
use Schema;
use October\Rain\Database\Schema\Blueprint;
use October\Rain\Database\Updates\Migration;
class CreateResumesTable extends Migration
{
public function up()
{
Schema::create('jetminds_job_resumes', function(Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('first_name')->nullable();
$table->string('last_name')->nullable();
$table->string('email')->nullable();
$table->string('phone')->nullable();
$table->string('position')->nullable();
$table->longText('location')->nullable();
$table->string('resume_category')->nullable();
$table->string('resume_education')->nullable();
$table->longText('education_note')->nullable();
$table->string('resume_experience')->nullable();
$table->longText('experience_note')->nullable();
$table->string('resume_language')->nullable();
$table->string('resume_skill')->nullable();
$table->longText('resume_note')->nullable();
$table->boolean('is_invite')->default(1);
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('jetminds_job_resumes');
}
}
| jetmindsgroup/job-plugin | updates/create_resumes_table.php | PHP | mit | 1,311 | [
30522,
1026,
1029,
25718,
3415,
15327,
6892,
23356,
2015,
1032,
3105,
1032,
14409,
1025,
2224,
8040,
28433,
1025,
2224,
2255,
1032,
4542,
1032,
7809,
1032,
8040,
28433,
1032,
2630,
16550,
1025,
2224,
2255,
1032,
4542,
1032,
7809,
1032,
1440... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/usr/bin/env python3
# Copyright (c) 2014-2017 The Doriancoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet keypool and interaction with wallet encryption/locking."""
from test_framework.test_framework import DoriancoinTestFramework
from test_framework.util import *
class KeyPoolTest(DoriancoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
def run_test(self):
nodes = self.nodes
addr_before_encrypting = nodes[0].getnewaddress()
addr_before_encrypting_data = nodes[0].validateaddress(addr_before_encrypting)
wallet_info_old = nodes[0].getwalletinfo()
assert(addr_before_encrypting_data['hdmasterkeyid'] == wallet_info_old['hdmasterkeyid'])
# Encrypt wallet and wait to terminate
nodes[0].node_encrypt_wallet('test')
# Restart node 0
self.start_node(0)
# Keep creating keys
addr = nodes[0].getnewaddress()
addr_data = nodes[0].validateaddress(addr)
wallet_info = nodes[0].getwalletinfo()
assert(addr_before_encrypting_data['hdmasterkeyid'] != wallet_info['hdmasterkeyid'])
assert(addr_data['hdmasterkeyid'] == wallet_info['hdmasterkeyid'])
assert_raises_rpc_error(-12, "Error: Keypool ran out, please call keypoolrefill first", nodes[0].getnewaddress)
# put six (plus 2) new keys in the keypool (100% external-, +100% internal-keys, 1 in min)
nodes[0].walletpassphrase('test', 12000)
nodes[0].keypoolrefill(6)
nodes[0].walletlock()
wi = nodes[0].getwalletinfo()
assert_equal(wi['keypoolsize_hd_internal'], 6)
assert_equal(wi['keypoolsize'], 6)
# drain the internal keys
nodes[0].getrawchangeaddress()
nodes[0].getrawchangeaddress()
nodes[0].getrawchangeaddress()
nodes[0].getrawchangeaddress()
nodes[0].getrawchangeaddress()
nodes[0].getrawchangeaddress()
addr = set()
# the next one should fail
assert_raises_rpc_error(-12, "Keypool ran out", nodes[0].getrawchangeaddress)
# drain the external keys
addr.add(nodes[0].getnewaddress())
addr.add(nodes[0].getnewaddress())
addr.add(nodes[0].getnewaddress())
addr.add(nodes[0].getnewaddress())
addr.add(nodes[0].getnewaddress())
addr.add(nodes[0].getnewaddress())
assert(len(addr) == 6)
# the next one should fail
assert_raises_rpc_error(-12, "Error: Keypool ran out, please call keypoolrefill first", nodes[0].getnewaddress)
# refill keypool with three new addresses
nodes[0].walletpassphrase('test', 1)
nodes[0].keypoolrefill(3)
# test walletpassphrase timeout
time.sleep(1.1)
assert_equal(nodes[0].getwalletinfo()["unlocked_until"], 0)
# drain them by mining
nodes[0].generate(1)
nodes[0].generate(1)
nodes[0].generate(1)
assert_raises_rpc_error(-12, "Keypool ran out", nodes[0].generate, 1)
nodes[0].walletpassphrase('test', 100)
nodes[0].keypoolrefill(100)
wi = nodes[0].getwalletinfo()
assert_equal(wi['keypoolsize_hd_internal'], 100)
assert_equal(wi['keypoolsize'], 100)
if __name__ == '__main__':
KeyPoolTest().main()
| doriancoins/doriancoin | test/functional/wallet_keypool.py | Python | mit | 3,428 | [
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
4372,
2615,
18750,
2509,
1001,
9385,
1006,
1039,
1007,
2297,
1011,
2418,
1996,
16092,
3597,
2378,
4563,
9797,
1001,
5500,
2104,
1996,
10210,
4007,
6105,
1010,
2156,
1996,
10860,
1001,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
import argparse
from nltk.corpus import brown
import requests
import arrow
import json
parser = argparse.ArgumentParser()
parser.add_argument('host')
args = parser.parse_args()
def create_new_novel():
url = 'http://{host}/api/novel'.format(host=args.host)
response = requests.post(url, json={'title': 'Test Novel {}'.format(arrow.utcnow())})
return json.loads(response.text)['id']
def create_new_chapter(novel_id):
url = 'http://{host}/api/chapter'.format(host=args.host)
chapter_title = 'Chapter {}'.format(arrow.utcnow())
response = requests.post(url, json={'title': chapter_title, 'novel_id': novel_id})
return json.loads(response.text)['id']
def post_example_text_to_chapter(chapter_id, host):
url = 'http://{host}/api/novel_token'.format(host=host)
words = brown.words(categories=['news'])
for ordinal, word in enumerate(words):
if ordinal > 1000:
break
requests.post(url, json={'token': word.lower(), 'ordinal': ordinal, 'chapter_id': chapter_id})
if __name__ == '__main__':
novel_id = create_new_novel()
chapter_id = create_new_chapter(novel_id)
post_example_text_to_chapter(chapter_id, args.host) | thebritican/anovelmous | anovelmous/tests/post_example_novel.py | Python | mit | 1,193 | [
30522,
12324,
12098,
21600,
11650,
2063,
2013,
17953,
2102,
2243,
1012,
13931,
12324,
2829,
12324,
11186,
12324,
8612,
12324,
1046,
3385,
11968,
8043,
1027,
12098,
21600,
11650,
2063,
1012,
6685,
19362,
8043,
1006,
1007,
11968,
8043,
1012,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package tsg.utils;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import tsg.TSNodeLabel;
public class CheckTreebankWordsConsistency {
public static void main(String[] args) throws Exception {
File treebankFile1 = new File(args[0]);
File treebankFile2 = new File(args[0]);
ArrayList<TSNodeLabel> treebank1 = TSNodeLabel.getTreebank(treebankFile1);
ArrayList<TSNodeLabel> treebank2 = TSNodeLabel.getTreebank(treebankFile2);
if (treebank1.size() != treebank2.size()) {
System.err.println("Sizes differ:");
System.err.println(treebankFile1 + " -> " + treebank1.size());
System.err.println(treebankFile2 + " -> " + treebank2.size());
return;
}
Iterator<TSNodeLabel> iter1 = treebank1.iterator();
Iterator<TSNodeLabel> iter2 = treebank2.iterator();
int index = 0;
boolean mistake = false;
while(iter1.hasNext()) {
index++;
TSNodeLabel t1 = iter1.next();
TSNodeLabel t2 = iter2.next();
if (!t1.toFlatSentence().equals(t2.toFlatSentence())) {
System.out.println("Inconsistent at index: " + index);
System.out.println(t1.toFlatSentence());
System.out.println(t2.toFlatSentence());
mistake = true;
break;
}
}
if (!mistake)
System.out.println("OK!");
}
}
| kercos/TreeGrammars | TreeGrammars/src/tsg/utils/CheckTreebankWordsConsistency.java | Java | mit | 1,266 | [
30522,
7427,
24529,
2290,
1012,
21183,
12146,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
9140,
9863,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2009,
6906,
4263,
1025,
12324,
24529,
2290,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Bundle\PayumBundle\Factory;
use Payum\Core\Request\GetStatusInterface;
interface GetStatusFactoryInterface
{
public function createNewWithModel($model): GetStatusInterface;
}
| lchrusciel/Sylius | src/Sylius/Bundle/PayumBundle/Factory/GetStatusFactoryInterface.php | PHP | mit | 444 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
1996,
25353,
15513,
7427,
1012,
1008,
1008,
1006,
1039,
1007,
22195,
2063,
18818,
24401,
15378,
20518,
7974,
5488,
1008,
1008,
2005,
1996,
2440,
9385,
1998,
6105,
259... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
Copyright (C) 2010,2012,2016 The ESPResSo project
Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
Max-Planck-Institute for Polymer Research, Theory Group
This file is part of ESPResSo.
ESPResSo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ESPResSo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file lees_edwards.h
Data and methods for Lees-Edwards periodic boundary conditions. The gist of LE-PBCs is to impose shear flow
by constantly moving the PBC wrap such that: $x_{unfolded} == x_{folded} + x_{img} \times L + (y_{img} * \gamma * t)$,
and $vx_{unfolded} = vx_{folded} + (y_{img} * \gamma)$.
*/
#ifndef LEES_EDWARDS_H
#define LEES_EDWARDS_H
#include "config.hpp"
extern double lees_edwards_offset, lees_edwards_rate;
extern int lees_edwards_count;
#ifdef LEES_EDWARDS
void lees_edwards_step_boundaries();
#endif //LEES_EDWARDS
#endif //LEES_EDWARDS_H
| Smiljanic/espresso | src/core/lees_edwards.hpp | C++ | gpl-3.0 | 1,440 | [
30522,
1013,
1008,
9385,
1006,
1039,
1007,
2230,
1010,
2262,
1010,
2355,
1996,
9686,
20110,
2080,
2622,
9385,
1006,
1039,
1007,
2526,
1010,
2494,
1010,
2432,
1010,
2384,
1010,
2294,
1010,
2289,
1010,
2263,
1010,
2268,
1010,
2230,
4098,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
---
layout: developer-post
title: "Best Practices"
date: 2014-11-05 11:08:00
category: developer/presentations/multi-page
parent-order: 0
order: 4
---
We’ve built our fair share of what we like to call “multi-page” Presentations; that is, Presentations where Widgets and other content are displayed only after touching a button or some other UI element. As a result, we’ve formulated some best practices based on our experiences that we think will benefit you as well. Here is our list of recommendations:
- When adding an image to a Presentation that must execute some code when clicked (e.g. a button), use a Placeholder with a background image and attach an `onclick` attribute to the resulting `div` tag.
- Instead of using an empty Placeholder in a Presentation (i.e. a Placeholder with no Playlist items and no background image) either:
- Don’t create it as a Placeholder and instead add the `div` tag directly to the HTML and style it with CSS, or
- Create it as a Placeholder so that the CSS is automatically generated, but then remove the `placeholder="true"` attribute. This will remove clutter from the Design view and kick out empty Placeholders.
- If a Placeholder should not appear on the first page of the Presentation, uncheck its *Visible* property. This will hide the Placeholder and pause all of its Widgets when the Presentation first loads.
- When a different page of the Presentation is selected, all Widgets on the page that is now invisible should be paused and those on the newly visible page should be started.
- Where possible, place Javascript code just before the closing `body` tag.
- It is best to comment any Javascript that appears in the HTML. This will make it easier to maintain the Presentation going forward.
- Only include code in a Presentation that is actually needed. It is not a good idea to copy the same code from Presentation to Presentation, as what was needed in one might not be needed in another.
- Using the Chrome Developer Tools, check the console for errors and resolve any that are directly related to the Presentation.
Follow these best practices and you’ll be sure to create some amazing multi-page Presentations! | sheadarlison/risevision-documentation | _posts/developer/presentations/multi-page/2014-11-05-best-practices.md | Markdown | gpl-3.0 | 2,192 | [
30522,
1011,
1011,
1011,
9621,
1024,
9722,
1011,
2695,
2516,
1024,
1000,
2190,
6078,
1000,
3058,
1024,
2297,
1011,
2340,
1011,
5709,
2340,
1024,
5511,
1024,
4002,
4696,
1024,
9722,
1013,
18216,
1013,
4800,
1011,
3931,
6687,
1011,
2344,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
**Note: This project has been renamed to [Stubmatic](https://github.com/NaturalIntelligence/Stubmatic). So any change after 4.2.0 will be happening on Stubmatic only.**
# StubbyDB (Depreciated)
[](https://nodei.co/npm/stubby-db/)
[](https://nodei.co/npm/stubby-db/)
<img align="right" src="http://naturalintelligence.github.io/StubbyDB/assets/img/stubbydb_logo_300.png?raw=true" alt="Sublime's custom image"/>
A nodejs based complete solution for maintaining the stubs for your project
To install
$npm install stubby-db -g
For basic help
$stubbydb --help
Important links : [Video Tutorial](https://youtu.be/7mA4-MXxwgk), [Wiki](https://github.com/NaturalIntelligence/StubbyDB/wiki), [NPM](https://www.npmjs.com/package/stubby-db), [Demo](https://github.com/NaturalIntelligence/stubby-db-test) application, [issues](https://github.com/NaturalIntelligence/StubbyDB/issues), [changelogs](https://github.com/NaturalIntelligence/StubbyDB/wiki/Changelog)
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KQJAX48SPUKNC)
##History
Developed by a victim.
I was previously using an open source project to manage stubbed data. However with the time when the project is expanded, I started missing few features in that. I also faced many limitations. Hence I decided to created a simple, light weighted, highly customizable, and easy to handy tool to manage stub data in whichever way I want.
##Description
Stubby DB is a npm module. In simple words you can stub the HTTP/HTTPS calls to provide stubbed data. You can make stubbed data service for SOAP or REST calls. Basic functionality is somewhat similar to stubby4j. But it has so many other features.
<p align="center"><a href="https://youtu.be/7mA4-MXxwgk">
<img src="http://naturalintelligence.github.io/StubbyDB/assets/img/Stubby%20DB%20Youtube.jpg?raw=true" alt="Sublime's custom image"/>
</a>
</p>
###Features and Basic terminology
To start with stubby db, you need to create **a yaml file** which maps request with response. You may need **response files** as per your need and optional config.json file to ask Stubby DB to use default options defined by you.
####Mappings
yaml based mappings are required to map a request with relevant response file. You can have multiple files instead of maintaining a big fat file. You can also mark files which should be used to map the requests and skip which are under development.
```yaml
- request:
method: POST
latency: 0
headers:
status: 200
url: /stubs/simple
post: Hello ([a-zA-Z]+) ([a-zA-Z]+)!! Your number is ((\+[0-9]{2}) ([0-9]+))
response:
file: post.xml
```
For maintainability purpose and to keep the size of mapping file short you can use **Short Notations** and **Default configuration**. Check [wiki](https://github.com/NaturalIntelligence/StubbyDB/wiki/03.0-Mappings) for more detail.
####Strategy
Many times, you don't have just one-to-one mapping between the request and response. You want to server different response every time, or you want to serve default response instead of saying 404 (stub data not found). There are many strategies, you can use suits to your requirement;
```yaml
- request:
url: /stubs/employee/([0-9]+)
response:
strategy: random
files: ["<% url.1 %>.xml","file2.xml","file3.xml"]
```
Stubby DB is currently supporting following strategies;
1. first-found : In above example, whichever file is found first, serve that response.
2. random : In above example, serve any file from mentioned list.
3. round-robin : In above example, serve the files in sequential order. So on second same request, it'll serve response from file2.xml
####Dynamic Response
Instead of creating multiple mappings for same request where just few query parameters or headers are being changed. You can use Regular expression to write generic mappings.
Capture some part from request and use it determine the file name, or use it in file contents, or in response headers.
```yaml
- request:
method: POST
url: /stubs/post2
post: Mobile=([0-9]+)
#name=Amit&Mobile=781011111&Sal=100000.00&DOJ=25-APR-2012
response:
#Mobile=781011111,781011111,<% post.2 %>
body: <% post.0 %>,<% post.1 %>,<% post.2 %>
```
####Data dumps
Stubby DB let you construct the response from multiple files. You can include contents of other file into your response files.
This is the content from sample response file.
Employee: <% post.1 %>
Projects:
[[dumps/projects:project1,project2]]
Now you need not maintain a big response file. Split them and reuse in different responses. It'll also increase consistency.
You can also decide at the run time which dumps have to be included.
####DB sets
If you still feel that you have so many response files in your project and it is being difficult to maintain them, use this **skeleton based approach**.
Use a response file as skeleton and fill the data from a dbset.
Sample response file
```
Employee: <% url.1 %>
Name: ##Name##
Projects:
[[dumps/projects:##Projects##]]
```
Sample dbset file: ./dbsets/employee
```
Num |Name |Projects
001 |Some Name |project1, project2
002 |Another Name |project2, project3, project4
```
Actual Response
```
Employee: 001
Name: Some Name
Projects:
Title : Title 1
Description: This is project 1
:
Title : Title 2
Description: This is project 2
:
```
See sample [yaml](https://github.com/NaturalIntelligence/stubby-db-test/blob/master/mappings/dbset.yaml) for more detail. Check [DBset wiki](https://github.com/NaturalIntelligence/StubbyDB/wiki/08.0-DB-Sets#strategy) to know about strategies for DB sets.
####Latency
When you want to serve the response with some delay. It may be useful to test negative scenarios or for performance test.
####DEBUG & Logging
1. On screen loggin with '-v' or '--verbose' option
2. File based logging with '-l' or '--logs' option
3. On demand logging with query parameter 'debug=true' with request URL. It gives additional detail with the response: Original request, Matched mapping, Raw and fine response etc. Response status depends on how your requests gets resolved. If 'debug=true' is provided on root url, then it gives system level information, configuration etc.
####Expressions
Expressions are build by markers and functions. If you write a marker `{{TODAY+1y-2m+3d}}` in response body or file, It'll be converted into date. If you write `{{formatDate(TODAY,"dd D, MMM YYYY HH:mm:ss")}}` current date will be written in specified format. See complete list of markers & functions on [expressions](https://github.com/NaturalIntelligence/StubbyDB/wiki/06.0-Expressions) page.
####Configuration
StubbyDB provides you many way of configuring your project: commandline arguments, configuration file, directory structure.
####SSL hanndshaking
Stubby DB supports HTTPS and 2 way SSL handshaking as well. Have a look on [wiki](https://github.com/NaturalIntelligence/StubbyDB/wiki/10.0-SSL-handshaking) and demo application for more detail.
####Compression
If accept-encoding header is set to deflate or gzip then stubby-db serve compressed response.
####Attachments
If contentType property is set in your mappings, stubby db sends file otherwise it sends file response as response body after resolving all markers,expressions,dbsets etc.
| NaturalIntelligence/StubbyDB | README.md | Markdown | mit | 7,576 | [
30522,
1008,
1008,
3602,
1024,
2023,
2622,
2038,
2042,
4096,
2000,
1031,
24646,
25526,
12070,
1033,
1006,
16770,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
3019,
18447,
13348,
17905,
1013,
24646,
25526,
12070,
1007,
1012,
2061,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package dotty.tools.dotc
package transform
import TreeTransforms._
import core.Names.Name
import core.DenotTransformers._
import core.Denotations._
import core.SymDenotations._
import core.Contexts._
import core.Symbols._
import core.Types._
import core.Flags._
import core.Constants._
import core.StdNames._
import core.Decorators._
import core.TypeErasure.isErasedType
import core.Phases.Phase
import typer._
import typer.ErrorReporting._
import reporting.ThrowingReporter
import ast.Trees._
import ast.{tpd, untpd}
import util.SourcePosition
import collection.mutable
import ProtoTypes._
import java.lang.AssertionError
import scala.util.control.NonFatal
/** Run by -Ycheck option after a given phase, this class retypes all syntax trees
* and verifies that the type of each tree node so obtained conforms to the type found in the tree node.
* It also performs the following checks:
*
* - The owner of each definition is the same as the owner of the current typing context.
* - Ident nodes do not refer to a denotation that would need a select to be accessible
* (see tpd.needsSelect).
* - After typer, identifiers and select nodes refer to terms only (all types should be
* represented as TypeTrees then).
*/
class TreeChecker extends Phase with SymTransformer {
import ast.tpd._
private val seenClasses = collection.mutable.HashMap[String, Symbol]()
private val seenModuleVals = collection.mutable.HashMap[String, Symbol]()
def isValidJVMName(name: Name) =
!name.exists(c => c == '.' || c == ';' || c =='[' || c == '/')
def isValidJVMMethodName(name: Name) =
!name.exists(c => c == '.' || c == ';' || c =='[' || c == '/' || c == '<' || c == '>')
def printError(str: String)(implicit ctx: Context) = {
ctx.println(Console.RED + "[error] " + Console.WHITE + str)
}
val NoSuperClass = Trait | Package
def testDuplicate(sym: Symbol, registry: mutable.Map[String, Symbol], typ: String)(implicit ctx: Context) = {
val name = sym.fullName.toString
if (this.flatClasses && registry.contains(name))
printError(s"$typ defined twice $sym ${sym.id} ${registry(name).id}")
registry(name) = sym
}
def checkCompanion(symd: SymDenotation)(implicit ctx: Context): Unit = {
val cur = symd.linkedClass
val prev = ctx.atPhase(ctx.phase.prev) {
ct => {
implicit val ctx: Context = ct.withMode(Mode.FutureDefsOK)
symd.symbol.linkedClass
}
}
if (prev.exists)
assert(cur.exists, i"companion disappeared from $symd")
}
def transformSym(symd: SymDenotation)(implicit ctx: Context): SymDenotation = {
val sym = symd.symbol
if (sym.isClass && !sym.isAbsent) {
val validSuperclass = defn.ScalaValueClasses.contains(sym) || defn.syntheticCoreClasses.contains(sym) ||
(sym eq defn.ObjectClass) || (sym is NoSuperClass) || (sym.asClass.superClass.exists)
if (!validSuperclass)
printError(s"$sym has no superclass set")
testDuplicate(sym, seenClasses, "class")
}
if (sym.is(Method) && sym.is(Deferred) && sym.is(Private))
assert(false, s"$sym is both Deferred and Private")
checkCompanion(symd)
symd
}
def phaseName: String = "Ycheck"
def run(implicit ctx: Context): Unit = {
check(ctx.allPhases, ctx)
}
private def previousPhases(phases: List[Phase])(implicit ctx: Context): List[Phase] = phases match {
case (phase: TreeTransformer) :: phases1 =>
val subPhases = phase.transformations.map(_.phase)
val previousSubPhases = previousPhases(subPhases.toList)
if (previousSubPhases.length == subPhases.length) previousSubPhases ::: previousPhases(phases1)
else previousSubPhases
case phase :: phases1 if phase ne ctx.phase =>
phase :: previousPhases(phases1)
case _ =>
Nil
}
def check(phasesToRun: Seq[Phase], ctx: Context) = {
val prevPhase = ctx.phase.prev // can be a mini-phase
val squahsedPhase = ctx.squashed(prevPhase)
ctx.println(s"checking ${ctx.compilationUnit} after phase ${squahsedPhase}")
val checkingCtx = ctx.fresh
.setTyperState(ctx.typerState.withReporter(new ThrowingReporter(ctx.typerState.reporter)))
val checker = new Checker(previousPhases(phasesToRun.toList)(ctx))
try checker.typedExpr(ctx.compilationUnit.tpdTree)(checkingCtx)
catch {
case NonFatal(ex) =>
implicit val ctx: Context = checkingCtx
ctx.println(i"*** error while checking after phase ${checkingCtx.phase.prev} ***")
throw ex
}
}
class Checker(phasesToCheck: Seq[Phase]) extends ReTyper {
val nowDefinedSyms = new mutable.HashSet[Symbol]
val everDefinedSyms = new mutable.HashMap[Symbol, Tree]
def withDefinedSym[T](tree: untpd.Tree)(op: => T)(implicit ctx: Context): T = tree match {
case tree: DefTree =>
val sym = tree.symbol
assert(isValidJVMName(sym.name), s"${sym.fullName} name is invalid on jvm")
everDefinedSyms.get(sym) match {
case Some(t) =>
if (t ne tree)
ctx.warning(i"symbol ${sym.fullName} is defined at least twice in different parts of AST")
// should become an error
case None =>
everDefinedSyms(sym) = tree
}
assert(!nowDefinedSyms.contains(sym), i"doubly defined symbol: ${sym.fullName} in $tree")
if (ctx.settings.YcheckMods.value) {
tree match {
case t: MemberDef =>
if (t.name ne sym.name) ctx.warning(s"symbol ${sym.fullName} name doesn't correspond to AST: ${t}")
if (sym.flags != t.mods.flags) ctx.warning(s"symbol ${sym.fullName} flags ${sym.flags} doesn't match AST definition flags ${t.mods.flags}")
// todo: compare trees inside annotations
case _ =>
}
}
nowDefinedSyms += tree.symbol
//ctx.println(i"defined: ${tree.symbol}")
val res = op
nowDefinedSyms -= tree.symbol
//ctx.println(i"undefined: ${tree.symbol}")
res
case _ => op
}
def withDefinedSyms[T](trees: List[untpd.Tree])(op: => T)(implicit ctx: Context) =
trees.foldRightBN(op)(withDefinedSym(_)(_))
def withDefinedSymss[T](vparamss: List[List[untpd.ValDef]])(op: => T)(implicit ctx: Context): T =
vparamss.foldRightBN(op)(withDefinedSyms(_)(_))
def assertDefined(tree: untpd.Tree)(implicit ctx: Context) =
if (tree.symbol.maybeOwner.isTerm)
assert(nowDefinedSyms contains tree.symbol, i"undefined symbol ${tree.symbol}")
override def typedUnadapted(tree: untpd.Tree, pt: Type)(implicit ctx: Context): tpd.Tree = {
val res = tree match {
case _: untpd.UnApply =>
// can't recheck patterns
tree.asInstanceOf[tpd.Tree]
case _: untpd.TypedSplice | _: untpd.Thicket | _: EmptyValDef[_] =>
super.typedUnadapted(tree)
case _ if tree.isType =>
promote(tree)
case _ =>
val tree1 = super.typedUnadapted(tree, pt)
def isSubType(tp1: Type, tp2: Type) =
(tp1 eq tp2) || // accept NoType / NoType
(tp1 <:< tp2)
def divergenceMsg(tp1: Type, tp2: Type) =
s"""Types differ
|Original type : ${tree.typeOpt.show}
|After checking: ${tree1.tpe.show}
|Original tree : ${tree.show}
|After checking: ${tree1.show}
|Why different :
""".stripMargin + core.TypeComparer.explained((tp1 <:< tp2)(_))
if (tree.hasType) // it might not be typed because Typer sometimes constructs new untyped trees and resubmits them to typedUnadapted
assert(isSubType(tree1.tpe, tree.typeOpt), divergenceMsg(tree1.tpe, tree.typeOpt))
tree1
}
checkNoOrphans(res.tpe)
phasesToCheck.foreach(_.checkPostCondition(res))
res
}
/** Check that PolyParams and MethodParams refer to an enclosing type */
def checkNoOrphans(tp: Type)(implicit ctx: Context) = new TypeMap() {
val definedBinders = mutable.Set[Type]()
def apply(tp: Type): Type = {
tp match {
case tp: BindingType =>
definedBinders += tp
mapOver(tp)
definedBinders -= tp
case tp: ParamType =>
assert(definedBinders.contains(tp.binder), s"orphan param: $tp")
case tp: TypeVar =>
apply(tp.underlying)
case _ =>
mapOver(tp)
}
tp
}
}.apply(tp)
override def typedIdent(tree: untpd.Ident, pt: Type)(implicit ctx: Context): Tree = {
assert(tree.isTerm || !ctx.isAfterTyper, tree.show + " at " + ctx.phase)
assert(tree.isType || !needsSelect(tree.tpe), i"bad type ${tree.tpe} for $tree # ${tree.uniqueId}")
assertDefined(tree)
super.typedIdent(tree, pt)
}
override def typedSelect(tree: untpd.Select, pt: Type)(implicit ctx: Context): Tree = {
assert(tree.isTerm || !ctx.isAfterTyper, tree.show + " at " + ctx.phase)
super.typedSelect(tree, pt)
}
override def typedThis(tree: untpd.This)(implicit ctx: Context) = {
val res = super.typedThis(tree)
val cls = res.symbol
assert(cls.isStaticOwner || ctx.owner.isContainedIn(cls), i"error while typing $tree, ${ctx.owner} is not contained in $cls")
res
}
private def checkOwner(tree: untpd.Tree)(implicit ctx: Context): Unit = {
def ownerMatches(symOwner: Symbol, ctxOwner: Symbol): Boolean =
symOwner == ctxOwner ||
ctxOwner.isWeakOwner && ownerMatches(symOwner, ctxOwner.owner) ||
ctx.phase.labelsReordered && symOwner.isWeakOwner && ownerMatches(symOwner.owner, ctxOwner)
assert(ownerMatches(tree.symbol.owner, ctx.owner),
i"bad owner; ${tree.symbol} has owner ${tree.symbol.owner}, expected was ${ctx.owner}\n" +
i"owner chain = ${tree.symbol.ownersIterator.toList}%, %, ctxOwners = ${ctx.outersIterator.map(_.owner).toList}%, %")
}
override def typedClassDef(cdef: untpd.TypeDef, cls: ClassSymbol)(implicit ctx: Context) = {
val TypeDef(_, impl @ Template(constr, _, _, _)) = cdef
assert(cdef.symbol == cls)
assert(impl.symbol.owner == cls)
assert(constr.symbol.owner == cls)
assert(cls.primaryConstructor == constr.symbol, i"mismatch, primary constructor ${cls.primaryConstructor}, in tree = ${constr.symbol}")
checkOwner(impl)
checkOwner(impl.constr)
def isNonMagicalMethod(x: Symbol) =
x.is(Method) &&
!x.isCompanionMethod &&
!x.isValueClassConvertMethod &&
x != defn.newRefArrayMethod
val symbolsNotDefined = cls.classInfo.decls.toSet.filter(isNonMagicalMethod) -- impl.body.map(_.symbol) - constr.symbol
assert(symbolsNotDefined.isEmpty, i" $cls tree does not define methods: $symbolsNotDefined")
super.typedClassDef(cdef, cls)
}
override def typedDefDef(ddef: untpd.DefDef, sym: Symbol)(implicit ctx: Context) =
withDefinedSyms(ddef.tparams) {
withDefinedSymss(ddef.vparamss) {
if (!sym.isClassConstructor) assert(isValidJVMMethodName(sym.name), s"${sym.fullName} name is invalid on jvm")
super.typedDefDef(ddef, sym)
}
}
override def typedCase(tree: untpd.CaseDef, pt: Type, selType: Type, gadtSyms: Set[Symbol])(implicit ctx: Context): CaseDef = {
withDefinedSyms(tree.pat.asInstanceOf[tpd.Tree].filterSubTrees(_.isInstanceOf[ast.Trees.Bind[_]])) {
super.typedCase(tree, pt, selType, gadtSyms)
}
}
override def typedBlock(tree: untpd.Block, pt: Type)(implicit ctx: Context) =
withDefinedSyms(tree.stats) { super.typedBlock(tree, pt) }
/** Check that all defined symbols have legal owners.
* An owner is legal if it is either the same as the context's owner
* or there's an owner chain of valdefs starting at the context's owner and
* reaching up to the symbol's owner. The reason for this relaxed matching
* is that we should be able to pull out an expression as an initializer
* of a helper value without having to do a change owner traversal of the expression.
*/
override def typedStats(trees: List[untpd.Tree], exprOwner: Symbol)(implicit ctx: Context): List[Tree] = {
for (tree <- trees) tree match {
case tree: untpd.DefTree => checkOwner(tree)
case _: untpd.Thicket => assert(false, i"unexpanded thicket $tree in statement sequence $trees%\n%")
case _ =>
}
super.typedStats(trees, exprOwner)
}
override def ensureNoLocalRefs(tree: Tree, pt: Type, localSyms: => List[Symbol], forcedDefined: Boolean = false)(implicit ctx: Context): Tree =
tree
override def adapt(tree: Tree, pt: Type, original: untpd.Tree = untpd.EmptyTree)(implicit ctx: Context) = {
def isPrimaryConstructorReturn =
ctx.owner.isPrimaryConstructor && pt.isRef(ctx.owner.owner) && tree.tpe.isRef(defn.UnitClass)
if (ctx.mode.isExpr &&
!tree.isEmpty &&
!isPrimaryConstructorReturn &&
!pt.isInstanceOf[FunProto])
assert(tree.tpe <:< pt,
s"error at ${sourcePos(tree.pos)}\n" +
err.typeMismatchStr(tree.tpe, pt) + "\ntree = " + tree)
tree
}
}
}
| folone/dotty | src/dotty/tools/dotc/transform/TreeChecker.scala | Scala | bsd-3-clause | 13,336 | [
30522,
7427,
11089,
3723,
1012,
5906,
1012,
11089,
2278,
7427,
10938,
12324,
3392,
6494,
3619,
22694,
1012,
1035,
12324,
4563,
1012,
3415,
1012,
2171,
12324,
4563,
1012,
7939,
14517,
5521,
22747,
2953,
16862,
1012,
1035,
12324,
4563,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright 1&1 Internet AG, https://github.com/1and1/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.oneandone.sushi.metadata;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/** An item in a complex type. TODO: rename to field? */
public abstract class Item<T> {
protected static Method lookup(Class type, String name) {
Method[] methods;
int i;
Method found;
Method tmp;
methods = type.getMethods();
found = null;
for (i = 0; i < methods.length; i++) {
tmp = methods[i];
if (tmp.getName().equalsIgnoreCase(name)) {
if (found != null) {
throw new IllegalArgumentException("ambiguous: " + name);
}
found = tmp;
}
}
if (found == null) {
throw new IllegalArgumentException("not found: " + name);
}
return found;
}
protected static void checkSetter(Class type, Method setter) {
if (setter.getParameterTypes().length != 1) {
fail(setter);
}
if (!setter.getParameterTypes()[0].equals(type)) {
fail(setter);
}
if (!setter.getReturnType().equals(Void.TYPE)) {
fail(setter);
}
check(setter);
}
protected static void checkGetter(Class type, Method getter) {
if (getter.getParameterTypes().length != 0) {
fail(getter);
}
if (!getter.getReturnType().equals(type)) {
fail(getter);
}
check(getter);
}
protected static void check(Method method) {
int modifier;
modifier = method.getModifiers();
if (Modifier.isAbstract(modifier)) {
fail(method);
}
if (Modifier.isStatic(modifier)) {
fail(method);
}
if (!Modifier.isPublic(modifier)) {
fail(method);
}
}
protected static void fail(Method method) {
throw new IllegalArgumentException(method.toString());
}
/* throws ItemException */
protected static Object invoke(Method method, Object dest, Object ... args) {
try {
return method.invoke(dest, args);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
throw new ItemException("cannot invoke " + method.getName(), e.getTargetException());
}
}
//--
/** name in singular. E.g. "package", not "packages" */
private final String name;
private final Cardinality cardinality;
private final Type type;
public Item(String name, Cardinality cardinality, Type type) {
this.name = name;
this.cardinality = cardinality;
this.type = type;
}
public String getName() {
return name;
}
public String getXmlName() {
return xmlName(name);
}
public Cardinality getCardinality() {
return cardinality;
}
public Type getType() {
return type;
}
public abstract Collection<T> get(Object src);
public abstract void set(Object dest, Collection<T> values);
public Collection<Instance<T>> getInstances(Object src) {
Collection<T> objects;
ArrayList<Instance<T>> result;
objects = get(src);
result = new ArrayList<>(objects.size());
for (Object obj : objects) {
result.add(new Instance<>(type, (T) obj));
}
return result;
}
public T getOne(Object src) {
Collection<T> all;
all = get(src);
if (all.size() != 1) {
throw new IllegalStateException(all.toString());
}
return all.iterator().next();
}
public void setOne(Object dest, T value) {
List<T> lst;
lst = new ArrayList<T>();
lst.add(value);
set(dest, lst);
}
//--
public static String xmlName(String name) {
StringBuilder builder;
char c;
builder = new StringBuilder();
for (int i = 0, max = name.length(); i < max; i++) {
c = name.charAt(i);
if (i > 0 && Character.isUpperCase(c)) {
builder.append('-');
builder.append(Character.toLowerCase(c));
} else {
builder.append(c);
}
}
return builder.toString();
}
}
| mlhartme/metadata | src/main/java/net/oneandone/sushi/metadata/Item.java | Java | apache-2.0 | 5,220 | [
30522,
1013,
1008,
1008,
9385,
1015,
1004,
1015,
4274,
12943,
1010,
16770,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
20720,
4859,
2487,
1013,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
* Interaction for the tags module
*
* @author Tijs Verkoyen <tijs@sumocoders.be>
*/
jsBackend.tags =
{
// init, something like a constructor
init: function()
{
$dataGridTag = $('.jsDataGrid td.tag');
if($dataGridTag.length > 0) $dataGridTag.inlineTextEdit({ params: { fork: { action: 'edit' } }, tooltip: jsBackend.locale.msg('ClickToEdit') });
}
};
$(jsBackend.tags.init);
| jlglorences/jorge_prueba | src/Backend/Modules/Tags/Js/Tags.js | JavaScript | mit | 392 | [
30522,
1013,
1008,
1008,
1008,
8290,
2005,
1996,
22073,
11336,
1008,
1008,
1030,
3166,
14841,
22578,
2310,
8024,
6977,
2368,
1026,
14841,
22578,
1030,
28193,
16044,
2869,
1012,
2022,
1028,
1008,
1013,
1046,
19022,
8684,
10497,
1012,
22073,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (c) 2000-2006 LSI Logic Corporation.
*
*
* Name: mpi_ioc.h
* Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
* Creation Date: August 11, 2000
*
* mpi_ioc.h Version: 01.05.12
*
* Version History
* ---------------
*
* Date Version Description
* -------- -------- ------------------------------------------------------
* 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
* 05-24-00 00.10.02 Added _MSG_IOC_INIT_REPLY structure.
* 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY.
* 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure.
* Added _MSG_EVENT_ACK_REPLY structure.
* Added _MSG_FW_DOWNLOAD_REPLY structure.
* Added _MSG_TOOLBOX_REPLY structure.
* 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure.
* 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI,
* _LINK_STATUS, _LOOP_STATE and _LOGOUT.
* 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in
* _MSG_EVENT_ACK_REPLY structure to match specification.
* 11-02-00 01.01.01 Original release for post 1.0 work.
* Added a value for Manufacturer to WhoInit.
* 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and
* removed toolbox message.
* 01-09-01 01.01.03 Added event enabled and disabled defines.
* Added structures for FwHeader and DataHeader.
* Added ImageType to FwUpload reply.
* 02-20-01 01.01.04 Started using MPI_POINTER.
* 02-27-01 01.01.05 Added event for RAID status change and its event data.
* Added IocNumber field to MSG_IOC_FACTS_REPLY.
* 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER.
* Added structure offset comments.
* 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE.
* 08-08-01 01.02.01 Original release for v1.2 work.
* New format for FWVersion and ProductId in
* MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
* 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and
* related structure and defines.
* Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
* Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
* Replaced a reserved field in MSG_IOC_FACTS_REPLY with
* IOCExceptions and changed DataImageSize to reserved.
* Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and
* MPI_FW_UPLOAD_ITYPE_NVDATA.
* 09-28-01 01.02.03 Modified Event Data for Integrated RAID.
* 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field.
* 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY.
* 05-31-02 01.02.06 Added define for
* MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID.
* Added AliasIndex to EVENT_DATA_LOGOUT structure.
* 04-01-03 01.02.07 Added defines for MPI_FW_HEADER_SIGNATURE_.
* 06-26-03 01.02.08 Added new values to the product family defines.
* 04-29-04 01.02.09 Added IOCCapabilities field to MSG_IOC_FACTS_REPLY and
* added related defines.
* 05-11-04 01.03.01 Original release for MPI v1.3.
* 08-19-04 01.05.01 Added four new fields to MSG_IOC_INIT.
* Added three new fields to MSG_IOC_FACTS_REPLY.
* Defined four new bits for the IOCCapabilities field of
* the IOCFacts reply.
* Added two new PortTypes for the PortFacts reply.
* Added six new events along with their EventData
* structures.
* Added a new MsgFlag to the FwDownload request to
* indicate last segment.
* Defined a new image type of boot loader.
* Added FW family codes for SAS product families.
* 10-05-04 01.05.02 Added ReplyFifoHostSignalingAddr field to
* MSG_IOC_FACTS_REPLY.
* 12-07-04 01.05.03 Added more defines for SAS Discovery Error event.
* 12-09-04 01.05.04 Added Unsupported device to SAS Device event.
* 01-15-05 01.05.05 Added event data for SAS SES Event.
* 02-09-05 01.05.06 Added MPI_FW_UPLOAD_ITYPE_FW_BACKUP define.
* 02-22-05 01.05.07 Added Host Page Buffer Persistent flag to IOC Facts
* Reply and IOC Init Request.
* 03-11-05 01.05.08 Added family code for 1068E family.
* Removed IOCFacts Reply EEDP Capability bit.
* 06-24-05 01.05.09 Added 5 new IOCFacts Reply IOCCapabilities bits.
* Added Max SATA Targets to SAS Discovery Error event.
* 08-30-05 01.05.10 Added 4 new events and their event data structures.
* Added new ReasonCode value for SAS Device Status Change
* event.
* Added new family code for FC949E.
* 03-27-06 01.05.11 Added MPI_IOCFACTS_CAPABILITY_TLR.
* Added additional Reason Codes and more event data fields
* to EVENT_DATA_SAS_DEVICE_STATUS_CHANGE.
* Added EVENT_DATA_SAS_BROADCAST_PRIMITIVE structure and
* new event.
* Added MPI_EVENT_SAS_SMP_ERROR and event data structure.
* Added MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE and event
* data structure.
* Added MPI_EVENT_SAS_INIT_TABLE_OVERFLOW and event
* data structure.
* Added MPI_EXT_IMAGE_TYPE_INITIALIZATION.
* 10-11-06 01.05.12 Added MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED.
* Added MaxInitiators field to PortFacts reply.
* Added SAS Device Status Change ReasonCode for
* asynchronous notificaiton.
* Added MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE and event
* data structure.
* Added new ImageType values for FWDownload and FWUpload
* requests.
* --------------------------------------------------------------------------
*/
#ifndef MPI_IOC_H
#define MPI_IOC_H
/*****************************************************************************
*
* I O C M e s s a g e s
*
*****************************************************************************/
/****************************************************************************/
/* IOCInit message */
/****************************************************************************/
typedef struct _MSG_IOC_INIT
{
U8 WhoInit; /* 00h */
U8 Reserved; /* 01h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 Flags; /* 04h */
U8 MaxDevices; /* 05h */
U8 MaxBuses; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 ReplyFrameSize; /* 0Ch */
U8 Reserved1[2]; /* 0Eh */
U32 HostMfaHighAddr; /* 10h */
U32 SenseBufferHighAddr; /* 14h */
U32 ReplyFifoHostSignalingAddr; /* 18h */
SGE_SIMPLE_UNION HostPageBufferSGE; /* 1Ch */
U16 MsgVersion; /* 28h */
U16 HeaderVersion; /* 2Ah */
} MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT,
IOCInit_t, MPI_POINTER pIOCInit_t;
/* WhoInit values */
#define MPI_WHOINIT_NO_ONE (0x00)
#define MPI_WHOINIT_SYSTEM_BIOS (0x01)
#define MPI_WHOINIT_ROM_BIOS (0x02)
#define MPI_WHOINIT_PCI_PEER (0x03)
#define MPI_WHOINIT_HOST_DRIVER (0x04)
#define MPI_WHOINIT_MANUFACTURER (0x05)
/* Flags values */
#define MPI_IOCINIT_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04)
#define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02)
#define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01)
/* MsgVersion */
#define MPI_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00)
#define MPI_IOCINIT_MSGVERSION_MAJOR_SHIFT (8)
#define MPI_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF)
#define MPI_IOCINIT_MSGVERSION_MINOR_SHIFT (0)
/* HeaderVersion */
#define MPI_IOCINIT_HEADERVERSION_UNIT_MASK (0xFF00)
#define MPI_IOCINIT_HEADERVERSION_UNIT_SHIFT (8)
#define MPI_IOCINIT_HEADERVERSION_DEV_MASK (0x00FF)
#define MPI_IOCINIT_HEADERVERSION_DEV_SHIFT (0)
typedef struct _MSG_IOC_INIT_REPLY
{
U8 WhoInit; /* 00h */
U8 Reserved; /* 01h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 Flags; /* 04h */
U8 MaxDevices; /* 05h */
U8 MaxBuses; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 Reserved2; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
} MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY,
IOCInitReply_t, MPI_POINTER pIOCInitReply_t;
/****************************************************************************/
/* IOC Facts message */
/****************************************************************************/
typedef struct _MSG_IOC_FACTS
{
U8 Reserved[2]; /* 00h */
U8 ChainOffset; /* 01h */
U8 Function; /* 02h */
U8 Reserved1[3]; /* 03h */
U8 MsgFlags; /* 04h */
U32 MsgContext; /* 08h */
} MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS,
IOCFacts_t, MPI_POINTER pIOCFacts_t;
typedef struct _MPI_FW_VERSION_STRUCT
{
U8 Dev; /* 00h */
U8 Unit; /* 01h */
U8 Minor; /* 02h */
U8 Major; /* 03h */
} MPI_FW_VERSION_STRUCT;
typedef union _MPI_FW_VERSION
{
MPI_FW_VERSION_STRUCT Struct;
U32 Word;
} MPI_FW_VERSION;
/* IOC Facts Reply */
typedef struct _MSG_IOC_FACTS_REPLY
{
U16 MsgVersion; /* 00h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U16 HeaderVersion; /* 04h */
U8 IOCNumber; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 IOCExceptions; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
U8 MaxChainDepth; /* 14h */
U8 WhoInit; /* 15h */
U8 BlockSize; /* 16h */
U8 Flags; /* 17h */
U16 ReplyQueueDepth; /* 18h */
U16 RequestFrameSize; /* 1Ah */
U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */
U16 ProductID; /* 1Eh */
U32 CurrentHostMfaHighAddr; /* 20h */
U16 GlobalCredits; /* 24h */
U8 NumberOfPorts; /* 26h */
U8 EventState; /* 27h */
U32 CurrentSenseBufferHighAddr; /* 28h */
U16 CurReplyFrameSize; /* 2Ch */
U8 MaxDevices; /* 2Eh */
U8 MaxBuses; /* 2Fh */
U32 FWImageSize; /* 30h */
U32 IOCCapabilities; /* 34h */
MPI_FW_VERSION FWVersion; /* 38h */
U16 HighPriorityQueueDepth; /* 3Ch */
U16 Reserved2; /* 3Eh */
SGE_SIMPLE_UNION HostPageBufferSGE; /* 40h */
U32 ReplyFifoHostSignalingAddr; /* 4Ch */
} MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY,
IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t;
#define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
#define MPI_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8)
#define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
#define MPI_IOCFACTS_MSGVERSION_MINOR_SHIFT (0)
#define MPI_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00)
#define MPI_IOCFACTS_HDRVERSION_UNIT_SHIFT (8)
#define MPI_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF)
#define MPI_IOCFACTS_HDRVERSION_DEV_SHIFT (0)
#define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
#define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
#define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004)
#define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL (0x0008)
#define MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED (0x0010)
#define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01)
#define MPI_IOCFACTS_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02)
#define MPI_IOCFACTS_FLAGS_HOST_PAGE_BUFFER_PERSISTENT (0x04)
#define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00)
#define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01)
#define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q (0x00000001)
#define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL (0x00000002)
#define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING (0x00000004)
#define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008)
#define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010)
#define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020)
#define MPI_IOCFACTS_CAPABILITY_EEDP (0x00000040)
#define MPI_IOCFACTS_CAPABILITY_BIDIRECTIONAL (0x00000080)
#define MPI_IOCFACTS_CAPABILITY_MULTICAST (0x00000100)
#define MPI_IOCFACTS_CAPABILITY_SCSIIO32 (0x00000200)
#define MPI_IOCFACTS_CAPABILITY_NO_SCSIIO16 (0x00000400)
#define MPI_IOCFACTS_CAPABILITY_TLR (0x00000800)
/*****************************************************************************
*
* P o r t M e s s a g e s
*
*****************************************************************************/
/****************************************************************************/
/* Port Facts message and Reply */
/****************************************************************************/
typedef struct _MSG_PORT_FACTS
{
U8 Reserved[2]; /* 00h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[2]; /* 04h */
U8 PortNumber; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
} MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS,
PortFacts_t, MPI_POINTER pPortFacts_t;
typedef struct _MSG_PORT_FACTS_REPLY
{
U16 Reserved; /* 00h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U16 Reserved1; /* 04h */
U8 PortNumber; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 Reserved2; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
U8 Reserved3; /* 14h */
U8 PortType; /* 15h */
U16 MaxDevices; /* 16h */
U16 PortSCSIID; /* 18h */
U16 ProtocolFlags; /* 1Ah */
U16 MaxPostedCmdBuffers; /* 1Ch */
U16 MaxPersistentIDs; /* 1Eh */
U16 MaxLanBuckets; /* 20h */
U8 MaxInitiators; /* 22h */
U8 Reserved4; /* 23h */
U32 Reserved5; /* 24h */
} MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY,
PortFactsReply_t, MPI_POINTER pPortFactsReply_t;
/* PortTypes values */
#define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00)
#define MPI_PORTFACTS_PORTTYPE_SCSI (0x01)
#define MPI_PORTFACTS_PORTTYPE_FC (0x10)
#define MPI_PORTFACTS_PORTTYPE_ISCSI (0x20)
#define MPI_PORTFACTS_PORTTYPE_SAS (0x30)
/* ProtocolFlags values */
#define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01)
#define MPI_PORTFACTS_PROTOCOL_LAN (0x02)
#define MPI_PORTFACTS_PROTOCOL_TARGET (0x04)
#define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08)
/****************************************************************************/
/* Port Enable Message */
/****************************************************************************/
typedef struct _MSG_PORT_ENABLE
{
U8 Reserved[2]; /* 00h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[2]; /* 04h */
U8 PortNumber; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
} MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE,
PortEnable_t, MPI_POINTER pPortEnable_t;
typedef struct _MSG_PORT_ENABLE_REPLY
{
U8 Reserved[2]; /* 00h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[2]; /* 04h */
U8 PortNumber; /* 05h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 Reserved2; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
} MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY,
PortEnableReply_t, MPI_POINTER pPortEnableReply_t;
/*****************************************************************************
*
* E v e n t M e s s a g e s
*
*****************************************************************************/
/****************************************************************************/
/* Event Notification messages */
/****************************************************************************/
typedef struct _MSG_EVENT_NOTIFY
{
U8 Switch; /* 00h */
U8 Reserved; /* 01h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[3]; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
} MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY,
EventNotification_t, MPI_POINTER pEventNotification_t;
/* Event Notification Reply */
typedef struct _MSG_EVENT_NOTIFY_REPLY
{
U16 EventDataLength; /* 00h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[2]; /* 04h */
U8 AckRequired; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U8 Reserved2[2]; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
U32 Event; /* 14h */
U32 EventContext; /* 18h */
U32 Data[1]; /* 1Ch */
} MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY,
EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t;
/* Event Acknowledge */
typedef struct _MSG_EVENT_ACK
{
U8 Reserved[2]; /* 00h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[3]; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U32 Event; /* 0Ch */
U32 EventContext; /* 10h */
} MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK,
EventAck_t, MPI_POINTER pEventAck_t;
typedef struct _MSG_EVENT_ACK_REPLY
{
U8 Reserved[2]; /* 00h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[3]; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 Reserved2; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
} MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY,
EventAckReply_t, MPI_POINTER pEventAckReply_t;
/* Switch */
#define MPI_EVENT_NOTIFICATION_SWITCH_OFF (0x00)
#define MPI_EVENT_NOTIFICATION_SWITCH_ON (0x01)
/* Event */
#define MPI_EVENT_NONE (0x00000000)
#define MPI_EVENT_LOG_DATA (0x00000001)
#define MPI_EVENT_STATE_CHANGE (0x00000002)
#define MPI_EVENT_UNIT_ATTENTION (0x00000003)
#define MPI_EVENT_IOC_BUS_RESET (0x00000004)
#define MPI_EVENT_EXT_BUS_RESET (0x00000005)
#define MPI_EVENT_RESCAN (0x00000006)
#define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007)
#define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008)
#define MPI_EVENT_LOGOUT (0x00000009)
#define MPI_EVENT_EVENT_CHANGE (0x0000000A)
#define MPI_EVENT_INTEGRATED_RAID (0x0000000B)
#define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C)
#define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D)
#define MPI_EVENT_QUEUE_FULL (0x0000000E)
#define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE (0x0000000F)
#define MPI_EVENT_SAS_SES (0x00000010)
#define MPI_EVENT_PERSISTENT_TABLE_FULL (0x00000011)
#define MPI_EVENT_SAS_PHY_LINK_STATUS (0x00000012)
#define MPI_EVENT_SAS_DISCOVERY_ERROR (0x00000013)
#define MPI_EVENT_IR_RESYNC_UPDATE (0x00000014)
#define MPI_EVENT_IR2 (0x00000015)
#define MPI_EVENT_SAS_DISCOVERY (0x00000016)
#define MPI_EVENT_SAS_BROADCAST_PRIMITIVE (0x00000017)
#define MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x00000018)
#define MPI_EVENT_SAS_INIT_TABLE_OVERFLOW (0x00000019)
#define MPI_EVENT_SAS_SMP_ERROR (0x0000001A)
#define MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE (0x0000001B)
#define MPI_EVENT_LOG_ENTRY_ADDED (0x00000021)
/* AckRequired field values */
#define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
#define MPI_EVENT_NOTIFICATION_ACK_REQUIRED (0x01)
/* EventChange Event data */
typedef struct _EVENT_DATA_EVENT_CHANGE
{
U8 EventState; /* 00h */
U8 Reserved; /* 01h */
U16 Reserved1; /* 02h */
} EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE,
EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t;
/* LogEntryAdded Event data */
/* this structure matches MPI_LOG_0_ENTRY in mpi_cnfg.h */
#define MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH (0x1C)
typedef struct _EVENT_DATA_LOG_ENTRY
{
U32 TimeStamp; /* 00h */
U32 Reserved1; /* 04h */
U16 LogSequence; /* 08h */
U16 LogEntryQualifier; /* 0Ah */
U8 LogData[MPI_EVENT_DATA_LOG_ENTRY_DATA_LENGTH]; /* 0Ch */
} EVENT_DATA_LOG_ENTRY, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY,
MpiEventDataLogEntry_t, MPI_POINTER pMpiEventDataLogEntry_t;
typedef struct _EVENT_DATA_LOG_ENTRY_ADDED
{
U16 LogSequence; /* 00h */
U16 Reserved1; /* 02h */
U32 Reserved2; /* 04h */
EVENT_DATA_LOG_ENTRY LogEntry; /* 08h */
} EVENT_DATA_LOG_ENTRY_ADDED, MPI_POINTER PTR_EVENT_DATA_LOG_ENTRY_ADDED,
MpiEventDataLogEntryAdded_t, MPI_POINTER pMpiEventDataLogEntryAdded_t;
/* SCSI Event data for Port, Bus and Device forms */
typedef struct _EVENT_DATA_SCSI
{
U8 TargetID; /* 00h */
U8 BusPort; /* 01h */
U16 Reserved; /* 02h */
} EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI,
EventDataScsi_t, MPI_POINTER pEventDataScsi_t;
/* SCSI Device Status Change Event data */
typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE
{
U8 TargetID; /* 00h */
U8 Bus; /* 01h */
U8 ReasonCode; /* 02h */
U8 LUN; /* 03h */
U8 ASC; /* 04h */
U8 ASCQ; /* 05h */
U16 Reserved; /* 06h */
} EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
MpiEventDataScsiDeviceStatusChange_t,
MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t;
/* MPI SCSI Device Status Change Event data ReasonCode values */
#define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED (0x03)
#define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING (0x04)
#define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA (0x05)
/* SAS Device Status Change Event data */
typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
{
U8 TargetID; /* 00h */
U8 Bus; /* 01h */
U8 ReasonCode; /* 02h */
U8 Reserved; /* 03h */
U8 ASC; /* 04h */
U8 ASCQ; /* 05h */
U16 DevHandle; /* 06h */
U32 DeviceInfo; /* 08h */
U16 ParentDevHandle; /* 0Ch */
U8 PhyNum; /* 0Eh */
U8 Reserved1; /* 0Fh */
U64 SASAddress; /* 10h */
U8 LUN[8]; /* 18h */
U16 TaskTag; /* 20h */
U16 Reserved2; /* 22h */
} EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
MpiEventDataSasDeviceStatusChange_t,
MPI_POINTER pMpiEventDataSasDeviceStatusChange_t;
/* MPI SAS Device Status Change Event data ReasonCode values */
#define MPI_EVENT_SAS_DEV_STAT_RC_ADDED (0x03)
#define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING (0x04)
#define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05)
#define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED (0x06)
#define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07)
#define MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08)
#define MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL (0x09)
#define MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL (0x0A)
#define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)
#define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)
#define MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D)
/* SCSI Event data for Queue Full event */
typedef struct _EVENT_DATA_QUEUE_FULL
{
U8 TargetID; /* 00h */
U8 Bus; /* 01h */
U16 CurrentDepth; /* 02h */
} EVENT_DATA_QUEUE_FULL, MPI_POINTER PTR_EVENT_DATA_QUEUE_FULL,
EventDataQueueFull_t, MPI_POINTER pEventDataQueueFull_t;
/* MPI Integrated RAID Event data */
typedef struct _EVENT_DATA_RAID
{
U8 VolumeID; /* 00h */
U8 VolumeBus; /* 01h */
U8 ReasonCode; /* 02h */
U8 PhysDiskNum; /* 03h */
U8 ASC; /* 04h */
U8 ASCQ; /* 05h */
U16 Reserved; /* 06h */
U32 SettingsStatus; /* 08h */
} EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID,
MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t;
/* MPI Integrated RAID Event data ReasonCode values */
#define MPI_EVENT_RAID_RC_VOLUME_CREATED (0x00)
#define MPI_EVENT_RAID_RC_VOLUME_DELETED (0x01)
#define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED (0x02)
#define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED (0x03)
#define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED (0x04)
#define MPI_EVENT_RAID_RC_PHYSDISK_CREATED (0x05)
#define MPI_EVENT_RAID_RC_PHYSDISK_DELETED (0x06)
#define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED (0x07)
#define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED (0x08)
#define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED (0x09)
#define MPI_EVENT_RAID_RC_SMART_DATA (0x0A)
#define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED (0x0B)
/* MPI Integrated RAID Resync Update Event data */
typedef struct _MPI_EVENT_DATA_IR_RESYNC_UPDATE
{
U8 VolumeID; /* 00h */
U8 VolumeBus; /* 01h */
U8 ResyncComplete; /* 02h */
U8 Reserved1; /* 03h */
U32 Reserved2; /* 04h */
} MPI_EVENT_DATA_IR_RESYNC_UPDATE,
MPI_POINTER PTR_MPI_EVENT_DATA_IR_RESYNC_UPDATE,
MpiEventDataIrResyncUpdate_t, MPI_POINTER pMpiEventDataIrResyncUpdate_t;
/* MPI IR2 Event data */
/* MPI_LD_STATE or MPI_PD_STATE */
typedef struct _IR2_STATE_CHANGED
{
U16 PreviousState; /* 00h */
U16 NewState; /* 02h */
} IR2_STATE_CHANGED, MPI_POINTER PTR_IR2_STATE_CHANGED;
typedef struct _IR2_PD_INFO
{
U16 DeviceHandle; /* 00h */
U8 TruncEnclosureHandle; /* 02h */
U8 TruncatedSlot; /* 03h */
} IR2_PD_INFO, MPI_POINTER PTR_IR2_PD_INFO;
typedef union _MPI_IR2_RC_EVENT_DATA
{
IR2_STATE_CHANGED StateChanged;
U32 Lba;
IR2_PD_INFO PdInfo;
} MPI_IR2_RC_EVENT_DATA, MPI_POINTER PTR_MPI_IR2_RC_EVENT_DATA;
typedef struct _MPI_EVENT_DATA_IR2
{
U8 TargetID; /* 00h */
U8 Bus; /* 01h */
U8 ReasonCode; /* 02h */
U8 PhysDiskNum; /* 03h */
MPI_IR2_RC_EVENT_DATA IR2EventData; /* 04h */
} MPI_EVENT_DATA_IR2, MPI_POINTER PTR_MPI_EVENT_DATA_IR2,
MpiEventDataIR2_t, MPI_POINTER pMpiEventDataIR2_t;
/* MPI IR2 Event data ReasonCode values */
#define MPI_EVENT_IR2_RC_LD_STATE_CHANGED (0x01)
#define MPI_EVENT_IR2_RC_PD_STATE_CHANGED (0x02)
#define MPI_EVENT_IR2_RC_BAD_BLOCK_TABLE_FULL (0x03)
#define MPI_EVENT_IR2_RC_PD_INSERTED (0x04)
#define MPI_EVENT_IR2_RC_PD_REMOVED (0x05)
#define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED (0x06)
#define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR (0x07)
/* defines for logical disk states */
#define MPI_LD_STATE_OPTIMAL (0x00)
#define MPI_LD_STATE_DEGRADED (0x01)
#define MPI_LD_STATE_FAILED (0x02)
#define MPI_LD_STATE_MISSING (0x03)
#define MPI_LD_STATE_OFFLINE (0x04)
/* defines for physical disk states */
#define MPI_PD_STATE_ONLINE (0x00)
#define MPI_PD_STATE_MISSING (0x01)
#define MPI_PD_STATE_NOT_COMPATIBLE (0x02)
#define MPI_PD_STATE_FAILED (0x03)
#define MPI_PD_STATE_INITIALIZING (0x04)
#define MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST (0x05)
#define MPI_PD_STATE_FAILED_AT_HOST_REQUEST (0x06)
#define MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON (0xFF)
/* MPI Link Status Change Event data */
typedef struct _EVENT_DATA_LINK_STATUS
{
U8 State; /* 00h */
U8 Reserved; /* 01h */
U16 Reserved1; /* 02h */
U8 Reserved2; /* 04h */
U8 Port; /* 05h */
U16 Reserved3; /* 06h */
} EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS,
EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t;
#define MPI_EVENT_LINK_STATUS_FAILURE (0x00000000)
#define MPI_EVENT_LINK_STATUS_ACTIVE (0x00000001)
/* MPI Loop State Change Event data */
typedef struct _EVENT_DATA_LOOP_STATE
{
U8 Character4; /* 00h */
U8 Character3; /* 01h */
U8 Type; /* 02h */
U8 Reserved; /* 03h */
U8 Reserved1; /* 04h */
U8 Port; /* 05h */
U16 Reserved2; /* 06h */
} EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE,
EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t;
#define MPI_EVENT_LOOP_STATE_CHANGE_LIP (0x0001)
#define MPI_EVENT_LOOP_STATE_CHANGE_LPE (0x0002)
#define MPI_EVENT_LOOP_STATE_CHANGE_LPB (0x0003)
/* MPI LOGOUT Event data */
typedef struct _EVENT_DATA_LOGOUT
{
U32 NPortID; /* 00h */
U8 AliasIndex; /* 04h */
U8 Port; /* 05h */
U16 Reserved1; /* 06h */
} EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT,
EventDataLogout_t, MPI_POINTER pEventDataLogout_t;
#define MPI_EVENT_LOGOUT_ALL_ALIASES (0xFF)
/* SAS SES Event data */
typedef struct _EVENT_DATA_SAS_SES
{
U8 PhyNum; /* 00h */
U8 Port; /* 01h */
U8 PortWidth; /* 02h */
U8 Reserved1; /* 04h */
} EVENT_DATA_SAS_SES, MPI_POINTER PTR_EVENT_DATA_SAS_SES,
MpiEventDataSasSes_t, MPI_POINTER pMpiEventDataSasSes_t;
/* SAS Broadcast Primitive Event data */
typedef struct _EVENT_DATA_SAS_BROADCAST_PRIMITIVE
{
U8 PhyNum; /* 00h */
U8 Port; /* 01h */
U8 PortWidth; /* 02h */
U8 Primitive; /* 04h */
} EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
MPI_POINTER PTR_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
MpiEventDataSasBroadcastPrimitive_t,
MPI_POINTER pMpiEventDataSasBroadcastPrimitive_t;
#define MPI_EVENT_PRIMITIVE_CHANGE (0x01)
#define MPI_EVENT_PRIMITIVE_EXPANDER (0x03)
#define MPI_EVENT_PRIMITIVE_RESERVED2 (0x04)
#define MPI_EVENT_PRIMITIVE_RESERVED3 (0x05)
#define MPI_EVENT_PRIMITIVE_RESERVED4 (0x06)
#define MPI_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07)
#define MPI_EVENT_PRIMITIVE_CHANGE1_RESERVED (0x08)
/* SAS Phy Link Status Event data */
typedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS
{
U8 PhyNum; /* 00h */
U8 LinkRates; /* 01h */
U16 DevHandle; /* 02h */
U64 SASAddress; /* 04h */
} EVENT_DATA_SAS_PHY_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_SAS_PHY_LINK_STATUS,
MpiEventDataSasPhyLinkStatus_t, MPI_POINTER pMpiEventDataSasPhyLinkStatus_t;
/* defines for the LinkRates field of the SAS PHY Link Status event */
#define MPI_EVENT_SAS_PLS_LR_CURRENT_MASK (0xF0)
#define MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT (4)
#define MPI_EVENT_SAS_PLS_LR_PREVIOUS_MASK (0x0F)
#define MPI_EVENT_SAS_PLS_LR_PREVIOUS_SHIFT (0)
#define MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN (0x00)
#define MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED (0x01)
#define MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION (0x02)
#define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE (0x03)
#define MPI_EVENT_SAS_PLS_LR_RATE_1_5 (0x08)
#define MPI_EVENT_SAS_PLS_LR_RATE_3_0 (0x09)
/* SAS Discovery Event data */
typedef struct _EVENT_DATA_SAS_DISCOVERY
{
U32 DiscoveryStatus; /* 00h */
U32 Reserved1; /* 04h */
} EVENT_DATA_SAS_DISCOVERY, MPI_POINTER PTR_EVENT_DATA_SAS_DISCOVERY,
EventDataSasDiscovery_t, MPI_POINTER pEventDataSasDiscovery_t;
#define MPI_EVENT_SAS_DSCVRY_COMPLETE (0x00000000)
#define MPI_EVENT_SAS_DSCVRY_IN_PROGRESS (0x00000001)
#define MPI_EVENT_SAS_DSCVRY_PHY_BITS_MASK (0xFFFF0000)
#define MPI_EVENT_SAS_DSCVRY_PHY_BITS_SHIFT (16)
/* SAS Discovery Errror Event data */
typedef struct _EVENT_DATA_DISCOVERY_ERROR
{
U32 DiscoveryStatus; /* 00h */
U8 Port; /* 04h */
U8 Reserved1; /* 05h */
U16 Reserved2; /* 06h */
} EVENT_DATA_DISCOVERY_ERROR, MPI_POINTER PTR_EVENT_DATA_DISCOVERY_ERROR,
EventDataDiscoveryError_t, MPI_POINTER pEventDataDiscoveryError_t;
#define MPI_EVENT_DSCVRY_ERR_DS_LOOP_DETECTED (0x00000001)
#define MPI_EVENT_DSCVRY_ERR_DS_UNADDRESSABLE_DEVICE (0x00000002)
#define MPI_EVENT_DSCVRY_ERR_DS_MULTIPLE_PORTS (0x00000004)
#define MPI_EVENT_DSCVRY_ERR_DS_EXPANDER_ERR (0x00000008)
#define MPI_EVENT_DSCVRY_ERR_DS_SMP_TIMEOUT (0x00000010)
#define MPI_EVENT_DSCVRY_ERR_DS_OUT_ROUTE_ENTRIES (0x00000020)
#define MPI_EVENT_DSCVRY_ERR_DS_INDEX_NOT_EXIST (0x00000040)
#define MPI_EVENT_DSCVRY_ERR_DS_SMP_FUNCTION_FAILED (0x00000080)
#define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR (0x00000100)
#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE (0x00000200)
#define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE (0x00000400)
#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_PATHS (0x00000800)
#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000)
/* SAS SMP Error Event data */
typedef struct _EVENT_DATA_SAS_SMP_ERROR
{
U8 Status; /* 00h */
U8 Port; /* 01h */
U8 SMPFunctionResult; /* 02h */
U8 Reserved1; /* 03h */
U64 SASAddress; /* 04h */
} EVENT_DATA_SAS_SMP_ERROR, MPI_POINTER PTR_EVENT_DATA_SAS_SMP_ERROR,
MpiEventDataSasSmpError_t, MPI_POINTER pMpiEventDataSasSmpError_t;
/* defines for the Status field of the SAS SMP Error event */
#define MPI_EVENT_SAS_SMP_FUNCTION_RESULT_VALID (0x00)
#define MPI_EVENT_SAS_SMP_CRC_ERROR (0x01)
#define MPI_EVENT_SAS_SMP_TIMEOUT (0x02)
#define MPI_EVENT_SAS_SMP_NO_DESTINATION (0x03)
#define MPI_EVENT_SAS_SMP_BAD_DESTINATION (0x04)
/* SAS Initiator Device Status Change Event data */
typedef struct _EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE
{
U8 ReasonCode; /* 00h */
U8 Port; /* 01h */
U16 DevHandle; /* 02h */
U64 SASAddress; /* 04h */
} EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
MPI_POINTER PTR_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
MpiEventDataSasInitDevStatusChange_t,
MPI_POINTER pMpiEventDataSasInitDevStatusChange_t;
/* defines for the ReasonCode field of the SAS Initiator Device Status Change event */
#define MPI_EVENT_SAS_INIT_RC_ADDED (0x01)
/* SAS Initiator Device Table Overflow Event data */
typedef struct _EVENT_DATA_SAS_INIT_TABLE_OVERFLOW
{
U8 MaxInit; /* 00h */
U8 CurrentInit; /* 01h */
U16 Reserved1; /* 02h */
} EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
MpiEventDataSasInitTableOverflow_t,
MPI_POINTER pMpiEventDataSasInitTableOverflow_t;
/* SAS Expander Status Change Event data */
typedef struct _EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE
{
U8 ReasonCode; /* 00h */
U8 Reserved1; /* 01h */
U16 Reserved2; /* 02h */
U8 PhysicalPort; /* 04h */
U8 Reserved3; /* 05h */
U16 EnclosureHandle; /* 06h */
U64 SASAddress; /* 08h */
U32 DiscoveryStatus; /* 10h */
U16 DevHandle; /* 14h */
U16 ParentDevHandle; /* 16h */
U16 ExpanderChangeCount; /* 18h */
U16 ExpanderRouteIndexes; /* 1Ah */
U8 NumPhys; /* 1Ch */
U8 SASLevel; /* 1Dh */
U8 Flags; /* 1Eh */
U8 Reserved4; /* 1Fh */
} EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE,
MPI_POINTER PTR_EVENT_DATA_SAS_EXPANDER_STATUS_CHANGE,
MpiEventDataSasExpanderStatusChange_t,
MPI_POINTER pMpiEventDataSasExpanderStatusChange_t;
/* values for ReasonCode field of SAS Expander Status Change Event data */
#define MPI_EVENT_SAS_EXP_RC_ADDED (0x00)
#define MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING (0x01)
/* values for DiscoveryStatus field of SAS Expander Status Change Event data */
#define MPI_EVENT_SAS_EXP_DS_LOOP_DETECTED (0x00000001)
#define MPI_EVENT_SAS_EXP_DS_UNADDRESSABLE_DEVICE (0x00000002)
#define MPI_EVENT_SAS_EXP_DS_MULTIPLE_PORTS (0x00000004)
#define MPI_EVENT_SAS_EXP_DS_EXPANDER_ERR (0x00000008)
#define MPI_EVENT_SAS_EXP_DS_SMP_TIMEOUT (0x00000010)
#define MPI_EVENT_SAS_EXP_DS_OUT_ROUTE_ENTRIES (0x00000020)
#define MPI_EVENT_SAS_EXP_DS_INDEX_NOT_EXIST (0x00000040)
#define MPI_EVENT_SAS_EXP_DS_SMP_FUNCTION_FAILED (0x00000080)
#define MPI_EVENT_SAS_EXP_DS_SMP_CRC_ERROR (0x00000100)
#define MPI_EVENT_SAS_EXP_DS_SUBTRACTIVE_LINK (0x00000200)
#define MPI_EVENT_SAS_EXP_DS_TABLE_LINK (0x00000400)
#define MPI_EVENT_SAS_EXP_DS_UNSUPPORTED_DEVICE (0x00000800)
/* values for Flags field of SAS Expander Status Change Event data */
#define MPI_EVENT_SAS_EXP_FLAGS_ROUTE_TABLE_CONFIG (0x02)
#define MPI_EVENT_SAS_EXP_FLAGS_CONFIG_IN_PROGRESS (0x01)
/*****************************************************************************
*
* F i r m w a r e L o a d M e s s a g e s
*
*****************************************************************************/
/****************************************************************************/
/* Firmware Download message and associated structures */
/****************************************************************************/
typedef struct _MSG_FW_DOWNLOAD
{
U8 ImageType; /* 00h */
U8 Reserved; /* 01h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[3]; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
SGE_MPI_UNION SGL; /* 0Ch */
} MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD,
FWDownload_t, MPI_POINTER pFWDownload_t;
#define MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01)
#define MPI_FW_DOWNLOAD_ITYPE_RESERVED (0x00)
#define MPI_FW_DOWNLOAD_ITYPE_FW (0x01)
#define MPI_FW_DOWNLOAD_ITYPE_BIOS (0x02)
#define MPI_FW_DOWNLOAD_ITYPE_NVDATA (0x03)
#define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER (0x04)
#define MPI_FW_DOWNLOAD_ITYPE_MANUFACTURING (0x06)
#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07)
#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08)
#define MPI_FW_DOWNLOAD_ITYPE_MEGARAID (0x09)
typedef struct _FWDownloadTCSGE
{
U8 Reserved; /* 00h */
U8 ContextSize; /* 01h */
U8 DetailsLength; /* 02h */
U8 Flags; /* 03h */
U32 Reserved_0100_Checksum; /* 04h */ /* obsolete Checksum */
U32 ImageOffset; /* 08h */
U32 ImageSize; /* 0Ch */
} FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE,
FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t;
/* Firmware Download reply */
typedef struct _MSG_FW_DOWNLOAD_REPLY
{
U8 ImageType; /* 00h */
U8 Reserved; /* 01h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[3]; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 Reserved2; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
} MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY,
FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t;
/****************************************************************************/
/* Firmware Upload message and associated structures */
/****************************************************************************/
typedef struct _MSG_FW_UPLOAD
{
U8 ImageType; /* 00h */
U8 Reserved; /* 01h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[3]; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
SGE_MPI_UNION SGL; /* 0Ch */
} MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
FWUpload_t, MPI_POINTER pFWUpload_t;
#define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00)
#define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
#define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
#define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03)
#define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04)
#define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
#define MPI_FW_UPLOAD_ITYPE_MANUFACTURING (0x06)
#define MPI_FW_UPLOAD_ITYPE_CONFIG_1 (0x07)
#define MPI_FW_UPLOAD_ITYPE_CONFIG_2 (0x08)
#define MPI_FW_UPLOAD_ITYPE_MEGARAID (0x09)
#define MPI_FW_UPLOAD_ITYPE_COMPLETE (0x0A)
typedef struct _FWUploadTCSGE
{
U8 Reserved; /* 00h */
U8 ContextSize; /* 01h */
U8 DetailsLength; /* 02h */
U8 Flags; /* 03h */
U32 Reserved1; /* 04h */
U32 ImageOffset; /* 08h */
U32 ImageSize; /* 0Ch */
} FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE,
FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t;
/* Firmware Upload reply */
typedef struct _MSG_FW_UPLOAD_REPLY
{
U8 ImageType; /* 00h */
U8 Reserved; /* 01h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 Reserved1[3]; /* 04h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 Reserved2; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
U32 ActualImageSize; /* 14h */
} MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY,
FWUploadReply_t, MPI_POINTER pFWUploadReply_t;
typedef struct _MPI_FW_HEADER
{
U32 ArmBranchInstruction0; /* 00h */
U32 Signature0; /* 04h */
U32 Signature1; /* 08h */
U32 Signature2; /* 0Ch */
U32 ArmBranchInstruction1; /* 10h */
U32 ArmBranchInstruction2; /* 14h */
U32 Reserved; /* 18h */
U32 Checksum; /* 1Ch */
U16 VendorId; /* 20h */
U16 ProductId; /* 22h */
MPI_FW_VERSION FWVersion; /* 24h */
U32 SeqCodeVersion; /* 28h */
U32 ImageSize; /* 2Ch */
U32 NextImageHeaderOffset; /* 30h */
U32 LoadStartAddress; /* 34h */
U32 IopResetVectorValue; /* 38h */
U32 IopResetRegAddr; /* 3Ch */
U32 VersionNameWhat; /* 40h */
U8 VersionName[32]; /* 44h */
U32 VendorNameWhat; /* 64h */
U8 VendorName[32]; /* 68h */
} MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER,
MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t;
#define MPI_FW_HEADER_WHAT_SIGNATURE (0x29232840)
/* defines for using the ProductId field */
#define MPI_FW_HEADER_PID_TYPE_MASK (0xF000)
#define MPI_FW_HEADER_PID_TYPE_SCSI (0x0000)
#define MPI_FW_HEADER_PID_TYPE_FC (0x1000)
#define MPI_FW_HEADER_PID_TYPE_SAS (0x2000)
#define MPI_FW_HEADER_SIGNATURE_0 (0x5AEAA55A)
#define MPI_FW_HEADER_SIGNATURE_1 (0xA55AEAA5)
#define MPI_FW_HEADER_SIGNATURE_2 (0x5AA55AEA)
#define MPI_FW_HEADER_PID_PROD_MASK (0x0F00)
#define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI (0x0100)
#define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200)
#define MPI_FW_HEADER_PID_PROD_TARGET_SCSI (0x0300)
#define MPI_FW_HEADER_PID_PROD_IM_SCSI (0x0400)
#define MPI_FW_HEADER_PID_PROD_IS_SCSI (0x0500)
#define MPI_FW_HEADER_PID_PROD_CTX_SCSI (0x0600)
#define MPI_FW_HEADER_PID_PROD_IR_SCSI (0x0700)
#define MPI_FW_HEADER_PID_FAMILY_MASK (0x00FF)
/* SCSI */
#define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI (0x0001)
#define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI (0x0002)
#define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI (0x0003)
#define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI (0x0004)
#define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI (0x0005)
#define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI (0x0006)
#define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI (0x0007)
#define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI (0x0008)
#define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI (0x0009)
#define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI (0x000A)
#define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI (0x000B)
#define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI (0x000C)
/* Fibre Channel */
#define MPI_FW_HEADER_PID_FAMILY_909_FC (0x0000)
#define MPI_FW_HEADER_PID_FAMILY_919_FC (0x0001) /* 919 and 929 */
#define MPI_FW_HEADER_PID_FAMILY_919X_FC (0x0002) /* 919X and 929X */
#define MPI_FW_HEADER_PID_FAMILY_919XL_FC (0x0003) /* 919XL and 929XL */
#define MPI_FW_HEADER_PID_FAMILY_939X_FC (0x0004) /* 939X and 949X */
#define MPI_FW_HEADER_PID_FAMILY_959_FC (0x0005)
#define MPI_FW_HEADER_PID_FAMILY_949E_FC (0x0006)
/* SAS */
#define MPI_FW_HEADER_PID_FAMILY_1064_SAS (0x0001)
#define MPI_FW_HEADER_PID_FAMILY_1068_SAS (0x0002)
#define MPI_FW_HEADER_PID_FAMILY_1078_SAS (0x0003)
#define MPI_FW_HEADER_PID_FAMILY_106xE_SAS (0x0004) /* 1068E, 1066E, and 1064E */
typedef struct _MPI_EXT_IMAGE_HEADER
{
U8 ImageType; /* 00h */
U8 Reserved; /* 01h */
U16 Reserved1; /* 02h */
U32 Checksum; /* 04h */
U32 ImageSize; /* 08h */
U32 NextImageHeaderOffset; /* 0Ch */
U32 LoadStartAddress; /* 10h */
U32 Reserved2; /* 14h */
} MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER,
MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t;
/* defines for the ImageType field */
#define MPI_EXT_IMAGE_TYPE_UNSPECIFIED (0x00)
#define MPI_EXT_IMAGE_TYPE_FW (0x01)
#define MPI_EXT_IMAGE_TYPE_NVDATA (0x03)
#define MPI_EXT_IMAGE_TYPE_BOOTLOADER (0x04)
#define MPI_EXT_IMAGE_TYPE_INITIALIZATION (0x05)
#endif
| impedimentToProgress/UCI-BlueChip | snapgear_linux/linux-2.6.21.1/drivers/message/fusion/lsi/mpi_ioc.h | C | mit | 58,797 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2456,
1011,
2294,
1048,
5332,
7961,
3840,
1012,
1008,
1008,
1008,
2171,
1024,
6131,
2072,
1035,
25941,
1012,
1044,
1008,
2516,
1024,
6131,
2072,
25941,
1010,
3417,
1010,
2724,
1010,
1042,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.wso2.developerstudio.eclipse.gmf.esb;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Transaction Mediator</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.wso2.developerstudio.eclipse.gmf.esb.TransactionMediator#getAction <em>Action</em>}</li>
* <li>{@link org.wso2.developerstudio.eclipse.gmf.esb.TransactionMediator#getInputConnector <em>Input Connector</em>}</li>
* <li>{@link org.wso2.developerstudio.eclipse.gmf.esb.TransactionMediator#getOutputConnector <em>Output Connector</em>}</li>
* </ul>
*
* @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getTransactionMediator()
* @model
* @generated
*/
public interface TransactionMediator extends Mediator {
/**
* Returns the value of the '<em><b>Action</b></em>' attribute.
* The literals are from the enumeration {@link org.wso2.developerstudio.eclipse.gmf.esb.TransactionAction}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Action</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Action</em>' attribute.
* @see org.wso2.developerstudio.eclipse.gmf.esb.TransactionAction
* @see #setAction(TransactionAction)
* @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getTransactionMediator_Action()
* @model
* @generated
*/
TransactionAction getAction();
/**
* Sets the value of the '{@link org.wso2.developerstudio.eclipse.gmf.esb.TransactionMediator#getAction <em>Action</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Action</em>' attribute.
* @see org.wso2.developerstudio.eclipse.gmf.esb.TransactionAction
* @see #getAction()
* @generated
*/
void setAction(TransactionAction value);
/**
* Returns the value of the '<em><b>Input Connector</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Input Connector</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Input Connector</em>' containment reference.
* @see #setInputConnector(TransactionMediatorInputConnector)
* @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getTransactionMediator_InputConnector()
* @model containment="true"
* @generated
*/
TransactionMediatorInputConnector getInputConnector();
/**
* Sets the value of the '{@link org.wso2.developerstudio.eclipse.gmf.esb.TransactionMediator#getInputConnector <em>Input Connector</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Input Connector</em>' containment reference.
* @see #getInputConnector()
* @generated
*/
void setInputConnector(TransactionMediatorInputConnector value);
/**
* Returns the value of the '<em><b>Output Connector</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Output Connector</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Output Connector</em>' containment reference.
* @see #setOutputConnector(TransactionMediatorOutputConnector)
* @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getTransactionMediator_OutputConnector()
* @model containment="true"
* @generated
*/
TransactionMediatorOutputConnector getOutputConnector();
/**
* Sets the value of the '{@link org.wso2.developerstudio.eclipse.gmf.esb.TransactionMediator#getOutputConnector <em>Output Connector</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Output Connector</em>' containment reference.
* @see #getOutputConnector()
* @generated
*/
void setOutputConnector(TransactionMediatorOutputConnector value);
} // TransactionMediator
| prabushi/devstudio-tooling-esb | plugins/org.wso2.developerstudio.eclipse.gmf.esb/src/org/wso2/developerstudio/eclipse/gmf/esb/TransactionMediator.java | Java | apache-2.0 | 4,390 | [
30522,
1013,
1008,
1008,
1008,
1026,
9385,
1028,
1008,
1026,
1013,
9385,
1028,
1008,
1008,
1002,
8909,
1002,
1008,
1013,
7427,
8917,
1012,
1059,
6499,
2475,
1012,
9797,
8525,
20617,
1012,
13232,
1012,
13938,
2546,
1012,
9686,
2497,
1025,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (c) 2012-2015 S-Core Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
define(['external/lodash/lodash.min',
'webida-lib/util/path',
'plugins/webida.editor.code-editor/content-assist/file-server',
'plugins/webida.editor.code-editor/content-assist/reference'],
function (_, pathUtil, fileServer, reference) {
'use strict';
var csshint = {};
function findCompletions(body) {
var result = {};
var token = body.query.token;
if (token) {
if ((token.type === 'tag' || token.type === 'qualifier') && /^\./.test(token.string)) {
token.type = 'class';
token.start = token.start + 1;
token.string = token.string.substr(1);
} else if (token.type === 'builtin' && /^#/.test(token.string)) {
token.type = 'id';
token.start = token.start + 1;
token.string = token.string.substr(1);
}
if (token.type === 'id' || token.type === 'class') {
var htmls = reference.getReferenceFroms(body.query.file);
if (pathUtil.isHtml(body.query.file)) {
htmls = _.union(htmls, [body.query.file]);
}
_.each(htmls, function (htmlpath) {
var html = fileServer.getLocalFile(htmlpath);
if (html) {
if (token.type === 'id') {
result.list = _.union(result, html.getHtmlIds());
} else if (token.type === 'class') {
result.list = _.union(result, html.getHtmlClasses());
}
}
});
if (result.list) {
result.to = body.query.end;
result.from = {
line: body.query.end.line,
ch: body.query.end.ch - token.string.length
};
}
}
}
return result;
}
/**
* @param {files: [{name, type, text}], query: {type: string, end:{line,ch}, file: string}} body
* @returns {from: {line, ch}, to: {line, ch}, list: [string]}
**/
csshint.request = function (serverId, body, c) {
_.each(body.files, function (file) {
if (file.type === 'full') {
fileServer.setText(file.name, file.text);
file.type = null;
}
});
body.files = _.filter(body.files, function (file) {
return file.type !== null;
});
var result = {};
if (body.query.type === 'completions') {
result = findCompletions(body);
}
c(undefined, result);
};
return csshint;
});
| happibum/webida-client | apps/ide/src/plugins/webida.editor.code-editor.content-assist.css.css-smart/css-hint-server.js | JavaScript | apache-2.0 | 3,359 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2262,
1011,
2325,
1055,
1011,
4563,
2522,
1012,
1010,
5183,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* The Original Code is Mozilla Universal charset detector code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* António Afonso (antonio.afonso gmail.com) - port to JavaScript
* Mark Pilgrim - port to Python
* Shy Shalom - original C code
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
!function(jschardet) {
jschardet.MBCSGroupProber = function() {
jschardet.CharSetGroupProber.apply(this);
this._mProbers = [
new jschardet.UTF8Prober(),
new jschardet.SJISProber(),
new jschardet.EUCJPProber(),
new jschardet.GB2312Prober(),
new jschardet.EUCKRProber(),
new jschardet.Big5Prober(),
new jschardet.EUCTWProber()
];
this.reset();
}
jschardet.MBCSGroupProber.prototype = new jschardet.CharSetGroupProber();
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); | stevebering/siteValidationCrawler | src/node_modules/crawler/node_modules/jschardet/src/mbcsgroupprober.js | JavaScript | mit | 1,792 | [
30522,
1013,
1008,
1008,
1996,
2434,
3642,
2003,
9587,
5831,
4571,
5415,
25869,
13462,
19034,
3642,
1012,
1008,
1008,
1996,
3988,
9722,
1997,
1996,
2434,
3642,
2003,
1008,
16996,
19464,
4806,
3840,
1012,
1008,
8810,
2580,
2011,
1996,
3988,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
---
layout: post
date: '2017-02-04'
title: "Compelling Vintage Piceous Halter Top Dress Of Special Material"
category: Formal Dresses
tags: ["piceous","bride","dress","vintage","compelling"]
image: http://www.starbrideapparel.com/11688-thickbox_default/compelling-vintage-piceous-halter-top-dress-of-special-material.jpg
---
Compelling Vintage Piceous Halter Top Dress Of Special Material
On Sales: **$257.394**
<a href="https://www.starbrideapparel.com/formal-dresses/5403-compelling-vintage-piceous-halter-top-dress-of-special-material-1463394436513.html"><amp-img layout="responsive" width="600" height="600" src="//www.starbrideapparel.com/11688-thickbox_default/compelling-vintage-piceous-halter-top-dress-of-special-material.jpg" alt="Compelling Vintage Piceous Halter Top Dress Of Special Material 0" /></a>
<a href="https://www.starbrideapparel.com/formal-dresses/5403-compelling-vintage-piceous-halter-top-dress-of-special-material-1463394436513.html"><amp-img layout="responsive" width="600" height="600" src="//www.starbrideapparel.com/11690-thickbox_default/compelling-vintage-piceous-halter-top-dress-of-special-material.jpg" alt="Compelling Vintage Piceous Halter Top Dress Of Special Material 1" /></a>
<a href="https://www.starbrideapparel.com/formal-dresses/5403-compelling-vintage-piceous-halter-top-dress-of-special-material-1463394436513.html"><amp-img layout="responsive" width="600" height="600" src="//www.starbrideapparel.com/11692-thickbox_default/compelling-vintage-piceous-halter-top-dress-of-special-material.jpg" alt="Compelling Vintage Piceous Halter Top Dress Of Special Material 2" /></a>
<a href="https://www.starbrideapparel.com/formal-dresses/5403-compelling-vintage-piceous-halter-top-dress-of-special-material-1463394436513.html"><amp-img layout="responsive" width="600" height="600" src="//www.starbrideapparel.com/11693-thickbox_default/compelling-vintage-piceous-halter-top-dress-of-special-material.jpg" alt="Compelling Vintage Piceous Halter Top Dress Of Special Material 3" /></a>
Buy it: [Compelling Vintage Piceous Halter Top Dress Of Special Material](https://www.starbrideapparel.com/formal-dresses/5403-compelling-vintage-piceous-halter-top-dress-of-special-material-1463394436513.html "Compelling Vintage Piceous Halter Top Dress Of Special Material")
View more: [Formal Dresses](https://www.starbrideapparel.com/38-formal-dresses "Formal Dresses") | lignertys/lignertys.github.io | _posts/2017-02-04-compelling-vintage-piceous-halter-top-dress-of-special-material.md | Markdown | mit | 2,408 | [
30522,
1011,
1011,
1011,
9621,
1024,
2695,
3058,
1024,
1005,
2418,
1011,
6185,
1011,
5840,
1005,
2516,
1024,
1000,
17075,
13528,
27263,
14769,
9190,
2121,
2327,
4377,
1997,
2569,
3430,
1000,
4696,
1024,
5337,
14464,
22073,
1024,
1031,
1000,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
---
layout: studio
---
see <http://www.nodeclipse.org/enide/studio/2014/README_2014.17-u2>
## Enide Studio 2014.17-u2 README
Enide Studio 2014.17 is eclipse-java-luna-SR2-win32-x86_64 plus
Nodeclipse and Enide plugins of 0.17 release train.
The intention is to let you save some time.
### Special about 2014.17-u2
- includes fixed JSHint-Eclipse issue [#99](https://github.com/eclipsesource/jshint-eclipse/issues/99) (v0.9.10)
- includes [eExplorer - Eclipse Plugin to embed Windows Explorer](https://github.com/culmat/eExplorer)
- example `ws` workspace
### Instructions
0. If you don't have, get latest Node.js <http://www.nodejs.org/download/>
1. If you don't have, download & install latest JDK 7/8
<http://www.oracle.com/technetwork/java/javase/downloads/index.html>
For example "Java Platform (JDK) 7u40"
2. [Download Enide Studio 2014 for your operating system](https://sourceforge.net/projects/nodeclipse/files/Enide-Studio-2014/)
3. Extract Enide-*.zip into folder where you keep our tools, e.g. `D:\Progs\` or `/usr/local/bin`
4. Open `eclipse.exe` from `eclipse` folder, e.g. <code>D:\Progs\Enide-Studio-2014.17-luna-SR1-win64\eclipse\eclipse.exe</code>
5.1 If you have error messages like
....\jre\....
That means you don't have JDK installed (JRE is not enough).
Reinstall JDK (see 1.) or use [hint how to configure Eclipse](https://github.com/Nodeclipse/eclipse-node-ide/blob/master/Hints.md#select-jvm-for-eclipse-instance)
You can configure `eclipse.ini` to exact JDK version you have using `-vm` option.
It should go before `-vmargs`. Examples:
-vm
C:/Program Files (x86)/Java/jdk1.7.0_40/jre/bin/client/jvm.dll
-vm
C:/Program Files/Java/jdk1.7.0_11/jre/bin/javaw.exe
5.2 On Linux don't forget to `sudo chmod -R 7555 eclipse` in folder with Enide Studio
### Hints
1. Archive included workspace `ws` with recommended configuration for example that you can open as `..\ws`.
But you should copy it or create new in folder where you have your workspaces, e.g.
D:\Workspaces\Enide-Studio-2014.17\
2. Add `-showLocation` to launch shortcut for Enide Studio `eclipse.exe` to display workspace path in window title.
| Nodeclipse/Nodeclipse.github.io | enide/studio/2014/README_2014.17-u2.md | Markdown | mit | 2,171 | [
30522,
1011,
1011,
1011,
9621,
1024,
2996,
1011,
1011,
1011,
2156,
1026,
8299,
1024,
1013,
1013,
7479,
1012,
13045,
20464,
11514,
3366,
1012,
8917,
1013,
4372,
5178,
1013,
2996,
1013,
2297,
1013,
3191,
4168,
1035,
2297,
1012,
2459,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
THIS WORK, INCLUDING THE SOURCE CODE, DOCUMENTATION
AND RELATED MEDIA AND DATA, IS PLACED INTO THE PUBLIC DOMAIN.
THE ORIGINAL AUTHOR IS KYLE FOLEY.
THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY
OF ANY KIND, NOT EVEN THE IMPLIED WARRANTY OF
MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE,
ASSUMES _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE
RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
#if USE_GLEW
#include "GL/glew.h"
#endif
#include "SDL/SDL.h"
#if !USE_GLEW
#include "SDL/SDL_opengl.h"
#endif
#include <stdio.h>
#include <string.h>
#include <assert.h>
extern void *getBindBuffer();
void (*_glBindBuffer)(unsigned, unsigned) = NULL;
int main(int argc, char *argv[])
{
_glBindBuffer = (void (*)(unsigned, unsigned))getBindBuffer();
// testing
GLint tempInt;
GLboolean tempBool;
void *tempPtr;
SDL_Surface *screen;
if ( SDL_Init(SDL_INIT_VIDEO) != 0 ) {
printf("Unable to initialize SDL: %s\n", SDL_GetError());
return 1;
}
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
screen = SDL_SetVideoMode( 640, 480, 24, SDL_OPENGL );
if ( !screen ) {
printf("Unable to set video mode: %s\n", SDL_GetError());
return 1;
}
glClearColor( 0, 0, 0, 0 );
glClear( GL_COLOR_BUFFER_BIT );
// Create a texture
GLuint boundTex = 123;
assert(!glGetError());
glGetIntegerv(GL_TEXTURE_BINDING_2D, &boundTex);
assert(!glGetError());
assert(boundTex == 0);
GLuint texture;
glGenTextures( 1, &texture );
glBindTexture( GL_TEXTURE_2D, texture );
assert(!glGetError());
glGetIntegerv(GL_TEXTURE_BINDING_2D, &boundTex);
assert(!glGetError());
assert(boundTex == texture);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
GLubyte textureData[16*16*4];
for (int x = 0; x < 16; x++) {
for (int y = 0; y < 16; y++) {
*((int*)&textureData[(x*16 + y) * 4]) = x*16 + ((y*16) << 8);
}
}
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0,
GL_RGBA, GL_UNSIGNED_BYTE, textureData );
// Create a second texture
GLuint texture2;
glGenTextures( 1, &texture2 );
glBindTexture( GL_TEXTURE_2D, texture2 );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
GLubyte texture2Data[] = { 0xff, 0, 0, 0xff,
0, 0xff, 0, 0xaa,
0, 0, 0xff, 0x55,
0x80, 0x90, 0x70, 0 };
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0,
GL_RGBA, GL_UNSIGNED_BYTE, texture2Data );
// BEGIN
#if USE_GLEW
glewInit();
#endif
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// original: glFrustum(-0.6435469817188064, 0.6435469817188064 ,-0.48266022190470925, 0.48266022190470925 ,0.5400000214576721, 2048);
glFrustum(-0.6435469817188064, 0.1435469817188064 ,-0.48266022190470925, 0.88266022190470925 ,0.5400000214576721, 2048);
glRotatef(-30, 1, 1, 1);
//GLfloat pm[] = { 1.372136116027832, 0, 0, 0, 0, 0.7910231351852417, 0, 0, -0.6352481842041016, 0.29297152161598206, -1.0005275011062622, -1, 0, 0, -1.080284833908081, 0 };
//glLoadMatrixf(pm);
glMatrixMode(GL_MODELVIEW);
GLfloat matrixData[] = { -1, 0, 0, 0,
0, 0,-1, 0,
0, 1, 0, 0,
0, 0, 0, 1 };
glLoadMatrixf(matrixData);
//glTranslated(-512,-512,-527); // XXX this should be uncommented, but if it is then nothing is shown
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT);
glEnableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glActiveTexture(GL_TEXTURE0);
glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(!tempBool);
glEnableClientState(GL_VERTEX_ARRAY);
glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool);
GLuint arrayBuffer, elementBuffer;
glGenBuffers(1, &arrayBuffer);
glGenBuffers(1, &elementBuffer);
GLubyte arrayData[] = {
/*
[0, 0, 0, 67] ==> 128 float
[0, 0, 128, 67] ==> 256 float
[0, 0, 0, 68] ==> 512 float
[0, 0, 128, 68] ==> 1024 float
[vertex x ] [vertex y ] [vertex z ] [nr] [texture u ] [texture v ] [lm u ] [lm v ] [color r,g,b,a ] */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, // 0
0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, // 1
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 2
0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 3
0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, // 4
0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, // 5
0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 6
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 7
0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 8
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 9
0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 128, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 10
0, 0, 0, 0, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 11
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 12
0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 0, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 13
0, 0, 128, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 67, 0, 0, 128, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 14
0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 128, 67, 0, 0, 0, 0, 128, 128, 128, 128, // 15
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 0, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128,
0, 0, 128, 68, 0, 0, 128, 68, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128
};
assert(sizeof(arrayData) == 1408);
_glBindBuffer(GL_ARRAY_BUFFER, arrayBuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(arrayData), arrayData, GL_STATIC_DRAW);
_glBindBuffer(GL_ARRAY_BUFFER, 0);
GLushort elementData[] = { 1, 2, 0, 2, 3, 0, 5, 6, 4, 6, 7, 4, 9, 10, 8, 10, 11, 8, 13, 14, 12, 14, 15, 12 };
assert(sizeof(elementData) == 48);
_glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementBuffer);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(elementData), elementData, GL_STATIC_DRAW);
_glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
_glBindBuffer(GL_ARRAY_BUFFER, arrayBuffer);
_glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementBuffer);
// sauer vertex data is apparently 0-12: V3F, 12: N1B, 16-24: T2F, 24-28: T2S, 28-32: C4B
glVertexPointer(3, GL_FLOAT, 32, (void*)0); // all these apply to the ARRAY_BUFFER that is bound
glTexCoordPointer(2, GL_FLOAT, 32, (void*)16);
glClientActiveTexture(GL_TEXTURE1); // XXX seems to be ignored in native build
glTexCoordPointer(2, GL_SHORT, 32, (void*)24);
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &tempInt); assert(tempInt == 2);
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &tempInt); assert(tempInt == GL_SHORT);
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)24);
glClientActiveTexture(GL_TEXTURE0); // likely not needed, it is a cleanup
glNormalPointer(GL_BYTE, 32, (void*)12);
glColorPointer(4, GL_UNSIGNED_BYTE, 32, (void*)28);
glGetPointerv(GL_VERTEX_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)0);
glGetPointerv(GL_COLOR_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)28);
glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &tempPtr); assert(tempPtr == (void *)16);
glGetIntegerv(GL_VERTEX_ARRAY_SIZE, &tempInt); assert(tempInt == 3);
glGetIntegerv(GL_VERTEX_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT);
glGetIntegerv(GL_VERTEX_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
glGetIntegerv(GL_COLOR_ARRAY_SIZE, &tempInt); assert(tempInt == 4);
glGetIntegerv(GL_COLOR_ARRAY_TYPE, &tempInt); assert(tempInt == GL_UNSIGNED_BYTE);
glGetIntegerv(GL_COLOR_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE, &tempInt); assert(tempInt == 2);
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE, &tempInt); assert(tempInt == GL_FLOAT);
glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE, &tempInt); assert(tempInt == 32);
glGetBooleanv(GL_VERTEX_ARRAY, &tempBool); assert(tempBool);
glBindTexture(GL_TEXTURE_2D, texture); // diffuse?
glActiveTexture(GL_TEXTURE0);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, texture2); // lightmap?
glActiveTexture(GL_TEXTURE0);
GLint ok;
const char *vertexShader = "uniform vec4 texgenscroll;\n"
"void main(void)\n"
"{\n"
" gl_Position = ftransform();\n"
" gl_TexCoord[0].xy = gl_MultiTexCoord0.xy/100.0 + texgenscroll.xy;\n" // added /100 here
" gl_TexCoord[1].xy = gl_MultiTexCoord1.xy/100.0 * 3.051851e-05;\n"
"}\n";
const char *fragmentShader = "uniform vec4 colorparams;\n"
"uniform sampler2D diffusemap, lightmap;\n"
"void main(void)\n"
"{\n"
" vec4 diffuse = texture2D(diffusemap, gl_TexCoord[0].xy);\n"
" vec4 lm = texture2D(lightmap, gl_TexCoord[1].xy);\n"
" diffuse *= colorparams;\n"
" gl_FragColor = diffuse * lm;\n"
"}\n";
GLuint vs = glCreateShader(GL_VERTEX_SHADER);
glShaderSource(vs, 1, &vertexShader, NULL);
glCompileShader(vs);
glGetShaderiv(vs, GL_COMPILE_STATUS, &ok);
assert(ok);
GLuint fs = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(fs, 1, &fragmentShader, NULL);
glCompileShader(fs);
glGetShaderiv(fs, GL_COMPILE_STATUS, &ok);
assert(ok);
GLuint program = glCreateProgram();
glAttachShader(program, vs);
glAttachShader(program, fs);
glLinkProgram(program);
glGetProgramiv(program, GL_LINK_STATUS, &ok);
assert(ok);
glUseProgram(program);
GLint lightmapLocation = glGetUniformLocation(program, "lightmap");
assert(lightmapLocation >= 0);
assert(lightmapLocation == glGetUniformLocation(program, "lightmap")); // must get identical ids
glLinkProgram(program);
glGetProgramiv(program, GL_LINK_STATUS, &ok);
assert(ok);
assert(lightmapLocation != glGetUniformLocation(program, "lightmap")); // must NOT get identical ids, we re-linked!
lightmapLocation = glGetUniformLocation(program, "lightmap");
assert(lightmapLocation == glGetUniformLocation(program, "lightmap")); // must get identical ids
glUniform1i(lightmapLocation, 1); // sampler2D? Is it the texture unit?
GLint diffusemapLocation = glGetUniformLocation(program, "diffusemap");
assert(diffusemapLocation >= 0);
glUniform1i(diffusemapLocation, 0);
GLint texgenscrollLocation = glGetUniformLocation(program, "texgenscroll");
assert(texgenscrollLocation >= 0);
GLint colorparamsLocation = glGetUniformLocation(program, "colorparams");
assert(colorparamsLocation >= 0);
GLfloat texgenscrollData[] = { 0, 0, 0, 0 };
glUniform4fv(texgenscrollLocation, 1, texgenscrollData);
GLfloat colorparamsData[] = { 2, 2, 2, 1 };
glUniform4fv(colorparamsLocation, 1, colorparamsData);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (void*)12);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (void*) 0);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (void*)24);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (void*)36);
// END
SDL_GL_SwapBuffers();
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
SDL_Quit();
return 0;
}
| slightperturbation/Cobalt | ext/emsdk_portable/emscripten/tag-1.34.1/tests/cubegeom_proc.c | C | apache-2.0 | 18,016 | [
30522,
1013,
1008,
2023,
2147,
1010,
2164,
1996,
3120,
3642,
1010,
12653,
1998,
3141,
2865,
1998,
2951,
1010,
2003,
2872,
2046,
1996,
2270,
5884,
1012,
1996,
2434,
3166,
2003,
7648,
17106,
1012,
2023,
4007,
2003,
3024,
2004,
1011,
2003,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<title>105年第十四任總統副總統及第九屆立法委員選舉</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="../css/style2.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/ftiens4.js"></script>
<script type="text/javascript" src="../js/ua.js"></script>
<script type="text/javascript" src="../js/func.js"></script>
<script type="text/javascript" src="../js/treeP1.js"></script>
<script type="text/javascript" src="../js/refresh.js"></script>
</head>
<body id="main-body">
<div id="main-header">
<div id="main-top">
<a class="main-top-logo" href="#">中央選舉委員會</a>
<ul class="main-top-list">
<li class="main-top-item"><a class="main-top-link main-top-link-home" href="../index.html">回首頁</a></li>
<li class="main-top-item"><a class="main-top-link main-top-link-cec" href="http://2016.cec.gov.tw">中選會網站</a></li>
<li class="main-top-item"><a class="main-top-link main-top-link-english" href="../../en/index.html">English</a></li>
</ul>
</div>
</div>
<div id="main-wrap">
<div id="main-banner">
<div class="slideshow">
<img src="../img/main_bg_1.jpg" width="1024" height="300" alt="background" title="background">
</div>
<div class="main-deco"></div>
<div class="main-title"></div>
<a class="main-pvpe main-pvpe-current" href="../IDX/indexP1.html">總統副總統選舉</a>
<a class="main-le" href="../IDX/indexT.html">立法委員選舉</a>
</div>
<div id="main-container">
<div id="main-content">
<table width="1024" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="180" valign="top">
<div id="divMenu">
<table border="0">
<tr>
<td><a style="text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank></a></td>
</tr>
</table>
<span class="TreeviewSpanArea">
<script>initializeDocument()</script>
<noscript>請開啟Javascript功能</noscript>
</span>
</div>
</td>
<td width="796" valign="top">
<div id="divContent">
<!-- 修改區塊 -->
<table width="100%" border="0" cellpadding="0" cellspacing="4">
<tr>
<td><img src="../images/search.png" alt="候選人得票數" title="候選人得票數"> <b>總統副總統選舉 候選人在 臺中市 神岡區得票數 </b></td>
</tr>
<tr valign="bottom">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="bottom">
<td class="fontNumber"> <img src="../images/nav.gif" alt="候選組數" title="候選組數"> <img src="../images/nav.gif" alt="候選組數" title="候選組數"> 候選組數:3 <img src="../images/nav.gif" alt="應選組數" title="應選組數"> <img src="../images/nav.gif" alt="應選組數" title="應選組數"> 應選組數:1</td>
<td align="right">
<select name="selector_order" class="selectC" tabindex="1" id="orderBy" onChange="changeOrder();">
<option value="n">依號次排序</option>
<option value="s">依得票排序</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td>
<table width="100%" border="0" cellpadding="6" cellspacing="1" class="tableT">
<tr class="trHeaderT">
<td>註記</td>
<td>號次</td>
<td><table><tr><td>總統</td><td rowspan=2> 候選人姓名</td></tr><td>副總統</td></table></td>
<td>性別</td>
<td>得票數</td>
<td>得票率%</td>
<td>登記方式</td>
</tr>
<tr class="trT">
<td> </td>
<td>1</td>
<td>朱立倫<br>王如玄</td>
<td>男<br>女</td>
<td class="tdAlignRight">8,773</td>
<td class="tdAlignRight">24.4748</td>
<td>中國國民黨 推薦</td>
</tr>
<tr class="trT">
<td> </td>
<td>2</td>
<td>蔡英文<br>陳建仁</td>
<td>女<br>男</td>
<td class="tdAlignRight">22,160</td>
<td class="tdAlignRight">61.8217</td>
<td>民主進步黨 推薦</td>
</tr>
<tr class="trT">
<td> </td>
<td>3</td>
<td>宋楚瑜<br>徐欣瑩</td>
<td>男<br>女</td>
<td class="tdAlignRight">4,912</td>
<td class="tdAlignRight">13.7034</td>
<td>親民黨 推薦</td>
</tr>
<tr class="trFooterT">
<td colspan="7" align="right">投開票所數 已送/應送: 41/42 </td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10"></td>
<td valign="top" class="fontNote">
<table>
<tr>
<td>註記說明:</td>
<td align="center">◎</td>
<td>自然當選</td>
</tr>
<tr>
<td></td>
<td align="center">?</td>
<td>同票待抽籤</td>
</tr>
</table>
</td>
<td valign="top" class="fontTimer"><img src="../images/clock2.png" alt="Sat, 16 Jan 2016 20:06:11 +0800" title="Sat, 16 Jan 2016 20:06:11 +0800"> 資料更新時間: 01/16 20:06:07 <br>(網頁每3分鐘自動更新一次)</td>
</tr>
<tr>
<td colspan="3" class="fontNote"></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 修改區塊 -->
</div>
</td>
</tr>
</table>
</div>
<div class="main-footer"></div>
<div id="divFooter" align=center>[中央選舉委員會] </div>
<!--main-content-->
</div><!--main-container-->
</div><!--END main-wrap-->
<script>setOrder();</script>
<script>setMenuScrollPosY();</script>
</body>
</html>
| gugod/vote-watch-2016 | data/president/n400001300000000/20160116120645/page.html | HTML | cc0-1.0 | 6,578 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
2132,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
4180,
1011,
2828,
1000,
4180,
1027,
1000,
3793,
1013,
16129,
1025,
25869,
13462,
1027,
21183,
2546,
1011,
1022,
1000,
1028... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package org.mapfish.print.test.util;
import com.google.common.io.Files;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.export.JRGraphics2DExporter;
import net.sf.jasperreports.export.SimpleExporterInput;
import net.sf.jasperreports.export.SimpleGraphics2DExporterOutput;
import net.sf.jasperreports.export.SimpleGraphics2DReportConfiguration;
import org.apache.batik.transcoder.TranscoderException;
import org.mapfish.print.SvgUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.util.Iterator;
import java.util.List;
import javax.imageio.ImageIO;
import javax.imageio.ImageWriteParam;
import javax.imageio.ImageWriter;
import javax.imageio.stream.FileImageOutputStream;
import javax.media.jai.iterator.RandomIter;
import javax.media.jai.iterator.RandomIterFactory;
/**
* Class for comparing an expected image to an actual image.
* <p>
* CHECKSTYLE:OFF
*/
public final class ImageSimilarity {
private static final Logger LOGGER = LoggerFactory.getLogger(ImageSimilarity.class);
private static final boolean GENERATE_IN_SOURCE = true;
private final BufferedImage expectedImage;
private final BufferedImage maskImage;
private final BufferedImage diffImage;
private final File expectedPath;
/**
* The constructor, which creates the GUI and start the image processing task.
*/
public ImageSimilarity(final File expectedFile) throws IOException {
this.expectedImage = expectedFile.exists() ? ImageIO.read(expectedFile) : null;
if (GENERATE_IN_SOURCE) {
this.expectedPath = new File(expectedFile.toString().replaceAll(
"/out/", "/src/").replaceAll("/build/classes/test/", "/src/test/resources/"));
} else {
this.expectedPath = expectedFile;
}
final File maskFile = getRelatedFile("mask");
if (maskFile.exists()) {
this.maskImage = ImageIO.read(maskFile);
assert this.maskImage.getSampleModel().getNumBands() == 1;
} else {
this.maskImage = new BufferedImage(
this.expectedImage.getWidth(), this.expectedImage.getHeight(),
BufferedImage.TYPE_BYTE_GRAY);
final Graphics2D graphics = this.maskImage.createGraphics();
try {
graphics.setBackground(new Color(255, 255, 255));
graphics.clearRect(0, 0, this.expectedImage.getWidth(), this.expectedImage.getHeight());
} finally {
graphics.dispose();
}
}
this.diffImage = new BufferedImage(
this.expectedImage.getWidth(), this.expectedImage.getHeight(), BufferedImage.TYPE_INT_RGB);
}
/**
* Write the image to a file in uncompressed tiff format.
*
* @param image image to write
* @param file path and file name (extension will be ignored and changed to tiff.
*/
private static void writeUncompressedImage(BufferedImage image, String file) throws IOException {
FileImageOutputStream out = null;
try {
final File parentFile = new File(file).getParentFile();
Iterator<ImageWriter> writers = ImageIO.getImageWritersBySuffix("png");
final ImageWriter next = writers.next();
final ImageWriteParam param = next.getDefaultWriteParam();
param.setCompressionMode(ImageWriteParam.MODE_DISABLED);
final File outputFile = new File(parentFile, Files.getNameWithoutExtension(file) + ".png");
out = new FileImageOutputStream(outputFile);
next.setOutput(out);
next.write(image);
} catch (Throwable e) {
System.err.println(String.format(
"Error writing the image generated by the test: %s%n\t", file));
e.printStackTrace();
} finally {
if (out != null) {
out.close();
}
}
}
/**
* Merges a list of graphic files into a single graphic.
*
* @param graphicFiles a list of graphic files
* @param width the graphic width (required for svg files)
* @param height the graphic height (required for svg files)
* @return a single graphic
*/
public static BufferedImage mergeImages(List<URI> graphicFiles, int width, int height)
throws IOException, TranscoderException {
if (graphicFiles.isEmpty()) {
throw new IllegalArgumentException("no graphics given");
}
BufferedImage mergedImage = loadGraphic(graphicFiles.get(0), width, height);
Graphics g = mergedImage.getGraphics();
for (int i = 1; i < graphicFiles.size(); i++) {
BufferedImage image = loadGraphic(graphicFiles.get(i), width, height);
g.drawImage(image, 0, 0, null);
}
g.dispose();
return mergedImage;
}
private static BufferedImage loadGraphic(final URI path, final int width, final int height)
throws IOException, TranscoderException {
File file = new File(path);
if (file.getName().endsWith(".svg")) {
return convertFromSvg(path, width, height);
} else {
BufferedImage originalImage = ImageIO.read(file);
BufferedImage resizedImage = new BufferedImage(width, height, originalImage.getType());
Graphics2D g = resizedImage.createGraphics();
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.drawImage(originalImage, 0, 0, width, height, null);
g.dispose();
return resizedImage;
}
}
/**
* Renders an SVG image into a {@link BufferedImage}.
*/
public static BufferedImage convertFromSvg(final URI svgFile, final int width, final int height)
throws TranscoderException {
return SvgUtil.convertFromSvg(svgFile, width, height);
}
/**
* Exports a rendered {@link JasperPrint} to a {@link BufferedImage}.
*/
public static BufferedImage exportReportToImage(final JasperPrint jasperPrint, final Integer page)
throws JRException {
BufferedImage pageImage = new BufferedImage(jasperPrint.getPageWidth(), jasperPrint.getPageHeight(),
BufferedImage.TYPE_INT_RGB);
JRGraphics2DExporter exporter = new JRGraphics2DExporter();
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
SimpleGraphics2DExporterOutput output = new SimpleGraphics2DExporterOutput();
output.setGraphics2D((Graphics2D) pageImage.getGraphics());
exporter.setExporterOutput(output);
SimpleGraphics2DReportConfiguration configuration = new SimpleGraphics2DReportConfiguration();
configuration.setPageIndex(page);
exporter.setConfiguration(configuration);
exporter.exportReport();
return pageImage;
}
public static void main(final String args[]) throws IOException {
final String path = "core/src/test/resources/map-data";
final File root = new File(path);
final Iterable<File> files = Files.fileTraverser().depthFirstPostOrder(root);
for (File file: files) {
if (Files.getFileExtension(file.getName()).equals("png")) {
final BufferedImage img = ImageIO.read(file);
writeUncompressedImage(img, file.getAbsolutePath());
}
}
}
private File getRelatedFile(final String name) {
final String expectedFileName = this.expectedPath.getName();
return new File(this.expectedPath.getParentFile(),
(expectedFileName.contains("expected") ?
expectedFileName.replace("expected", name) :
name + "-" + expectedFileName));
}
/**
* This method calculates the distance between the signatures of an image and the reference one. The
* signatures for the image passed as the parameter are calculated inside the method.
*
* @return a number between 0 and 10000 or Double.MAX_VALUE on images format error.
*/
private double calcDistance(final BufferedImage actual) {
// There are several ways to calculate distances between two vectors,
// we will calculate the sum of the distances between the RGB values of
// pixels in the same positions.
if (actual.getWidth() != this.expectedImage.getWidth()) {
LOGGER.error("Not the same width (expected: {}, actual: {})",
this.expectedImage.getWidth(), actual.getWidth());
return Double.MAX_VALUE;
}
if (actual.getHeight() != this.expectedImage.getHeight()) {
LOGGER.error("Not the same height (expected: {}, actual: {})",
this.expectedImage.getHeight(), actual.getHeight());
return Double.MAX_VALUE;
}
if (actual.getSampleModel().getNumBands() != this.expectedImage.getSampleModel().getNumBands()) {
LOGGER.error("Not the same number of bands (expected: {}, actual: {})",
this.expectedImage.getSampleModel().getNumBands(),
actual.getSampleModel().getNumBands());
return Double.MAX_VALUE;
}
double dist = 0;
double[] expectedPixel = new double[this.expectedImage.getSampleModel().getNumBands()];
double[] actualPixel = new double[this.expectedImage.getSampleModel().getNumBands()];
int[] maskPixel = new int[1];
RandomIter expectedIterator = RandomIterFactory.create(this.expectedImage, null);
RandomIter actualIterator = RandomIterFactory.create(actual, null);
RandomIter maskIterator = RandomIterFactory.create(this.maskImage, null);
Graphics2D diffGraphics = this.diffImage.createGraphics();
for (int x = 0; x < actual.getWidth(); x++) {
for (int y = 0; y < actual.getHeight(); y++) {
expectedIterator.getPixel(x, y, expectedPixel);
actualIterator.getPixel(x, y, actualPixel);
maskIterator.getPixel(x, y, maskPixel);
double squareDist = 0.0;
for (int i = 0; i < this.expectedImage.getSampleModel().getNumBands(); i++) {
double colorDist = (expectedPixel[i] - actualPixel[i]) * (maskPixel[0] / 255.0);
if (colorDist >
7.0) { // allow a small color change (JPEG compression, anti-aliasing, ...)
squareDist += colorDist * colorDist;
}
}
double pxDiff = Math.sqrt(squareDist) /
Math.sqrt(this.expectedImage.getSampleModel().getNumBands());
dist += pxDiff / 255;
diffGraphics.setColor(new Color((int) Math.round(pxDiff), 0, 0));
diffGraphics.drawRect(x, y, 1, 1);
}
}
diffGraphics.dispose();
// Normalise
dist = dist / this.expectedImage.getWidth() / this.expectedImage.getHeight() * 10000;
LOGGER.debug("Current distance: {}", dist);
return dist;
}
/**
* Check that the actual image and the image calculated by this object are within the given distance.
*
* @param actual the image to compare to "this" image.
*/
public void assertSimilarity(final File actual) throws IOException {
assertSimilarity(actual, 1);
}
/**
* Check that the actual image and the image calculated by this object are within the given distance.
*
* @param maxDistance the maximum distance between the two images.
*/
public void assertSimilarity(
final byte[] graphicData, final double maxDistance)
throws IOException {
assertSimilarity(ImageIO.read(new ByteArrayInputStream(graphicData)), maxDistance);
}
/**
* Check that the actual image and the image calculated by this object are within the given distance.
*
* @param graphicFiles a list of graphic files
* @param width the graphic width (required for svg files)
* @param height the graphic height (required for svg files)
* @param maxDistance the maximum distance between the two images.
*/
public void assertSimilarity(
final List<URI> graphicFiles, final int width, final int height, final double maxDistance)
throws IOException, TranscoderException {
assertSimilarity(mergeImages(graphicFiles, width, height), maxDistance);
}
/**
* Check that the actual image and the image calculated by this object are within the given distance.
*
* @param maxDistance the maximum distance between the two images.
*/
public void assertSimilarity(
final URI svgFile, final int width, final int height, final double maxDistance)
throws IOException, TranscoderException {
assertSimilarity(convertFromSvg(svgFile, width, height), maxDistance);
}
/**
* Check that the actual image and the image calculated by this object are within the given distance.
*
* @param maxDistance the maximum distance between the two images.
*/
public void assertSimilarity(
final JasperPrint jasperPrint, final Integer page, final double maxDistance)
throws IOException, JRException {
assertSimilarity(exportReportToImage(jasperPrint, page), maxDistance);
}
/**
* Check that the actual image and the image calculated by this object are within the given distance.
*
* @param actualFile the file to compare to "this" image.
* @param maxDistance the maximum distance between the two images.
*/
public void assertSimilarity(final File actualFile, final double maxDistance) throws IOException {
assertSimilarity(ImageIO.read(actualFile), maxDistance);
}
/**
* Check that the actual image and the image calculated by this object are within the given distance.
*
* @param actualImage the image to compare to "this" image.
* @param maxDistance the maximum distance between the two images.
*/
public void assertSimilarity(
final BufferedImage actualImage, final double maxDistance)
throws IOException {
if (!this.expectedPath.exists()) {
ImageIO.write(actualImage, "png", expectedPath);
throw new AssertionError("The expected file was missing and has been generated: " +
expectedPath.getAbsolutePath());
}
final double distance = calcDistance(actualImage);
if (distance > maxDistance) {
final File actualOutput = getRelatedFile("actual");
ImageIO.write(actualImage, "png", actualOutput);
final File diffOutput = getRelatedFile("diff");
ImageIO.write(this.diffImage, "png", diffOutput);
throw new AssertionError(String.format("similarity difference between images is: %s which is " +
"greater than the max distance of %s%n" +
"actual=%s%n" +
"expected=%s", distance, maxDistance,
actualOutput.getAbsolutePath(),
this.expectedPath.getAbsolutePath()));
}
}
}
| marcjansen/mapfish-print | core/src/main/java/org/mapfish/print/test/util/ImageSimilarity.java | Java | bsd-2-clause | 15,963 | [
30522,
7427,
8917,
1012,
4949,
7529,
1012,
6140,
1012,
3231,
1012,
21183,
4014,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
22834,
1012,
6764,
1025,
12324,
5658,
1012,
16420,
1012,
14791,
2890,
25378,
1012,
3194,
1012,
3781,
10288,
244... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.example.easeweather.gson;
import com.google.gson.annotations.SerializedName;
/**
* Created by ZS_PC on 2017/10/12.
*/
public class Suggestion {
@SerializedName("comf")
public Comfort comfort;
@SerializedName("cw")
public CarWash carWash;
public Sport sport;
public class Comfort{
@SerializedName("txt")
public String info;
}
public class CarWash{
@SerializedName("txt")
public String info;
}
public class Sport{
@SerializedName("txt")
public String info;
}
}
| StartFlow/easeweather | app/src/main/java/com/example/easeweather/gson/Suggestion.java | Java | apache-2.0 | 571 | [
30522,
7427,
4012,
1012,
2742,
1012,
7496,
28949,
1012,
28177,
2239,
1025,
12324,
4012,
1012,
8224,
1012,
28177,
2239,
1012,
5754,
17287,
9285,
1012,
27289,
18442,
1025,
1013,
1008,
1008,
1008,
2580,
2011,
1062,
2015,
1035,
7473,
2006,
2418... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150715020048) do
create_table "categories", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "item_types", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "items", force: :cascade do |t|
t.string "name", null: false
t.string "description", null: false
t.integer "item_type_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "people", force: :cascade do |t|
t.string "name", null: false
t.boolean "living", default: true
t.integer "age", default: -1
t.string "description", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "relationships", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "tags", force: :cascade do |t|
t.integer "taggable_id"
t.string "taggable_type"
t.integer "category_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
end
| armstrhb/SeaCat | db/schema.rb | Ruby | mit | 2,219 | [
30522,
1001,
17181,
1024,
21183,
2546,
1011,
1022,
1001,
2023,
5371,
2003,
8285,
1011,
7013,
2013,
1996,
2783,
2110,
1997,
1996,
7809,
1012,
2612,
1001,
1997,
9260,
2023,
5371,
1010,
3531,
2224,
1996,
9230,
2015,
3444,
1997,
3161,
2501,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* jQuery Textarea Characters Counter Plugin v 2.0
* Examples and documentation at: http://roy-jin.appspot.com/jsp/textareaCounter.jsp
* Copyright (c) 2010 Roy Jin
* Version: 2.0 (11-JUN-2010)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Requires: jQuery v1.4.2 or later
*/
(function($){
$.fn.textareaCount = function(options, fn) {
var defaults = {
maxCharacterSize: -1,
originalStyle: 'originalTextareaInfo',
warningStyle: 'warningTextareaInfo',
warningNumber: 20,
displayFormat: '#input characters | #words words'
};
var options = $.extend(defaults, options);
var container = $(this);
$("<div class='charleft'> </div>").insertAfter(container);
//create charleft css
var charLeftCss = {
'width' : container.width()
};
var charLeftInfo = getNextCharLeftInformation(container);
charLeftInfo.addClass(options.originalStyle);
//charLeftInfo.css(charLeftCss);
var numInput = 0;
var maxCharacters = options.maxCharacterSize;
var numLeft = 0;
var numWords = 0;
container.bind('keyup', function(event){limitTextAreaByCharacterCount();})
.bind('mouseover', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);})
.bind('paste', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);});
limitTextAreaByCharacterCount();
function limitTextAreaByCharacterCount(){
charLeftInfo.html(countByCharacters());
//function call back
if(typeof fn != 'undefined'){
fn.call(this, getInfo());
}
return true;
}
function countByCharacters(){
var content = container.val();
var contentLength = content.length;
//Start Cut
if(options.maxCharacterSize > 0){
//If copied content is already more than maxCharacterSize, chop it to maxCharacterSize.
if(contentLength >= options.maxCharacterSize) {
content = content.substring(0, options.maxCharacterSize);
}
var newlineCount = getNewlineCount(content);
// newlineCount new line character. For windows, it occupies 2 characters
var systemmaxCharacterSize = options.maxCharacterSize - newlineCount;
if (!isWin()){
systemmaxCharacterSize = options.maxCharacterSize
}
if(contentLength > systemmaxCharacterSize){
//avoid scroll bar moving
var originalScrollTopPosition = this.scrollTop;
container.val(content.substring(0, systemmaxCharacterSize));
this.scrollTop = originalScrollTopPosition;
}
charLeftInfo.removeClass(options.warningStyle);
if(systemmaxCharacterSize - contentLength <= options.warningNumber){
charLeftInfo.addClass(options.warningStyle);
}
numInput = container.val().length + newlineCount;
if(!isWin()){
numInput = container.val().length;
}
numWords = countWord(getCleanedWordString(container.val()));
numLeft = maxCharacters - numInput;
} else {
//normal count, no cut
var newlineCount = getNewlineCount(content);
numInput = container.val().length + newlineCount;
if(!isWin()){
numInput = container.val().length;
}
numWords = countWord(getCleanedWordString(container.val()));
}
return formatDisplayInfo();
}
function formatDisplayInfo(){
var format = options.displayFormat;
format = format.replace('#input', numInput);
format = format.replace('#words', numWords);
//When maxCharacters <= 0, #max, #left cannot be substituted.
if(maxCharacters > 0){
format = format.replace('#max', maxCharacters);
format = format.replace('#left', numLeft);
}
return format;
}
function getInfo(){
var info = {
input: numInput,
max: maxCharacters,
left: numLeft,
words: numWords
};
return info;
}
function getNextCharLeftInformation(container){
return container.next('.charleft');
}
function isWin(){
var strOS = navigator.appVersion;
if (strOS.toLowerCase().indexOf('win') != -1){
return true;
}
return false;
}
function getNewlineCount(content){
var newlineCount = 0;
for(var i=0; i<content.length;i++){
if(content.charAt(i) == '\n'){
newlineCount++;
}
}
return newlineCount;
}
function getCleanedWordString(content){
var fullStr = content + " ";
var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, "");
var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " ");
var splitString = cleanedStr.split(" ");
return splitString;
}
function countWord(cleanedWordString){
var word_count = cleanedWordString.length-1;
return word_count;
}
};
})(jQuery); | cypherjones/lazy-j-ranch | wp-content/wp-content/plugins/gravityforms/js/jquery.textareaCounter.plugin.js | JavaScript | gpl-2.0 | 4,961 | [
30522,
1013,
1008,
1008,
1046,
4226,
2854,
3793,
12069,
2050,
3494,
4675,
13354,
2378,
1058,
1016,
1012,
1014,
1008,
4973,
1998,
12653,
2012,
1024,
8299,
1024,
1013,
1013,
6060,
1011,
9743,
1012,
18726,
11008,
1012,
4012,
1013,
1046,
13102,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package org.openyu.mix.sasang.log;
import java.util.List;
import org.openyu.mix.app.log.AppLogEntity;
import org.openyu.mix.item.vo.Item;
import org.openyu.mix.sasang.service.SasangService.PlayType;
import org.openyu.mix.sasang.vo.Outcome;
/**
* 四象玩的log
*
* log不做bean,直接用entity處理掉
*/
public interface SasangPlayLog extends AppLogEntity
{
String KEY = SasangPlayLog.class.getName();
/**
* 玩的類別
*
* @return
*/
PlayType getPlayType();
void setPlayType(PlayType playType);
/**
* 玩的時間
*
* @return
*/
Long getPlayTime();
void setPlayTime(Long playTime);
/**
* 玩的結果
*
* @return
*/
Outcome getOutcome();
void setOutcome(Outcome outcome);
/**
* 真正成功扣道具及儲值幣的次數
*
* @return
*/
Integer getRealTimes();
void setRealTimes(Integer realTimes);
/**
* 消耗的金幣
*
* @return
*/
Long getSpendGold();
void setSpendGold(Long spendGold);
/**
* 消耗的道具
*
* @return
*/
List<Item> getSpendItems();
void setSpendItems(List<Item> spendItems);
/**
* 消耗的儲值幣
*
* @return
*/
Integer getSpendCoin();
void setSpendCoin(Integer spendCoin);
}
| mixaceh/openyu-mix.j | openyu-mix-core/src/main/java/org/openyu/mix/sasang/log/SasangPlayLog.java | Java | gpl-2.0 | 1,216 | [
30522,
7427,
8917,
1012,
2330,
10513,
1012,
4666,
1012,
21871,
5654,
1012,
8833,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025,
12324,
8917,
1012,
2330,
10513,
1012,
4666,
1012,
10439,
1012,
8833,
1012,
10439,
21197,
4765,
3012,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Thu Jul 06 10:54:05 MST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class org.wildfly.swarm.config.management.access.syslog_handler.TcpProtocol (Public javadocs 2017.7.0 API)</title>
<meta name="date" content="2017-07-06">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.wildfly.swarm.config.management.access.syslog_handler.TcpProtocol (Public javadocs 2017.7.0 API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.7.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/wildfly/swarm/config/management/access/syslog_handler/class-use/TcpProtocol.html" target="_top">Frames</a></li>
<li><a href="TcpProtocol.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class org.wildfly.swarm.config.management.access.syslog_handler.TcpProtocol" class="title">Uses of Class<br>org.wildfly.swarm.config.management.access.syslog_handler.TcpProtocol</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.management.access">org.wildfly.swarm.config.management.access</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.management.access.syslog_handler">org.wildfly.swarm.config.management.access.syslog_handler</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.management.access">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a> in <a href="../../../../../../../../org/wildfly/swarm/config/management/access/package-summary.html">org.wildfly.swarm.config.management.access</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../../org/wildfly/swarm/config/management/access/package-summary.html">org.wildfly.swarm.config.management.access</a> that return <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a></code></td>
<td class="colLast"><span class="typeNameLabel">SyslogHandler.SyslogHandlerResources.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/management/access/SyslogHandler.SyslogHandlerResources.html#tcpProtocol--">tcpProtocol</a></span>()</code>
<div class="block">Configuration to append to syslog over tcp/ip.</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../../org/wildfly/swarm/config/management/access/package-summary.html">org.wildfly.swarm.config.management.access</a> with parameters of type <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/wildfly/swarm/config/management/access/SyslogHandler.html" title="type parameter in SyslogHandler">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">SyslogHandler.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/management/access/SyslogHandler.html#tcpProtocol-org.wildfly.swarm.config.management.access.syslog_handler.TcpProtocol-">tcpProtocol</a></span>(<a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a> value)</code>
<div class="block">Configuration to append to syslog over tcp/ip.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="org.wildfly.swarm.config.management.access.syslog_handler">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a> in <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/package-summary.html">org.wildfly.swarm.config.management.access.syslog_handler</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/package-summary.html">org.wildfly.swarm.config.management.access.syslog_handler</a> with type parameters of type <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a><T extends <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a><T>></span></code>
<div class="block">Configuration to append to syslog over tcp/ip.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocolConsumer.html" title="interface in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocolConsumer</a><T extends <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a><T>></span></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocolSupplier.html" title="interface in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocolSupplier</a><T extends <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a>></span></code> </td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/package-summary.html">org.wildfly.swarm.config.management.access.syslog_handler</a> that return <a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">TcpProtocol</a></code></td>
<td class="colLast"><span class="typeNameLabel">TcpProtocolSupplier.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocolSupplier.html#get--">get</a></span>()</code>
<div class="block">Constructed instance of TcpProtocol resource</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../org/wildfly/swarm/config/management/access/syslog_handler/TcpProtocol.html" title="class in org.wildfly.swarm.config.management.access.syslog_handler">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.7.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/wildfly/swarm/config/management/access/syslog_handler/class-use/TcpProtocol.html" target="_top">Frames</a></li>
<li><a href="TcpProtocol.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2017 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p>
</body>
</html>
| wildfly-swarm/wildfly-swarm-javadocs | 2017.7.0/apidocs/org/wildfly/swarm/config/management/access/syslog_handler/class-use/TcpProtocol.html | HTML | apache-2.0 | 14,105 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.cache.binary;
import org.apache.ignite.cache.CacheAtomicityMode;
/**
* Cache EntryProcessor + Deployment for transactional cache.
*/
public class GridCacheBinaryTransactionalEntryProcessorDeploymentSelfTest extends
GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest {
/** {@inheritDoc} */
@Override protected CacheAtomicityMode atomicityMode() {
return CacheAtomicityMode.TRANSACTIONAL;
}
}
| irudyak/ignite | modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryTransactionalEntryProcessorDeploymentSelfTest.java | Java | apache-2.0 | 1,284 | [
30522,
1013,
1008,
1008,
7000,
2000,
1996,
15895,
4007,
3192,
1006,
2004,
2546,
1007,
2104,
2028,
2030,
2062,
1008,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
5500,
2007,
1008,
2023,
2147,
2005,
3176,
2592,
4953,
9385,
6095,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
* vuex-mapstate-modelvalue-instrict- v0.0.4
* (c) 2017 fsy0718
* @license MIT
*/
'use strict';
var push = Array.prototype.push;
var pop = Array.prototype.pop;
var _mapStateModelValueInStrict = function (modelValue, stateName, type, opts, setWithPayload, copts) {
if ( opts === void 0 ) opts = {};
if ( copts === void 0 ) copts = {};
if (process.env.NODE_ENV === 'development' && (!modelValue || !stateName || !type)) {
throw new Error(("vuex-mapstate-modelvalue-instrict: the " + modelValue + " at least 3 parameters are required"))
}
var getFn = opts.getFn || copts.getFn;
var modulePath = opts.modulePath || copts.modulePath;
return {
get: function get () {
if (getFn) {
return getFn(this.$store.state, modelValue, stateName, modulePath)
}
if (modulePath) {
var paths = modulePath.split('/') || [];
var result;
try {
result = paths.reduce(function (r, c) {
return r[c]
}, this.$store.state);
result = result[stateName];
} catch (e) {
if (process.env.NODE_ENV === 'development') {
throw e
}
result = undefined;
}
return result
}
return this.$store.state[stateName]
},
set: function set (value) {
var mutation = setWithPayload ? ( obj = {}, obj[stateName] = value, obj ) : value;
var obj;
var _type = modulePath ? (modulePath + "/" + type) : type;
this.$store.commit(_type, mutation, modulePath ? opts.param || copts.param : undefined);
}
}
};
var _mapStateModelValuesInStrict = function () {
var args = arguments;
var setWithPayload = pop.call(args);
var result = {};
if (Array.isArray(args[0])) {
var opts = args[1];
args[0].forEach(function (item) {
result[item[0]] = _mapStateModelValueInStrict(item[0], item[1], item[2], item[3], setWithPayload, opts);
});
} else {
result[args[0]] = _mapStateModelValueInStrict(args[0], args[1], args[2], args[3], setWithPayload);
}
return result
};
// mapStateModelValuesInStrict(modelValue, stateName, type, {getFn, setWithPayload, modulePath}})
// mapStateModelValuesInStrict([[modelValue, stateName, type, {getFn1}], [modelValue, stateName, type]], {getFn, setWithPayload})
var mapStateModelValuesInStrictWithPayload = function () {
var args = arguments;
push.call(arguments, true);
return _mapStateModelValuesInStrict.apply(null, args)
};
var mapStateModelValuesInStrict = function () {
var args = arguments;
push.call(arguments, false);
return _mapStateModelValuesInStrict.apply(null, args)
};
var index = {
mapStateModelValuesInStrict: mapStateModelValuesInStrict,
mapStateModelValuesInStrictWithPayload: mapStateModelValuesInStrictWithPayload,
version: '0.0.4'
};
module.exports = index;
| fsy0718/mapStateModelInStrict | dist/mapStateModelValueInStrict.common.js | JavaScript | mit | 2,832 | [
30522,
1013,
1008,
1008,
1008,
24728,
10288,
1011,
7341,
12259,
1011,
2944,
10175,
5657,
1011,
16021,
12412,
2102,
1011,
1058,
2692,
1012,
1014,
1012,
1018,
1008,
1006,
1039,
1007,
2418,
1042,
6508,
2692,
2581,
15136,
1008,
1030,
6105,
1021... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009, Cisco Systems Inc.
# Ngie Cooper, July 2009
top_srcdir ?= ../../../..
include $(top_srcdir)/include/mk/env_pre.mk
INSTALL_TARGETS := netstat01.sh
include $(top_srcdir)/include/mk/generic_leaf_target.mk
| linux-test-project/ltp | testcases/network/tcp_cmds/netstat/Makefile | Makefile | gpl-2.0 | 274 | [
30522,
1001,
23772,
2595,
1011,
6105,
1011,
8909,
4765,
18095,
1024,
14246,
2140,
1011,
1016,
1012,
1014,
1011,
2030,
1011,
2101,
1001,
9385,
1006,
1039,
1007,
2268,
1010,
26408,
3001,
4297,
1012,
1001,
12835,
2666,
6201,
1010,
2251,
2268,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
"""
Overview of all settings which can be customized.
"""
from django.conf import settings
from parler import appsettings as parler_appsettings
FLUENT_CONTENTS_CACHE_OUTPUT = getattr(settings, 'FLUENT_CONTENTS_CACHE_OUTPUT', True)
FLUENT_CONTENTS_PLACEHOLDER_CONFIG = getattr(settings, 'FLUENT_CONTENTS_PLACEHOLDER_CONFIG', {})
# Note: the default language setting is used during the migrations
FLUENT_DEFAULT_LANGUAGE_CODE = getattr(settings, 'FLUENT_DEFAULT_LANGUAGE_CODE', parler_appsettings.PARLER_DEFAULT_LANGUAGE_CODE)
FLUENT_CONTENTS_DEFAULT_LANGUAGE_CODE = getattr(settings, 'FLUENT_CONTENTS_DEFAULT_LANGUAGE_CODE', FLUENT_DEFAULT_LANGUAGE_CODE)
| pombredanne/django-fluent-contents | fluent_contents/appsettings.py | Python | apache-2.0 | 658 | [
30522,
1000,
1000,
1000,
19184,
1997,
2035,
10906,
2029,
2064,
2022,
28749,
1012,
1000,
1000,
1000,
2013,
6520,
23422,
1012,
9530,
2546,
12324,
10906,
2013,
11968,
3917,
12324,
18726,
18319,
3070,
2015,
2004,
11968,
3917,
1035,
18726,
18319,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
using System;
using System.Collections.Generic;
using System.IO;
using dnlib.DotNet;
using dnlib.DotNet.Writer;
using dnlib.IO;
using dnlib.PE;
using SR = System.Reflection;
namespace Confuser.Core {
internal class NativeEraser {
static void Erase(Tuple<uint, uint, byte[]> section, uint offset, uint len) {
Array.Clear(section.Item3, (int)(offset - section.Item1), (int)len);
}
static void Erase(List<Tuple<uint, uint, byte[]>> sections, uint beginOffset, uint size) {
foreach (var sect in sections)
if (beginOffset >= sect.Item1 && beginOffset + size < sect.Item2) {
Erase(sect, beginOffset, size);
break;
}
}
static void Erase(List<Tuple<uint, uint, byte[]>> sections, IFileSection s) {
foreach (var sect in sections)
if ((uint)s.StartOffset >= sect.Item1 && (uint)s.EndOffset < sect.Item2) {
Erase(sect, (uint)s.StartOffset, (uint)(s.EndOffset - s.StartOffset));
break;
}
}
static void Erase(List<Tuple<uint, uint, byte[]>> sections, uint methodOffset) {
foreach (var sect in sections)
if (methodOffset >= sect.Item1 && methodOffset - sect.Item1 < sect.Item3.Length) {
uint f = sect.Item3[methodOffset - sect.Item1];
uint size;
switch ((f & 7)) {
case 2:
case 6:
size = (f >> 2) + 1;
break;
case 3:
f |= (uint)((sect.Item3[methodOffset - sect.Item1 + 1]) << 8);
size = (f >> 12) * 4;
uint codeSize = BitConverter.ToUInt32(sect.Item3, (int)(methodOffset - sect.Item1 + 4));
size += codeSize;
break;
default:
return;
}
Erase(sect, methodOffset, size);
}
}
public static void Erase(NativeModuleWriter writer, ModuleDefMD module) {
if (writer == null || module == null)
return;
var sections = new List<Tuple<uint, uint, byte[]>>();
var s = new MemoryStream();
foreach (var origSect in writer.OrigSections) {
var oldChunk = origSect.Chunk;
var sectHdr = origSect.PESection;
s.SetLength(0);
oldChunk.WriteTo(new BinaryWriter(s));
var buf = s.ToArray();
var newChunk = new BinaryReaderChunk(MemoryImageStream.Create(buf), oldChunk.GetVirtualSize());
newChunk.SetOffset(oldChunk.FileOffset, oldChunk.RVA);
origSect.Chunk = newChunk;
sections.Add(Tuple.Create(
sectHdr.PointerToRawData,
sectHdr.PointerToRawData + sectHdr.SizeOfRawData,
buf));
}
var md = module.MetaData;
var row = md.TablesStream.MethodTable.Rows;
for (uint i = 1; i <= row; i++) {
var method = md.TablesStream.ReadMethodRow(i);
var codeType = ((MethodImplAttributes)method.ImplFlags & MethodImplAttributes.CodeTypeMask);
if (codeType == MethodImplAttributes.IL)
Erase(sections, (uint)md.PEImage.ToFileOffset((RVA)method.RVA));
}
var res = md.ImageCor20Header.Resources;
if (res.Size > 0)
Erase(sections, (uint)res.StartOffset, res.Size);
Erase(sections, md.ImageCor20Header);
Erase(sections, md.MetaDataHeader);
foreach (var stream in md.AllStreams)
Erase(sections, stream);
}
}
} | engdata/ConfuserEx | Confuser.Core/NativeEraser.cs | C# | mit | 3,066 | [
30522,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
22834,
1025,
2478,
1040,
20554,
12322,
1012,
11089,
7159,
1025,
2478,
1040,
20554,
12322,
1012,
11089,
7159,
1012,
3213,
1025,
2478,
1040,
20554,
12322,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#! /bin/bash
php bin/console deeson:warden:reset
| teamdeeson/warden | scripts/reset-data.sh | Shell | gpl-3.0 | 50 | [
30522,
1001,
999,
1013,
8026,
1013,
24234,
25718,
8026,
1013,
10122,
9266,
3385,
1024,
13745,
1024,
25141,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
namespace Konves.ChordPro.Directives
{
public sealed class CommentBoxDirective : Directive
{
public CommentBoxDirective(string text)
{
Text = text;
}
public string Text { get; set; }
}
}
| skonves/Konves.ChordPro | src/Konves.ChordPro/Directives/CommentBoxDirective.cs | C# | apache-2.0 | 205 | [
30522,
3415,
15327,
12849,
2078,
6961,
1012,
13924,
21572,
1012,
16449,
2015,
1063,
2270,
10203,
2465,
7615,
8758,
4305,
2890,
15277,
1024,
16449,
1063,
2270,
7615,
8758,
4305,
2890,
15277,
1006,
5164,
3793,
1007,
1063,
3793,
1027,
3793,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php namespace Administracion\Tablas;
/**
* Description of ParentescosController
*
* @author Nadin Yamani
*/
class ParentescosController extends \Administracion\TablasBaseController {
} | kentronvzla/sasyc | app/controllers/administracion/tablas/ParentescosController.php | PHP | gpl-2.0 | 192 | [
30522,
1026,
1029,
25718,
3415,
15327,
4748,
25300,
20528,
10446,
1032,
21628,
8523,
1025,
1013,
1008,
1008,
1008,
6412,
1997,
6687,
2229,
13186,
8663,
13181,
10820,
1008,
1008,
1030,
3166,
23233,
2378,
8038,
20799,
1008,
1013,
2465,
6687,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace Icinga\Module\Director\Controllers;
use Icinga\Module\Director\Web\Controller\ObjectsController;
class EndpointsController extends ObjectsController
{
}
| hashfunktion/icingaweb2-module-director | application/controllers/EndpointsController.php | PHP | gpl-2.0 | 172 | [
30522,
1026,
1029,
25718,
3415,
15327,
24582,
28234,
1032,
11336,
1032,
2472,
1032,
21257,
1025,
2224,
24582,
28234,
1032,
11336,
1032,
2472,
1032,
4773,
1032,
11486,
1032,
5200,
8663,
13181,
10820,
1025,
2465,
2203,
26521,
8663,
13181,
10820... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>V8 API Reference Guide for node.js v0.5.2 - v0.5.3: Class Members - Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v0.5.2 - v0.5.3
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="functions.html"><span>All</span></a></li>
<li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
<li><a href="functions_type.html"><span>Typedefs</span></a></li>
<li><a href="functions_enum.html"><span>Enumerations</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="functions_func.html#index_a"><span>a</span></a></li>
<li><a href="functions_func_b.html#index_b"><span>b</span></a></li>
<li><a href="functions_func_c.html#index_c"><span>c</span></a></li>
<li><a href="functions_func_d.html#index_d"><span>d</span></a></li>
<li><a href="functions_func_e.html#index_e"><span>e</span></a></li>
<li><a href="functions_func_f.html#index_f"><span>f</span></a></li>
<li><a href="functions_func_g.html#index_g"><span>g</span></a></li>
<li><a href="functions_func_h.html#index_h"><span>h</span></a></li>
<li><a href="functions_func_i.html#index_i"><span>i</span></a></li>
<li><a href="functions_func_l.html#index_l"><span>l</span></a></li>
<li class="current"><a href="functions_func_m.html#index_m"><span>m</span></a></li>
<li><a href="functions_func_n.html#index_n"><span>n</span></a></li>
<li><a href="functions_func_o.html#index_o"><span>o</span></a></li>
<li><a href="functions_func_p.html#index_p"><span>p</span></a></li>
<li><a href="functions_func_r.html#index_r"><span>r</span></a></li>
<li><a href="functions_func_s.html#index_s"><span>s</span></a></li>
<li><a href="functions_func_t.html#index_t"><span>t</span></a></li>
<li><a href="functions_func_u.html#index_u"><span>u</span></a></li>
<li><a href="functions_func_w.html#index_w"><span>w</span></a></li>
<li><a href="functions_func_~.html#index_~"><span>~</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="contents">
 
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
<li>MakeExternal()
: <a class="el" href="classv8_1_1_string.html#a6419e6b87e73bf03e326dd862fdca495">v8::String</a>
</li>
<li>MakeWeak()
: <a class="el" href="classv8_1_1_persistent.html#ab04609812113450bece2640ad0b27658">v8::Persistent< T ></a>
</li>
<li>MarkAsUndetectable()
: <a class="el" href="classv8_1_1_object_template.html#a7e40ef313b44c2ad336c73051523b4f8">v8::ObjectTemplate</a>
</li>
<li>MarkIndependent()
: <a class="el" href="classv8_1_1_persistent.html#a2c3bc812813279b80326c8a52164a2b4">v8::Persistent< T ></a>
</li>
<li>Message()
: <a class="el" href="classv8_1_1_try_catch.html#a2811e500fbb906ee505895a3d94fc66f">v8::TryCatch</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 11 2015 23:47:17 for V8 API Reference Guide for node.js v0.5.2 - v0.5.3 by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
| v8-dox/v8-dox.github.io | fea524e/html/functions_func_m.html | HTML | mit | 6,729 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
1060,
11039,
19968,
1015,
1012,
1014,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import models
from odoo.tests.common import SavepointCase
class BaseKanbanAbstractTester(models.TransientModel):
_name = 'base.kanban.abstract.tester'
_inherit = 'base.kanban.abstract'
class TestBaseKanbanAbstract(SavepointCase):
@classmethod
def _init_test_model(cls, model_cls):
""" It builds a model from model_cls in order to test abstract models.
Note that this does not actually create a table in the database, so
there may be some unidentified edge cases.
Args:
model_cls (openerp.models.BaseModel): Class of model to initialize
Returns:
model_cls: Instance
"""
registry = cls.env.registry
cr = cls.env.cr
inst = model_cls._build_model(registry, cr)
model = cls.env[model_cls._name].with_context(todo=[])
model._prepare_setup()
model._setup_base(partial=False)
model._setup_fields(partial=False)
model._setup_complete()
model._auto_init()
model.init()
model._auto_end()
cls.test_model_record = cls.env['ir.model'].search([
('name', '=', model._name),
])
return inst
@classmethod
def setUpClass(cls):
super(TestBaseKanbanAbstract, cls).setUpClass()
cls.env.registry.enter_test_mode()
cls._init_test_model(BaseKanbanAbstractTester)
cls.test_model = cls.env[BaseKanbanAbstractTester._name]
@classmethod
def tearDownClass(cls):
cls.env.registry.leave_test_mode()
super(TestBaseKanbanAbstract, cls).tearDownClass()
def setUp(self):
super(TestBaseKanbanAbstract, self).setUp()
test_stage_1 = self.env['base.kanban.stage'].create({
'name': 'Test Stage 1',
'res_model_id': self.test_model_record.id,
})
test_stage_2 = self.env['base.kanban.stage'].create({
'name': 'Test Stage 2',
'res_model_id': self.test_model_record.id,
'fold': True,
})
self.id_1 = test_stage_1.id
self.id_2 = test_stage_2.id
def test_read_group_stage_ids(self):
"""It should return the correct recordset. """
self.assertEqual(
self.test_model._read_group_stage_ids(
self.env['base.kanban.stage'], [], 'id',
),
self.env['base.kanban.stage'].search([], order='id'),
)
def test_default_stage_id(self):
""" It should return an empty RecordSet """
self.assertEqual(
self.env['base.kanban.abstract']._default_stage_id(),
self.env['base.kanban.stage']
)
| thinkopensolutions/server-tools | base_kanban_stage/tests/test_base_kanban_abstract.py | Python | agpl-3.0 | 2,793 | [
30522,
1001,
1011,
1008,
1011,
16861,
1024,
21183,
2546,
1011,
1022,
1011,
1008,
1011,
1001,
9385,
2355,
5869,
20470,
2015,
4297,
1012,
1001,
6105,
1048,
21600,
2140,
1011,
1017,
1012,
1014,
2030,
2101,
1006,
8299,
1024,
1013,
1013,
7479,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<html>
This page triggers two file downloads.
<script>
var count = 0;
function triggerDownload() {
var a = document.createElement('a');
a.download = "test-image" + count + ".png";
count++;
a.href = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABC0lEQVQYlTXPPUsCYQDA8b/e04tdQR5ZBpE3NAR6S0SDVDZKDQ2BY9TUy1foE0TQ1Edo6hOEkyUG0QuBRtQgl0hnenVdnZD5eLbU7xv8Avy5X16KhrQBg47EtpziXO6qBhAEeNEm0qr7VdBcLxt2mlnNbhVu0NMAgdj1wvjOoX2xdSt0L7MGgx2GGid8yLrJvJMUkbKfOF8N68bUIqcz2wQR7GUcYvJIr1dFQijvkh89xGV6BPPMwvMF/nQXJMgWiM+KLPX2tc0HNa/HUxDv2owpx7xV+023Hiwpdt7yhmcjj9/NdrIhn8LrPVmotctWVd01Nt27wH9T3YhHU5O+sT/6SuVZKa4cNGoAv/ZMas7pC/KaAAAAAElFTkSuQmCC";
a.click();
}
triggerDownload();
triggerDownload();
</script>
</html> | nwjs/chromium.src | content/test/data/android/auto_downloads_permissions.html | HTML | bsd-3-clause | 749 | [
30522,
1026,
16129,
1028,
2023,
3931,
27099,
2048,
5371,
22956,
1012,
1026,
5896,
1028,
13075,
4175,
1027,
1014,
1025,
3853,
9495,
7698,
11066,
1006,
1007,
1063,
13075,
1037,
1027,
6254,
1012,
3443,
12260,
3672,
1006,
1005,
1037,
1005,
1007... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Modern effects for a modern Streamer
* Copyright (C) 2017 Michael Fabian Dirks
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "gs-indexbuffer.hpp"
#include <stdexcept>
#include "gs-limits.hpp"
#include "obs/gs/gs-helper.hpp"
streamfx::obs::gs::index_buffer::index_buffer(uint32_t maximumVertices)
{
this->reserve(maximumVertices);
auto gctx = streamfx::obs::gs::context();
_index_buffer = gs_indexbuffer_create(gs_index_type::GS_UNSIGNED_LONG, this->data(), maximumVertices, GS_DYNAMIC);
}
streamfx::obs::gs::index_buffer::index_buffer() : index_buffer(MAXIMUM_VERTICES) {}
streamfx::obs::gs::index_buffer::index_buffer(index_buffer& other) : index_buffer(static_cast<uint32_t>(other.size()))
{
std::copy(other.begin(), other.end(), this->end());
}
streamfx::obs::gs::index_buffer::index_buffer(std::vector<uint32_t>& other)
: index_buffer(static_cast<uint32_t>(other.size()))
{
std::copy(other.begin(), other.end(), this->end());
}
streamfx::obs::gs::index_buffer::~index_buffer()
{
auto gctx = streamfx::obs::gs::context();
gs_indexbuffer_destroy(_index_buffer);
}
gs_indexbuffer_t* streamfx::obs::gs::index_buffer::get()
{
return get(true);
}
gs_indexbuffer_t* streamfx::obs::gs::index_buffer::get(bool refreshGPU)
{
if (refreshGPU) {
auto gctx = streamfx::obs::gs::context();
gs_indexbuffer_flush(_index_buffer);
}
return _index_buffer;
}
| Xaymar/obs-stream-effects | source/obs/gs/gs-indexbuffer.cpp | C++ | gpl-2.0 | 2,065 | [
30522,
1013,
1008,
1008,
2715,
3896,
2005,
1037,
2715,
5460,
2121,
1008,
9385,
1006,
1039,
1007,
2418,
2745,
21174,
17594,
2015,
1008,
1008,
2023,
2565,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* $Id: WrapperClassBean.java 799110 2009-07-29 22:44:26Z musachy $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.json;
import java.util.List;
import java.util.Map;
public class WrapperClassBean {
private String stringField;
private Integer intField;
private int nullIntField;
private Boolean booleanField;
private boolean primitiveBooleanField1;
private boolean primitiveBooleanField2;
private boolean primitiveBooleanField3;
private Character charField;
private Long longField;
private Float floatField;
private Double doubleField;
private Object objectField;
private Byte byteField;
private List<SimpleValue> listField;
private List<Map<String, Long>> listMapField;
private Map<String, List<Long>> mapListField;
private Map<String, Long>[] arrayMapField;
public List<SimpleValue> getListField() {
return listField;
}
public void setListField(List<SimpleValue> listField) {
this.listField = listField;
}
public List<Map<String, Long>> getListMapField() {
return listMapField;
}
public void setListMapField(List<Map<String, Long>> listMapField) {
this.listMapField = listMapField;
}
public Map<String, List<Long>> getMapListField() {
return mapListField;
}
public void setMapListField(Map<String, List<Long>> mapListField) {
this.mapListField = mapListField;
}
public Map<String, Long>[] getArrayMapField() {
return arrayMapField;
}
public void setArrayMapField(Map<String, Long>[] arrayMapField) {
this.arrayMapField = arrayMapField;
}
public Boolean getBooleanField() {
return booleanField;
}
public void setBooleanField(Boolean booleanField) {
this.booleanField = booleanField;
}
public boolean isPrimitiveBooleanField1() {
return primitiveBooleanField1;
}
public void setPrimitiveBooleanField1(boolean primitiveBooleanField1) {
this.primitiveBooleanField1 = primitiveBooleanField1;
}
public boolean isPrimitiveBooleanField2() {
return primitiveBooleanField2;
}
public void setPrimitiveBooleanField2(boolean primitiveBooleanField2) {
this.primitiveBooleanField2 = primitiveBooleanField2;
}
public boolean isPrimitiveBooleanField3() {
return primitiveBooleanField3;
}
public void setPrimitiveBooleanField3(boolean primitiveBooleanField3) {
this.primitiveBooleanField3 = primitiveBooleanField3;
}
public Byte getByteField() {
return byteField;
}
public void setByteField(Byte byteField) {
this.byteField = byteField;
}
public Character getCharField() {
return charField;
}
public void setCharField(Character charField) {
this.charField = charField;
}
public Double getDoubleField() {
return doubleField;
}
public void setDoubleField(Double doubleField) {
this.doubleField = doubleField;
}
public Float getFloatField() {
return floatField;
}
public void setFloatField(Float floatField) {
this.floatField = floatField;
}
public Integer getIntField() {
return intField;
}
public void setIntField(Integer intField) {
this.intField = intField;
}
public int getNullIntField() {
return nullIntField;
}
public void setNullIntField(int nullIntField) {
this.nullIntField = nullIntField;
}
public Long getLongField() {
return longField;
}
public void setLongField(Long longField) {
this.longField = longField;
}
public Object getObjectField() {
return objectField;
}
public void setObjectField(Object objectField) {
this.objectField = objectField;
}
public String getStringField() {
return stringField;
}
public void setStringField(String stringField) {
this.stringField = stringField;
}
}
| WillJiang/WillJiang | src/plugins/json/src/test/java/org/apache/struts2/json/WrapperClassBean.java | Java | apache-2.0 | 4,821 | [
30522,
1013,
1008,
1008,
1002,
8909,
1024,
10236,
4842,
26266,
4783,
2319,
1012,
9262,
6535,
2683,
14526,
2692,
2268,
1011,
5718,
1011,
2756,
2570,
1024,
4008,
1024,
2656,
2480,
23154,
11714,
1002,
1008,
1008,
7000,
2000,
1996,
15895,
4007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* Copyright 2011 Bas de Nooijer. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this listof conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of the copyright holder.
*/
class Solarium_Result_Select_FacetSetTest extends PHPUnit_Framework_TestCase
{
/**
* @var Solarium_Result_Select_FacetSet
*/
protected $_result;
protected $_facets;
public function setUp()
{
$this->_facets = array(
'facet1' => 'content1',
'facet2' => 'content2',
);
$this->_result = new Solarium_Result_Select_FacetSet($this->_facets);
}
public function testGetFacets()
{
$this->assertEquals($this->_facets, $this->_result->getFacets());
}
public function testGetFacet()
{
$this->assertEquals(
$this->_facets['facet2'],
$this->_result->getFacet('facet2')
);
}
public function testGetInvalidFacet()
{
$this->assertEquals(
null,
$this->_result->getFacet('invalid')
);
}
public function testIterator()
{
$items = array();
foreach($this->_result AS $key => $item)
{
$items[$key] = $item;
}
$this->assertEquals($this->_facets, $items);
}
public function testCount()
{
$this->assertEquals(count($this->_facets), count($this->_result));
}
}
| bitclaw/solr-test | www/vendor/solarium/solarium/tests/Solarium/Result/Select/FacetSetTest.php | PHP | mit | 2,846 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
9385,
2249,
19021,
2139,
2053,
10448,
20009,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
1008,
14080,
1010,
2024,
7936... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.humbertdany.tpproject.test;
import com.humbertdany.tpproject.util.binarystack.v1.BinaryStack;
import com.humbertdany.tpproject.util.binarystack.v1.Node;
import com.humbertdany.tpproject.util.binarystack.v2.TasBinaire;
import com.humbertdany.tpproject.util.factory.ArrayFactory;
import java.util.Arrays;
/**
*
* @author dhumbert
*/
public class TestBinaryStack extends ATest {
public TestBinaryStack(){
}
final private ArrayFactory<Ni> nArrayFactory = new ArrayFactory<Ni>() {
@Override
public Ni[] buildArray(int dimension) {
return new Ni[dimension];
}
};
final public void launch(){
// Test v1
final Ni root = new Ni(1);
final Ni n1 = new Ni(50);
final Ni n2 = new Ni(4);
final Ni n3 = new Ni(2);
final Ni n4 = new Ni(5);
final BinaryStack<Ni> l1 = new BinaryStack<>(nArrayFactory, root);
l1.add(root, n1, BinaryStack.ORIENTATION_LEFT);
l1.add(root, n2, BinaryStack.ORIENTATION_RIGHT);
l1.add(n2, n3, BinaryStack.ORIENTATION_LEFT);
l1.add(n2, n4, BinaryStack.ORIENTATION_RIGHT);
log(l1.contains(new Ni(50)));
log(l1.contains(new Ni(4)));
log(l1.contains(new Ni(55)));
l1.printInOrder();
l1.printPostOrder();
// Test v2
final TasBinaire<N> h = new TasBinaire<>(new ArrayFactory<N>() {
@Override
public N[] buildArray(int dimension) {
return new N[dimension];
}
});
h.insertAll(new N("p"), new N("r"), new N("i"), new N("a"), new N("o"));
h.insert(new N("r"));
log("Binary Stack stocked : \n " + h);
h.deleteMin();
log("Binary Stack state after deletion of min : \n " + h);
final Ni[] a = {new Ni(4), new Ni(7), new Ni(7), new Ni(7), new Ni(5), new Ni(0), new Ni(2), new Ni(3), new Ni(5), new Ni(1)};
log("Array given to sort \n " + descArray(a));
TasBinaire<Ni> tmp = new TasBinaire<>(new ArrayFactory<Ni>() {
@Override
public Ni[] buildArray(int dimension) {
return new Ni[dimension];
}
});
tmp.heapSort(a);
log("The last array sorted : \n " + descArray(a));
}
private class N extends Node<String> {
N(final String n){
super(n);
}
}
private class Ni extends Node<Integer> {
Ni(final Integer n){
super(n);
}
}
private String descArray(final Ni[] array){
return Arrays.toString(array);
}
}
| Humbertda/TP-AG51 | src/test/java/com/humbertdany/tpproject/test/TestBinaryStack.java | Java | gpl-3.0 | 2,351 | [
30522,
7427,
4012,
1012,
14910,
8296,
7847,
2100,
1012,
1056,
9397,
3217,
20614,
1012,
3231,
1025,
12324,
4012,
1012,
14910,
8296,
7847,
2100,
1012,
1056,
9397,
3217,
20614,
1012,
21183,
4014,
1012,
12441,
9153,
3600,
1012,
1058,
2487,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
from distutils.core import setup
import py2exe
import os, sys
from glob import glob
import PyQt5
data_files=[('',['C:/Python34/DLLs/sqlite3.dll','C:/Python34/Lib/site-packages/PyQt5/icuuc53.dll','C:/Python34/Lib/site-packages/PyQt5/icudt53.dll','C:/Python34/Lib/site-packages/PyQt5/icuin53.dll','C:/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll','C:/Python34/Lib/site-packages/PyQt5/Qt5Core.dll','C:/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll']),
('data',['data/configure','data/model.sqlite','data/loading.jpg']),
('platforms',['C:/Python34/Lib/site-packages/PyQt5/plugins/platforms/qminimal.dll','C:/Python34/Lib/site-packages/PyQt5/plugins/platforms/qoffscreen.dll','C:/Python34/Lib/site-packages/PyQt5/plugins/platforms/qwindows.dll'])
]
qt_platform_plugins = [("platforms", glob(PyQt5.__path__[0] + r'\plugins\platforms\*.*'))]
data_files.extend(qt_platform_plugins)
msvc_dlls = [('.', glob(r'''C:/Windows/System32/msvc?100.dll'''))]
data_files.extend(msvc_dlls)
setup(
windows = ["ChemDB.py"],
zipfile = None,
data_files = data_files,
options = {
'py2exe': {
'includes' : ['sip','PyQt5.QtCore','PyQt5.QtGui',"sqlite3",'xlrd','xlwt',"_sqlite3","PyQt5"],
}
},
) | dedichan/ChemDB | setup_win.py | Python | gpl-3.0 | 1,223 | [
30522,
2013,
4487,
3367,
21823,
4877,
1012,
4563,
12324,
16437,
12324,
1052,
2100,
2475,
10288,
2063,
12324,
9808,
1010,
25353,
2015,
2013,
1043,
4135,
2497,
12324,
1043,
4135,
2497,
12324,
1052,
2100,
4160,
2102,
2629,
2951,
1035,
6764,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package io.github.trulyfree.modular6.test.action.impl;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import io.github.trulyfree.modular6.action.Action;
import io.github.trulyfree.modular6.action.ActionGroup;
/* Modular6 library by TrulyFree: A general-use module-building library.
* Copyright (C) 2016 VTCAKAVSMoACE
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class SimpleActionGroup<T extends Action> implements ActionGroup<T> {
private List<T> actions;
private int current;
public SimpleActionGroup(List<T> actions) {
this.actions = actions;
current = 0;
}
@Override
public boolean enactNextAction() {
return actions.get(next()).enact();
}
@Override
public int size() {
return actions.size();
}
@Override
public Collection<T> getActions() {
Collection<T> actions = new ArrayList<T>(size());
for (T action : this.actions) {
actions.add(action);
}
return actions;
}
private int next() {
final int intermediary = current;
current++;
current %= this.size();
return intermediary;
}
@Override
public void enactAllOfType(Class<? extends T> type) {
for (T action : getActions()) {
if (type.isInstance(action)) {
action.enact();
}
}
}
@Override
public void enactAll() {
for (T action : getActions()) {
action.enact();
}
}
}
| TrulyFree/Modular6 | src/test/java/io/github/trulyfree/modular6/test/action/impl/SimpleActionGroup.java | Java | gpl-3.0 | 1,957 | [
30522,
7427,
22834,
1012,
21025,
2705,
12083,
1012,
5621,
23301,
1012,
19160,
2575,
1012,
3231,
1012,
2895,
1012,
17727,
2140,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
9140,
9863,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3074,
1025,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* The template for displaying Category Archive pages.
*
*/
$blog_layout = etheme_get_option('blog_layout');
$blog_sidebar = etheme_get_option('blog_sidebar');
$blog_sidebar_responsive = etheme_get_option('blog_sidebar_responsive');
get_header(); ?>
<div class="container">
<div class="row">
<?php blog_breadcrumbs(); ?>
<?php if($blog_sidebar_responsive == 'top'): ?>
<div class="span3 sidebar_grid sidebar_<?php echo $blog_sidebar ?>">
<?php get_sidebar(); ?>
</div>
<?php endif; ?>
<div class="<?php echo ($blog_sidebar)? 'span9':'span12'; ?> grid_content with-sidebar-<?php echo $blog_sidebar ?>">
<?php
/* Run the loop for the category page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-category.php and that will be used instead.
*/
get_template_part( 'loop', 'category' );
?>
</div><!-- #content -->
<?php if($blog_sidebar_responsive == 'bottom'): ?>
<div class="span3 sidebar_grid sidebar_<?php echo $blog_sidebar ?>">
<?php get_sidebar(); ?>
</div>
<?php endif; ?>
<div class="clear"></div>
</div>
</div><!-- .container -->
<?php get_footer(); ?>
| arsood/Solemade | wp-content/themes/idstore/category.php | PHP | gpl-2.0 | 1,458 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
1996,
23561,
2005,
14962,
4696,
8756,
5530,
1012,
1008,
1008,
1013,
1002,
9927,
1035,
9621,
1027,
3802,
29122,
2063,
1035,
2131,
1035,
5724,
1006,
1005,
9927,
1035,
9621,
1005,
1007,
1025,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
* Copyright (C) 2004-2011 Jive Software. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.spark.component;
import org.jivesoftware.Spark;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JButton;
import java.awt.Insets;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
* Button UI for handling of rollover buttons.
*
* @author Derek DeMoro
*/
public class RolloverButton extends JButton {
private static final long serialVersionUID = 6351541211385798436L;
/**
* Create a new RolloverButton.
*/
public RolloverButton() {
decorate();
}
public RolloverButton(String text) {
super(text);
decorate();
}
public RolloverButton(Action action) {
super(action);
decorate();
}
/**
* Create a new RolloverButton.
*
* @param icon the icon to use on the button.
*/
public RolloverButton(Icon icon) {
super(icon);
decorate();
}
/**
* Create a new RolloverButton.
*
* @param text the button text.
* @param icon the button icon.
*/
public RolloverButton(String text, Icon icon) {
super(text, icon);
decorate();
}
/**
* Decorates the button with the approriate UI configurations.
*/
protected void decorate() {
setBorderPainted(false);
setOpaque(true);
setContentAreaFilled(false);
setMargin(new Insets(1, 1, 1, 1));
addMouseListener(new MouseAdapter() {
public void mouseEntered(MouseEvent e) {
if (isEnabled()) {
setBorderPainted(true);
// Handle background border on mac.
if (!Spark.isMac()) {
setContentAreaFilled(true);
}
}
}
public void mouseExited(MouseEvent e) {
setBorderPainted(false);
setContentAreaFilled(false);
}
});
}
} | vipinraj/Spark | core/src/main/java/org/jivesoftware/spark/component/RolloverButton.java | Java | apache-2.0 | 2,619 | [
30522,
1013,
1008,
1008,
1008,
9385,
1006,
1039,
1007,
2432,
1011,
2249,
10147,
3726,
4007,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.